Room temperature data processing method
By preprocessing the room temperature data and K-means clustering, different types of room temperature fluctuation modes are extracted, and the room temperature and the real-time feedback of the user is selected to the heating system. This solves the problem that it is difficult to reflect the user's room temperature fluctuation characteristics in the prior art. , achieving more accurate heat exchange station regulation and more full energy saving potential.
Patent Information
- Application Number
- CN202411427158.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to effectively reflect the fluctuations of the user's room temperature in room temperature data processing, resulting in the inability to accurately feed back to the heat exchange station under special circumstances, affecting the energy saving potential.
By obtaining historical room temperature data during the heating cycle for preprocessing and K-means clustering, different types of room temperature fluctuations are extracted, representative room temperature and representative users are selected to feed back to the heating system in real time, and monitor and adjust under abnormal conditions. .
It realizes an accurate reflection of the user's room temperature fluctuation mode, improves the accuracy and effectiveness of heat exchange station regulation, and fully utilizes the energy-saving potential of room temperature data.
Smart Images

Figure CN119441920A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a room temperature data processing method. Background Art
[0002] In the field of centralized heating, the application of advanced technologies such as the Internet of Things and big data is driving the intelligent upgrade of centralized heating systems. From the previous extensive regulation to the current stage of smart heating, the regulation of heat exchange stations has basically achieved automation and informatization. The core goal of smart heating is to ensure that the room temperature of most end users meets the standards. Therefore, to achieve true "smart heating, heating on demand", it is necessary to rely on room temperature data to feedback the operation and regulation of the heat exchange station. With the popularization of room temperature sensors, heating companies can obtain a large amount of terminal room temperature data and use this data to adjust the heat exchange station. However, despite the sufficient data, due to the lack of in-depth analysis and processing research on room temperature data, most heating companies are still limited to simply taking the average of a certain user based on past experience to feedback the operation and regulation of the heat exchange station. When special circumstances occur, the room temperature often changes suddenly. At this time, the typical user selected based on experience cannot well represent all room temperatures.
[0003] However, the existing room temperature data of a large number of users can only reflect the overall trend of the room temperature under the heat exchange station. For example, in the method for diagnosing and processing abnormal data of heating and cooling based on time and space in CN117235642A, the room temperature data of a single diagnosed user is preliminarily diagnosed and the preliminarily diagnosed abnormal data is deleted, the remaining data is recorded as the original data, and the original data is converted into the rate of change data. It is difficult for the operating personnel to grasp the different room temperature fluctuation patterns of users. The method of taking the average of the room temperature of typical users will submerge the fluctuation characteristics of the room temperature of users. It can only reflect the average level of the room temperature of a large number of users. It is precisely because different users will present different types of fluctuation patterns that the room temperature of typical users selected through past experience often feeds back the wrong user room temperature fluctuation situation to the heat exchange station. Therefore, different room temperature fluctuation patterns of users mean different energy-saving potentials. Only by feeding back the comprehensive room temperature fluctuation patterns and size levels to the heat exchange station can the energy-saving potential of room temperature data be fully utilized. Summary of the invention
[0004] In view of the deficiencies existing in the related art, the purpose of the present invention is to provide a room temperature data processing method to solve the limitation of the prior art that based on past experience, a simple way of taking the average of a certain user is used to feedback the operation and control of the heat exchange station. When special circumstances occur, the room temperature often changes suddenly. At this time, the typical user selected based on experience cannot represent all the room temperatures well. It is difficult for the operating personnel to grasp the room temperature fluctuation patterns of different users. The way of taking the average of the room temperature of typical users will submerge the fluctuation characteristics of the user's room temperature, which can only reflect the average level of the room temperature of a large number of users. It is precisely because different users will present different types of fluctuation patterns that the technical problem of the wrong user room temperature fluctuation situation is often fed back to the heat exchange station when the room temperature of the typical user selected based on past experience is used.
[0005] The present invention provides a room temperature data processing method, comprising the following steps:
[0006] S1. Obtain historical room temperature data within a heating cycle, preprocess the historical room temperature data, cluster the preprocessed historical room temperature data using a K-means clustering algorithm, adjust the K value of the K-means clustering algorithm using a preset evaluation index, and select the optimal K value according to the clustering results under different K values;
[0007] S2, obtaining the room temperature data of the first day in the heating cycle, generating a room temperature matrix of the first day after preprocessing the room temperature data of the first day, performing Z-standardization processing on the room temperature sequence of the first day in the room temperature matrix of the first day to obtain the fluctuation pattern corresponding to the room temperature sequence of the day, and clustering the room temperature matrix of the first day after Z-standardization processing according to the optimal K value by using the K-means clustering algorithm to extract the room temperature sequence of the day with K types of fluctuation patterns;
[0008] S3, selecting the first representative room temperature in each daily room temperature sequence, the user corresponding to the first representative room temperature is the first representative user, and the room temperature of the first representative user will be fed back to the heating system in real time for operation control;
[0009] S4. Continuously obtain the room temperature data of the second day following the room temperature data of the first day in the heating cycle on a daily basis, repeat steps S2 and S3 to select a second representative room temperature according to the room temperature data of the second day, and determine whether the user corresponding to the second representative room temperature is the same as the first representative user; if different, repeat step S3 again to select a third representative room temperature, and use the user corresponding to the third representative room temperature as the new representative user.
[0010] The embodiment of the present invention comprehensively considers the fluctuation characteristics of room temperature and uses the representative user corresponding to the representative room temperature to feedback the heat exchange station control. Compared with the traditional mean room temperature control ability, it has stronger control ability and can better reflect the actual situation of the user's room temperature. By continuously verifying the representativeness of the representative room temperature and continuously selecting new representative users, the room temperature of the representative user is representative throughout the heating season. Compared with the traditional method of statically selecting typical users and assuming that they are representative throughout the heating season, it is more accurate and reliable.
[0011] In some embodiments of the present invention, a temperature interval is preset, the mean of the daily room temperature sequence is calculated, the effective room temperature mean sequence whose mean of the daily room temperature sequence is within the temperature interval is calculated, the deviation between the daily room temperature sequence and the effective room temperature mean sequence is calculated, and the daily room temperature sequence with the smallest deviation is the representative room temperature.
[0012] The embodiment of the present invention calculates the mean of the daily room temperature sequence of the K-type fluctuation mode, and calculates the deviation to obtain a more accurate user room temperature fluctuation situation that represents the room temperature and feeds it back to the heat exchange station, thereby giving full play to the energy-saving potential of the room temperature data.
[0013] In some embodiments of the present invention, the method further comprises:
[0014] S5. Preset a room temperature change threshold. If the absolute value of the difference between the room temperature values of the user corresponding to the representative room temperature at three consecutive moments starting from the first moment and the room temperature value at the first moment is greater than the room temperature change threshold, it is determined that the room temperature of the user corresponding to the representative room temperature is abnormal, and the daily room temperature sequence with the smallest deviation in the class of daily room temperature sequences corresponding to the user corresponding to the representative room temperature, excluding the user corresponding to the representative room temperature, is taken as a new representative room temperature, and the user corresponding to the new representative room temperature is taken as a new representative user.
[0015] The embodiment of the present invention performs real-time room temperature anomaly monitoring on the representative room temperature by targeting the poor anti-interference capability of the room temperature data, so as to avoid obtaining an erroneous representative room temperature due to the influence of the anomaly when the room temperature anomaly occurs.
[0016] In some embodiments of the present invention, the step S1 further comprises:
[0017] Whether the value of the evaluation index is the minimum is determined by adjusting the K value. If the value of the evaluation index is the minimum, the K value that minimizes the value of the evaluation index is the optimal K value.
[0018] The embodiment of the present invention can select the optimal K value through the evaluation index, which paves the way for the subsequent clustering calculation of daily room temperature. When the evaluation index is optimal, the similarity within the cluster is the highest and the difference between clusters is the greatest.
[0019] In some embodiments of the present invention, step S2 further comprises:
[0020] S21. The first-day room temperature matrix includes the first-day room temperature data of n heating users at 24 moments; wherein the first-day room temperature matrix is:
[0021] X=[x1,x2,…,x i ,…,x n ] T
[0022] x i =[x0,x1,…,x t ,…,x 23 ]
[0023] Among them, x i is the daily room temperature sequence of the room temperature data of the i-th user at 24 moments; x t is the room temperature data of the user at time t, t=0,1,……,23; n is the number of users.
[0024] S22, for each daily room temperature sequence x in the first day room temperature matrix i Perform Z standardization to obtain the daily room temperature series x i The corresponding fluctuation pattern:
[0025]
[0026] Among them, x′ t is the room temperature data of the first day after Z standardization; x t is the room temperature data of the first day; μ is the mean value of the room temperature data of the first day; σ is the standard deviation of the room temperature data of the first day.
[0027] The step S3 further comprises:
[0028] S31, eliminating the daily room temperature sequences whose mean values of the daily room temperature sequences are outside the temperature range, and calculating the effective room temperature mean sequences whose mean values of the daily room temperature sequences are within the temperature range, the calculation formula is:
[0029]
[0030]
[0031] in, is the average value of the daily room temperature sequence at time t; m is the number of valid users corresponding to the daily room temperature mean within the temperature range; x it is the value corresponding to the room temperature data of the first day of the i-th valid user at time t;
[0032] S32, calculating the deviation between the daily room temperature sequence and the effective room temperature mean sequence, the calculation formula is:
[0033]
[0034] Among them, R i is the daily room temperature sequence x of the i-th user i With the effective room temperature mean series deviation.
[0035] S33. The daily room temperature sequence with the smallest calculated deviation is taken as the first representative room temperature, and the user corresponding to the first representative room temperature is taken as the first representative user. The weight of the first representative user is obtained by calculating the ratio of the number of all users in the class of the daily room temperature sequence corresponding to the first representative user to the number of users in the total cluster. The weight is used to indicate the user room temperature situation of the first representative user that can represent the numerical value of the weight.
[0036] The embodiment of the present invention obtains the daily room temperature sequence with the smallest deviation as the representative room temperature by calculating the daily room temperature matrix formula, the Z-standardized extraction fluctuation mode formula, the effective room temperature mean sequence formula, and the deviation formula between the daily room temperature sequence and the effective room temperature mean sequence. The operation steps are simpler and the calculation results are more accurate.
[0037] In some embodiments of the present invention, step S4 further comprises:
[0038] According to steps S2 and S3, the deviation of the second daily room temperature data is recalculated and sorted according to the deviation size. The user corresponding to the second representative room temperature is the second representative user. It is determined whether the number of second representative users in the daily room temperature sequence corresponding to the second daily room temperature data is greater than 1. If the number of second representative users is greater than 1, the deviations between the second representative users are compared, and the second representative user with the smallest deviation is considered representative. The deviation between each second representative user and the non-representative user other than the second representative user is compared. If the deviation of the second representative user is less than the deviation of more than 80% of the users in the class of the daily room temperature sequence corresponding to the second representative user, it is considered that the second representative user is still representative. If the number of second representative users is equal to 0, the representative user is recalculated according to step S3.
[0039] The embodiment of the present invention continuously obtains subsequent daily room temperature data in a loop and determines whether the representative user is still representative. When the number of representative users is greater than 1 or is 0, the representative user can be recalculated through corresponding calculations to ensure that during the heating cycle, there is always correct regulation of the heat exchange system with representative users. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A flow chart of a room temperature data processing method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a daily room temperature series fluctuation provided in an embodiment of the present invention;
[0043] Figure 3 Another schematic diagram of daily room temperature series fluctuations provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0045] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0047] The technical solution of the present invention is described in detail below in conjunction with specific embodiments and the accompanying drawings.
[0048] As attached Figure 1 As shown, in an exemplary embodiment of a room temperature data processing method of the present invention, the following steps are included:
[0049] S1. Obtain the historical room temperature data within the heating cycle, pre-process the historical room temperature data, cluster the pre-processed historical room temperature data through the K-means clustering algorithm, adjust the K value of the K-means clustering algorithm through a preset evaluation index, and select the optimal K value according to the clustering results under different K values; determine whether the value of the evaluation index is the minimum by adjusting the K value. If the value of the evaluation index is the minimum, the K value that minimizes the value of the evaluation index is the optimal K value. Optionally, the pre-processing includes timestamp alignment, missing value processing, outlier processing and Z normalization processing; optionally, the evaluation index is the DBI index. The smaller the DBI index, the better the clustering result. When the index is optimal, the similarity within the cluster is the highest and the difference between clusters is the largest. The formula is as follows:
[0050]
[0051] Where l is the number of curve sets; S i , S j are the average distances between the i-th type curve set, the j-th type curve set and the cluster center curve of this type; C ij is the distance between the i-th cluster center curve and the j-th cluster center curve;
[0052] Among them, the clustering process of the K-means clustering algorithm is:
[0053] 1) Initialization: mainly includes presetting the number of clusters K and randomly selecting K data points as the initial cluster centers;
[0054] 2) Iteration process: The K-means algorithm optimizes the location of the cluster center through iteration to minimize the distance between each sample point and its cluster center. First, the Euclidean distance between each sample point and each cluster center is calculated, and the sample point is assigned to the cluster center with the closest distance. Then, the cluster center is updated. The new cluster center is the mean of all the sample points it contains, and the iteration continues.
[0055] 3) Convergence judgment: Repeat the iterative process until the convergence condition is met. The iterative condition is that the number of iterations reaches the maximum or the change in the cluster center is less than the predetermined threshold. In the present invention, the maximum number of iterations is set to 100, and the predetermined threshold is set to 1×10 -5 ;
[0056] 4) Output results: Output the cluster center and the cluster label of each sample point.
[0057] S2. Obtain the room temperature data of the first day in the heating cycle, generate the room temperature matrix of the first day after preprocessing the room temperature data of the first day, perform Z-standardization on the daily room temperature sequence in the room temperature matrix of the first day to obtain the fluctuation pattern corresponding to the daily room temperature sequence, and cluster the room temperature matrix of the first day after Z-standardization according to the optimal K value through the K-means clustering algorithm to extract the daily room temperature sequence of K types of fluctuation patterns; optionally, when there is a lack of room temperature data of the heating cycle, the room temperature data can be collected and the required values can be analyzed after the system has been running stably for 3-5 days in the current heating cycle; The preprocessing includes timestamp alignment, missing value processing and outlier processing. Timestamp alignment is to process the room temperature data collected by each room temperature sensor with different sampling time into hourly data. The specific method is to search for all room temperature data within half an hour before and after each hour. The room temperature data closest to the hourly time is used as the data at that time. If there is no data, it is left blank. The methods used for missing value processing and outlier processing are linear interpolation and 3σ principle respectively. Optionally, the interval of K value is [2,7], and the value increases with the increase of heat exchange station and user scale.
[0058] S3, selecting the first representative room temperature in each daily room temperature sequence, the user corresponding to the first representative room temperature is the first representative user, and the room temperature of the first representative user will be fed back to the heating system in real time for operation control;
[0059] S4, continuously obtaining the room temperature data of the second day following the room temperature data of the first day in the heating cycle in units of days, repeating steps S2 and S3 to select a second representative room temperature according to the room temperature data of the second day, and determining whether the user corresponding to the second representative room temperature is the same as the first representative user; if they are different, repeating step S3 again to select a third representative room temperature, and taking the user corresponding to the third representative room temperature as the new representative user;
[0060] According to steps S2 and S3, the deviation of the room temperature data of the second day is recalculated, and the data is sorted according to the deviation. The user corresponding to the second representative room temperature is the second representative user. It is determined whether the number of second representative users in the daily room temperature sequence corresponding to the room temperature data of the second day is greater than 1. If the number of second representative users is greater than 1, the deviations between the second representative users are compared, and the second representative user with the smallest deviation is considered representative. The deviations between each second representative user and non-representative users other than the second representative user are compared. If the deviation of the second representative user is less than the deviation of more than 80% of the users in the class of the daily room temperature sequence corresponding to the second representative user, the second representative user is considered to be still representative. If the number of second representative users is equal to 0, the representative user is recalculated according to step S3.
[0061] S5. Preset a room temperature change threshold. If the absolute value of the difference between the room temperature value of the user corresponding to the representative room temperature at three consecutive moments starting from the first moment and the room temperature value at the first moment is greater than the room temperature change threshold, it is determined that the room temperature of the user corresponding to the representative room temperature is abnormal, and the daily room temperature sequence with the smallest deviation in the class of daily room temperature sequences corresponding to the user corresponding to the representative room temperature except for the user corresponding to the representative room temperature is used as the new representative room temperature, and the user corresponding to the new representative room temperature is the new representative user; optionally, the room temperature change threshold is defined as 2°C. Starting from moment t, if the absolute value of the difference between the room temperature value of a certain representative user at three consecutive moments and the room temperature value at moment t is greater than 2°C, it is determined that the room temperature is abnormal. At the same time, the representative room temperature actually fed back to the heat exchange station at these three moments cannot change by more than 2°C compared with the room temperature value at moment t.
[0062] Based on the above method, by comprehensively considering the fluctuation characteristics of room temperature, the representative user corresponding to the representative room temperature is used to feedback the heat exchange station control. Compared with the traditional mean room temperature, the control ability is stronger and can better reflect the actual situation of the user's room temperature. By continuously verifying the representativeness of the representative room temperature and continuously selecting new representative users, the room temperature of the representative user is representative throughout the heating season. Compared with the traditional method of statically selecting typical users and assuming that they are representative throughout the heating season, it is more accurate and reliable; by performing real-time room temperature anomaly monitoring of the representative room temperature based on the poor anti-interference ability of the room temperature data, it is possible to avoid being affected by the anomaly and obtaining an erroneous representative room temperature when the room temperature anomaly occurs. By continuously looping to obtain subsequent daily room temperature data and judging whether the representative user is still representative, and when the number of representative users is greater than 1 or is 0, the representative user can be recalculated through corresponding calculations to ensure that during the heating cycle, there is always a correct representative user to control the heat exchange system.
[0063] In order to avoid the problem that the visualization of a large number of user room temperature data in the prior art can only reflect the overall trend of the room temperature under the heat exchange station, the operating personnel are difficult to grasp the room temperature fluctuation patterns of different users, and the method of obtaining the average value of the typical user room temperature will drown out the fluctuation characteristics of the user room temperature, which can only reflect the average level of the room temperature of a large number of users, a temperature range is preset, the mean of the daily room temperature sequence is calculated, the effective room temperature mean sequence whose mean value of the daily room temperature sequence is within the temperature range is calculated, the deviation of the daily room temperature sequence and the effective room temperature mean sequence is calculated, and the daily room temperature sequence with the smallest deviation is the representative room temperature; optionally, the temperature range is 18°C-24°C, which can avoid the influence of the maximum or minimum value on the calculation;
[0064] The first-day room temperature matrix includes the first-day room temperature data of n heating users at 24 moments; the first-day room temperature matrix is:
[0065] X=[x1,x2,…,x i,…,x n ] T
[0066] x i =[x0,x1,…,x t ,…,x 23 ]
[0067] Among them, x i is the daily room temperature sequence of the room temperature data of the i-th user at 24 moments; x t is the room temperature data of the user at time t, t=0,1,……,23; n is the number of users;
[0068] For each daily room temperature sequence x in the first day room temperature matrix i Perform Z standardization to obtain the daily room temperature series x i The corresponding fluctuation pattern:
[0069]
[0070] Among them, x t is the room temperature data of the first day after Z standardization; x t is the room temperature data of the first day; μ is the mean value of the room temperature data of the first day; σ is the standard deviation of the room temperature data of the first day;
[0071] K-means clustering is performed on the first day room temperature matrix after Z standardization. The number of clusters is preset to 3. When the K-means algorithm meets the convergence condition and outputs the clustering result, a set of 3 types of daily room temperature sequences is obtained. Figure 2 -Attached Figure 3 The daily room temperature series under the two types of fluctuation modes shown in the figure are as follows: Figure 2 , Figure 3 The horizontal axis is time, and the vertical axis is indoor temperature. Figure 2 or Figure 3 It can be seen that the same type of daily room temperature series has the same fluctuation pattern, only the room temperature level is different; Figure 2 and Figure 3 It can be seen that different types of daily room temperature series have different fluctuation patterns.
[0072] Eliminate the daily room temperature sequences whose mean values are outside the temperature range, and calculate the effective room temperature mean sequence whose mean values are within the temperature range. The calculation formula is:
[0073]
[0074]
[0075] in, is the average value of the daily room temperature sequence at time t; m is the number of valid users corresponding to the daily room temperature mean within the temperature range; x it It is the value corresponding to the room temperature data of the first day of the i-th valid user at time t.
[0076] Calculate the deviation between the daily room temperature series and the effective room temperature mean series. The calculation formula is:
[0077]
[0078] Among them, R i is the daily room temperature sequence x of the i-th user i With the effective room temperature mean series deviation.
[0079] The daily room temperature sequence with the smallest calculated deviation is the first representative room temperature, and the user corresponding to the first representative room temperature is the first representative user. The weight of the first representative user is obtained by calculating the ratio of the number of all users in the class of the daily room temperature sequence corresponding to the first representative user to the number of users in the total cluster. The weight is used to indicate that the first representative user can represent the user room temperature of the numerical value of the weight. The three representative users corresponding to the three representative room temperatures selected according to the three types of daily room temperature sequences are assigned weights of w1, w2, and w3 respectively. The room temperatures of the three representative users will be fed back to the heat exchange station in real time on the next day for operation regulation.
[0080] The embodiment of the present invention calculates the mean of the daily room temperature sequence of the K-type fluctuation mode, and calculates the deviation to obtain a more accurate user room temperature fluctuation situation that represents the room temperature and feeds it back to the heat exchange station, thereby giving full play to the energy-saving potential of the room temperature data.
[0081] It should be noted that the above is a reference method for room temperature data processing, and the present invention is not limited thereto.
[0082] The embodiments of the present invention realize that by comprehensively considering the fluctuation characteristics of room temperature, the actual situation of user room temperature can be better reflected, and by continuously verifying the representativeness of representative room temperature and continuously selecting new representative users, the room temperature of representative users is representative throughout the heating season; by performing real-time room temperature anomaly monitoring of representative room temperature according to the poor anti-interference ability of room temperature data, it is possible to avoid obtaining erroneous representative room temperature due to the influence of anomalies when room temperature anomalies occur, thereby solving the problem that it is difficult for operators in the prior art to grasp different user room temperature fluctuation patterns, and the method of obtaining the average of typical user room temperature will drown out the fluctuation characteristics of user room temperature, which can only reflect the average level of room temperature of a large number of users. It is precisely because different users will present different types of fluctuation patterns that the technical problem that when the room temperature of typical users selected based on past experience is often fed back to the heat exchange station, the wrong user room temperature fluctuation situation is technically problematic.
[0083] Finally, it should be noted that: the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0084] The above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.
Claims
1. A room temperature data processing method, characterized in that: The steps include: S1. Obtain historical room temperature data within a heating cycle, preprocess the historical room temperature data, cluster the preprocessed historical room temperature data using a K-means clustering algorithm, adjust the K value of the K-means clustering algorithm using a preset evaluation index, and select the optimal K value according to the clustering results under different K values; S2, obtaining the room temperature data of the first day in the heating cycle, generating a room temperature matrix of the first day after preprocessing the room temperature data of the first day, performing Z-standardization processing on the room temperature sequence of the first day in the room temperature matrix of the first day to obtain the fluctuation pattern corresponding to the room temperature sequence of the day, and clustering the room temperature matrix of the first day after Z-standardization processing according to the optimal K value by using the K-means clustering algorithm to extract the room temperature sequence of the day with K types of fluctuation patterns; S3, selecting the first representative room temperature in each daily room temperature sequence, the user corresponding to the first representative room temperature is the first representative user, and the room temperature of the first representative user will be fed back to the heating system in real time for operation control; S4. Continuously obtain the room temperature data of the second day following the room temperature data of the first day in the heating cycle on a daily basis, repeat steps S2 and S3 to select a second representative room temperature according to the room temperature data of the second day, and determine whether the user corresponding to the second representative room temperature is the same as the first representative user; if different, repeat step S3 again to select a third representative room temperature, and use the user corresponding to the third representative room temperature as the new representative user.
2. The room temperature data processing method according to claim 1, characterized in that: Also includes: A temperature interval is preset, the mean of the daily room temperature sequence is calculated, the effective room temperature mean sequence whose mean of the daily room temperature sequence is within the temperature interval is calculated, the deviation between the daily room temperature sequence and the effective room temperature mean sequence is calculated, and the daily room temperature sequence with the smallest deviation is the representative room temperature.
3. The room temperature data processing method according to claim 2, characterized in that: The method further comprises: S5. Preset a room temperature change threshold. If the absolute value of the difference between the room temperature values of the user corresponding to the representative room temperature at three consecutive moments starting from the first moment and the room temperature value at the first moment is greater than the room temperature change threshold, it is determined that the room temperature of the user corresponding to the representative room temperature is abnormal, and the daily room temperature sequence with the smallest deviation in the class of daily room temperature sequences corresponding to the user corresponding to the representative room temperature, excluding the user corresponding to the representative room temperature, is taken as a new representative room temperature, and the user corresponding to the new representative room temperature is taken as a new representative user.
4. The room temperature data processing method according to claim 1, characterized in that: The step S1 further comprises: Whether the value of the evaluation index is the minimum is determined by adjusting the K value. If the value of the evaluation index is the minimum, the K value that minimizes the value of the evaluation index is the optimal K value.
5. The room temperature data processing method according to claim 1, characterized in that: The step S2 further comprises: S21. The first-day room temperature matrix includes the first-day room temperature data of n heating users at 24 moments; wherein the first-day room temperature matrix is: X=[x1,x2,…,x i ,…,x n ] T x i =[x0,x1,…,x t ,…,x 23 ] Among them, x i is the daily room temperature sequence of the room temperature data of the i-th user at 24 moments; x t is the room temperature data of the user at time t, t=0,1,……,23; n is the number of users.
6. The room temperature data processing method according to claim 5, characterized in that: The step S2 further comprises: S22, for each daily room temperature sequence x in the first day room temperature matrix i Perform Z normalization to obtain the daily room temperature series x i The corresponding fluctuation pattern: Among them, x′ t is the room temperature data of the first day after Z standardization; x t is the room temperature data of the first day; μ is the mean value of the room temperature data of the first day; σ is the standard deviation of the room temperature data of the first day.
7. The room temperature data processing method according to claim 2, characterized in that: The step S3 further comprises: S31, eliminating the daily room temperature sequences whose mean values of the daily room temperature sequences are outside the temperature range, and calculating the effective room temperature mean sequences whose mean values of the daily room temperature sequences are within the temperature range, the calculation formula is: in, is the average value of the daily room temperature sequence at time t; m is the number of valid users corresponding to the daily room temperature mean within the temperature range; x it It is the value corresponding to the room temperature data of the first day of the i-th valid user at time t.
8. The room temperature data processing method according to claim 7, characterized in that: The step S3 further comprises: S32, calculating the deviation between the daily room temperature sequence and the effective room temperature mean sequence, the calculation formula is: Among them, R i is the daily room temperature sequence x of the i-th user i With the effective room temperature mean series deviation.
9. The room temperature data processing method according to claim 8, characterized in that: The step S3 further comprises: S33. The daily room temperature sequence with the smallest calculated deviation is taken as the first representative room temperature, and the user corresponding to the first representative room temperature is taken as the first representative user. The weight of the first representative user is obtained by calculating the ratio of the number of all users in the class of the daily room temperature sequence corresponding to the first representative user to the number of users in the total cluster. The weight is used to indicate the user room temperature situation of the first representative user that can represent the numerical value of the weight.
10. The room temperature data processing method according to claim 2, characterized in that: The step S4 further comprises: According to steps S2 and S3, the deviation of the second daily room temperature data is recalculated and sorted according to the deviation size. The user corresponding to the second representative room temperature is the second representative user. It is determined whether the number of second representative users in the daily room temperature sequence corresponding to the second daily room temperature data is greater than 1. If the number of second representative users is greater than 1, the deviations between the second representative users are compared to determine that the second representative user with the smallest deviation is representative. The deviations between each second representative user and non-representative users other than the second representative user are compared. If the deviation of the second representative user is less than the deviation of more than 80% of the users in the class of the daily room temperature sequence corresponding to the second representative user, it is considered that the second representative user is still representative. If the number of second representative users is equal to 0, the representative user is recalculated according to step S3.
Citation Information
Patent Citations
Heat supply and cold supply abnormal data diagnosis processing method based on time and space
CN117235642A