## 3 System Architecture
This complete case content was divided into three parts: (1) Convert the time period into a semantic meaning; that is, let users understand the meaning of system processing; (2) acquire environmental information and use it to quickly classify or filter a relevant system case to be a solution; and (3) obtain knowledge answers. Figure 7: Framework of the proposed system. Case Retrieval was divided into two stages. Stage 1 was the semantic time period and location index. This study defined case retrieval as an action for conducting time-series analysis on the semantic meanings of the Chinese time period (also known as the Chinese sexagenary cycle) and then choosing the cases that meet the semantic time period and location as the candidate cases. This is also the biggest difference between this study and traditional information systems. With the support of semantic technology, the operating interface of this system automatically offers self-explanatory functions. For example, in Table 1, the contents of Start_DT (2010/10/1 12:00:00 AM) and End_DT (2010/10/1 02:00:00 AM) were converted into the semantic contents shown in Table 2 (DT_Seasons, DT_Months, DT_Days, DT_Weeks, DT_Sesions, and DT_Dizhi) based on the Chinese sexagenary cycle. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Start DT** & **End DT** & \begin{tabular}{c} **Area Type** \\ **Name** \\ \end{tabular} & \begin{tabular}{c} **Area Size** \\ **Name** \\ \end{tabular} & \
\begin{tabular}{c} **MAC Type** \\ **Name** \\ \end{tabular} &
\begin{tabular}{c} **Sensor Data** \\ \end{tabular} \\ \hline
2010/10/1 & 2010/10/1 & Computer & Large & \
\begin{tabular}{c} Humidity, \\ Temperature, \\ Illumination, \\ CO\({}_{2}\) \\ \end{tabular} &
\begin{tabular}{c} 54.000, \\ 18.000, \\ 463.000, \\ 921.000 \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Example-data content. Figure 8: Case generation concepts (T: Temperature, C: CO\({}_{2}\), and H: Humidity). Figure 9: Practice example of a case generation. Stage 2 was the process to retrieve the similar case. It was divided into two steps: (1) Directly compare the values of case; if the case was the same, then the similarity calculation was skipped and this candidate case was deemed a solution; and (2) if the case was not the same, then it entered into similarity calculation. This study adopted the most common Nearest-Neighbor Retrieval method for similarity calculation because this method was simple. As long as the similarity between cases can be analyzed, the purpose of retrieval can be achieved. The calculation of Equation (1) is:  
\[SR(P,C)=\sum\limits_{i=1}^{n}[f(P_{i},C_{i})], \tag{1}\]  
where \(P\) denotes the problem; \(C\) is the original case in the database; n is the number of attributes for each case; \(i\) is the order of the attribute (from 1 to \(n\)); \(f(P_{i},C_{i})\) is the problem and original case in the database belonging to the \(i\)th attribute; and \(SR(P,C)\) means the similarity between the problem and original case in the database (Similarity, SR). The Nearest-Neighbor Retrieval is quite simple and intuitive. The system compared the characteristic attributes of a new problem and the original cases in the case base, obtaining a complete case similarity value. The calculated similarity value was used as a basis for the priority of case usage. The equations for related distance conversion, normalized distance, and similarity are shown respectively as Equations (2)-(4). \[d_{i}(P,C)=\sum\limits_{i=1}^{n}\left|\frac{V(P_{i})-V(C_{i})}{V(C_{i})}\right|, \tag{2}\]  
The distance between the problems and the characteristic attribute of the cases in the case base is called \(d_{i}(P,C)\). Here, \(P\) denotes the problem; \(C\) is a specific case in the recommended solution; \(V(P_{i})\) is the value of characteristic attributes of the problems; and \(V(C_{i})\) is the value of characteristic attributes of the original cases in the case base. Equation (2) is an extremely traditional method of calculating distance functions.