Intelligent control system and method for temperature controller
By classifying the sub-therm controller and using step by step transmission and data encryption technology, data loss and abnormality problems in long-distance communication between the sub-therm controller and the main thermostat are solved, and the accuracy and safety of temperature regulation are improved. Ensures the effectiveness of temperature control.
Patent Information
- Application Number
- CN202411585963.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In large areas, long-distance communication between the sub-therm controller and the main thermostat leads to increased risk of data loss and abnormalities, affecting the accuracy and safety of temperature regulation.
By dividing the sub-therm controller into multiple stages, and using step by step to transmit average temperature data and temperature adjustment information, combining data encryption and HMAC algorithm to verify message authentication code, avoid long-distance data transmission and improve data accuracy and completeness. And the data is corrected according to the internal heating average amount.
It improves the accuracy and completeness of data transmission, enhances the accuracy and safety of temperature adjustment, and ensures that the main thermostat can effectively control the temperature in the area where each sub-thermotor is located.
Smart Images

Figure CN119126870A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information transmission and control, and in particular to a temperature controller intelligent control system and method. Background Art
[0002] A thermostat is a device used to control a heating or cooling system to maintain a set temperature. It adjusts the temperature of a zone by monitoring the ambient temperature and comparing it to a preset target temperature. When the actual temperature deviates from the target temperature, the thermostat starts or stops the heating or cooling device.
[0003] In a large area, there are multiple sub-areas with different temperature requirements, so multiple thermostats need to be set up. For the convenience of control, the existing technology divides multiple thermostats into a main thermostat and multiple sub-thermostats. The main thermostat sends temperature adjustment instructions to the corresponding sub-thermostat according to the temperature data transmitted by each sub-thermostat. However, if the area is large, the distance between the sub-thermostat and the main thermostat may be large, resulting in a large communication distance. If the sub-thermostat directly transmits data to the main thermostat, the long distance may easily lead to data loss and increased abnormal risks, resulting in improper temperature adjustment instructions issued by the main thermostat. Therefore, there is an urgent need for a thermostat intelligent control system and method to solve the above technical problems. Summary of the invention
[0004] In order to solve the technical problems existing in the prior art, the present invention provides a temperature controller intelligent control method, comprising the following steps: A main thermostat and multiple sub-thermostats are pre-set in the thermostat network, and the sub-thermostats are divided into one to N levels, the first-level sub-thermostat is the lower-level thermostat of the main thermostat, the main thermostat is the upper-level thermostat of the first-level sub-thermostat, the n-level sub-thermostat is the lower-level thermostat of the n-1-level sub-thermostat, the n-level sub-thermostat is the upper-level thermostat of the n+1-level sub-thermostat, and each sub-thermostat is matched with only one upper-level thermostat, N is a positive integer greater than or equal to 1, n∈N; Each sub-thermostat collects temperature data in the corresponding area, and sends average temperature data to the corresponding upper-level thermostat every preset time. The average temperature data is calculated from the temperature data in the corresponding area collected within the corresponding preset time, and the average temperature data carries the IP address of the corresponding sub-thermostat; Each sub-thermostat packages and transmits the average temperature data received from the corresponding lower-level thermostat and the average temperature data calculated by itself to the corresponding upper-level thermostat; The main thermostat sends temperature adjustment information to the sub-thermostat step by step according to each average temperature data and the IP address of the corresponding sub-thermostat carried by each average temperature data, wherein the temperature adjustment information includes the corresponding sub-thermostat IP address and temperature adjustment instruction; Each sub-thermostat controls the corresponding temperature adjustment device to adjust the temperature of the area according to the received temperature adjustment information; Each sub-thermostat packages and transmits the average temperature data received from the corresponding lower-level thermostat and the average temperature data calculated by itself to the corresponding upper-level thermostat, specifically: Decrypting the ciphertext received from the corresponding lower-level thermostat to obtain the average temperature data transmitted by the corresponding lower-level thermostat; Encrypt the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself into ciphertext; Generate a first message authentication code for the ciphertext using the HMAC algorithm; The ciphertext and the corresponding first message authentication code are sent to the corresponding upper-level thermostat.
[0005] Furthermore, the sub-thermostat is divided into levels 1 to N, specifically according to the preset maximum communication distance, and is divided step by step from level 1 to level N, specifically: The sub-thermostat whose distance to the main thermostat is less than or equal to the preset maximum communication distance is divided into the first-level sub-thermostat, and then from the remaining sub-thermostat, the sub-thermostat whose distance to any first-level sub-thermostat is less than or equal to the preset maximum communication distance is divided into the second-level sub-thermostat. If there is a second-level sub-thermostat and the distance between multiple first-level sub-thermostats is less than or equal to the preset maximum communication distance, then a first-level sub-thermostat is randomly selected from the multiple first-level sub-thermostats to communicate and match with the second-level sub-thermostat, and so on for step-by-step division.
[0006] Furthermore, the temperature data collected by each sub-temperature controller in the corresponding area are all temperature data that have been corrected. The data correction specifically includes the following steps: A plurality of historical original temperature data collected by the sub-thermostat, a plurality of corresponding actual temperature data, and an average amount of internal heat generation under different working conditions are obtained, and used as training samples to train a deep learning model to obtain a compensation model; Through the compensation model, data correction is performed according to the average internal heat generation of the sub-thermostat in the current working state and the collected original temperature data to obtain the corrected temperature data.
[0007] Furthermore, the first message authentication code is generated for the ciphertext by using the HMAC algorithm, and is specifically generated according to a shared key between the corresponding superior thermostat and a preset hash function.
[0008] Furthermore, before decrypting the ciphertext received from the corresponding lower-level thermostat, the following steps are also included: A second HMAC algorithm is used to generate a second message authentication code for the corresponding ciphertext. If the second message authentication code is different from the corresponding first message authentication code, the corresponding lower-level thermostat is notified to resend the ciphertext. If they are the same, the ciphertext received from the corresponding lower-level thermostat is decrypted.
[0009] Furthermore, the shared key and hash function used by the second HMAC algorithm are the same as the shared key and hash function used by the HMAC algorithm used by the corresponding lower-level thermostat when generating the first message authentication code for the ciphertext.
[0010] Furthermore, the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself are encrypted into ciphertext, and any asymmetric encryption algorithm is used for encryption.
[0011] Furthermore, the decryption of the ciphertext received from the corresponding lower-level thermostat is specifically performed according to an asymmetric encryption algorithm used by the corresponding lower-level thermostat.
[0012] Furthermore, the temperature adjustment instruction is determined by the main thermostat according to the corresponding average temperature data and the preset temperature threshold of the area where the corresponding sub-thermostat is located, specifically: If the average temperature data is greater than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the first preset threshold, a cooling adjustment instruction is issued to the corresponding sub-thermostat; if the average temperature data is less than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the second preset threshold, a heating adjustment instruction is issued to the corresponding sub-thermostat.
[0013] The present invention also provides a temperature controller intelligent control system, comprising: A main thermostat and multiple sub-thermostats, the sub-thermostats are divided into levels 1 to N, the level 1 sub-thermostat is the lower level thermostat of the main thermostat, the main thermostat is the upper level thermostat of the level 1 sub-thermostat, the level n sub-thermostat is the lower level thermostat of the level n-1 sub-thermostat, the level n sub-thermostat is the upper level thermostat of the level n+1 sub-thermostat, and each sub-thermostat is matched with only one upper level thermostat, N is a positive integer greater than or equal to 1, n∈N; The main thermostat contains a data decryption module, an information generation module and an information sending module, and each sub-thermostat contains a corresponding calculation module, a data encryption module, a transmission module, a data decryption module and an information sending module; A calculation module, used for calculating average temperature data from the temperature data collected during the preset time period after each preset time period, wherein the average temperature data carries the IP address of the corresponding sub-thermostat; A data encryption module, used to encrypt the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself into ciphertext, and generate a first message authentication code for the ciphertext through an HMAC algorithm; A transmission module, used for sending the ciphertext of the corresponding data encryption module and the first message authentication code to the corresponding upper-level temperature controller; A data decryption module, used to decrypt the ciphertext received from the corresponding lower-level thermostat to obtain the average temperature data transmitted by the corresponding lower-level thermostat; An information generation module, used to generate corresponding temperature adjustment information for each sub-thermostat according to each average temperature data, wherein the temperature adjustment information includes a corresponding sub-thermostat IP address and a temperature adjustment instruction; The information sending module is used to send temperature adjustment information to the sub-thermostat step by step according to the sub-thermostat IP address.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The present invention classifies the sub-thermostat and transmits the average temperature data step by step, thereby avoiding the sub-thermostat from transmitting data to the main thermostat over a long distance, improving the accuracy and integrity of the data during transmission, and combining data encryption and HMAC algorithm to verify the message authentication code, further improving the accuracy, integrity and security of the data, and ensuring that the main thermostat can accurately and effectively adjust the temperature according to the average temperature of the area where each sub-thermostat is located; By correcting the collected original temperature data according to the average internal heat generation under the current working state of the sub-thermostat, the corresponding correction degree of the sub-thermostat in different working states is ensured, the accuracy of data correction is improved, and then the accuracy of data and temperature regulation is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] Figure 1 It is a flow chart of a thermostat intelligent control method of the present invention; Figure 2 It is a flow chart of data correction in a temperature controller intelligent control method of the present invention; Figure 3It is a flow chart of step S3 in a thermostat intelligent control method of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0020] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0021] Embodiment 1 See also Figures 1 to 3 As shown, the present invention provides a thermostat intelligent control method, which specifically includes the following steps: S1. A main thermostat and multiple sub-thermostats are pre-set in the thermostat network, and the sub-thermostats are divided into one to N levels, the first-level sub-thermostat is the lower-level thermostat of the main thermostat, the main thermostat is the upper-level thermostat of the first-level sub-thermostat, the n-level sub-thermostat is the lower-level thermostat of the n-1-level sub-thermostat, the n-level sub-thermostat is the upper-level thermostat of the n+1-level sub-thermostat, and each sub-thermostat is matched with only one upper-level thermostat, N is a positive integer greater than or equal to 1, n∈N.
[0022] It should be noted that the sub-thermostat is divided into levels 1 to N, specifically according to the preset maximum communication distance, from level 1 to level N are divided step by step, specifically: The sub-thermostat whose distance to the main thermostat is less than or equal to the preset maximum communication distance is divided into the first-level sub-thermostat, and then from the remaining sub-thermostat, the sub-thermostat whose distance to any first-level sub-thermostat is less than or equal to the preset maximum communication distance is divided into the second-level sub-thermostat. If there is a second-level sub-thermostat and the distance between multiple first-level sub-thermostats is less than or equal to the preset maximum communication distance, then a first-level sub-thermostat is randomly selected from the multiple first-level sub-thermostats to communicate and match with the second-level sub-thermostat, and so on for step-by-step division.
[0023] For example, if the preset maximum communication distance of each thermostat is s, then the sub-thermostat whose distance to the main thermostat is less than or equal to s is a first-level sub-thermostat, and among the remaining sub-thermostats, the sub-thermostat whose distance to any first-level thermostat is less than or equal to s is a second-level sub-thermostat. If there is a second-level sub-thermostat whose distance to multiple first-level sub-thermostats is less than or equal to s, then the second-level sub-thermostat is randomly matched with one of the first-level sub-thermostats for communication as the lower-level thermostat of the first-level sub-thermostat, that is, each sub-thermostat is matched with only one upper-level thermostat, and so on, until all sub-thermostats are matched with one upper-level thermostat, and the last-level sub-thermostat has no corresponding lower-level thermostat.
[0024] S2. Each sub-thermostat collects temperature data in the corresponding area, and sends average temperature data to the corresponding upper-level thermostat after a preset time. The average temperature data is calculated from the temperature data in the corresponding area collected within the corresponding preset time, and the average temperature data carries the IP address of the corresponding sub-thermostat.
[0025] Each sub-thermostat collects temperature data in the corresponding area, and sends average temperature data to the corresponding superior thermostat after a preset time period, that is, the sub-thermostat calculates the average of the temperature data collected during the preset time period. For example, if the preset time period is 3 minutes, the sub-thermostat calculates the average of the temperature data collected within these 3 minutes to obtain the average temperature data of the area within these 3 minutes, and then sends it to the corresponding superior thermostat.
[0026] The temperature data collected by each sub-temperature controller in the corresponding area are all temperature data that have been data-corrected.
[0027] The data correction specifically comprises the following steps: T1. Obtain multiple historical original temperature data collected by the sub-thermostat, the corresponding multiple actual temperature data, and the average amount of internal heat generation under different working conditions, and use them as training samples to train the deep learning model to obtain a compensation model; T2. Through the compensation model, data correction is performed according to the average internal heat generation of the sub-thermostat in the current working state and the collected original temperature data to obtain the corrected temperature data.
[0028] The compensation model is trained in advance with the average amount of internal heat generated by the sub-thermostat under different working conditions, multiple historical original temperature data (i.e., uncorrected temperature data) and corresponding multiple actual temperature data as training sets, which can reflect the influence of the average amount of internal heat generated by the sub-thermostat under different working conditions on the temperature data acquisition, compensate and correct the original temperature data, and output the corresponding temperature data as the corrected temperature data.
[0029] The average amount of internal heat generated by the sub-thermostat under different working conditions can be monitored and calculated through relevant experiments.
[0030] Generally speaking, when the thermostat is in different working states, such as temperature collection, data transmission, control output, etc., the heat generated by the internal electronic components will be different, which will have different impacts on the collected temperature data. Therefore, this solution performs corresponding data correction according to the different working states of the thermostat to improve the accuracy of the collected temperature data, thereby improving the rationality and effectiveness of the thermostat control.
[0031] The average amount of internal heat generated by the sub-thermostat under different working states can be obtained by performing multiple experimental monitoring on the sub-thermostat under different working states, obtaining multiple internal heat values for each working state, and then performing average calculation on the multiple internal heat values for each working state to obtain the average amount of internal heat generated by the sub-thermostat under different working states.
[0032] S3, each sub-thermostat packages and transmits the average temperature data received from the corresponding lower-level thermostat and the average temperature data calculated by itself to the upper-level thermostat with the corresponding communication connection.
[0033] Each sub-thermostat packages and transmits the average temperature data received from the corresponding lower-level thermostat and the average temperature data calculated by itself to the corresponding upper-level thermostat connected by communication, specifically including the following steps: A1. Decrypt the ciphertext received from the corresponding lower-level thermostat to obtain the average temperature data transmitted by the corresponding lower-level thermostat; A2, encrypt the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself into ciphertext; A3, generating a first message authentication code for the ciphertext using the HMAC algorithm; A4. Send the ciphertext and the corresponding first message authentication code to the corresponding upper-level thermostat.
[0034] It should be noted that if there is no corresponding sub-thermostat of the lower-level thermostat, there is no need to execute step A1, and in step A2, the average temperature data calculated by the sub-thermostat is directly encrypted into ciphertext.
[0035] It should be noted that the main thermostat also verifies and decrypts the ciphertext transmitted by the first-level sub-thermostat using the above steps.
[0036] In step A1, before decrypting the ciphertext received from the corresponding lower-level thermostat, it also includes using a second HMAC algorithm to generate a second message authentication code for the corresponding ciphertext. If the second message authentication code is different from the corresponding first message authentication code, the corresponding lower-level thermostat is notified to resend the ciphertext. If they are the same, the ciphertext received from the corresponding lower-level thermostat is decrypted.
[0037] A first message authentication code is generated for the ciphertext through the HMAC algorithm, which is specifically generated based on the shared key K between the corresponding superior thermostat and a preset hash function. The specific generation method is prior art and will not be repeated here.
[0038] The shared key and hash function used by the second HMAC algorithm are the same as the shared key and hash function used by the HMAC algorithm used by the corresponding lower-level thermostat when generating the first message authentication code for the ciphertext, and the specific calculation for generating the second message authentication code is the same as the existing HMAC algorithm.
[0039] The decryption of the ciphertext received from the corresponding lower-level thermostat is specifically performed according to the asymmetric encryption algorithm used by the corresponding lower-level thermostat.
[0040] In step A2, the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself are encrypted into ciphertext, and any asymmetric encryption algorithm is used for encryption.
[0041] The asymmetric encryption algorithm includes RSA encryption algorithm, ECC encryption algorithm and ElGamal encryption algorithm.
[0042] The specific method of encrypting and decrypting using the asymmetric encryption algorithm mentioned above belongs to the prior art and will not be described in detail here.
[0043] S4. The main thermostat sends temperature adjustment information to the sub-thermostat step by step according to each average temperature data and the IP address of the corresponding sub-thermostat carried by each average temperature data. The temperature adjustment information includes the corresponding sub-thermostat IP address and temperature adjustment instruction.
[0044] The temperature adjustment instruction is determined by the main thermostat according to the corresponding average temperature data and the preset temperature threshold of the area where the corresponding sub-thermostat is located, specifically: If the average temperature data is greater than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the first preset threshold, a cooling adjustment instruction is issued to the corresponding sub-thermostat; if the average temperature data is less than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the second preset threshold, a heating adjustment instruction is issued to the corresponding sub-thermostat.
[0045] The main thermostat sends temperature adjustment information to the sub-thermostat step by step according to each average temperature data and the IP address information of the corresponding sub-thermostat carried by each average temperature data, specifically: The main thermostat sends the temperature adjustment information of each sub-thermostat to the corresponding first-level sub-thermostat according to the IP address of each sub-thermostat. Each first-level sub-thermostat then sends the temperature adjustment information to the corresponding lower-level thermostat according to the sub-thermostat IP address in the temperature adjustment information. This process completes the sending of all temperature adjustment information.
[0046] For example, the main thermostat has two subordinate thermostats, namely the first-level sub-thermostat 1 and the first-level sub-thermostat 2, the first-level sub-thermostat 1 has one subordinate thermostat, namely the second-level sub-thermostat 1, and the first-level sub-thermostat 2 has two subordinate thermostats, namely the second-level sub-thermostat 2 and the second-level sub-thermostat 3. Then, the main thermostat sends the temperature adjustment information of the first-level sub-thermostat 1 and the second-level sub-thermostat 1 to the first-level sub-thermostat 1, and sends the temperature adjustment information of the first-level sub-thermostat 2, the second-level sub-thermostat 2 and the second-level sub-thermostat 3 to the first-level sub-thermostat 2. Then, the first-level sub-thermostat 1 sends the temperature adjustment information of the second-level sub-thermostat 1 to the second-level sub-thermostat 1, and the first-level sub-thermostat 2 sends the temperature adjustment information of the second-level sub-thermostat 2 and the second-level sub-thermostat 3 to the second-level sub-thermostat 2 and the second-level sub-thermostat 3 respectively, thereby sending the temperature adjustment information step by step according to the IP addresses of the sub-thermostats.
[0047] S5. Each sub-thermostat controls the corresponding temperature adjustment device to adjust the temperature of the area according to the received temperature adjustment information.
[0048] Embodiment 2 The present invention also provides a temperature controller intelligent control system provided by the present invention, specifically comprising: A main thermostat and multiple sub-thermostats, the sub-thermostats are divided into levels 1 to N, the level 1 sub-thermostat is the lower level thermostat of the main thermostat, the main thermostat is the upper level thermostat of the level 1 sub-thermostat, the level n sub-thermostat is the lower level thermostat of the level n-1 sub-thermostat, the level n sub-thermostat is the upper level thermostat of the level n+1 sub-thermostat, and each sub-thermostat is matched with only one upper level thermostat, N is a positive integer greater than or equal to 1, n∈N; The main thermostat contains a data decryption module, an information generation module and an information sending module, and each sub-thermostat contains a corresponding calculation module, a data encryption module, a transmission module, a data decryption module and an information sending module; A calculation module, used for calculating average temperature data from the temperature data collected during the preset time period after each preset time period, wherein the average temperature data carries the IP address of the corresponding sub-thermostat; A data encryption module, used to encrypt the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself into ciphertext, and generate a first message authentication code for the ciphertext through an HMAC algorithm; A transmission module, used for sending the ciphertext of the corresponding data encryption module and the first message authentication code to the corresponding upper-level temperature controller; A data decryption module, used to decrypt the ciphertext received from the corresponding lower-level thermostat to obtain the average temperature data transmitted by the corresponding lower-level thermostat; An information generation module, used to generate corresponding temperature adjustment information for each sub-thermostat according to each average temperature data, wherein the temperature adjustment information includes a corresponding sub-thermostat IP address and a temperature adjustment instruction; The information sending module is used to send temperature adjustment information to the sub-thermostat step by step according to the sub-thermostat IP address.
[0049] Each sub-temperature controller also includes a data correction module for correcting the temperature data. The temperature data used in calculating the average temperature data is the corrected temperature data. The correction of the temperature data is specifically as follows: T1. Obtain multiple historical original temperature data collected by the sub-thermostat, the corresponding multiple actual temperature data, and the average amount of internal heat generation under different working conditions, and use them as training samples to train the deep learning model to obtain a compensation model; T2. Through the compensation model, data correction is performed according to the average internal heat generation of the sub-thermostat in the current working state and the collected original temperature data to obtain the corrected temperature data.
[0050] The compensation model is a deep learning model, which is trained in advance with the average internal heat generation of the sub-thermostat under different working conditions, multiple historical original temperature data (i.e., uncorrected temperature data) and corresponding multiple actual temperature data as training sets. It can reflect the influence of the average internal heat generation of the sub-thermostat under different working conditions on the temperature data acquisition, compensate and correct the original temperature data, and output the corresponding temperature data as the corrected temperature data.
[0051] Before decrypting the ciphertext received from the corresponding lower-level thermostat, the data decryption module also includes using a second HMAC algorithm to generate a second message authentication code for the corresponding ciphertext. If the second message authentication code is different from the corresponding first message authentication code, the corresponding lower-level thermostat is notified to resend the ciphertext. If they are the same, the ciphertext received from the corresponding lower-level thermostat is decrypted.
[0052] The shared key and hash function used by the second HMAC algorithm are the same as the shared key and hash function used by the HMAC algorithm used by the corresponding lower-level thermostat when generating the first message authentication code for the ciphertext, and the specific calculation for generating the second message authentication code is the same as the existing HMAC algorithm.
[0053] The temperature adjustment instruction is determined by the main thermostat according to the corresponding average temperature data and the preset temperature threshold of the area where the corresponding sub-thermostat is located, specifically: If the average temperature data is greater than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the first preset threshold, a cooling adjustment instruction is issued to the corresponding sub-thermostat; if the average temperature data is less than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the second preset threshold, a heating adjustment instruction is issued to the corresponding sub-thermostat.
[0054] The main thermostat sends temperature adjustment information to the sub-thermostat step by step according to each average temperature data and the IP address information of the corresponding sub-thermostat carried by each average temperature data, specifically: The main thermostat sends the temperature adjustment information of each sub-thermostat to the corresponding first-level sub-thermostat according to the IP address of each sub-thermostat. Each first-level sub-thermostat then sends the temperature adjustment information to the corresponding lower-level thermostat according to the sub-thermostat IP address in the temperature adjustment information. This process completes the sending of all temperature adjustment information.
[0055] Embodiment 3 The present invention also provides an electronic device, including: a processor, a sending device, an input device, an output device and a memory. The processor can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in the embodiment of the present application. The memory can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM), and is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any of the above possible implementation methods.
[0056] Embodiment 4 The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a method as described in any possible implementation manner.
[0057] The beneficial effects of the present invention are: The present invention classifies the sub-thermostat and transmits the average temperature data step by step, thereby avoiding the sub-thermostat from transmitting data to the main thermostat over a long distance, improving the accuracy and integrity of the data during transmission, and combining data encryption and HMAC algorithm to verify the message authentication code, further improving the accuracy, integrity and security of the data, and ensuring that the main thermostat can accurately and effectively adjust the temperature according to the average temperature of the area where each sub-thermostat is located; By correcting the collected original temperature data according to the average internal heat generation under the current working state of the sub-thermostat, the corresponding correction degree of the sub-thermostat in different working states is ensured, the accuracy of data correction is improved, and then the accuracy of data and temperature regulation is improved.
[0058] In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0059] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (RandomAccess Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0060] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A thermostat intelligent control method, characterized in that: The following steps are involved: A main thermostat and multiple sub-thermostats are pre-set in the thermostat network, and the sub-thermostats are divided into one to N levels, the first-level sub-thermostat is the lower-level thermostat of the main thermostat, the main thermostat is the upper-level thermostat of the first-level sub-thermostat, the n-level sub-thermostat is the lower-level thermostat of the n-1-level sub-thermostat, the n-level sub-thermostat is the upper-level thermostat of the n+1-level sub-thermostat, and each sub-thermostat is matched with only one upper-level thermostat, N is a positive integer greater than or equal to 1, n∈N; Each sub-thermostat collects temperature data in the corresponding area, and sends average temperature data to the corresponding upper-level thermostat every preset time. The average temperature data is calculated from the temperature data in the corresponding area collected within the corresponding preset time, and the average temperature data carries the IP address of the corresponding sub-thermostat; Each sub-thermostat packages and transmits the average temperature data received from the corresponding lower-level thermostat and the average temperature data calculated by itself to the corresponding upper-level thermostat; The main thermostat sends temperature adjustment information to the sub-thermostat step by step according to each average temperature data and the IP address of the corresponding sub-thermostat carried by each average temperature data, wherein the temperature adjustment information includes the corresponding sub-thermostat IP address and temperature adjustment instruction; Each sub-thermostat controls the corresponding temperature adjustment device to adjust the temperature of the area according to the received temperature adjustment information; Each sub-thermostat packages and transmits the average temperature data received from the corresponding lower-level thermostat and the average temperature data calculated by itself to the corresponding upper-level thermostat, specifically: Decrypting the ciphertext received from the corresponding lower-level thermostat to obtain the average temperature data transmitted by the corresponding lower-level thermostat; Encrypt the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself into ciphertext; Generate a first message authentication code for the ciphertext using the HMAC algorithm; The ciphertext and the corresponding first message authentication code are sent to the corresponding upper-level thermostat.
2. The thermostat intelligent control method according to claim 1, characterized in that: The sub-thermostat is divided into levels 1 to N, and is divided step by step from level 1 to level N according to the preset maximum communication distance, specifically: The sub-thermostat whose distance to the main thermostat is less than or equal to the preset maximum communication distance is divided into the first-level sub-thermostat, and then from the remaining sub-thermostat, the sub-thermostat whose distance to any first-level sub-thermostat is less than or equal to the preset maximum communication distance is divided into the second-level sub-thermostat. If there is a second-level sub-thermostat and the distance between multiple first-level sub-thermostats is less than or equal to the preset maximum communication distance, then a first-level sub-thermostat is randomly selected from the multiple first-level sub-thermostats to communicate and match with the second-level sub-thermostat, and so on for step-by-step division.
3. The thermostat intelligent control method according to claim 1, characterized in that: The temperature data collected by each sub-temperature controller in the corresponding area are all temperature data that has been corrected. The data correction specifically includes the following steps: A plurality of historical original temperature data collected by the sub-thermostat, a plurality of corresponding actual temperature data, and an average amount of internal heat generation under different working conditions are obtained, and used as training samples to train a deep learning model to obtain a compensation model; Through the compensation model, data correction is performed according to the average internal heat generation of the sub-thermostat in the current working state and the collected original temperature data to obtain the corrected temperature data.
4. The thermostat intelligent control method according to claim 1, characterized in that: The first message authentication code is generated for the ciphertext by using the HMAC algorithm, and is specifically generated according to a shared key between the corresponding superior thermostat and a preset hash function.
5. The thermostat intelligent control method according to claim 4, characterized in that: Before decrypting the ciphertext received from the corresponding lower-level thermostat, the following steps are also included: A second HMAC algorithm is used to generate a second message authentication code for the corresponding ciphertext. If the second message authentication code is different from the corresponding first message authentication code, the corresponding lower-level thermostat is notified to resend the ciphertext. If they are the same, the ciphertext received from the corresponding lower-level thermostat is decrypted.
6. The thermostat intelligent control method according to claim 5, characterized in that: The shared key and hash function used by the second HMAC algorithm are the same as the shared key and hash function used by the HMAC algorithm used by the corresponding lower-level thermostat when generating the first message authentication code for the ciphertext.
7. The thermostat intelligent control method according to claim 1, characterized in that: The average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself are encrypted into ciphertext, and any asymmetric encryption algorithm is used for encryption.
8. The thermostat intelligent control method according to claim 7, characterized in that: The decryption of the ciphertext received from the corresponding lower-level thermostat is specifically performed according to the asymmetric encryption algorithm used by the corresponding lower-level thermostat.
9. The thermostat intelligent control method according to claim 1, characterized in that: The temperature adjustment instruction is determined by the main thermostat according to the corresponding average temperature data and the preset temperature threshold of the area where the corresponding sub-thermostat is located, specifically: If the average temperature data is greater than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the first preset threshold, a cooling adjustment instruction is issued to the corresponding sub-thermostat; if the average temperature data is less than the preset temperature threshold of the area where the corresponding sub-thermostat is located, and the difference is greater than or equal to the second preset threshold, a heating adjustment instruction is issued to the corresponding sub-thermostat.
10. A temperature controller intelligent control system, characterized in that: include: A main thermostat and multiple sub-thermostats, the sub-thermostats are divided into levels 1 to N, the level 1 sub-thermostat is the lower level thermostat of the main thermostat, the main thermostat is the upper level thermostat of the level 1 sub-thermostat, the level n sub-thermostat is the lower level thermostat of the level n-1 sub-thermostat, the level n sub-thermostat is the upper level thermostat of the level n+1 sub-thermostat, and each sub-thermostat is matched with only one upper level thermostat, N is a positive integer greater than or equal to 1, n∈N; The main thermostat contains a data decryption module, an information generation module and an information sending module, and each sub-thermostat contains a corresponding calculation module, a data encryption module, a transmission module, a data decryption module and an information sending module; A calculation module, used for calculating average temperature data from the temperature data collected during the preset time period after each preset time period, wherein the average temperature data carries the IP address of the corresponding sub-thermostat; A data encryption module, used to encrypt the average temperature data received from the corresponding lower-level temperature controller and the average temperature data calculated by itself into ciphertext, and generate a first message authentication code for the ciphertext through an HMAC algorithm; A transmission module, used for sending the ciphertext of the corresponding data encryption module and the first message authentication code to the corresponding upper-level temperature controller; A data decryption module, used to decrypt the ciphertext received from the corresponding lower-level thermostat to obtain the average temperature data transmitted by the corresponding lower-level thermostat; An information generation module, used to generate corresponding temperature adjustment information for each sub-thermostat according to each average temperature data, wherein the temperature adjustment information includes a corresponding sub-thermostat IP address and a temperature adjustment instruction; The information sending module is used to send temperature adjustment information to the sub-thermostat step by step according to the sub-thermostat IP address.
Citation Information
Patent Citations
Intelligent domestic Internet of Things security control method and system
CN103634325A
SDN network system, controller and control method
CN105099995A
Intelligent networking method based on fire-fighting automatic fire alarm system
CN113542031A
Message transmission method, message verification method, device, equipment, medium and product
CN116684102A
Temperature control system based on wireless sensor network
CN220271778U
