Low-power internet of things module data reporting time synchronization system and method

By using a time synchronization system between the data acquisition unit and the NB-IoT module, the problem of IoT modules being unable to accurately synchronize data acquisition time in low-power conditions is solved, enabling accurate data acquisition time synchronization in low-power conditions and supporting high-precision data analysis.

CN115589629BActive Publication Date: 2026-04-10SICHUAN HONGMEI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

When IoT modules are in a low-power state, they cannot accurately synchronize the data acquisition time, which makes it impossible for the cloud to determine the exact acquisition time of each piece of data. Especially in high-frequency acquisition environments, the cumulative time error is large, affecting the accuracy of data analysis.

Method used

A time synchronization system using a data acquisition device and an NB-IoT module in conjunction with a cloud server is employed. Through the design of a timer and data packet mode, the timer is periodically reset and data packets are uploaded. The cloud server calculates the acquisition time of the sampled data based on the reference time information.

Benefits of technology

It achieves accurate synchronization of data acquisition time in a low-power state, reduces the cumulative error caused by clock oscillator error and environmental influence, and supports high-precision data analysis in the cloud.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589629B_ABST
    Figure CN115589629B_ABST
Patent Text Reader

Abstract

The application relates to a low-power Internet of Things module data reporting time synchronization system and method, which comprises a data collector, an NB-IoT module, a telecom IoT platform and a cloud server. The data collector is used for collecting data to form sampling data, and when the number of the sampling data reaches a preset number, the sampling data is packaged into a first data packet and then sent to the NB-IoT module. The NB-IoT module is used for judging whether the first data packet is received and whether the timing of a second timer reaches a first time interval. If the first data packet is not received but the first time interval is reached, a second data packet in a first mode is generated, the second data packet is sent to the cloud server, and the timing of the second timer and the first timer is cleared. If the first data packet is received but the first time interval is not reached, a second data packet in a second mode is formed and sent to the cloud server. The cloud server is used for processing the second data packets in different modes. The application is convenient for calculating the collection time of the sampling data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things modules, and particularly to a data reporting time synchronization system and method for a low-power Internet of Things module. BACKGROUND

[0002] At present, there are many Internet of Things modules using NB-IoT technology on the market to collect and report field data for cloud-based statistics, analysis and processing. For example, smart water meters, electricity meters, gas meters, etc. NB-IoT Internet of Things technology is a kind of wide-area network supported cellular data connection technology, which is built by telecom operators. It has the advantages of wide coverage, large connection, low cost, low power consumption, etc. It solves the problems of network coverage limitation of ZigBee and Wi-Fi technology, and backwardness of GPRS communication technology.

[0003] However, due to the limitation of the installation environment, the Internet of Things module does not have a stable 220V power supply for long-term power supply, and can only provide power through a battery. In order to reduce the loss of manpower and material resources caused by frequent battery replacement of users, the Internet of Things module needs to work in a low-power state. The low-power state of the Internet of Things module is generally to work in a sleep mode for a long time, and to be awakened after a certain period of time, enter a normal working mode to collect data, send data to the cloud, and then continue to sleep, and repeat the cycle. Because the Internet of Things module works in sleep mode, the power consumption current is 2 to 3 microamperes, and when working in normal mode, especially when sending and receiving data, the power consumption current can reach 50 milliamperes, 1 milliamperes = 1000 microamperes. Therefore, in order to save power, the Internet of Things module for data collection only supports the function of periodic and short-time data reporting to the cloud, and does not support the function of data transmission from the cloud to the Internet of Things module. Because the Internet of Things module needs to receive control commands for a long time to maintain a data receiving state, the power consumption is very large. If one piece of data is reported after collecting one piece of data, there will be high power consumption and high communication cost problems in a high-frequency sampling environment.

[0004] Some intelligent applications supporting big data information analysis need to know the specific time of the data collected by the Internet of Things module, including hours, minutes, seconds, and also years, months, and days. For example, in the high-precision mold rental business in the machinery processing industry, the renter wants to know the main time period of the mold used by the customer in a year, the length of each working time of the mold, the mold usage frequency, and other data, and then master the real service life of the mold, the customer usage rules through data analysis, provide accurate service for mold maintenance, customization, and customer use, and reduce costs. Some businesses need the Internet of Things module to collect data randomly and at a high frequency. For example, a mold is used 100 times in one day, and then it is not used for 20 days. The data needs to be collected and accumulated to a certain amount before being sent out. The Internet of Things module can only accumulate the count of seconds, minutes, and hours locally, and does not know the exact year, month, and day time information. Then, after collecting multiple data samples (such as 50) on site, the data is packaged and uploaded to the cloud. The cloud has no way to know the exact time when each piece of data in the data package was collected. In order to minimize power consumption, the Internet of Things module only supports reporting data and does not work in a high-energy consumption receiving state to receive time synchronization information sent by the cloud. The cloud has no way to synchronize the year, month, and day information of each sampling data with the Internet of Things module. Moreover, because of the process error of the clock crystal hardware of the Internet of Things module itself and the influence of the surrounding working environment, the cumulative time error becomes larger as the working time becomes longer. SUMMARY

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the application provides a low-power Internet of Things module data reporting time synchronization system and method.

[0006] In a first aspect, the application embodiment provides a low-power Internet of Things module data reporting time synchronization system, comprising a data collector, an NB-IoT module, a telecommunications IoT platform, and a cloud server, wherein:

[0007] The data collector is configured to collect data from the sensors of the on-site device, form a sampling data by combining the first timer inside the data collector at the current first timing when collecting the data and the collected data, save the sampling data, pack each piece of sampling data into a first data packet when the number of saved sampling data reaches a preset number, and send the first data packet to the NB-IoT module.

[0008] The NB-IoT module is used for: after being woken up, judging whether the first data packet sent by the data collector is received and whether the timing of the second timer inside the NB-IoT module reaches a first time interval; if the first data packet is not received but the first time interval is reached, a second data packet of a first mode is generated, the second data packet of the first mode is sent to the cloud server through the telecommunication IoT platform, the timing of the second timer is cleared to make the second timer start timing again, a clear instruction is sent to the data collector to make the first timer clear and start timing again, and the sleep state is returned; if the first data packet is received but the first time interval is not reached, a second data packet of a second mode is formed according to the first data packet, the second data packet is forwarded to the cloud server through the telecommunication IoT platform, and the sleep state is returned; wherein the first mode is a synchronous time mode, and the second mode is a sampling data reporting mode.

[0009] The cloud server is used for: if the second data packet of the first mode is received, reference time information is updated as current time information; if the second data packet of the second mode is received, the collection time corresponding to each sampling data in the second data packet of the second mode is calculated according to the current reference time information and the first timing in the sampling data.

[0010] In a second aspect, an embodiment of the present application provides a low-power Internet of Things module data reporting time synchronization method, which is executed by the NB-IoT module in the system provided in the first aspect, and the method comprises the following steps:

[0011] After being woken up, whether the first data packet sent by the data collector is received and whether the timing of the second timer inside the NB-IoT module reaches a first time interval is judged; wherein the data collector collects data from the sensor of the field device, forms a sampling data by the first timer inside the data collector at the current first timing and the collected data when collecting data, saves the sampling data, and when the number of saved sampling data reaches a preset number, each sampling data is packaged into a first data packet and sent to the NB-IoT module;

[0012] If the first data packet is not received but the first time interval is reached, a second data packet of a first mode is generated, the second data packet of the first mode is sent to the cloud server through the telecommunication IoT platform, the timing of the second timer is cleared to make the second timer start timing again, a clear instruction is sent to the data collector to make the first timer clear and start timing again, and the sleep state is returned; wherein the first mode is a synchronous time mode;

[0013] If the first data packet is received but the first time interval is not reached, a second data packet of a second mode is formed according to the first data packet, the second data packet is forwarded to the cloud server through the telecom IoT platform, and the sleep state is returned; wherein the second mode is a sampling data reporting mode.

[0014] The cloud server receiving the second data packet of the first mode updates the reference time information as the current time information; and the cloud server receiving the second data packet of the second mode calculates the collection time of each sampling data according to the current reference time information and the first time in the sampling data in the second data packet of the second mode.

[0015] The low-power Internet of Things module reporting data time synchronization system and method provided by the embodiments of the application have the following beneficial effects after being combined:

[0016] (1) The data collector is responsible for collecting data, forming sampling data with the collected data and the timing of the first timer, and generating a first data packet and sending the first data packet to the NB-IoT module when the number of sampling data reaches a certain data. The NB-IoT module judges whether the first data packet sent by the data collector is received and whether the timing of the second timer inside the NB-IoT module reaches the first time interval in the wake-up state, generates a second data packet of different modes according to the judgment result, and then sends the second data packet to the cloud server. At the same time, if the second data packet is of the first mode, the NB-IoT module will also clear the two timers. After receiving the second data packet of the first mode, the cloud server updates the reference time information as the current time information; after receiving the second data packet of the second mode, the cloud server calculates the collection time of the sampling data according to the current reference time information and the first time in the sampling data in the second data packet of the second mode. As can be seen, in the above system, the NB-IoT module is in a sleep state most of the time, that is, the low-power state of the NB-IoT module is still supported. The NB-IoT module will notify the cloud server to update the reference time information through the second data packet of the first mode every period of time, and also clear the two timers to start timing again. Since the first timer and the second timer are cleared periodically, the cumulative error caused by the long-term cumulative time of the clock oscillator error and the influence of the field environment can be avoided. The NB-IoT module will upload the sampling data to the cloud server through the second data packet of the second mode, so that the cloud server can calculate the collection time of the sampling data according to the current reference time information and the first time in the sampling data, thereby knowing the specific collection time of each sampling data, and facilitating the cloud server to perform big data analysis based on the sampling data with the known specific collection time.

[0017] (2) In one embodiment, the NB-IoT module generates a second data packet of a first mode when powered on, and sends the second data packet of the first mode to the cloud server through the telecom IoT platform, so that the cloud server records the current time information as reference time information, and clears the count of two timers, thereby realizing initialization of the reference time information and the two timers.

[0018] (3) In one embodiment, if the first data packet is received and a first time interval is reached, the NB-IoT module generates a second data packet of a third mode, and sends the second data packet of the third mode to the cloud server through the telecom IoT platform, and clears the count of two timers, so that the cloud server first calculates the collection time corresponding to the sampling data, and then updates the reference time information, thereby ensuring the accuracy of the calculation of the collection time of the sampling data each time. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application, together with the description.

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced hereinafter. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0021] Figure 1 FIG. 1 is a structural schematic diagram of a data reporting time synchronization system of a low-power Internet of Things module in one embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort fall within the scope of protection of the present application.

[0023] The embodiments of the present application provide a data reporting time synchronization system of a low-power Internet of Things module.

[0024] Reference is made to Figure 1 The system comprises a data collector, an NB-IoT module, a telecom IoT platform and a cloud server, wherein:

[0025] The data collector is configured to collect data from the sensors of the field device, form a piece of sample data by combining the collected data with a first time of a first timer inside the data collector at the time of collecting the data, save the sample data, pack each piece of sample data into a first data packet when the number of saved sample data reaches a preset number, and send the first data packet to the NB-IoT module.

[0026] The NB-IoT module is configured to determine whether the first data packet sent by the data collector is received and whether a second timer inside the NB-IoT module reaches a first time interval after being woken up; if the first data packet is not received but the first time interval is reached, generate a second data packet of a first mode, send the second data packet of the first mode to the cloud server through the telecom IoT platform, clear the second timer to make the second timer start timing again, send a clear instruction to the data collector to make the first timer clear and start timing again, and return to the sleep state; if the first data packet is received but the first time interval is not reached, form a second data packet of a second mode according to the first data packet, and forward the second data packet to the cloud server through the telecom IoT platform, and return to the sleep state; wherein the first mode is a synchronous time mode, and the second mode is a sample data reporting mode.

[0027] The cloud server is configured to update the reference time information to the current time information if the second data packet of the first mode is received, and calculate the collection time corresponding to each piece of sample data in the second data packet of the second mode according to the reference time information and the first time of each piece of sample data.

[0028] It can be understood that the function of the data collector is to collect data from various sensors of the field device, such as temperature, motor speed, etc. A first timer is built in the data collector, which will wake up the data collector after timing to a certain time. The woken-up data collector will collect data once, form a piece of sample data by combining the collected data with the first time of the first timer at the time of collecting the data, and save the sample data. The above process is the operation of the data collector in the wake-up state. In order to save power, if the number of saved sample data does not reach the preset number (for example, 50), the data collector will return to the sleep state. If the number of saved sample data reaches the preset number, the sample data will be packed into a data packet, which is called a first data packet, and then the first data packet will be sent to the NB-IoT module, and then return to the sleep state.

[0029] It can be understood that some sensor data needs to be collected in a timely manner, and the first timer needs to be awakened in a timely manner for data collector. The data of some sensors is random and cannot be collected in a timely manner. In this case, the sensor can send a signal to the data collector, and the data collector will be triggered by the signal of the sensor. After being triggered, the data collector collects data from the sensor, collects the collected data and the first time of the first timer to form a sampling data, and saves the sampling data. Further, it is judged whether the number of sampling data reaches the preset number of operations, and after a series of operations are completed, it returns to the sleep state.

[0030] It can be seen that there are two ways to wake up the data collector: one is to wake up when the first timer in the data collector reaches the second time interval; and the other is to wake up when receiving the trigger signal sent by the sensor.

[0031] It can be understood that the role of the NB-IoT module is to determine whether the first data packet is received and whether the second timer built-in the NB-IoT module reaches the first time interval in the wake-up state, and then generate a second data packet of different modes according to different judgment structures:

[0032] (1) The first mode of the second data packet is generated when the first data packet is not received but the first time interval is reached. The first mode of the second data packet does not contain sampling data, but contains time synchronization related information. At this time, the two timers need to be cleared, so that the two timers start timing again. At the same time, the first mode of the second data packet is sent to the telecom IoT platform, and the telecom IoT platform sends the first mode of the second data packet to the cloud server, so that the cloud server updates the current reference time information. After a series of operations are performed, the NB-IoT module returns to the sleep state.

[0033] (2) The second mode of the second data packet is generated when the first data packet is received but the first time interval is not reached. The second mode of the second data packet contains sampling data, but does not contain time synchronization related information. The two timers do not need to be cleared, and the second mode of the second data packet is sent to the telecom IoT platform, and the telecom IoT platform sends the second mode of the second data packet to the cloud server. The cloud server calculates the sampling time corresponding to each sampling data according to the current reference time information and the first time in the sampling data in the second data packet. After a series of operations are performed, the NB-IoT module returns to the sleep state.

[0034] The NB-IoT module has two wake-up modes, one of which is to be woken up when the second timer inside the NB-IoT module reaches the first time interval, and the other is to be woken up when the first data packet sent by the data collector is received. The NB-IoT module itself does not know which mode it is woken up in, so it determines which mode of the second data packet to generate after entering the wake-up state by judging whether the first data packet sent by the data collector is received and whether the second timer inside the NB-IoT module reaches the first time interval.

[0035] It can be understood that the role of the cloud server is to update the current reference time information when the second data packet of the first mode is received, and to calculate the collection time of each piece of sampling data when the second data packet of the second mode is received.

[0036] In one embodiment, the NB-IoT module can also be used to generate a second data packet of the first mode when powered on, and send the second data packet of the first mode to the cloud server through the telecom IoT platform, so that the cloud server records the current time information as reference time information, clears the second timer to start timing, and sends a clear instruction to the data collector to clear the first timer and start timing.

[0037] That is, the second data packet of the first mode is generated when powered on, the timing of the two timers is cleared to restart the timing of the two timers, and the second data packet of the first mode is sent to the cloud server to record the current time as the reference time information. It can be seen that the above process when powered on is actually an initialization process.

[0038] In one embodiment, the NB-IoT module can also be used to generate a second data packet of the third mode if the first data packet is received and the first time interval is reached, and send the second data packet of the third mode to the cloud server through the telecom IoT platform, clear the second timer to start timing, and send a clear instruction to the data collector to clear the first timer and start timing; wherein the third mode is a mode of synchronizing time and reporting sampling data.

[0039] Correspondingly, the cloud server is configured to calculate the collection time of each piece of sampling data corresponding to the reference time information and the first timing in each piece of sampling data in the second data packet of the third mode when the second data packet of the third mode is received, and update the reference time information to the current time information after the collection time of each piece of sampling data is calculated.

[0040] It can be seen that this belongs to the third case:

[0041] The NB-IoT module receives the first data packet and the second timer reaches the first time interval, and a second data packet of the third mode is generated, which has the need to update the reference time information and the need to calculate the collection time, so the counting of the two timers is cleared to make the two timers start counting again. The second data packet of the third mode is sent to the cloud server. Since the first time in the sampling data in the second data packet of the third mode is counted based on the current reference time information, the cloud server must first calculate the collection time corresponding to each sampling data, and then update the reference time information, so as to ensure the accuracy of the calculation of the collection time.

[0042] In one embodiment, the second data packet can include a mode field, which uses different characters to represent different modes of the second data packet, and the mode includes the first mode, the second mode and the third mode.

[0043] For example, the mode field is the mode field, which can be represented by 7 bits, 0 represents only reporting sampling data, i.e. the second mode. 1 represents only reporting time synchronization related information, i.e. the first mode. 2 represents reporting both sampling data and synchronization time related information, i.e. the third mode.

[0044] In one embodiment, the second data packet can include a synchronization interval field and a packet field:

[0045] The synchronization interval field is used to represent the first time interval to inform the cloud server of the time interval for time synchronization;

[0046] The packet field includes a number field and a plurality of subfields, the number field is used to represent the number of subfields; each subfield is used to store a sampling data in the first data packet; each subfield includes a first subfield and a second subfield, the first subfield is used to store the first time in a sampling data, and the second subfield is used to store the data collected from the sensor in a sampling data;

[0047] Among them, the packet field in the second data packet of the first mode is empty; the synchronization interval field in the second data packet of the second mode is empty, and the synchronization interval field and the packet field in the second data packet of the third mode are both non-empty.

[0048] For example, the syc_time field is a field for the NB-IoT module to agree with the cloud server on a first time interval for time synchronization, and the first time interval ranges from 0 to 65536 minutes, theoretically up to 1092 hours, indicating how often the NB-IoT module and the cloud server update the reference time information.

[0049] For example, the packet field is a multi-byte field, and the packet field includes a number field and a plurality of subfields. The number field is used to indicate the number of sampling data, i.e., the number of subfields. One subfield is used to store one piece of sampling data. Since the sampling data includes data collected from the sensor and the first time, each subfield includes a first subfield and a second subfield. The first subfield is used to store the first time in the corresponding sampling data, and the second subfield is used to store the data collected from the sensor in the corresponding sampling data.

[0050] For example, two pieces of sampling data are included in one packet field, so the number field is 2, and two subfields are included. The first subfield includes a first subfield time1 and a second subfield sample1, and the second subfield includes a first subfield time2 and a second subfield sample2.

[0051] Among them, time1 is used to record the first time of the first timer when collecting data for the first time, and the unit is millisecond, and the maximum time is 1193 hours. sample1 is used to record the data collected from the sensor when collecting data for the first time. The data content is defined according to the product, such as temperature, voltage, switch state, etc. time2 is the first time of the first timer when collecting data for the second time, and sample2 is used to record the data collected from the sensor when collecting data for the second time.

[0052] In practice, since the mode includes 1 byte, i.e., 8 bits, the first 7 bits are used to represent mode information. The 8th bit, i.e., bit7, can be used to represent the battery power state of the NB-IoT module. For example, 0 represents normal power, and 1 represents power lower than the warning value.

[0053] Of course, a separate field can also be used to represent the power state. In an embodiment, the second data packet can include a power state field, and the power state field uses different characters to represent whether the battery power of the NB-IoT module is lower than the warning value. Correspondingly, the cloud server can also be configured to send a battery replacement reminder to the mobile terminal of the worker if the power state field in the received second data packet represents that the battery power of the NB-IoT module is lower than the warning value.

[0054] In this way, the battery power state of the NB-IoT module of the cloud server is reminded, and when the battery power of the NB-IoT module is lower than the warning value, the cloud server can send a battery replacement reminder message to the mobile terminal of the worker, so that the worker replaces the battery in time to avoid affecting the normal work of the NB-IoT module.

[0055] For example, the second data packet can be represented by the following table 1:

[0056] Table 1

[0057] mode id_time syc_time packet 1 byte 1 byte 2 bytes multiple bytes

[0058] In the above table 1, bits 0 to 6 in the mode field represent the mode. 0 means only reporting sampling data without time synchronization information, at which time the syc_time field content is empty. 1 means only reporting time synchronization information without sampling data, at which time the packet field content is empty. 2 means reporting both time synchronization information and sampling data, and the syc_time field content and the packet field content are both non-empty. Bit 7 represents the battery power state of the NB-IoT module, 0 means normal, and 1 means low power warning.

[0059] It can be seen that the packet field in the second data packet of the first mode is empty, the synchronization interval field in the second data packet of the second mode is empty, and the synchronization interval field and the packet field in the second data packet of the third mode are both non-empty.

[0060] The Id_time field records the number of updates of the reference time information, and this field has data in the second data packet of the first mode or the third mode, and is empty in the second data packet of the second mode. Id_time is counted from 0 to 255. Each time the time synchronization information is sent, it is updated to provide a reference basis for the cloud to analyze the collected data reported by the Internet of Things module. The syc_time field is the synchronization interval field, and the counting range is 0 to 65536 minutes.

[0061] The packet field is the packet field, and the specific content is shown in the following table 2:

[0062] number id len time1 sample1 time2 sample2 1 byte 1 byte 1 byte 4 bytes n bytes 4 bytes n bytes

[0063] In Table 2, the packet field is actually the content in the first data packet. The number field records the number of sample data. The id field is the identification of the first data packet, the len field identifies the data length of a piece of sample data, and the data length = 4 (time1) + n (sample1). The meanings of the time1, sample1, time2, and sample2 fields have been explained above. Among them, the number * (4 + n) is not greater than 900 bytes, because the maximum capacity of a frame of data reported by the NB-IoT module each time is 1024 bytes, and considering the occupied bytes of the protocol, the maximum capacity of the data collection packet is recommended to be not greater than 900 bytes.

[0064] It can be understood that when the NB-IoT module is powered on, it connects to the network for the first time and actively reports a first time interval, at which time the id_time field is 1, thereby informing the cloud server that it is the first time to set the reference time information, i.e., the initialization of the reference time information. And through the syc_time field, the cloud server is informed of the interval of each subsequent synchronization time. When the second timer built-in the NB-IoT module times out at each first time interval, whether there is sample data to be reported or not, the NB-IoT module will generate a second data packet and send it to the cloud server. The syc_time field is set by the user according to the product use scenario, such as 1 hour, 12 hours, 24 hours, etc.

[0065] It can be understood that each time the NB-IoT module generates a second data packet of the first mode or a second data packet of the third mode, the second timer inside the NB-IoT module and the first timer in the data collector will be reset, so that the two timers start timing again. Because the second data packet of the first mode and the second data packet of the third mode will cause the cloud server to update the reference time information.

[0066] It can be understood that each time the data collector receives the reset instruction sent by the NB-IoT module, it will immediately reset the timing of the first timer, so that each time the sample data is recorded in the packet field, the first timing in the timt1, time2, etc. fields is timed from this moment as 0.

[0067] It can be understood that each time the cloud server receives a second data packet of the first mode or the third mode, it will update the reference time information according to the current year, month, day, hour, minute, and second time information, indicating that from now on until the next first mode or third mode second data packet is received, the first timing of the sample data in the second mode second data packet is accumulated from the current reference time information.

[0068] For example, the cloud receives a second data packet of a first mode, and the time is 10:32:54 on September 9, 2022. The cloud server records the time as the reference time information systime1. In the second data packet of the first mode, id_time = 1, and syc_time is 12 hours. After 10 minutes of receiving the second data packet of the first mode, the cloud server receives a second data packet of a second mode, which includes two pieces of sampling data, time1 = 23 seconds and time2 = 9 minutes and 11 seconds in the packet field. The cloud server calculates the collection time of the first piece of sampling data sample1 as systime1 + time1 = 10:33:17 on September 9, 2022. The collection time of sample2 is systime1 + time2 = 10:42:05 on September 9, 2022. It can be seen that the collection time of the data collected from the sensor in each piece of sampling data can be calculated in this way.

[0069] After 12 hours of receiving the second data packet of the first mode, a second data packet of a third mode is received. In the second data packet, id_time = 2, and the cloud server needs to update the reference time information and calculate the collection time. Specifically, the cloud server first calculates the collection time of each piece of sampling data in the second data packet of the third mode based on systime1. Since these data are obtained in the time period after systime1, the reference time should be systime1. After the calculation is completed, the current time 22:32:54 on September 9, 2022 is taken as the reference time information systime2. The sampling data in the next time interval are sampled based on systime2.

[0070] In the embodiment of the application, the NB-IoT module works in a low-power state, and only needs to collect and report data. The cloud server can calculate the collection time in detail to the level of year, month, day, minute, second, and even millisecond. Since the first timer and the second timer are periodically reset to zero, the cumulative error caused by the long-term cumulative time of the clock oscillator error and the influence of the field environment can be avoided.

[0071] The NB-IoT module can periodically update the reference time information with the cloud server, and the period is the first time interval, which can be 10 seconds, 1 hour, 1 day, etc. The NB-IoT module is based on the cellular mobile NB-IoT network communication technology. The first time interval is greater than the second time interval.

[0072] It can be understood that the data collector, the NB-IoT module, the cloud server and the telecommunication IoT platform in the scheme work cooperatively, and the NB-IoT module works in a sleep state most of the time. The NB-IoT module is woken up when the timing of the second timer reaches the first time interval or when a first data packet sent by the data collector is received, and performs a series of operations after being woken up and returns to the sleep state after the operations are performed. The cloud server can calculate the detailed collection time of each piece of sampling data, for example, the year, month, day, minute, second and millisecond level, to provide data support for cloud big data intelligent analysis.

[0073] It can be understood that the data collector is an MCU supporting a low-power mode, and the data collector is connected to the sensors of the field device through a relevant bus interface (for example, UART, I2C, SPI) or GPIO. The MCU works in a sleep state, that is, a low-power state, and can be woken up to collect data when the timing of the first timer reaches the second time interval. The second time interval can be configured as 10 seconds, 1 hour, 1 day or the like. The data collector can also be woken up by the sensors of the field device, and the specific sensors trigger the data collector in a very short time by changing the high and low states of the GPIO level. The data collector is woken up to collect data, save data and the like, and then returns to the sleep state.

[0074] The data collector saves a certain number of pieces of sampling data to form a first data packet, and then reports the first data packet to the NB-IoT module through an RS232 or RS485 bus. The amount of sampling data in the first data packet is not greater than 900 bytes.

[0075] The data collector is responsible for collecting and saving the data of each sensor on the local field device to form a first data packet and transmit the first data packet to the NB-IoT module. The NB-IoT module is responsible for generating a second data packet and uploading the second data packet to the telecommunication IoT platform. The telecommunication IoT platform is responsible for the data access function of the NB-IoT module and forwards the second data packet to the cloud server. The telecommunication IoT platform includes an IoT device and a data management platform operated by a telecommunication operator. The domestic telecommunication operators include China Telecom, China Mobile and China Unicom. The cloud server is responsible for receiving the second data packet forwarded by the telecommunication IoT platform, and then performing different processing according to different modes of the second data packet. The cloud server is managed and maintained by a user.

[0076] In a second aspect, the embodiment of the present application provides a reporting data time synchronization method of a low-power Internet of Things module, and the method is executed by the NB-IoT module in the system provided in the first aspect. The method comprises the following steps.

[0077] determining whether the first data packet sent by the data collector is received and whether the second timer inside the NB-IoT module reaches a first time interval after being woken up; wherein the data collector collects data from a sensor of a field device, and forms a piece of sampling data by combining a current first time of a first timer inside the data collector at the time of collecting the data and the collected data, saves the sampling data, and packs each piece of the sampling data into a first data packet when a number of pieces of the saved sampling data reaches a preset number and sends the first data packet to the NB-IoT module;

[0078] if the first data packet is not received but the first time interval is reached, generating a second data packet of a first mode, sending the second data packet of the first mode to a cloud server through a telecom IoT platform, resetting the second timer to make the second timer start timing again, sending a reset instruction to the data collector to make the first timer reset and start timing again, and returning to a sleep state; wherein the first mode is a synchronous time mode;

[0079] if the first data packet is received but the first time interval is not reached, forming a second data packet of a second mode according to the first data packet, forwarding the second data packet to the cloud server through the telecom IoT platform, and returning to the sleep state; wherein the second mode is a sampling data reporting mode;

[0080] wherein the cloud server receiving the second data packet of the first mode updates reference time information as current time information; and the cloud server receiving the second data packet of the second mode calculates a collection time corresponding to each piece of sampling data according to the current reference time information and the first time in each piece of sampling data in the second data packet of the second mode.

[0081] In one embodiment, the method can further include:

[0082] if the first data packet is received and the first time interval is reached, generating a second data packet of a third mode, and sending the second data packet of the third mode to the cloud server through the telecom IoT platform; wherein the third mode is a synchronous time and sampling data reporting mode;

[0083] wherein the cloud server receiving the second data packet of the third mode calculates a collection time corresponding to each piece of sampling data according to the reference time information and the first time in each piece of sampling data in the second data packet of the third mode, and updates the reference time information as current time information after the calculation of the collection time corresponding to each piece of sampling data is completed.

[0084] In one embodiment, the method further includes:

[0085] generating a second data packet of a first mode when powered on, and sending the second data packet of the first mode to the cloud server through the telecom IoT platform, so that the cloud server records the current time information as reference time information, clears the count of the second timer to make the second timer start counting, and sends a clear instruction to the data collector to clear and start counting the first timer.

[0086] In one embodiment, the second data packet includes a mode field, and different characters in the mode field represent different modes of the second data packet, including the first mode, the second mode and the third mode.

[0087] In one embodiment, the second data packet includes a synchronization interval field and a packet field, wherein: the synchronization interval field is used to represent the first time interval to inform the cloud server of the time interval for time synchronization; the packet field includes a number field and a plurality of subfields, the number field is used to represent the number of subfields; each subfield is used to store a piece of sampling data in the first data packet; each subfield includes a first subfield and a second subfield, the first subfield is used to store the first count in a piece of sampling data, and the second subfield is used to store the data collected from the sensor in a piece of sampling data; wherein the packet field in the second data packet of the first mode is empty; the synchronization interval field in the second data packet of the second mode is empty, and the synchronization interval field and the packet field in the second data packet of the third mode are both non-empty.

[0088] In one embodiment, the second data packet includes a power state field, and different characters in the power state field represent whether the battery power of the NB-IoT module is lower than a warning value; correspondingly, the cloud server is further configured to send a battery replacement reminder to the mobile terminal of the staff if the power state field in the received second data packet represents that the battery power of the NB-IoT module is lower than the warning value.

[0089] In one embodiment, the wake-up mode of the NB-IoT module includes: being woken up when the count of the second timer inside the NB-IoT module reaches a first time interval or when the first data packet sent by the data collector is received.

[0090] In one embodiment, the wake-up mode of the data collector includes: being woken up when the first timer inside the data collector reaches a second time interval, or being woken up when a trigger signal sent by the sensor is received, collecting data from the sensor of the field device after being woken up, and returning to a sleep state after performing the corresponding operation.

[0091] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the device embodiments, the description is relatively simple because the device embodiments are basically similar to the method embodiments, and the relevant parts can be referred to the description of the method embodiments.

[0092] Those skilled in the art can realize that the functions described in the present application can be realized by hardware, software, a plug-in or any combination thereof in one or more examples. When realized by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on the computer readable medium.

[0093] The above detailed description of the specific embodiments has further explained the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the present application shall be included in the protection scope of the present application.

Claims

1. A system for synchronizing reporting data time of a low-power Internet of Things module, characterized in that, The system comprises a data collector, an NB-IoT module, a telecom IoT platform and a cloud server, wherein: The data collector is configured to collect data from sensors of field devices, form a piece of sampling data by combining a current first time of a first timer inside the data collector with the collected data, save the sampling data, pack each piece of the saved sampling data into a first data packet when a number of the saved sampling data reaches a preset number, and send the first data packet to the NB-IoT module; The NB-IoT module is configured to determine whether the first data packet sent by the data collector is received and whether a second timer inside the NB-IoT module reaches a first time interval after being woken up; if the first data packet is not received but the first time interval is reached, generate a second data packet of a first mode, send the second data packet of the first mode to the cloud server through the telecom IoT platform, clear the second timer to make the second timer start timing again, send a clear instruction to the data collector to clear the first timer and make the first timer start timing again, and return to a sleep state; if the first data packet is received but the first time interval is not reached, form a second data packet of a second mode according to the first data packet, and forward the second data packet of the second mode to the cloud server through the telecom IoT platform and return to the sleep state; the first mode is a synchronous time mode, and the second mode is a sampling data reporting mode; The cloud server is configured to update reference time information to current time information if the second data packet of the first mode is received, and calculate a collection time corresponding to each piece of sampling data in the second data packet of the second mode according to the reference time information and the first time of each piece of sampling data if the second data packet of the second mode is received; The NB-IoT module is further configured to generate a second data packet of a third mode if the first data packet is received and the first time interval is reached, send the second data packet of the third mode to the cloud server through the telecom IoT platform, clear the second timer to make the second timer start timing, and send a clear instruction to the data collector to clear the first timer and make the first timer start timing; the third mode is a synchronous time and sampling data reporting mode; Correspondingly, the cloud server is configured to calculate a collection time corresponding to each piece of sampling data in the second data packet of the third mode according to the reference time information and the first time of each piece of sampling data when the second data packet of the third mode is received, and update the reference time information to current time information after the collection time corresponding to each piece of sampling data is calculated.

2. The system of claim 1, wherein, The NB-IoT module is further configured to generate a second data packet of the first mode when powered on, and send the second data packet of the first mode to the cloud server through the telecommunication IoT platform, so that the cloud server records current time information as reference time information, clears the count of the second timer to start the count of the second timer, and sends a clearing instruction to the data collector to clear and start the count of the first timer.

3. The system of claim 1, wherein, The second data packet comprises a mode field, and different characters in the mode field represent different modes of the second data packet, the modes comprising the first mode, the second mode and the third mode.

4. The system of claim 1, wherein, The second data packet comprises a synchronization interval field and a packet field, wherein: The synchronization interval field is used to represent the first time interval, to inform the cloud server of the time interval for time synchronization; The packet field comprises a quantity field and a plurality of subfields, the quantity field being used to represent the number of the subfields, each subfield being used to store a piece of sampling data in the first data packet, each subfield comprising a first subfield and a second subfield, the first subfield being used to store the first count in a piece of sampling data, and the second subfield being used to store the data collected from the sensor in a piece of sampling data; The packet field in the second data packet of the first mode is empty, the synchronization interval field in the second data packet of the second mode is empty, and the synchronization interval field and the packet field in the second data packet of the third mode are both non-empty.

5. The system of claim 1, wherein, The second data packet comprises a power state field, and different characters in the power state field represent whether the battery power of the NB-IoT module is lower than a warning value; Correspondingly, the cloud server is further configured to send a battery replacement reminder to a mobile terminal of a staff member if the power state field in the received second data packet represents that the battery power of the NB-IoT module is lower than the warning value.

6. The system of claim 1, wherein, The NB-IoT module is configured to be woken up whenever the count of the second timer inside the NB-IoT module reaches the first time interval or upon receiving the first data packet sent by the data collector.

7. The system of claim 1, wherein, The data collector is specifically configured to be woken up when the first timer inside the data collector reaches the second time interval, or upon receiving a trigger signal sent by the sensor, collect data from the sensor of the field device after being woken up, and return to a sleep state after performing corresponding operations. 8.A method for reporting data time synchronization of a low-power Internet of Things module, characterized in that, The method is performed by the NB-IoT module in the system of any one of claims 1-7, and the method comprises: determining whether the first data packet sent by the data collector is received and whether the second timer inside the NB-IoT module reaches a first time interval after being woken up; wherein the data collector collects data from sensors of field devices, and forms a piece of sampling data by combining the first timer inside the data collector at the time of collecting data and the collected data, saves the sampling data, and packs each piece of sampling data into a first data packet when the number of saved pieces of sampling data reaches a preset number and sends the first data packet to the NB-IoT module; if the first data packet is not received but the first time interval is reached, a second data packet of a first mode is generated, the second data packet of the first mode is sent to a cloud server through a telecom IoT platform, the timing of the second timer is cleared to make the second timer start timing again, a clear instruction is sent to the data collector to make the first timer clear and start timing again, and the NB-IoT module returns to a sleep state; wherein the first mode is a synchronous time mode; if the first data packet is received but the first time interval is not reached, a second data packet of a second mode is formed according to the first data packet, the second data packet of the second mode is forwarded to the cloud server through the telecom IoT platform, and the NB-IoT module returns to the sleep state; wherein the second mode is a sampling data reporting mode; wherein the cloud server receiving the second data packet of the first mode updates reference time information to current time information, and the cloud server receiving the second data packet of the second mode calculates the collection time corresponding to each piece of sampling data according to the current reference time information and the first timing in each piece of sampling data in the second data packet of the second mode; further comprising: if the first data packet is received and the first time interval is reached, the NB-IoT module generates a second data packet of a third mode, sends the second data packet of the third mode to the cloud server through the telecom IoT platform, clears the timing of the second timer to make the second timer start timing, and sends a clear instruction to the data collector to make the first timer clear and start timing; wherein the third mode is a synchronous time and sampling data reporting mode; when the second data packet of the third mode is received, the cloud server calculates the collection time corresponding to each piece of sampling data according to the reference time information and the first timing in each piece of sampling data in the second data packet of the third mode, and updates the reference time information to current time information after the calculation of the collection time corresponding to each piece of sampling data is completed.

Citation Information

Patent Citations

  • Method for awakening wireless sensor, wireless sensor and wireless sensor system

    CN102740427A

  • Intelligent sensing equipment and sensing system

    CN107124458A