Temperature controller data alignment method and system and related equipment

By using MQTT and TCP protocols in IoT systems to store the thermostat data in Redis and TDengine databases, the timeline dispersion caused by the thermostat independent reporting of data is solved, and the timing alignment and analysis efficiency of data is improved.

CN119402511APending Publication Date: 2025-02-07GUANGDONG CHICO ELECTRONIC INC +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410787736.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The thermostat independently reports data in the Internet of Things system, resulting in the inability to view all data on the same timeline, increasing the complexity of data analysis and after-sales service.

Method used

Thermotor data is uploaded to the EMQX subscription server through the MQTT protocol, the data is read out and stored in the Redis database using the TCP protocol, and the data is stored regularly in the TDengine timing database to achieve timing alignment of the data.

Benefits of technology

The complete display of different thermostat data on the same timeline is realized, which improves the efficiency and accuracy of after-sales analysis and simplifies the complexity of after-sales service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402511A_ABST
    Figure CN119402511A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, in particular to a temperature controller data alignment method and system and related equipment, and the method comprises the following steps: obtaining first temperature control data uploaded by temperature controller equipment through a first preset transmission protocol, and storing the first temperature control data in a subscription server; reading the first temperature control data from the subscription server based on a second preset transmission protocol to obtain second temperature control data; correspondingly storing the second temperature control data to a database server according to the data information of the temperature controller equipment; and reading the second temperature control data from the database server every preset storage interval time, and storing the second temperature control data in a time sequence database to obtain time sequence temperature control data with aligned time sequences. According to the invention, complete display of different temperature control data on the same time axis is realized, and the after-sales analysis efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method, system and related equipment for aligning thermostat data. Background Art

[0002] As a device in the Internet of Things system, the thermostat is often used in scenarios such as smart cities and smart agriculture. As the application of thermostat equipment controllers becomes more popular, the requirements for control systems are increasing, especially in terms of after-sales service, which faces a series of challenges.

[0003] Due to factors such as traffic restrictions, the data reported by the thermostat is usually reported separately. This design results in the upper-level IoT platform performing data analysis based on the reported data. The time axis is a discrete point, and the time of different data points cannot correspond one to one, which brings great trouble to data analysis and after-sales analysis. In addition, in complex scenarios, since the thermostat equipment may be distributed in different locations, the specific location cannot be directly observed manually, which increases the complexity of after-sales service.

[0004] Therefore, it is necessary to process the data reported by the thermostat to facilitate data analysis. Summary of the invention

[0005] The present invention aims to solve the problem of time axis dispersion caused by separate uploading of data of different thermostats in the prior art.

[0006] In order to solve the above technical problems, in a first aspect, the present invention provides a method for aligning thermostat data, the method comprising the following steps:

[0007] Acquire first temperature control data uploaded by the thermostat device through a first preset transmission protocol, and save the first temperature control data to a subscription server;

[0008] Based on a second preset transmission protocol, the first temperature control data is read from the subscription server to obtain second temperature control data;

[0009] The second temperature control data is stored in a database server according to the data information of the temperature controller device;

[0010] At every preset storage interval, the second temperature control data is read from the database server and saved in a time series database to obtain time series temperature control data with time series alignment.

[0011] Furthermore, the subscription server is an EMQX distributed Internet of Things message server, and the first preset transmission protocol is an MQTT message queue telemetry transmission protocol.

[0012] Furthermore, the second preset transmission protocol is TCP transmission control protocol.

[0013] Furthermore, the database server is based on a Redis database.

[0014] Furthermore, the step of storing the second temperature control data in a database server according to the data information of the temperature controller device is specifically as follows:

[0015] The device ID and device name of the thermostat device are used as the key of the Redis database, and the second temperature control data corresponding to the thermostat device is used as the value of the Redis database, and the key value data is stored in the Redis database as a database entry.

[0016] Furthermore, the time series database is a TDengine time series database.

[0017] Furthermore, an interval time for the thermostat device to upload the first temperature control data through a first preset transmission protocol is defined as a preset upload interval time, and the preset data upload interval time is the same as the preset storage interval time.

[0018] In a second aspect, the present invention further provides a system for aligning thermostat data, comprising:

[0019] A data acquisition module, which acquires first temperature control data uploaded by the thermostat device through a first preset transmission protocol, and saves the first temperature control data to a subscription server;

[0020] a data aggregation module, configured to read the first temperature control data from the subscription server based on a second preset transmission protocol to obtain second temperature control data;

[0021] A storage module, used for storing the second temperature control data in a database server according to the data information of the temperature controller device;

[0022] The data alignment module is used to read the second temperature control data from the database server at every preset storage interval and save it into a time series database to obtain time series temperature control data with time series alignment.

[0023] In a third aspect, the present invention further provides a computer device, characterized in that it comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the method for aligning thermostat data as described in any one of the above items are implemented.

[0024] In a fourth aspect, the present invention further provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the method for thermostat data alignment as described in any one of the above items are implemented.

[0025] The beneficial effect achieved by the present invention is that a method for aligning thermostat data is proposed. This method addresses the problem that a large number of thermostat data points in the Internet of Things system are independently reported, resulting in the inability to view all data on the same timeline. The method stores each data point reported by the device on the Redis database platform and stores them in the TDengine database in a unified key-value pair format, thereby achieving a complete display of different temperature control data on the same timeline and improving the efficiency and accuracy of after-sales analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic flow chart of the steps of a method for aligning thermostat data provided by an embodiment of the present invention;

[0027] Figure 2 It is a logic flow chart of a method for aligning thermostat data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail 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 invention and are not intended to limit the present invention.

[0029] Please refer to Figure 1 , Figure 1 1 is a flow chart of steps of a method for aligning thermostat data provided by an embodiment of the present invention, wherein the method for aligning thermostat data comprises the following steps:

[0030] S1. Acquire first temperature control data uploaded by a thermostat device through a first preset transmission protocol, and save the first temperature control data to a subscription server.

[0031] The subscription server is the EMQX distributed IoT message server, and the first preset transmission protocol is the MQTT message queue telemetry transmission protocol. EMQX is an open source distributed IoT message server designed for IoT, industrial IoT and IoT platforms. It can implement protocols such as MQTT, CoAP, LwM2M, WebSocket, etc., supports millions of connections and billions of message throughput, and provides rich functions and plug-in systems, such as message routing, message storage, authentication and authorization, cluster management, etc. Therefore, EMQX has the characteristics of high availability, high performance, scalability, security, etc., and is widely used in IoT data transmission, real-time monitoring, remote control and other scenarios.

[0032] S2. Based on a second preset transmission protocol, read the first temperature control data from the subscription server to obtain second temperature control data.

[0033] The second preset transmission protocol is the TCP transmission control protocol.

[0034] S3. Store the second temperature control data in a database server according to the data information of the temperature controller device.

[0035] The database server is based on the Redis database. Redis (Remote Dictionary Server) is an open source in-memory data structure storage system that can be used as a database, cache and message agent, supporting a variety of data structures, including strings, lists, sets, hash tables, ordered sets, etc. Redis is based on key-value pair storage, and each key is associated with a specific value. Therefore, it has high performance, persistence, distribution, multi-language clients and rich functions, and is widely used in real-time data processing, caching, queues, session storage and other scenarios.

[0036] The step of storing the second temperature control data in a database server according to the data information of the temperature controller device is specifically:

[0037] The device ID and device name of the thermostat device are used as the key of the Redis database, and the second temperature control data corresponding to the thermostat device is used as the value of the Redis database, and the key value data is stored in the Redis database as a database entry.

[0038] S4. At every preset storage interval, the second temperature control data is read from the database server and saved in a time series database to obtain time series temperature control data with time series alignment.

[0039] The time series database is the TDengine time series database. TDengine is a high-performance, highly reliable open source time series database designed for big data and IoT scenarios. It uses a highly optimized storage engine that supports fast data writing and querying, and has a built-in time series calculation engine that can achieve real-time analysis and aggregation. TDengine has high scalability, powerful data compression and compression rate, rich query language, and functions related to time series data processing, and is suitable for large-scale time series data storage and analysis applications. The interval time for the thermostat device to upload the first temperature control data through the first preset transmission protocol is defined as the preset upload interval time, and the preset upload data interval time is the same as the preset storage interval time. During implementation, the preset storage interval time can be determined according to the time when different thermostat devices upload data, and in order to ensure the real-time nature of the data, the preset storage interval time should be as close as possible to the preset upload data interval time.

[0040] like Figure 2 As shown, Figure 2 This is a logic flow chart of the method for aligning thermostat data provided by an embodiment of the present invention. The Internet of Things platform is used as the control center of the entire method. First, the thermostat device reports data to the MQTT subscription server through the MQTT protocol. After the Internet of Things platform obtains the data reported by the device through the MQTT protocol, it first stores the data in the Redis database, using the device ID and data point name as the key of the Redis database, and the value of the data point as the value of the Redis database. At this time, there is a data entry for the latest status of all current thermostat devices in the Redis database. The Internet of Things platform periodically obtains all data point values ​​of the device from the Redis database and stores them uniformly in the TDengine database. Since the data is read uniformly, the data uploaded by different thermostats have a uniform storage time in the TDengine database, thereby achieving alignment of the data timeline.

[0041] The embodiment of the present invention can provide reliable data storage, real-time data processing and message transmission capabilities through the above method flow, meeting the needs of temperature control Internet of Things systems for data management, real-time monitoring and remote control. Specifically, when a device fails, the user can quickly obtain the values ​​of all parameters at the time of the failure, not only to clearly understand the specific time point when the failure occurred, but also to have a comprehensive understanding of the numerical status of all data points. Such comprehensive information helps users locate the cause of the failure more quickly and accurately, providing strong support for problem solving;

[0042] Secondly, when a user reports a device failure, after-sales personnel can directly obtain the values ​​of all data points at the time of the failure through the technical solution of the present invention, without having to repeatedly ask the user or wait for real-time data transmission. This greatly improves the efficiency of after-sales processing, shortens the time for troubleshooting and solving faults, and improves the quality of after-sales service and user satisfaction;

[0043] Furthermore, since all data points have values ​​on the same timeline, users can obtain a more complete and accurate data image when performing data analysis. This helps users better understand the operating status and performance of the equipment, and provides reliable data support for equipment optimization and improvement.

[0044] The beneficial effect achieved by the present invention is that a method for aligning thermostat data is proposed. This method addresses the problem that a large number of thermostat data points in the Internet of Things system are independently reported, resulting in the inability to view all data on the same timeline. The method stores each data point reported by the device on the Redis database platform and stores them in the TDengine database in a unified key-value pair format, thereby achieving a complete display of different temperature control data on the same timeline and improving the efficiency and accuracy of after-sales analysis.

[0045] An embodiment of the present invention further provides a system for aligning thermostat data, including:

[0046] A data acquisition module, which acquires first temperature control data uploaded by the thermostat device through a first preset transmission protocol, and saves the first temperature control data to a subscription server;

[0047] a data aggregation module, configured to read the first temperature control data from the subscription server based on a second preset transmission protocol to obtain second temperature control data;

[0048] A storage module, used for storing the second temperature control data in a database server according to the data information of the temperature controller device;

[0049] The data alignment module is used to read the second temperature control data from the database server at every preset storage interval and save it into a time series database to obtain time series temperature control data with time series alignment.

[0050] The system for aligning the thermostat data can implement the steps in the method for aligning the thermostat data in the above embodiment, and can achieve the same technical effects. Please refer to the description in the above embodiment, which will not be repeated here.

[0051] An embodiment of the present invention further provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0052] The processor calls the computer program stored in the memory to execute the steps of the method provided in the embodiment of the present invention. Figure 1 , specifically including the following steps:

[0053] S1. Acquire first temperature control data uploaded by a thermostat device through a first preset transmission protocol, and save the first temperature control data to a subscription server.

[0054] The subscription server is the EMQX distributed Internet of Things message server, and the first preset transmission protocol is the MQTT message queue telemetry transmission protocol.

[0055] S2. Based on a second preset transmission protocol, read the first temperature control data from the subscription server to obtain second temperature control data.

[0056] The second preset transmission protocol is the TCP transmission control protocol.

[0057] S3. Store the second temperature control data in a database server according to the data information of the temperature controller device.

[0058] The database server is based on a Redis database. The step of storing the second temperature control data in the database server according to the data information of the temperature controller device is specifically as follows:

[0059] The device ID and device name of the thermostat device are used as the key of the Redis database, and the second temperature control data corresponding to the thermostat device is used as the value of the Redis database, and the key value data is stored in the Redis database as a database entry.

[0060] S4. At every preset storage interval, the second temperature control data is read from the database server and saved in a time series database to obtain time series temperature control data with time series alignment.

[0061] The time series database is the TDengine time series database.

[0062] The computer device provided in the embodiment of the present invention can implement the steps in the method for aligning thermostat data in the above embodiment, and can achieve the same technical effect. Please refer to the description in the above embodiment, which will not be repeated here.

[0063] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes and steps in the method for thermostat data alignment provided in the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0064] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0065] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0066] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0067] The embodiments of the present invention are described above in conjunction with the accompanying drawings. What is disclosed is only the preferred embodiment of the present invention. However, the present invention is not limited to the above-mentioned specific implementation manner. The above-mentioned specific implementation manner is only illustrative rather than restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms and equivalent changes without departing from the scope of protection of the purpose of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A method for aligning thermostat data, characterized in that: The method comprises the following steps: Acquire first temperature control data uploaded by the thermostat device through a first preset transmission protocol, and save the first temperature control data to a subscription server; Based on a second preset transmission protocol, the first temperature control data is read from the subscription server to obtain second temperature control data; The second temperature control data is stored in a database server according to the data information of the temperature controller device; At every preset storage interval, the second temperature control data is read from the database server and saved in a time series database to obtain time series temperature control data with time series alignment.

2. The method for aligning thermostat data according to claim 1, characterized in that: The subscription server is the EMQX distributed Internet of Things message server, and the first preset transmission protocol is the MQTT message queue telemetry transmission protocol.

3. The method for aligning thermostat data according to claim 1, characterized in that: The second preset transmission protocol is the TCP transmission control protocol.

4. The method for aligning thermostat data according to claim 1, characterized in that: The database server is based on the Redis database.

5. The method for aligning thermostat data according to claim 4, characterized in that: The step of storing the second temperature control data in a database server according to the data information of the temperature controller device is specifically: The device ID and device name of the thermostat device are used as the key of the Redis database, and the second temperature control data corresponding to the thermostat device is used as the value of the Redis database, and the key value data is stored in the Redis database as a database entry.

6. The method for aligning thermostat data according to claim 1, characterized in that: The time series database is the TDengine time series database.

7. The method for aligning thermostat data according to claim 1, characterized in that: The interval time for the thermostat device to upload the first temperature control data through the first preset transmission protocol is defined as a preset upload interval time, and the preset data upload interval time is the same as the preset storage interval time.

8. A system for aligning thermostat data, characterized in that: include: A data acquisition module, which acquires first temperature control data uploaded by the thermostat device through a first preset transmission protocol, and saves the first temperature control data to a subscription server; a data aggregation module, configured to read the first temperature control data from the subscription server based on a second preset transmission protocol to obtain second temperature control data; A storage module, used for storing the second temperature control data in a database server according to the data information of the temperature controller device; The data alignment module is used to read the second temperature control data from the database server at every preset storage interval and save it into a time series database to obtain time series temperature control data with time series alignment.

9. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the method for aligning thermostat data as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for aligning thermostat data as described in any one of claims 1 to 7 are implemented.