Heat Supply Optimization Based On Machine Learning And Knowledge Graph

At present, heating companies mostly use a set-point temperature control curve. The operator adjusts the temperature control curve according to watching the outdoor weather conditions, which usually results in economic conditions. Given the above condition, we analyze the heating system’s mechanism first, then compile and analyze much historical data. According to the analysis results, we establish the heat exchange station-user room temperature joint model based on the machine learning method. Using the above model, the system is deeply explored, and the optimized secondary heating curve is designed and simulated. The results show that the user’s room temperature stability has an obvious control effect, which is of great significance to meet the room temperature compliance rate. At the same time, the knowledge graph of the heating field and some applications based on the knowledge graph are also built to provide more convenient and friendly operating advice for operators.


Introduction
Heating load forecasting plays an essential role in the reasonable dispatch of resources and performance optimization [1] [2]. Literature [3] propagates the input uncertainties of the degree-day method to estimate the building heating energy consumption as numerical intervals. Literature [4] introduces the genetic algorithm to optimize the weights of the neural network and designs a neural network heating load forecasting model. Literature [5] introduces a flexible algorithm based on Fuzzy Logic (FL) and artificial neural network (ANN) to cope with optimum heating load forecasting in noisy environments. Arvastson et al. [6] proposed a heat load prediction model based on the outdoor temperature in which the physical and stochastic characteristics of the central heating system are fully considered. In-ho Yang [7] roughly calculates the start-up time of the central heating system through the artificial neural network ANN, improves the speed of the system, and improves the energy efficiency of the system. Byung Chang swag and Moncef Krarti [8] introduced the application of the thermo-active Foundation (TAF) system in residential buildings. Compared with the conventional ground-source heat pump system (GSHPs), the effect of the TAF system in providing heating and cooling for multifamily houses is evaluated. Bing Dong et al. [9] propose a new algorithm, which supports vector machine to predict building energy consumption. Wei Zhong, Jiaying Chen, et al. [10] discuss the operational enhancement of urban central heating systems from the perspective of network segmentation, which improves the load distribution among heat sources and reduces operating costs.  [11] establish a theoretical model of distributed variable-frequency speed pumps district heating system based on cost-oriented indicators, and determine the optimal energy station location in the DVFSP system. Hanmin Caia et al. [12] develop a distributed demand response method based on exchange ADMM, which relieves network congestion and helps reduce the use of primary energy. Qiang Zhang, Zhe Tian, et al. [13] propose the demand-side method, which predicts the heating load of terminal buildings considering the influence of indoor temperature. Ehsan Kamel and et al. [14] select the most impactful inputs to choose the type and quantity of sensors for deployment that improve the data-driven models' accuracy and minimize the costs. Valery A and et al. [15] present a methodological approach to determining optimal parameters of district heating systems with several heat sources. The approach employed a modified dynamic programming optimization method that provided an optimal solution without decomposition into the heat source service areas.
Many methods use deep neural networks for heating optimization, but it isn't easy to ensure its safety due to its black box characteristics in actual industrial scenarios. We combine the prior knowledge with the machine learning algorithm, which can meet the safety and availability and achieve the purpose of optimization.
Simultaneously, we also established the knowledge graph of the heating system and applications based on the knowledge graph. In this way, this system provided great help in locating the problems reported by users quickly.
The concept of Knowledge Graph was formally proposed by Google in 2012 [16], which is to reveal the relationship between entities Semantic networks. The Knowledge Graph can be divided into two categories, including the general domain and vertical domain, which has many applications in different fields, such as Facebook [17], Baidu [18], Tecent [19], CN-DBpedia [20]. The main domains include: biology [21,22], financial [23,24], social meida [25,26], academic paper [27], tourism [28,29], life science [30],while there isn't any single application found in Heating industry. In this paper, a method of knowledge graph applied is proposed in the heating field and has great help to field operators.
Based on mechanism analysis and considering the influence of weather conditions on heating, this paper establishes a joint model of heating system based on multi-mode and multi-working condition methods and a large amount of historical data. By using the above model, the system was further explored, an optimized secondary temperature supply curve was specifically designed, and the simulation experiment was carried out. The results showed that an obvious control effect was obtained for users' room temperature stability, which is of great significance for meeting room temperature reaching the standard rate. Figure 1 shows the whole heating system, including heat sources, heat exchange stations, pipe networks, and users. The parameter most directly related to user experience is indoor temperature. However, the current situation is that the setting of the secondary temperature supply curve in the heating system is not reasonable, which is not refined and intelligently adjusted, so the room temperature fluctuates wildly. Therefore, this article establishes a heating model based on the above reasons to explore how to make the room temperature stable and comfortable.  backwater pipeline refers to the pipelines from the user back to the heat exchange station. The heat transfer principle of the water supply pipeline is the same as that of the return pipeline, so we use the water supply pipeline to establish the pipeline heat transfer model.

System model
The inlet temperature of the indoor heat exchanger T 2L is affected by the inlet temperature of heat exchanger pipe T 2 , the outdoor temperature T 0 , and the heating pipe system parameters a, A, and C of heat exchanger station. The water supply pipeline model is shown in figure 2. Figure 2 Water supply pipeline heating system model Considering the calculation performance and accuracy of the model, the heat exchange process of the heat station heating line system is moderately simplified, and the heat loss of the water pipe is assumed to be determined by the average temperature and the difference of the temperature of the line. So, for the heat exchange process of the water supply pipeline from the heat exchange station to the indoor heat exchanger, the energy balance steady-state equation is presented as follows: According to the definition of heat loss Q_2, it can be calculated as follows according to the difference between the inlet temperature and outlet temperature of the heating pipe in the heat exchange station: T2 is the outlet temperature of the water supply from the heat exchange station, and T2L is the inlet temperature of the indoor heat exchanger. Due to heat loss, T2 is always greater than T2L. According to Equations (1) and (2), the inlet temperature of the indoor heat exchanger T2L can be calculated as follows:

Water supply pipeline heating system model
The user's room temperature model is shown in figure 3, and the energy equilibrium steady-state equation is listed as follows: According to Equation (4), the outlet temperature of indoor heat exchanger T_3H can be calculated as follows:

Joint model
The water supply pipeline model, the backwater pipeline model, and the user room temperature model are established and combined in figure 4. According to the law of conservation of heat, we have the following equations: Figure 4 System model of heat exchange station According to Equation (6), the indoor temperature T1 can be calculated as follows: By substituting and arranging equations (3) and (5), we finally get the following relation:

Influence of weather conditions on the heating system
At present, there are many ways to analyze the influence of meteorological factors on central heating systems. For example, Werner [31] tested several district heating systems in Sweden and analyzed the main factors affecting heat load: outdoor temperature, natural wind, and solar radiation. The research results show that 60% of the total heat load of the heating network can be considered to be affected by outdoor temperature. The influence of natural wind will increase the heat load by 1%-4%, and solar radiation heat can reduce the heat load by 1%-5%. Krzysztof et al. [32]used other meteorological parameters to correct the outdoor temperature. They studied the influence of solar radiation and wind speed on building load and heating energy consumption in Warsaw, Poland. He analyzed the principles of solar radiation and wind's influence on building load and heating energy consumption and found that the influence of solar radiation was greater than that of wind through the correction analysis of solar radiation and wind speed on the outdoor temperature. The influence of solar radiation can vary greatly in a day. In general, solar radiation can reduce energy consumption by 5%-8%. When the wind speed is below 2m/s, it basically has no effect on the building load. When the wind speed is in the range of 5-10m/s, every increase of 1m/s in the wind speed is equivalent to a decrease in outdoor temperature by 3-4°C. However, there is no unified conclusion in the industry at present, which is summarized for the following reasons: • There are deviations in the testing methods of each country; • Each meteorological factor depends on each other and has a serious coupling relationship. For example, wind speed and relative humidity are an interdependent impact on the heat load, rather than a simple superposition of a single effect; • There are both linear and nonlinear relationships between the meteorological factors and the heat load. The nonlinear relation described by linear mathematical expression can not reflect the changing trend of heat load properly. Based on a large amount of heating data, this paper conducts a systematic analysis of a heating system and explores the influence of weather conditions on the heating system.

Influence of radiation on the heating system
Based on the analysis of a large amount of historical data of a heating company, this paper adopts the control variable method to decouple the influence of wind and radiant energy on the heating system and analyzes the influence of light on heating.
The difference between the indoor temperature and the outdoor temperature is regarded as the amount of heating from the indoor to the outdoor, we take it as Q1, and the difference between the secondary heating temperature and the outdoor temperature is regarded as the indoor heat absorption, we take it as Q2. It can be seen that there is a linear relationship between the two, which means that the room temperature is in a certain stable state. In order to explore the impact of light intensity on the heating system, the date of October 16th and October 24yh are taken respectively as examples. The wind conditions were similar on these two days, and the illumination time of October 24th was significantly longer than that of October 16th. It can be found that the data of October 24th was in the lower right direction of October 16th. It indicates that the longer the illumination time is, the higher the indoor temperature will be. Therefore, the illumination time can be equivalent to the outdoor temperature. The shorter the illumination time, the lower the equivalent outdoor temperature, and the longer the illumination time, which means the higher the equivalent outdoor temperature.

Influence of wind on the heating system
Based on the analysis of a large amount of historical data of a heating company, this paper adopts the control variable method to decouple the influence of wind and radiant energy on the heating system and analyzes the influence of light on heating.
The difference between the indoor temperature and the outdoor temperature is regarded as the amount of heating from the indoor to the outdoor, we take it as Q1, and the difference between the secondary heating temperature and the outdoor temperature is regarded as the indoor heat absorption, we take it as Q2. It can be seen that there is a linear relationship between the two, which means that the room temperature is in a certain stable state. In order to explore the influence of light intensity on the heating system, the data of November 19th and November 23th were taken, respectively. The duration of illumination on these two days was similar. However, the wind speed of No.19 is significantly higher than that of No.24. It can be found that the data of October 23th was in the lower right direction of October 19th. It indicates that the stronger the wind, the lower the indoor temperature will be. Therefore, the wind force can be equivalent to the outdoor temperature. Figure 6 shows that three levels of wind equal the change of 0.6 C o of outdoor temperature. Through a large number of experiments, we can get the equivalent outdoor temperature corresponding to different wind speeds under similar lighting conditions. Figure 6. Influence of wind on the heating system

Simulation and Optimization
According to the study of the system model and weather conditions on the heating system, the steadystate heating model is obtained. According to the comparison between the peak-to-peak values of the water supply temperature and the return water temperature, it can be concluded that the dynamic state of the secondary pipe network is mainly delayed. Combining several working conditions, the mean pure delay time is 2500 seconds. Through the check, the pure delay time of the wall is 7800 seconds.
Considering that the specific heat capacity of constant pressure changes nonlinearly with the water temperature in the heat exchange process, the small-deviation linearization modeling is carried out by using the small-deviation linear method of multi-working conditions. Comprehensively considering the influence of model dynamics and weather conditions on heat supply, it is shown in figure 7 that the model is established accurately.   8 We have obtained the model of the heating system, which is essentially a multivariate linear regression model with multiple working conditions. The indoor temperature T1 is affected by the outdoor temperature T0, the outlet temperature of the water supply in heat exchange station T2, the wind intensity wi, and the illumination intensity Qs. It can be expressed by the following formula: b * wi * * * 4 3 2 2 0 1 1 Among the features, the invariable variables are T0, wi and Qs. T2 is artificially adjusted. Therefore, the temperature of the water supply can be controlled to keep the indoor temperature at 18 °C, which is the prescribed temperature by the company.
According to the established dynamic model, we set the indoor temperature at 18°C. According to the model, the indoor temperature changes within 1°C. It is shown clearly in figure 8 that the fluctuation is significantly reduced compared with the original room temperature.

Construction and Application of Heating Knowledge Graphs
In this section, we focus on constructing the knowledge graph of the heating field, and according to the constructed knowledge graph, KBQA of the heating field is applied.

Ontology construction
With the help of professionals in the field of industrial manufacturing, this paper focuses on enterprise managers and front-line producers' requirements analysis.
According to the actual situation, the residents' information and the heating situation are constructed as the ontology of the heating knowledge graph. The residents' information includes the name of the community, the building's name, temperature probe sequence number, temperature measuring position, and room temperature. The heating situation includes the temperature of water supply, the temperature of outdoor, wind scale, radiation condition, secondary return water pressure, the secondary water supply temperature, coal consumption, and boiler water supply temperature.

Knowledge Extraction
In general, there are mainly three types of data sources, i.e., structured data, semi-structured data, and unstructured data. Most of the Chinese knowledge graphs, including CN-DBpedia, Zhishi. me, etc., extract knowledge from structured or semi-structured data. While in the industrial community, especially the heating industry, structured data with a strict data model is the main component, and we construct the heating knowledge graph from the structured data. The number of entities is 8,500, and the number of relationships is 23.

Knowledge Storage and Update
Faced with frequent schema changes, managing the explosive growth of data volume, real-time query response times, and smarter data activation requirements, we took the neo4j graph database as the database.
Since the knowledge in the knowledge graph may change (such as the change of weather and the change of room temperature), it is necessary to update the knowledge in the knowledge graph in time after the knowledge graph is constructed. However, in the knowledge graph, change the properties of the cycle of change is not completely the same, such as the change of age period is one year, the change in the weather cycle for a day. Therefore, when large amounts of knowledge graph data, the method of full amount regularly updating will not only update a lot but don't need to update the attribute values and consume a large amount of time and resources, and has taken a different update cycle to update the knowledge graph.

Knowledge Application
Heating knowledge graphs can provide high-quality structured background knowledge.KBQA is one of the most important applications. In practice, there are situations like this: Residents report heating problems to the heating company, such as the low temperature, which is reflected in the on-site staff. Some on-site staff is unable to make complex inquiries and analyses. According to the KBQA system, field operators can use natural language to locate users' information quickly and then analyze problems. For example, some buildings in the boundary layer or pipeline disrepair, and for other reasons, the room temperature in some homes is not up to standard. While the new operator will not be an expert in the database but can be preliminary using natural language and his experience to solve the problem: For example, according to KBQA, he can get the location of the household, the location of the thermometer, the length of the pipe in the building and other information to help make necessary judgments.
In the task of the KBQA system, there are two tasks to perform, and they are entity recognition and attribute matching. Among them, the purpose of the entity recognition step is to find the entity name asked in the question, while the purpose of the attribute matching step is to find the relative attribute asked in the question. The system is shown in figure 9.
We adopted the LPT of Harbin Institute of Technology as an open-source tool in the entity recognition stage and added the updated dictionary. In the attribute recognition stage, we adopt the framework MCCNNs model [33] approach as the baseline. This paper uses Chinese-BERT-wwm[34] to encode questions and attributes to obtain corresponding semantic vectors.
For the problem part, we use Bert[34] to encode the question , and extract features through three CNN networks. For the heating knowledge graph part, we adopt the encoding methods of MCCNNs [33] for the answer path, the answer context, and the answer type. We believe that questions and answers interact two modes of information, which are highly correlated. Therefore, we use Co-Attention [35] to exchange information. And then go through the fully connected layer and the softmax layer to obtain the most matching answers. Figure 9 Model overview of KBQA The proposed method obtains satisfactory results compared to the baseline. This method achieves the performance in KB F1 score and outperforms the baseline about 21.7% on the heating system test dataset. The number of pipes is 148 4 I forgot the name of the community of Zhao XX The name of the community is Fuxing 5 I forgot which company the supplier is of XX heat exchange station. The name of the supplier is Dalian xx

Conclusion
Most heating enterprises lack a deeper level of data analysis, which causes extensive management, energy waste, and a lower qualified room temperature rate. Based on a large amount of historical data on the heat exchange station, this paper combines the mechanism analysis, takes the influence of outdoor weather conditions into the model in an innovative method, and makes significant progress to the heating system. The optimization method of temperature supply proposed by the paper has been verified to stabilize the room temperature, make users comfortable, and save energy. At the same time, we establish the knowledge graph of the heating system, and there are few relevant articles about the knowledge graph of the heating system yet. Based on the knowledge graph, relevant applications are established, playing a significant role in heating systems.