A Protocol-Based Data Communication Method and System for the Central Control Host in the Internet of Things
By collecting and analyzing the data update parameters of IoT devices, dynamically adjusting the data synchronization mechanism, the problem of different IoT device protocols and irregular update cycles is solved, real-time collection and update of device data by the central control host is realized, and data integrity and continuity are improved.
Patent Information
- Application Number
- CN202510421405.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-04-07
AI Technical Summary
IoT devices adopt different protocols, and the data update cycle is not fixed, resulting in the central control host being unable to obtain the latest data of all devices in real time.
By collecting data update parameters of IoT devices, we can determine whether there is an update abnormality, divide the device frequency, unify the preset time reference, add local data buffers, dynamically adjust the data synchronization mechanism, and realize real-time data collection and update.
The real-time data acquisition capability of the central control host for multi-protocol IoT devices is improved, the polling cycle is optimized, unnecessary requests are reduced, data loss and redundancy is avoided, and data integrity and continuity are ensured.
Smart Images

Figure CN119946030B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication data processing, and particularly to a method and system for data communication of an IoT central control host based on protocols. Background Art
[0002] In an Internet of Things (IoT) system, the central control host, as the core data communication node, is responsible for data interaction with multiple terminal devices, issuing control instructions, and status monitoring.
[0003] The method for data communication of an IoT central control host based on protocols mainly involves the integration and management of multiple communication protocols (such as RS485, Modbus, MQTT, BACnet, Zigbee, BLE, etc.) to achieve the interconnection and interoperability of cross-protocol devices. However, due to the large number of IoT device types and complex network environments, it is difficult to ensure data synchronization and consistency. Summary of the Invention
[0004] The present invention aims to solve the problem that IoT devices use different protocols and the data update cycle is not fixed, resulting in the central control host being unable to obtain the latest data of all devices in real time, and provides a method and system for data communication of an IoT central control host based on protocols.
[0005] The present invention adopts the following technical means to solve the technical problems:
[0006] The present invention provides a method for data communication of an IoT central control host based on protocols, including:
[0007] Collecting the data update parameters of the IoT devices preset in the central control host, where the data update parameters specifically include a data update timestamp and a data value;
[0008] Judging whether a preset update anomaly is detected in the data update parameters, where the update anomaly specifically includes an unstable update cycle and no update for a long time;
[0009] If so, dividing the frequency devices of the IoT devices according to the data update requirements of the IoT devices, unifying a preset time reference to calculate the data collection interval, adding a local data buffer at the gateway end preset in the central control host, and allowing the return of the previous data collection value within a preset time period, where the frequency devices specifically include high-frequency devices, medium-frequency devices, and low-frequency devices;
[0010] Judging whether the return of the previous data collection value exceeds a preset number of times;
[0011] If it exceeds, a preset data refresh request is sent to the central control host. Based on the data refresh request, the preset polling period is shortened to forcibly obtain the latest data. The latest data is compared with the previous data acquisition value, and according to the pre-recorded historical data trend, the missing estimation value of the data update requirement is calculated, and the missing estimation value is filled into the missing data.
[0012] Further, in the step of dividing the frequency devices of the Internet of Things devices according to the data update requirements of the Internet of Things devices, it further includes:
[0013] Based on the usage requirements of the central control host, the data synchronization frequency of the frequency device is collected;
[0014] Judge whether the data synchronization frequency matches the data update requirement;
[0015] If not, then according to the preset cache hierarchical structure of the central control host, the preset data synchronization mechanism is dynamically adjusted. Based on the data synchronization mechanism, the preset differential data detection of the central control host is activated. Among them, the cache hierarchical structure specifically includes a local cache layer, an edge computing layer, and a cloud storage layer. The data synchronization mechanism specifically includes on-demand synchronization and batch synchronization. The differential data detection is specifically to synchronize only the changed data to reduce data redundancy.
[0016] Further, before the step of adding a local data buffer on the preset gateway end of the central control host and allowing the return of the previous data acquisition value within a preset time period, it further includes:
[0017] Based on the preset data reporting period of the central control host, the data update mode of the Internet of Things device is obtained. Among them, the data update mode specifically includes scheduled reporting, event triggering, and on-demand request;
[0018] Judge whether the data update mode matches the central control host;
[0019] If not, then a data caching strategy for the Internet of Things device is constructed. According to the data update frequency, the effective time range of the data cache is dynamically adjusted. Based on the data caching strategy, data caching of preset inapplicable devices is restricted. Among them, the inapplicable devices specifically include camera video streams and transient event monitoring devices.
[0020] Further, in the step of sending a preset data refresh request to the central control host, it further includes:
[0021] Based on the communication data format of the Internet of Things device, the communication method of the Internet of Things device is detected. Among them, the communication data format specifically includes JSON, XML, and binary stream;
[0022] Determine whether the preset encrypted communication needs to be enabled for the communication method;
[0023] If so, construct corresponding data request content according to the communication address of the Internet of Things device, and dynamically adjust the request interval period of the data request content according to the data update requirement, where the communication address specifically includes an IP domain name, a port number, and an authentication method, and the data request content specifically includes a specified target device ID, a set data time range, and an increased request priority.
[0024] Further, in the step of determining whether a preset update anomaly is detected in the data update parameter, it further includes:
[0025] Based on the preset data update interval of the Internet of Things device, identify the corresponding data change rate;
[0026] Determine whether the data change rate exceeds a preset change threshold;
[0027] If not, obtain the field integrity during data update, and detect the abnormal device with data anomalies according to the field integrity, and batch send a preset data re-acquisition request to the abnormal device through the central control host, where the field integrity specifically includes a field value and a field format.
[0028] Further, in the step of determining whether the return of the previous data acquisition value exceeds a preset number of times, it further includes:
[0029] Based on the preset heartbeat detection of the central control host, identify the communication status of the Internet of Things device;
[0030] Determine whether the communication status is offline;
[0031] If not, collect the timeout information of the Internet of Things device, obtain the data packet loss rate during data update according to the timeout information, and compare the data packet loss rate with the preset data reception timestamp of the central control host to detect the corresponding delay and lost data.
[0032] Further, in the step of collecting the data update parameter of the Internet of Things device based on the central control host preset for the Internet of Things device, it further includes:
[0033] Based on the operation log of the Internet of Things device, detect the communication quality between the central control host and the Internet of Things device, where the operation log specifically includes an average online rate, a disconnection number, and a disconnection time period, and the communication quality specifically includes network delay, packet loss rate, and signal strength;
[0034] Determine whether the communication quality reaches a preset quality threshold;
[0035] If not, the central control host identifies a preset high packet loss device, dynamically adjusts the data reporting interval according to the communication quality, and adaptively reduces the data transmission frequency based on the data reporting interval.
[0036] The present invention also provides an Internet of Things central control host data communication system based on a protocol, including:
[0037] An acquisition module, configured to acquire data update parameters of the Internet of Things device based on the Internet of Things device preset by the central control host, where the data update parameters specifically include a data update timestamp and a data value;
[0038] A judgment module, configured to judge whether a preset update exception is detected in the data update parameters, where the update exception specifically includes an unstable update period and no update for a long time;
[0039] An execution module, configured to, if so, divide the frequency devices of the Internet of Things device according to the data update requirements of the Internet of Things device, calculate the data acquisition interval based on the frequency devices by unifying a preset time reference, add a local data buffer on the gateway side preset by the central control host, and allow the return of the previous data acquisition value within a preset time period, where the frequency devices specifically include high-frequency devices, medium-frequency devices, and low-frequency devices;
[0040] A second judgment module, configured to judge whether the return of the previous data acquisition value exceeds a preset number of times;
[0041] A second execution module, configured to, if it exceeds, send a preset data refresh request to the central control host, shorten a preset polling period based on the data refresh request, forcefully obtain the latest data, compare the latest data with the previous data acquisition value, calculate a missing estimation value of the data update requirements according to the pre-recorded historical data trend, and fill the missing estimation value into the missing data.
[0042] Further, the execution module further includes:
[0043] An acquisition unit, configured to acquire the data synchronization frequency of the frequency device based on the usage requirements of the central control host;
[0044] A judgment unit, configured to judge whether the data synchronization frequency matches the data update requirements;
[0045] An execution unit, which, if the answer is no, dynamically adjusts a preset data synchronization mechanism according to a cache layering structure preset in the central control host, and activates a differential data detection preset in the central control host according to the data synchronization mechanism. The cache layering structure specifically includes a local cache layer, an edge computing layer, and a cloud storage layer. The data synchronization mechanism specifically includes on-demand synchronization and batch synchronization. The differential data detection specifically means synchronizing only the changed data to reduce data redundancy.
[0046] Further, it further includes:
[0047] An acquisition module, which is used to acquire a data update mode of the Internet of Things device based on a data reporting period preset in the central control host, where the data update mode specifically includes scheduled reporting, event triggering, and on-demand request;
[0048] A third judgment module, which is used to judge whether the data update mode matches the central control host;
[0049] A third execution module, which, if the answer is no, constructs a data caching strategy for the Internet of Things device, dynamically adjusts an effective time range of data caching according to a data update frequency, and restricts data caching of preset inapplicable devices according to the data caching strategy, where the inapplicable devices specifically include camera video streams and transient event monitoring devices.
[0050] The present invention provides a method and system for data communication of an Internet of Things central control host based on a protocol, having the following beneficial effects:
[0051] Through means such as data update timestamp detection, device update frequency division, and local data buffering, the present invention improves the real-time data acquisition ability of the central control host for multi-protocol Internet of Things devices, adopts a hierarchical acquisition strategy, optimizes the polling period for devices with different frequencies, reduces unnecessary requests, and at the same time avoids data loss caused by long-term non-response of low-frequency update devices. It can also intelligently detect data update anomalies, trigger data refresh requests, shorten the polling period, and ensure the acquisition of the latest data. Finally, through historical data trend analysis, the missing estimation value is calculated for data compensation to improve data integrity and continuity. Description of the Drawings
[0052] Figure 1 It is a flowchart of an embodiment of a method for data communication of an Internet of Things central control host based on a protocol of the present invention;
[0053] Figure 2 It is a structural block diagram of an embodiment of a system for data communication of an Internet of Things central control host based on a protocol of the present invention. Detailed Embodiments
[0054] It should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention. The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
[0055] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0056] Refer to the attached Figure 1 , which is a method for data communication of an Internet of Things central control host based on a protocol in an embodiment of the present invention, including:
[0057] S1: Based on the Internet of Things devices preset in the central control host, collect the data update parameters of the Internet of Things devices, where the data update parameters specifically include a data update timestamp and a data value;
[0058] S2: Determine whether a preset update exception is detected in the data update parameters, where the update exception specifically includes an unstable update period and no update for a long time;
[0059] S3: If so, divide the frequency devices of the Internet of Things devices according to the data update requirements of the Internet of Things devices, and based on the frequency devices, unify the preset time reference to calculate the data collection interval. Add a local data buffer on the gateway side preset in the central control host, and allow the return of the previous data collection value within a preset time period, where the frequency devices specifically include high-frequency devices, medium-frequency devices, and low-frequency devices;
[0060] S4: Determine whether the return of the previous data collection value exceeds a preset number of times;
[0061] S5: If it exceeds, send a preset data refresh request to the central control host. Based on the data refresh request, shorten the preset polling period, forcefully obtain the latest data, compare the latest data with the previous data collection value, calculate the missing estimation value of the data update requirements according to the pre-recorded historical data trend, and fill the missing estimation value into the missing data.
[0062] In this embodiment, the system collects data update parameters of these Internet of Things devices based on the Internet of Things devices preset in the central control host. The data update parameters specifically include a data update timestamp and a data value. Then, the system determines whether these data update parameters detect a preset update anomaly. The update anomaly specifically includes an unstable update cycle and no update for a long time, so as to execute corresponding steps. For example, when the system determines that the data update parameters of the Internet of Things device do not detect a preset update anomaly, the system will consider that the data update cycle of the device is stable, and the data can be normally uploaded as expected, without problems such as no update for a long time or fluctuations in the update frequency. The system will continue to obtain data according to the preset collection cycle and polling method, without adjusting the collection frequency or triggering an additional data refresh request. At the same time, the current data update timestamp and data value are stored in the database or log system for subsequent analysis and anomaly detection, maintaining the update status of the device, marking that the device is currently operating normally, without additional intervention, and continuously monitoring the data update situation of the device to ensure that subsequent data still maintains stable updates, avoiding sudden anomalies that are not detected in time, and preferentially allocating system resources to devices with data update anomalies. For example, reducing the polling frequency of normal devices, reducing network and computing burdens, and improving the overall system efficiency. For example, when the system determines that the data update parameters of the Internet of Things device detect a preset update anomaly, at this time, the system will consider that the data update cycle of the device is unstable and the data may not be normally uploaded. The system will divide the frequency devices of the Internet of Things device according to the data update requirements of the Internet of Things device. The frequency devices specifically include high-frequency devices, medium-frequency devices, and low-frequency devices. Based on different frequency devices, a unified preset time reference is used to calculate the data collection interval, a local data buffer is added at the gateway end preset in the central control host, and the previous data collection value is allowed to be returned within a preset period. By dividing the device frequencies (high, medium, low), the system optimizes the collection strategy according to the data update requirements of the device, making data acquisition more targeted, reducing data loss or delay problems caused by unreasonable collection strategies. At the same time, a local data buffer is added at the gateway end. When there is short-term data loss or update anomaly, the system can return the previous data collection value to ensure the continuity of the data stream, avoid the impact of sudden update anomalies on the business logic, and calculate the data collection interval by a unified time reference, reducing ineffective polling, improving the utilization rate of network bandwidth and computing resources, ensuring that high-frequency devices get more priority data collection, reducing the excessive polling pressure on low-frequency devices, and when a data update anomaly occurs, the previous data collection value can be relied on for supplementation in a short time to avoid data loss affecting the real-time decision-making of the system, and improving the reliability and stability of the system. Then, the system determines whether the return of the previous data collection value exceeds a preset number of times to execute corresponding steps;For example, when the system determines that the return of the previous data acquisition value has not exceeded the preset number of times, the system will consider that the current data update anomaly is still within the range allowed by the system. Although the device has not provided new data in the short term, the system can still accept the previous data acquisition value as temporary filling data without immediately taking further corrective measures. During the response cycle of the data request, the system will continue to return the previous data acquisition value in the cache to ensure the integrity of the data stream, avoid affecting the system operation due to short-term data loss, and continuously detect whether the device resumes normal data upload in the subsequent polling cycle. If new data is detected, it will be stored and updated; if there is still no update, it will continue to enter the next round of detection. Since the data update anomaly does not reach a serious level, there is no need to immediately shorten the polling cycle or trigger a data refresh request to avoid increasing unnecessary system load. For example, when the system determines that the return of the previous data acquisition value has exceeded the preset number of times, the system will consider that the current data update anomaly exceeds the range allowed by the system and the device has not provided new data for a long time. The system will send a preset data refresh request to the central control host. Based on these data refresh requests, the preset polling cycle will be shortened to forcibly obtain the latest data. The latest data will be compared with the previous data acquisition value, and according to the historical data trend pre-recorded, the missing estimation value of the data update requirement will be calculated and filled into the missing data; by shortening the polling cycle through the data refresh request and forcibly obtaining the latest data, the system ensures that data acquisition is no longer delayed, effectively avoiding the situation where the device does not respond or update data for a long time, ensuring more timely system data update and meeting the real-time requirement. At the same time, by comparing the latest data with the previous data acquisition value, the system can accurately identify and supplement the missing data, reducing the risk of data loss or incomplete update, making the data more continuous and complete, providing more reliable information support for subsequent decisions. And through historical data trend analysis, the system can calculate the missing estimation value of the missing data based on the pre-recorded historical data instead of simply filling the previous data acquisition value or missing value. This intelligent estimation enhances the accuracy of the data and avoids data inaccuracy problems that may be caused by simple filling. By detecting and processing the update anomaly in a timely manner, the system can maintain stable operation in case of device failure or short-term anomaly, avoiding affecting the normal operation of the entire system. This enables the system to adapt to more environmental changes and device behavior anomalies, improving the fault tolerance of the system.;
[0063] It should be noted that according to the data update requirements of the Internet of Things device, the frequency devices of the Internet of Things device are divided, and based on the frequency devices, a unified preset time reference is used to calculate the data acquisition interval, and a local data buffer is added to the gateway end preset by the central control host. The specific example is as follows:
[0064] Suppose an intelligent building uses Internet of Things technology to monitor environmental data and deploys the following devices:
[0065] Temperature and humidity sensor (high-frequency device): Report data once per second for the HVAC (Heating, Ventilation, and Air Conditioning system) to adjust the room temperature in real time;
[0066] Energy consumption monitor (medium-frequency device): Update every 60 seconds to provide real-time energy consumption data and optimize power management;
[0067] Intelligent access control system (low-frequency device): Upload data only when swiping a card or remotely controlled;
[0068] Optimization measures: Device frequency division,
[0069] Temperature and humidity sensor → High-frequency device;
[0070] Energy consumption monitor → Medium-frequency device;
[0071] Access control system → Low-frequency device;
[0072] Unified time reference setting (reference period: 1 second);
[0073] The temperature and humidity sensor collects data once per second (1-second interval);
[0074] The energy consumption monitor collects data every 60 seconds (60-second interval);
[0075] The access control system collects data only when an event occurs. Local data buffering is performed at the gateway end. When the temperature and humidity sensor fails to report data in a timely manner due to network latency, the gateway will return the data of the previous moment to prevent the HVAC from misjudging temperature changes; the data of the energy consumption monitor will be cached locally and uploaded to the central control host in batches regularly to reduce communication pressure; the data of the access control system is uploaded only when an event is triggered and does not require caching;
[0076] In summary, in the above example content, by using different collection intervals for devices with different frequencies, unnecessary polling is reduced, while the network occupancy of high-frequency devices is reduced, ensuring that data of low-frequency devices is not lost, and the gateway cache prevents data loss. Even if the device is temporarily disconnected, the latest available data can be returned, avoiding misjudging anomalies due to the device not being updated for a long time, and improving the reliability of the Internet of Things system; this strategy is applicable to large-scale Internet of Things environments such as smart buildings, industrial monitoring, and intelligent transportation, effectively improving system stability and the accuracy of data collection.
[0077] It should be added that a preset data refresh request is sent to the central control host. Based on the data refresh request, the preset polling period is shortened to forcibly obtain the latest data. The latest data is compared with the previous data collection value. According to the historical data trend pre-recorded, the missing estimation value of the data update requirement is calculated, and the missing estimation value is filled into the missing data. The specific example is as follows:
[0078] Suppose in an industrial park, a set of intelligent power monitoring systems are installed with multiple power sensing devices, including:
[0079] Current detector: It monitors the current values of each distribution line in real time and sends data to the central control host once every 60 seconds;
[0080] Voltage sensor: It is used to detect the line voltage and calculate the power load in combination with the current data;
[0081] Power meter: It provides the overall power consumption situation and is used to optimize energy consumption;
[0082] This system is used to monitor the current load of high-power equipment in the park, prevent line overload, and at the same time provide data support for energy-saving management;
[0083] Regarding abnormal situations, during a certain period, due to network jitter or unstable device signals, the current detector fails to upload data continuously for 3 times, resulting in the system being unable to obtain the latest current value; at this time, the system detects the abnormality and executes the following steps:
[0084] Trigger the abnormal handling mechanism, detect the abnormality and send a data refresh request. Since the current data has not been updated continuously for 3 times (180 seconds), the system determines that the device may have a fault or communication abnormality; send a data refresh request to the current detector, requiring it to report data again; shorten the polling period. Since the data has not been updated for a long time, the system temporarily shortens the polling period from 60 seconds to 10 seconds to accelerate the data acquisition frequency and try to restore the normal data stream as soon as possible;
[0085] Calculate the missing estimated value. If the device still cannot report data, the system will calculate the missing estimated value and fill in the missing data based on the historical data trend. The calculation method is as follows:
[0086] Based on time series trend prediction, select the historical data of the past 1 hour, and extract the time series change trend of this current detector; use methods such as linear regression, exponential smoothing or LSTM (Long Short-Term Memory Network) to predict the current value of the current moment;
[0087] Example:
[0088] Current data of the past 1 hour (unit: A):
[0089] 10:00 -> 55A;
[0090] 10:10 -> 56A;
[0091] 10:20 -> 58A;
[0092] 10:30 -> 59A;
[0093] 10:40 -> 60A;
[0094] 10:50 -> 62A;
[0095] Use the linear regression model to calculate the estimated current at 11:00:
[0096] Estimated value = slope * time + intercept;
[0097] Slope ≈ (62A - 55A) / (10:50 - 10:00) ≈ 0.14 A / minute;
[0098] Estimated current at 11:00 ≈ 62A + 0.14 * 10 ≈ 63.4A;
[0099] Based on the compensation of adjacent device data, query the data of adjacent current detectors in the same distribution area, and use the average value or proportional relationship to infer the missing value;
[0100] Example:
[0101] The data of the current detector C1 is missing, but the data of the adjacent devices C2 and C3 are as follows:
[0102] Current of device C2: 64A;
[0103] Current of device C3: 66A;
[0104] Since C1, C2, and C3 are on the same power supply branch and usually have similar current loads, the weighted average method can be used:
[0105] Estimated current of C1 = (C2 + C3) / 2 = (64A + 66A) / 2 = 65A;
[0106] Based on the load characteristic model, if the load characteristics of the device are known, the current can be calculated based on the current voltage value and the historical load curve:
[0107] Example (based on Ohm's law P = VI):
[0108] Historical power load trend of the device:
[0109] 10:00 -> 3300W;
[0110] 10:10 -> 3360W;
[0111] 10:20 -> 3480W;
[0112] The current voltage is 220V, then the current estimation:
[0113] Estimated power = 3500W;
[0114] Estimated current = 3500W / 220V ≈ 15.9A;
[0115] Finally, fill in the missing data to determine the final estimated value. If multiple methods are available, use the weighted average method:
[0116] Missing current = (Time series estimation + Adjacent device estimation + Load characteristic estimation) / 3;
[0117] That is, (63.4A + 65A + 15.9A) / 3 ≈ 48.1A;
[0118] Fill the estimated value into the database, record the estimated data, and mark it as "estimated filling" for subsequent correction. If the device resumes normal data upload, the estimated value will be overwritten with the real data of the device;
[0119] To sum up, in the above example content, even if the device has an abnormality, reasonable missing data filling can still be generated to avoid data breakage. By shortening the polling period, the latest data of the device can be quickly obtained to avoid the risk of long-term lack of data. At the same time, multiple estimation methods are used to ensure the accuracy of the estimated value, support the stable operation of the energy consumption optimization strategy, and prevent false alarms triggered by short-term data loss, improving the accuracy of anomaly detection.
[0120] In this embodiment, in step S3 of dividing the frequency devices of the Internet of Things devices according to the data update requirements of the Internet of Things devices, it further includes:
[0121] S31: Collect the data synchronization frequency of the frequency device based on the usage requirements of the central control host;
[0122] S32: Determine whether the data synchronization frequency matches the data update requirements;
[0123] S33: If not, then dynamically adjust the preset data synchronization mechanism according to the cache hierarchical structure preset in the central control host. According to the data synchronization mechanism, activate the differential data detection preset in the central control host, where the cache hierarchical structure specifically includes a local cache layer, an edge computing layer, and a cloud storage layer, the data synchronization mechanism specifically includes on-demand synchronization and batch synchronization, and the differential data detection is specifically to synchronize only the changed data to reduce data redundancy.
[0124] In this embodiment, based on the usage requirements of the central control host, the system collects the data synchronization frequencies of frequency devices, and then the system determines whether these data synchronization frequencies match the data update requirements to execute corresponding steps. For example, when the system determines that the data synchronization frequency of the frequency device can match the data update requirements, the system will consider that the current data collection frequency is consistent with the system requirements, the data transmission of the Internet of Things devices is stable, and there is no need to adjust the collection strategy additionally. The system will continue to operate according to the existing collection cycle and data synchronization mechanism, avoiding unnecessary calculations and adjustments, ensuring efficient use of resources. At the same time, although the synchronization frequency matches the requirements, it is still necessary to check the integrity and accuracy of the data. The system ensures that the data fluctuations are within the normal range by comparing historical trends, avoiding the influence of abnormal values on decision-making, verifying the data transmission delay, and preventing timing errors caused by network congestion or device failures. And when the data is stable, the system can further optimize the synchronization strategy, such as dynamically adjusting the fault tolerance range to adapt to possible future device state changes, improving the system robustness, and recording the data synchronization status for subsequent analysis and optimization, such as predicting future load changes and adjusting the synchronization strategy in advance. For example, when the system determines that the data synchronization frequency of the frequency device cannot match the data update requirements, at this time the system will consider that the current data collection frequency is inconsistent with the system requirements and the data transmission is unstable. The system will dynamically adjust the preset data synchronization mechanism according to the cache hierarchical structure preset by the central control host. The cache hierarchical structure specifically includes a local cache layer, an edge computing layer, and a cloud storage layer. The data synchronization mechanism specifically includes on-demand synchronization and batch synchronization. According to this data synchronization mechanism, the differential data detection preset by the central control host is activated. The differential data detection is specifically to synchronize only the changed data, reducing data redundancy. By dynamically adjusting the data synchronization mechanism (on-demand synchronization and batch synchronization), the system can adaptively adjust the synchronization method according to the actual operating state of the device, ensuring that the central control host can obtain the latest key data as soon as possible, reducing the information lag problem caused by device asynchronization. At the same time, using the local cache layer, the edge computing layer, and the cloud storage layer, different frequency data is reasonably allocated. For example, high-frequency data is preferentially stored in the local cache layer for the central control host to read in real time. Medium-frequency data can be stored in the edge computing layer for preprocessing in combination with the computing power to reduce the transmission burden. Low-frequency data is stored in the cloud storage layer to ensure long-term traceability, reduce the local storage pressure. And by synchronizing only the changed data, the system can avoid repeated transmission of unchanged data, helping to reduce network traffic consumption, reduce bandwidth occupancy, improve the overall data transmission efficiency, reduce the data storage and computing burden of the central control host, improve the system processing speed, make the data synchronization between devices more accurate, and reduce data errors.
[0125] It should be noted that, according to the cache hierarchical structure preset in the central control host, the preset data synchronization mechanism is dynamically adjusted. According to the data synchronization mechanism, the differential data detection preset in the central control host is activated. The specific example is as follows:
[0126] Suppose the smart grid system of a certain city needs to monitor parameters such as the load, voltage, and current of a substation, and the data update frequencies of different monitoring devices are different:
[0127] High-frequency device (smart meter): updates once per second;
[0128] Medium-frequency device (substation sensor): updates once every 10 minutes;
[0129] Low-frequency device (power grid dispatching system): updates once per hour;
[0130] System optimization steps, that is, the application of the cache hierarchical structure:
[0131] The smart meter data is stored in the local cache layer for the power distribution system to read in real time;
[0132] The substation sensor data is stored in the edge computing layer for short-term analysis and anomaly detection;
[0133] The power grid dispatching data is stored in the cloud storage layer for long-term load forecasting and optimization;
[0134] Dynamically adjust the data synchronization mechanism. The smart meter uses the on-demand synchronization mechanism and only synchronizes data when the current and voltage fluctuations exceed the threshold, reducing the data transmission pressure; the substation sensor adopts batch synchronization and sends data once every 10 minutes, reducing communication consumption; the power grid dispatching system synchronizes once a day and only uploads key indicators, reducing cloud storage costs;
[0135] Activate differential data detection. When the voltage and current fluctuate slightly, data synchronization is not triggered, and data is only uploaded when the change amount exceeds the set threshold (such as ±5%); if the sensor data of a certain substation is abnormal, the system automatically triggers on-demand synchronization, immediately uploads the latest data and adjusts the dispatching strategy; use historical trends to predict missing data. If the sensor is disconnected for a short time, the system calculates the estimated value based on the current curve in the past hour to fill in the missing data points and ensure the continuity of power grid monitoring;
[0136] In summary, in the above example content, the smart meter synchronizes data only when the voltage and current fluctuate violently, avoiding a large amount of invalid transmissions. At the same time, different devices adopt different synchronization mechanisms to ensure real-time acquisition of key data, process non-critical data in batches, and reduce the system's computing and storage burdens: the local cache layer reduces the dependence on the central control host, the edge computing layer processes data in advance, the cloud storage layer only stores key information. Even if some devices are temporarily disconnected, the system can estimate values through historical trend calculations to maintain data integrity.
[0137] In this embodiment, a local data buffer is added to the gateway end preset by the central control host. Before step S3 that allows returning the previous data acquisition value within a preset time period, it further includes:
[0138] S301: Based on the data reporting period preset by the central control host, obtain the data update mode of the Internet of Things device, where the data update mode specifically includes scheduled reporting, event triggering, and on-demand request;
[0139] S302: Determine whether the data update mode matches the central control host;
[0140] S303: If not, construct a data caching policy for the Internet of Things device, dynamically adjust the effective time range of data caching according to the data update frequency, and restrict data caching of preset inapplicable devices according to the data caching policy, where the inapplicable devices specifically include camera video streams and transient event monitoring devices.
[0141] In this embodiment, the system obtains the data update mode of the Internet of Things device based on the data reporting period preset by the central control host. The data update mode specifically includes scheduled reporting, event triggering, and on-demand request. Then, the system determines whether the data update mode of the Internet of Things device matches the central control host to execute corresponding steps. For example, when the system determines that the data update mode of the Internet of Things device can match the central control host, the system will consider that the current data reporting method of the Internet of Things device is consistent with the preset requirements of the central control host, and the data can be transmitted according to the expected frequency and triggering mechanism, without problems such as information lag or redundancy. The system does not need to adjust the data acquisition mechanism additionally, and maintains the current scheduled reporting, event triggering, or on-demand request mode. At the same time, by comparing historical data and current data, it checks whether there are data losses or abnormal jumps, uses redundant sensors or cross-comparison algorithms to ensure the accuracy of the data. For example, it detects whether the data of the temperature and humidity sensor conforms to the environmental change trend, and optimizes the data storage strategy to ensure the efficient archiving of historical data, avoiding repeated storage from affecting the storage space, reasonably configuring the event triggering threshold to avoid data overload caused by false triggering, ensuring the rationality of the request scheduling mechanism, and avoiding bandwidth waste caused by frequent queries or data lag caused by too long request intervals. For example, when the system determines that the data update mode of the Internet of Things device cannot match the central control host, at this time, the system will consider that the current data reporting method of the Internet of Things device is inconsistent with the preset requirements of the central control host, and the data cannot be transmitted as expected. The system will construct a data caching strategy for the Internet of Things device, dynamically adjust the effective time range of the cache according to the data update frequency, and limit the data caching of pre-set non-applicable devices according to this data caching strategy. The non-applicable devices specifically include camera video streams and transient event monitoring devices. Through the data caching strategy, the system ensures that high-frequency data or short-time change data (such as sensor transient data) are stored within a reasonable time range without affecting the overall data transmission efficiency, restricts non-applicable devices (such as camera video streams, transient event monitoring devices) from entering the cache, and avoids the high data traffic of these devices from occupying system resources and affecting the normal data transmission of other devices. At the same time, for devices with low-frequency data updates (such as environmental sensors, temperature and humidity monitoring devices), the cache time can be extended to avoid repeated requests and reduce bandwidth occupancy. For devices with high-frequency updates (such as power monitoring, industrial automation systems), the cache time can be shortened to ensure the timeliness and availability of the data. Dynamically adjust the cache effective time according to the data update frequency of the device, which not only ensures data availability but also avoids waste of storage resources. And by restricting non-applicable devices (such as high-definition video streams, transient event monitoring devices) from caching, it ensures that core business data will not be affected and prevents cache overflow or data loss. In the case of data mode mismatch, the caching strategy is adopted so that the system can still obtain some valid data instead of directly discarding the data, improving the integrity of the data.
[0142] In this embodiment, in step S5 of sending a preset data refresh request to the central control host, the following steps are further included:
[0143] S51: Detect the communication mode of the Internet of Things device based on the communication data format of the Internet of Things device, where the communication data format specifically includes JSON, XML, and binary stream;
[0144] S52: Determine whether the communication mode needs to enable preset encrypted communication;
[0145] S53: If so, construct corresponding data request content according to the communication address of the Internet of Things device, and dynamically adjust the request interval period of the data request content according to the data update requirement, where the communication address specifically includes IP domain name, port number, and authentication method, and the data request content specifically includes specifying the target device ID, setting the data time range, and increasing the request priority.
[0146] In this embodiment, the system is based on the communication data format of the Internet of Things device. The communication data format specifically includes JSON, XML, and binary streams. The system detects the communication method of the Internet of Things device, and then the system determines whether these communication methods need to enable pre-set encrypted communication to execute corresponding steps. For example, when the system determines that the communication method of the Internet of Things device does not need to enable pre-set encrypted communication, the system will consider that the communication data format and transmission protocol adopted by the current device do not involve sensitive data transmission in the current application scenario, or are already in a trusted secure network environment and do not require additional encryption. The system will perform data transmission according to the pre-set communication data format without adding additional encryption overhead, and continue to use ordinary transmission protocols such as HTTP or MQTT to avoid performance loss caused by encryption. At the same time, since no encryption is performed, the system can reduce the computational resource overhead required for data encryption and decryption, reduce the latency of data transmission. In an environment with limited bandwidth (such as wireless networks or low-power devices), the size of data packets can be reduced, improving communication real-time performance. And for devices with limited computing power (such as low-power sensors), the problem of increased device processing burden caused by enabling encryption can be avoided, ensuring its normal operation and avoiding problems such as increased device processing delay or power consumption due to the high computational complexity of the encryption algorithm. For example, when the system determines that the communication method of the Internet of Things device needs to enable pre-set encrypted communication, at this time the system will consider that the communication data format and transmission protocol adopted by the current device involve sensitive data transmission and additional encryption is required. The system will construct corresponding data request content according to the communication address of the Internet of Things device. The communication address specifically includes IP domain name, port number, and authentication method. The data request content specifically includes specifying the target device ID, setting the data time range, and increasing the request priority. According to the data update requirements, the request interval period of the data request content is dynamically adjusted. By judging whether the communication method needs encryption, the system can automatically enable encrypted communication for specific data streams, avoiding risks such as data leakage, eavesdropping, or tampering caused by plaintext transmission. For example, when the device uses JSON or XML format and transmits data over the public network, the system can automatically enable encryption methods such as TLS or AES to ensure that the data is only parsed by authorized terminals and prevent man-in-the-middle attacks. At the same time, the system constructs accurate data request content according to the communication address of the device (IP domain name, port number, authentication method, etc.). For example, it only sends a data pull request to the specified device instead of broadcasting to all devices. This optimization strategy reduces unnecessary data traffic, reduces network bandwidth occupancy, and improves the stability of data transmission. And the system reasonably allocates data synchronization time by dynamically adjusting the request interval period of the data request content. For example, it increases the synchronization interval for low-frequency update devices (such as environmental monitoring sensors), while shortening the synchronization interval for high-real-time devices (such as video surveillance devices), ensuring that data of different types of devices can be efficiently transmitted as needed.
[0147] In this embodiment, in step S2 of determining whether the data update parameter detects a preset update anomaly, the following is further included:
[0148] S21: Based on the preset data update interval of the Internet of Things device, identify the corresponding data change rate;
[0149] S22: Determine whether the data change rate exceeds a preset change threshold;
[0150] S23: If not, obtain the field integrity during data update, and based on the field integrity, detect the abnormal device with data anomalies, and batch send a preset data re-collection request to the abnormal device through the central control host, where the field integrity specifically includes field values and field formats.
[0151] In this embodiment, the system identifies the corresponding data change rate based on the data update interval preset by the Internet of Things device, and then the system determines whether the data change rate exceeds the preset change threshold to execute corresponding steps; for example, when the system determines that the data change rate exceeds the preset change threshold, the system will consider that the data fluctuation of the current Internet of Things device is abnormal, and there may be situations such as device failure, environmental mutation or incorrect data reporting. The system will screen the abnormal data, and combine the historical data trend and the relevant data of surrounding sensors to judge whether the data change is reasonable. For example, if the temperature data of the environmental sensor fluctuates violently in a short period of time, the system will compare the data of surrounding temperature and humidity devices to confirm whether it is a real environmental change or a sensor failure. At the same time, if the system detects a possible abnormal fluctuation, it will perform cross-verification with adjacent devices or historical data. For example, if the power consumption data of an intelligent electricity meter suddenly increases abnormally, the system can refer to the load conditions of adjacent electricity meters to judge whether it is a sensor error, abnormal electricity consumption behavior or power theft. And if the data changes too fast, the system may need to temporarily increase the data acquisition frequency to obtain a more detailed change trend. For example, when the acceleration sensor monitoring the health of the building structure detects abnormal vibrations, it will automatically increase the data acquisition frequency to capture more detailed vibration patterns to assist in structural safety assessment; for example, when the system determines that the data change rate does not exceed the preset change threshold, at this time the system will consider that the data of the current Internet of Things device is transmitted normally, and the system will obtain the field integrity at the time of data update. The field integrity specifically includes the field value and the field format. According to these field integrities, it will detect abnormal devices that may have data anomalies, and send a preset data re-acquisition request to the abnormal devices that may have data anomalies in batches through the central control host;By detecting field integrity (field values and field formats), the system can effectively screen for missing fields, format errors, or outliers that may exist in data packets, avoiding calculation errors or business logic anomalies caused by incomplete data or format mismatches. For example, the data fields of a temperature and humidity sensor should include information such as temperature, humidity, and timestamp. If a certain field is missing, the system can immediately identify and process it. At the same time, by comparing the field integrity of each device, the system can quickly identify devices that may have data anomalies, rather than blindly re-collecting data from all devices, thereby improving the detection efficiency and reducing unnecessary resource consumption. For example, in an intelligent building management system, if the data formats reported by the temperature sensors in some rooms are abnormal, the system can accurately lock these sensors for rechecking, rather than affecting the normal data reporting of all devices. And by sending a data re-collection request to abnormal devices in batches through the central control host, rather than sending requests to each abnormal device individually, the communication overhead can be greatly reduced, the system bandwidth usage can be optimized, and the efficiency of data transmission can be ensured. For example, in a large-scale Internet of Things deployment environment (such as smart cities and industrial monitoring), the batch processing mechanism can effectively reduce the server load and improve the data synchronization efficiency.;
[0152] In this embodiment, in step S4 of determining whether the return of the previous data acquisition value exceeds the preset number of times, it further includes:
[0153] S41: Based on the heartbeat detection preset by the central control host, identify the communication status of the Internet of Things device;
[0154] S42: Determine whether the communication status is offline;
[0155] S43: If not, collect the timeout information of the Internet of Things device, obtain the data packet loss rate when the data is updated according to the timeout information, and compare the data packet loss rate with the data reception timestamp preset by the central control host to detect the corresponding delay and lost data.
[0156] In this embodiment, the system identifies the communication status of the Internet of Things (IoT) devices based on the heartbeat detection preset by the central control host, and then the system determines whether the communication status is offline to execute corresponding steps. For example, when the system determines that the communication status of the IoT device is offline, the system will consider that the device can no longer communicate with the central control host normally. The system will confirm that the device is indeed offline through continuous multiple heartbeat detections (such as not receiving heartbeat signals continuously 3 to 5 times), rather than temporary signal fluctuations or short-term communication interruptions, record the device offline time, mark the device status, avoid affecting the data processing of other online devices, and at the same time generate an alarm notification through the central control host interface to prompt the operation and maintenance personnel to troubleshoot the specific reasons. If the device supports remote maintenance, a firmware restart command can be sent to try to restore the device to normal operation. When the device supports self-diagnosis, the self-check function is triggered and an error code is returned for further analysis of the cause of the fault, and the local cache mechanism is enabled to store key data to avoid data loss during the offline period. After the device resumes online, the system can execute a data compensation mechanism to batch synchronize the historical data during the offline period to ensure data integrity. For example, when the system determines that the communication status of the IoT device is not offline, the system will consider that the device is still communicating with the central control host normally. The system will collect the timeout information of the IoT device, and based on this timeout information, obtain the data packet loss rate during data update, and compare this data packet loss rate with the data reception timestamp preset by the central control host to detect the corresponding delay and lost data. By monitoring the data packet loss rate, the system can timely detect abnormal situations in the data transmission process of the IoT device, such as network congestion, signal interference, or device failure, thereby improving the overall reliability of the system. At the same time, based on the comparison result of the data packet loss rate and the data reception timestamp, the system can dynamically adjust the data synchronization mechanism, such as increasing the number of data retransmissions, optimizing the data packaging method, or enabling differential data transmission, to reduce data loss and improve data synchronization efficiency. And by detecting the data reception timestamp, the system can calculate the actual data transmission delay and adjust the data processing priority according to the application scenario of the IoT device (such as real-time monitoring or batch reporting) to optimize the response speed of the system. In a large-scale IoT deployment environment, this mechanism can adaptively adjust the data transmission strategy according to the communication status of different devices to ensure the priority transmission of data of critical devices, reduce unnecessary data traffic, and improve the stability and resource utilization rate of the entire network.
[0157] In this embodiment, in step S1 of collecting the data update parameters of the IoT device based on the IoT device preset by the central control host, it further includes:
[0158] S11: Based on the operation log of the IoT device, detect the communication quality between the central control host and the IoT device, where the operation log specifically includes the average online rate, the number of disconnections, and the disconnection time period, and the communication quality specifically includes network delay, packet loss rate, and signal strength;
[0159] S12: Determine whether the communication quality reaches a preset quality threshold;
[0160] S13: If not, identify a preset high packet loss device through the central control host, dynamically adjust the data reporting interval according to the communication quality, and adaptively reduce the data transmission frequency according to the data reporting interval.
[0161] In this embodiment, the system detects the communication quality between the central control host and the Internet of Things devices based on the operation logs of the Internet of Things devices. The operation logs specifically include the average online rate, the number of disconnections, and the disconnection time period. The communication quality specifically includes network latency, packet loss rate, and signal strength. Then, the system determines whether the communication quality reaches a pre-set quality threshold to execute corresponding steps. For example, when the system determines that the communication quality between the central control host and the Internet of Things devices can reach the pre-set quality threshold, the system will consider that the communication state between the current Internet of Things device and the central control host is normal, the data transmission is stable, and it can meet the requirements of real-time data exchange. When the communication quality reaches the preset threshold, the system will continue to perform data transmission at the normal data update frequency to ensure that the device data is reported on time, without being affected by network factors, and ensure the real-time and integrity of the data. At the same time, according to the actual data update requirements of the device, the data collection frequency is further optimized. For example, if the usage scenario of the device requires high-frequency data updates, the collection frequency can be appropriately increased, or the time window of data transmission can be dynamically adjusted according to business requirements to ensure the efficient use of system resources. And according to the good communication quality of the device, redundant operations such as data retransmission, error checking, and data rollback are reduced, thereby reducing the burden on the central control host and improving the overall operation efficiency and response speed of the system. For example, when the system determines that the communication quality between the central control host and the Internet of Things devices cannot reach the pre-set quality threshold, the system will consider that the communication state between the current Internet of Things device and the central control host is abnormal. The system will identify the pre-set high packet loss devices through the central control host, dynamically adjust the data reporting interval according to different communication qualities, and adaptively reduce the data transmission frequency based on this data reporting interval. By dynamically adjusting the data reporting interval, the system can avoid frequent data retransmission or error checking caused by high packet loss rate or unstable communication quality, thereby reducing unnecessary bandwidth occupation and system burden. Reducing the data transmission frequency helps to reduce the pressure on the central control host and the network. Especially in high-load situations, it can ensure the stability and performance of the system. At the same time, according to the communication quality and packet loss situation of the device, the data reporting frequency is adaptively adjusted, which can effectively cope with the actual communication situations of different devices. For example, in the case of weak signals or large network fluctuations, the system will automatically reduce the data collection and transmission frequency to avoid excessive data loss and system anomalies. This can enable the device to maintain a connection with the central control host even when the communication quality is unstable, without causing serious lag or loss of information. And for devices with poor communication quality, by reducing the data transmission frequency, the system can effectively reduce the risk of data packet loss. A lower frequency helps to avoid overly frequent transmission requests, exacerbating network congestion and causing more data loss.
[0162] Refer to the appendix Figure 2 , which is a protocol-based Internet of Things central control host data communication system in an embodiment of the present invention, including:
[0163] The acquisition module 10 is configured to collect data update parameters of the Internet of Things devices based on the Internet of Things devices preset by the central control host, where the data update parameters specifically include a data update timestamp and a data value;
[0164] The judgment module 20 is configured to judge whether a preset update anomaly is detected in the data update parameters, where the update anomaly specifically includes an unstable update period and no update for a long time;
[0165] The execution module 30 is configured to, if so, divide the frequency devices of the Internet of Things devices according to the data update requirements of the Internet of Things devices, and based on the frequency devices, unify a preset time reference to calculate the data acquisition interval, add a local data buffer on the gateway end preset by the central control host, and allow the return of the previous data acquisition value within a preset time period, where the frequency devices specifically include high-frequency devices, medium-frequency devices, and low-frequency devices;
[0166] The second judgment module 40 is configured to judge whether the return of the previous data acquisition value exceeds a preset number of times;
[0167] The second execution module 50 is configured to, if it exceeds, send a preset data refresh request to the central control host, based on the data refresh request, shorten a preset polling period, forcibly obtain the latest data, compare the latest data with the previous data acquisition value, calculate a missing estimation value of the data update requirement according to the pre-recorded historical data trend, and fill the missing estimation value into the missing data.
[0168] In this embodiment, the acquisition module 10 collects data update parameters of these Internet of Things devices based on the Internet of Things devices preset in the central control host. The data update parameters specifically include a data update timestamp and a data value. Then, the judgment module 20 determines whether these data update parameters detect a preset update anomaly. The update anomaly specifically includes an unstable update cycle and no update for a long time, so as to execute corresponding steps. For example, when the system determines that the data update parameters of the Internet of Things device do not detect a preset update anomaly, the system will consider that the data update cycle of the device is stable, and the data can be normally uploaded as expected, and there is no problem of no update for a long time or fluctuating update frequency. The system will continue to obtain data according to the preset acquisition cycle and polling method, without adjusting the acquisition frequency or triggering an additional data refresh request. At the same time, the current data update timestamp and data value are stored in the database or log system for subsequent analysis and anomaly detection, maintaining the update status of the device, marking that the device is currently running normally without additional intervention, and continuously monitoring the data update situation of the device to ensure that subsequent data still maintains stable updates, avoiding sudden anomalies that are not detected in time, and preferentially allocating system resources to devices with data update anomalies. For example, reducing the polling frequency of normal devices, reducing network and computing burdens, and improving the overall system efficiency. For example, when the system determines that the data update parameters of the Internet of Things device detect a preset update anomaly, at this time, the execution module 30 will consider that the data update cycle of the device is unstable and the data may not be normally uploaded. The system will divide the frequency devices of the Internet of Things device according to the data update requirements of the Internet of Things device. The frequency devices specifically include high-frequency devices, medium-frequency devices, and low-frequency devices. According to different frequency devices, a unified preset time reference is used to calculate the data acquisition interval, a local data buffer is added at the gateway end preset in the central control host, and the previous data acquisition value is allowed to be returned within a preset time period. The system optimizes the acquisition strategy according to the device frequency division (high frequency, medium frequency, low frequency) according to the data update requirements of the device, making the data acquisition more targeted, reducing data loss or delay problems caused by unreasonable acquisition strategies. At the same time, a local data buffer is added at the gateway end. When there is short-term data loss or update anomaly, the system can return the previous data acquisition value to ensure the continuity of the data stream, avoid the impact of sudden update anomalies on the business logic, and calculate the data acquisition interval through a unified time reference, reducing ineffective polling, improving the utilization rate of network bandwidth and computing resources, ensuring that high-frequency devices get more priority data acquisition, reducing the excessive polling pressure of low-frequency devices, and when a data update anomaly occurs, the previous data acquisition value can be relied on for supplementation in a short time to avoid data missing affecting the real-time decision-making of the system and improving the reliability and stability of the system. Then, the second judgment module 40 determines whether the return of the previous data acquisition value exceeds the preset number of times to execute corresponding steps;For example, when the system determines that the return of the previous data acquisition value does not exceed the preset number of times, the system will consider that the current data update anomaly is still within the range allowed by the system. The device has not provided new data in the short term, but can still accept the previous data acquisition value as temporary filling data without immediately taking further corrective measures. The system will continue to return the previous data acquisition value in the cache within the response cycle of the data request to ensure the integrity of the data stream, avoid affecting the system operation due to short-term data absence, and continuously detect whether the device resumes normal data upload in the subsequent polling cycle. If new data is detected, it will be stored and updated; if it is still not updated, it will continue to enter the next round of detection. And since the data update anomaly does not reach the severe level, there is no need to immediately shorten the polling cycle or trigger a data refresh request to avoid increasing unnecessary system load. For example, when the system determines that the return of the previous data acquisition value exceeds the preset number of times, at this time, the second execution module 50 will consider that the current data update anomaly exceeds the range allowed by the system, and the device has not provided new data for a long time. The system will send a preset data refresh request to the central control host. Based on these data refresh requests, shorten the preset polling cycle, forcefully obtain the latest data, compare these latest data with the previous data acquisition value, calculate the missing estimation value of the data update requirement according to the historical data trend collected in advance, and fill the missing estimation value into the missing data; the system shortens the polling cycle through the data refresh request and forcefully obtains the latest data to ensure that data acquisition is no longer delayed, which effectively avoids the situation that the device does not respond or update data for a long time, ensures that the system data is updated more timely, meets the real-time requirement, and at the same time, through the comparison of the latest data with the previous data acquisition value, the system can accurately identify and supplement the missing data, reduce the risk of data loss or incomplete update, make the data more continuous and complete, provide more reliable information support for subsequent decisions, and through the historical data trend analysis, the system can calculate the missing estimation value of the missing data based on the historical data collected in advance, rather than simply filling the previous data acquisition value or missing value. This intelligent estimation enhances the accuracy of the data and avoids the problem of inaccurate data that may be caused by simple filling. And by detecting and processing the update anomaly in a timely manner, the system can maintain stable operation in case of device failure or short-term anomaly, avoid affecting the normal operation of the entire system, which enables the system to adapt to more environmental changes and device behavior anomalies and improves the fault tolerance of the system.;
[0169] In this embodiment, the execution module further includes:
[0170] An acquisition unit, configured to acquire the data synchronization frequency of the frequency device based on the usage requirements of the central control host;
[0171] A judgment unit, configured to judge whether the data synchronization frequency matches the data update requirement;
[0172] An execution unit, if not, dynamically adjusts a preset data synchronization mechanism according to a cache layering structure preset by the central control host, activates a differential data detection preset by the central control host according to the data synchronization mechanism, wherein the cache layering structure specifically includes a local cache layer, an edge computing layer and a cloud storage layer, the data synchronization mechanism specifically includes on-demand synchronization and batch synchronization, and the differential data detection is specifically to synchronize only the changed data to reduce data redundancy.
[0173] In this embodiment, the system collects the data synchronization frequencies of frequency devices based on the usage requirements of the central control host, and then the system determines whether these data synchronization frequencies match the data update requirements to execute corresponding steps. For example, when the system determines that the data synchronization frequency of the frequency device can match the data update requirements, the system will consider that the current data collection frequency is consistent with the system requirements, the data transmission of the Internet of Things devices is stable, and there is no need to adjust the collection strategy additionally. The system will continue to operate according to the existing collection period and data synchronization mechanism, avoiding unnecessary calculations and adjustments, ensuring efficient use of resources. At the same time, although the synchronization frequency matches the requirements, it is still necessary to check the integrity and accuracy of the data. The system ensures that the data fluctuations are within the normal range by comparing historical trends, avoiding the influence of abnormal values on decision-making, verifying the data transmission delay, preventing timing errors caused by network congestion or device failures, and in the case of stable data, the system can further optimize the synchronization strategy, such as dynamically adjusting the fault tolerance range to adapt to possible future device state changes, improving the system robustness, recording the data synchronization status for subsequent analysis and optimization, such as predicting future load changes and adjusting the synchronization strategy in advance. For example, when the system determines that the data synchronization frequency of the frequency device cannot match the data update requirements, at this time the system will consider that the current data collection frequency is inconsistent with the system requirements and the data transmission is unstable. The system will dynamically adjust the preset data synchronization mechanism according to the cache hierarchical structure preset by the central control host. The cache hierarchical structure specifically includes a local cache layer, an edge computing layer, and a cloud storage layer. The data synchronization mechanism specifically includes on-demand synchronization and batch synchronization. According to this data synchronization mechanism, the differential data detection preset by the central control host is activated. The differential data detection is specifically to synchronize only the changed data, reducing data redundancy. By dynamically adjusting the data synchronization mechanism (on-demand synchronization and batch synchronization), the system can adaptively adjust the synchronization method according to the actual operating state of the device, ensuring that the central control host can obtain the latest key data as soon as possible, reducing the information lag problem caused by device desynchronization. At the same time, using the local cache layer, the edge computing layer, and the cloud storage layer, different frequency data is reasonably allocated. For example, high-frequency data is preferentially stored in the local cache layer for the central control host to read in real time. Medium-frequency data can be stored in the edge computing layer for preprocessing in combination with the computing power to reduce the transmission burden. Low-frequency data is stored in the cloud storage layer to ensure long-term traceability, reduce the local storage pressure, and by synchronizing only the changed data, the system can avoid repeated transmission of unchanged data, helping to reduce network traffic consumption, reduce bandwidth occupancy, improve the overall data transmission efficiency, reduce the data storage and computing burden of the central control host, improve the system processing speed, make the data synchronization between devices more accurate, and reduce data errors.
[0174] In this embodiment, it also includes:
[0175] An acquisition module, configured to acquire the data update mode of the Internet of Things device based on a preset data reporting period of the central control host, where the data update mode specifically includes scheduled reporting, event triggering, and on-demand request;
[0176] A third judgment module, configured to judge whether the data update mode matches the central control host;
[0177] A third execution module, configured to, if not, construct a data caching policy for the Internet of Things device, dynamically adjust the effective time range of data caching according to the data update frequency, and limit data caching of preset inapplicable devices according to the data caching policy, where the inapplicable devices specifically include camera video streams and transient event monitoring devices.
[0178] In this embodiment, the system obtains the data update mode of the Internet of Things device based on the data reporting period preset by the central control host. The data update mode specifically includes scheduled reporting, event triggering, and on-demand request. Then, the system determines whether the data update mode of the Internet of Things device matches the central control host to execute corresponding steps. For example, when the system determines that the data update mode of the Internet of Things device can match the central control host, the system will consider that the current data reporting method of the Internet of Things device is consistent with the preset requirements of the central control host, and the data can be transmitted according to the expected frequency and triggering mechanism, without problems such as information lag or redundancy. The system does not need to adjust the data acquisition mechanism additionally, and maintains the current scheduled reporting, event triggering, or on-demand request mode. At the same time, by comparing historical data and current data, it checks whether there are data losses or abnormal jumps, and uses redundant sensors or cross-comparison algorithms to ensure the accuracy of the data. For example, it checks whether the data of the temperature and humidity sensor conforms to the environmental change trend, and optimizes the data storage strategy to ensure the efficient archiving of historical data, avoid repeated storage from affecting the storage space, reasonably configure the event triggering threshold to avoid data overload caused by mis-triggering, ensure the reasonableness of the request scheduling mechanism, and avoid bandwidth waste caused by frequent queries or data lag caused by too long request intervals. For example, when the system determines that the data update mode of the Internet of Things device cannot match the central control host, at this time, the system will consider that the current data reporting method of the Internet of Things device is inconsistent with the preset requirements of the central control host, and the data cannot be transmitted as expected. The system will construct a data caching strategy for the Internet of Things device, dynamically adjust the effective time range of the cache according to the data update frequency, and limit the data caching of pre-set non-applicable devices according to this data caching strategy. The non-applicable devices specifically include camera video streams and transient event monitoring devices. Through the data caching strategy, the system ensures that high-frequency data or short-term change data (such as sensor transient data) are stored within a reasonable time range without affecting the overall data transmission efficiency, restricts non-applicable devices (such as camera video streams, transient event monitoring devices) from entering the cache, avoids the high data traffic of these devices from occupying system resources and affecting the normal data transmission of other devices. At the same time, for devices with low-frequency data updates (such as environmental sensors, temperature and humidity monitoring devices), the cache time can be extended to avoid repeated requests and reduce bandwidth occupancy. For devices with high-frequency updates (such as power monitoring, industrial automation systems), the cache time can be shortened to ensure the timeliness and availability of the data. Dynamically adjust the cache effective time according to the data update frequency of the device, which not only ensures data availability but also avoids waste of storage resources. And by restricting non-applicable devices (such as high-definition video streams, transient event monitoring devices) from caching, it ensures that core business data will not be affected and prevents cache overflow or data loss. In the case of data mode mismatch, the caching strategy is adopted so that the system can still obtain some valid data instead of directly discarding the data, improving the integrity of the data.
[0179] In this embodiment, the second execution module further includes:
[0180] A detection unit, configured to detect the communication mode of the Internet of Things device based on the communication data format of the Internet of Things device, where the communication data format specifically includes JSON, XML, and binary stream;
[0181] A second judgment unit, configured to judge whether the communication mode needs to enable a preset encrypted communication;
[0182] A second execution unit, configured to, if so, construct corresponding data request content according to the communication address of the Internet of Things device, and dynamically adjust the request interval period of the data request content according to the data update requirement, where the communication address specifically includes an IP domain name, a port number, and an authentication method, and the data request content specifically includes a specified target device ID, a set data time range, and an increased request priority.
[0183] In this embodiment, the system is based on the communication data format of the Internet of Things devices. The communication data format specifically includes JSON, XML, and binary streams. The system detects the communication methods of the Internet of Things devices, and then determines whether these communication methods need to enable pre-set encrypted communication to execute corresponding steps. For example, when the system determines that the communication method of the Internet of Things device does not need to enable pre-set encrypted communication, the system will consider that the communication data format and transmission protocol adopted by the current device do not involve sensitive data transmission in the current application scenario, or are already in a trusted secure network environment and do not require additional encryption. The system will perform data transmission according to the pre-set communication data format without adding additional encryption overhead, and continue to use ordinary transmission protocols such as HTTP or MQTT to avoid performance loss caused by encryption. At the same time, since no encryption is performed, the system can reduce the computational resource overhead required for data encryption and decryption, reduce the data transmission delay. In a bandwidth-constrained environment (such as a wireless network or a low-power device), the size of data packets can be reduced, improving communication real-time performance. And for devices with limited computing power (such as low-power sensors), the problem of increased device processing burden caused by enabling encryption can be avoided, ensuring that they can operate normally and avoiding problems such as device processing delay or increased power consumption caused by the high computational complexity of the encryption algorithm. For example, when the system determines that the communication method of the Internet of Things device needs to enable pre-set encrypted communication, at this time the system will consider that the communication data format and transmission protocol adopted by the current device involve sensitive data transmission and additional encryption is required. The system will construct corresponding data request content according to the communication address of the Internet of Things device. The communication address specifically includes IP domain name, port number, and authentication method. The data request content specifically includes specifying the target device ID, setting the data time range, and increasing the request priority. According to the data update requirements, the request interval period of the data request content is dynamically adjusted. By judging whether the communication method needs encryption, the system can automatically enable encrypted communication for specific data streams, avoiding risks such as data leakage, eavesdropping, or tampering caused by plaintext transmission. For example, when the device uses JSON or XML format and transmits data over the public network, the system can automatically enable encryption methods such as TLS or AES to ensure that the data is only parsed by authorized terminals and prevent man-in-the-middle attacks. At the same time, the system constructs precise data request content according to the device's communication address (IP domain name, port number, authentication method, etc.). For example, it only sends a data pull request to the specified device instead of broadcasting to all devices. This optimization strategy reduces unnecessary data traffic, reduces network bandwidth occupancy, and improves the stability of data transmission. And the system dynamically adjusts the request interval period of the data request content to reasonably allocate data synchronization time. For example, it increases the synchronization interval for low-frequency update devices (such as environmental monitoring sensors) and shortens the synchronization interval for high-real-time devices (such as video surveillance devices) to ensure that data of different types of devices can be efficiently transmitted as needed.
[0184] In this embodiment, the judgment module further includes:
[0185] An identification unit, configured to identify the corresponding data change rate based on the preset data update interval of the Internet of Things device;
[0186] A third judgment unit, configured to judge whether the data change rate exceeds a preset change threshold;
[0187] A third execution unit, configured to, if not, obtain the field integrity at the time of data update, detect the abnormal devices with data anomalies according to the field integrity, and batch send a preset data re-collection request to the abnormal devices through the central control host, where the field integrity specifically includes field values and field formats.
[0188] In this embodiment, the system identifies the corresponding data change rate based on the data update interval preset by the Internet of Things device, and then the system determines whether the data change rate exceeds the preset change threshold to execute the corresponding steps; for example, when the system determines that the data change rate exceeds the preset change threshold, the system will consider that the data fluctuation of the current Internet of Things device is abnormal, and there may be situations such as device failure, environmental mutation or incorrect data reporting. The system will screen the abnormal data, combine the historical data trend and the relevant data of the surrounding sensors to judge whether the data change is reasonable. For example, if the temperature data of the environmental sensor fluctuates violently in a short period of time, the system will compare the data of the surrounding temperature and humidity devices to confirm whether it is a real environmental change or a sensor failure. At the same time, if the system detects a possible abnormal fluctuation, it will perform cross-verification with adjacent devices or historical data. For example, if the power consumption data of a smart meter suddenly increases abnormally, the system can refer to the load conditions of adjacent meters to judge whether it is a sensor error, abnormal electricity consumption behavior or power theft. And if the data changes too fast, the system may need to temporarily increase the data acquisition frequency to obtain a more detailed change trend. For example, an acceleration sensor for monitoring the health of a building structure will automatically increase the data acquisition frequency when detecting abnormal vibrations in order to capture more detailed vibration patterns to assist in structural safety assessment; for example, when the system determines that the data change rate does not exceed the preset change threshold, at this time the system will consider that the data of the current Internet of Things device is transmitted normally, and the system will obtain the field integrity at the time of data update. The field integrity specifically includes the field value and the field format. According to these field integrities, it will detect abnormal devices that may have data anomalies, and send a preset data re-acquisition request to the abnormal devices that may have data anomalies in batches through the central control host;By detecting field integrity (field values and field formats), the system can effectively screen for missing fields, format errors, or outliers that may exist in data packets, avoiding calculation errors or business logic anomalies caused by incomplete data or format mismatches. For example, the data fields of a temperature and humidity sensor should include information such as temperature, humidity, and timestamp. If a certain field is missing, the system can immediately identify and handle it. At the same time, by comparing the field integrity of each device, the system can quickly identify devices that may have data anomalies, rather than blindly re-collecting data from all devices, thereby improving detection efficiency and reducing unnecessary resource consumption. For example, in an intelligent building management system, if the data format reported by temperature sensors in certain rooms is abnormal, the system can accurately lock these sensors for recheck, rather than affecting the normal data reporting of all devices. And by sending a data re-collection request to abnormal devices in batches through the central control host, rather than sending requests to each abnormal device individually, the communication overhead can be significantly reduced, the system bandwidth usage can be optimized, and the efficiency of data transmission can be ensured. For example, in a large-scale Internet of Things deployment environment (such as smart cities and industrial monitoring), the batch processing mechanism can effectively reduce the server load and improve the data synchronization efficiency.;
[0189] In this embodiment, the second judgment module further includes:
[0190] A second identification unit, configured to identify the communication status of the Internet of Things device based on the heartbeat detection preset by the central control host;
[0191] A fourth judgment unit, configured to judge whether the communication status is offline;
[0192] A fourth execution unit, configured to, if not, collect the timeout information of the Internet of Things device, obtain the data packet loss rate when data is updated according to the timeout information, compare the data packet loss rate with the data reception timestamp preset by the central control host, and detect the corresponding delay and lost data.
[0193] In this embodiment, the system identifies the communication status of the Internet of Things (IoT) device based on the heartbeat detection preset by the central control host, and then the system determines whether the communication status is offline to execute corresponding steps. For example, when the system determines that the communication status of the IoT device is offline, the system will consider that the device can no longer communicate with the central control host normally. The system will confirm that the device is indeed offline through continuous multiple heartbeat detections (such as not receiving heartbeat signals continuously 3 to 5 times), rather than temporary signal fluctuations or short-term communication interruptions, record the device offline time, mark the device status, avoid affecting the data processing of other online devices, and at the same time generate an alarm notification through the central control host interface to prompt the operation and maintenance personnel to troubleshoot the specific reason. If the device supports remote maintenance, a firmware restart command can be sent to try to restore the device to normal operation. When the device supports self-diagnosis, the self-check function is triggered and an error code is returned for further analysis of the cause of the fault. And the local cache mechanism is enabled to store key data to avoid data loss during the offline period. After the device resumes online, the system can execute the data compensation mechanism to batch synchronize the historical data during the offline period to ensure data integrity. For example, when the system determines that the communication status of the IoT device is not offline, at this time the system will consider that the device still maintains normal communication with the central control host. The system will collect the timeout information of the IoT device, and based on this timeout information, obtain the data packet loss rate when the data is updated, and compare this data packet loss rate with the data reception timestamp preset by the central control host to detect the corresponding time delay and lost data. By monitoring the data packet loss rate, the system can timely detect abnormal situations in the data transmission process of the IoT device, such as network congestion, signal interference or device failure, thereby improving the overall reliability of the system. At the same time, based on the comparison result of the data packet loss rate and the data reception timestamp, the system can dynamically adjust the data synchronization mechanism, such as increasing the number of data retransmissions, optimizing the data packaging method or enabling differential data transmission, to reduce data loss and improve the data synchronization efficiency. And by detecting the data reception timestamp, the system can calculate the actual data transmission time delay, and according to the application scenario of the IoT device (such as real-time monitoring or batch reporting), adjust the data processing priority to optimize the response speed of the system. In a large-scale IoT deployment environment, this mechanism can adaptively adjust the data transmission strategy according to the communication status of different devices, ensure the priority transmission of data of key devices, reduce unnecessary data traffic, and improve the stability and resource utilization rate of the entire network.
[0194] In this embodiment, the acquisition module further includes:
[0195] A second detection unit for detecting the communication quality between the central control host and the IoT device based on the operation log of the IoT device, where the operation log specifically includes the average online rate, the number of disconnections, and the disconnection time period, and the communication quality specifically includes network delay, packet loss rate, and signal strength;
[0196] The fifth judgment unit is used to judge whether the communication quality reaches a preset quality threshold;
[0197] The fifth execution unit is used to, if not, identify a preset high packet loss device through the central control host, dynamically adjust the data reporting interval according to the communication quality, and adaptively reduce the data transmission frequency according to the data reporting interval.
[0198] In this embodiment, the system detects the communication quality between the central control host and the Internet of Things device based on the operation logs of the Internet of Things device. The operation logs specifically include the average online rate, the number of disconnections, and the disconnection time period. The communication quality specifically includes network latency, packet loss rate, and signal strength. Then, the system determines whether the communication quality reaches a pre-set quality threshold to execute corresponding steps. For example, when the system determines that the communication quality between the central control host and the Internet of Things device can reach the pre-set quality threshold, the system will consider that the communication state between the current Internet of Things device and the central control host is normal, the data transmission is stable, and it can meet the requirements of real-time data exchange. When the communication quality reaches the preset threshold, the system will continue to perform data transmission at the normal data update frequency to ensure that device data is reported on time, without being affected by network factors, guaranteeing the real-time and integrity of the data. At the same time, according to the actual data update requirements of the device, the data acquisition frequency is further optimized. For example, if the usage scenario of the device requires high-frequency data updates, the acquisition frequency can be appropriately increased, or the data transmission time window can be dynamically adjusted according to business requirements to ensure the efficient utilization of system resources. And based on the good communication quality of the device, redundant operations such as data retransmission, error checking, and data rollback are reduced, thereby reducing the burden on the central control host and improving the overall system operation efficiency and response speed. For example, when the system determines that the communication quality between the central control host and the Internet of Things device cannot reach the pre-set quality threshold, at this time, the system will consider that the communication state between the current Internet of Things device and the central control host is abnormal. The system will identify the pre-set high packet loss devices through the central control host, dynamically adjust the data reporting interval according to different communication qualities, and adaptively reduce the data transmission frequency based on this data reporting interval. By dynamically adjusting the data reporting interval, the system can avoid frequent data retransmission or error checking caused by high packet loss rate or unstable communication quality, thereby reducing unnecessary bandwidth occupancy and system burden. Reducing the data transmission frequency helps to reduce the pressure on the central control host and the network. Especially in high-load situations, it can ensure the stability and performance of the system. At the same time, according to the communication quality and packet loss situation of the device, the data reporting frequency is adaptively adjusted, which can effectively cope with the actual communication situations of different devices. For example, in the case of weak signals or large network fluctuations, the system will automatically reduce the data acquisition and transmission frequency to avoid excessive data loss and system anomalies. This can enable the device to maintain a connection with the central control host even when the communication quality is unstable, without causing serious lag or loss of information. And for devices with poor communication quality, by reducing the data transmission frequency, the system can effectively reduce the risk of data packet loss. A lower frequency helps to avoid overly frequent transmission requests, exacerbating network congestion and resulting in more data loss.
[0199] Although embodiments of the present invention have been shown and described, those of ordinary skill in the art will appreciate that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A protocol-based data communication method for a central control host of the Internet of Things, characterized in that: The following steps are involved: Based on the IoT device preset by the central control host, collect data update parameters of the IoT device, wherein the data update parameters specifically include a data update timestamp and a data value; Determine whether the data update parameter detects a preset update anomaly, wherein the update anomaly specifically includes an unstable update cycle and no update for a long time; If yes, then the frequency devices of the IoT devices are divided according to the data update requirements of the IoT devices, and based on the frequency devices, a unified preset time base is used to calculate the data collection interval, and a local data buffer is added on the gateway end preset by the central control host, and the previous data collection value is allowed to be returned within a preset period of time, wherein the frequency devices specifically include high-frequency devices, medium-frequency devices and low-frequency devices; Determine whether the return of the previous data collection value exceeds a preset number of times; If it exceeds, a preset data refresh request is sent to the central control host, based on the data refresh request, the preset polling cycle is shortened, the latest data is forcibly obtained, the latest data is compared with the previous data collection value, and the missing estimated value of the data update demand is calculated according to the pre-collected historical data trend, and the missing estimated value is filled into the missing data; Wherein, the step of dividing the frequency devices of the Internet of Things devices according to the data update requirements of the Internet of Things devices also includes: Based on the usage requirements of the central control host, the data synchronization frequency of the frequency device is collected; Determining whether the data synchronization frequency matches the data update requirement; If not, the preset data synchronization mechanism is dynamically adjusted according to the cache hierarchical structure preset by the central control host, and the differential data detection preset by the central control host is activated according to the data synchronization mechanism, wherein the cache hierarchical structure specifically includes a local cache layer, an edge computing layer and a cloud storage layer, the data synchronization mechanism specifically includes on-demand synchronization and batch synchronization, and the differential data detection specifically synchronizes only the changed data to reduce data redundancy.
2. The protocol-based IoT central control host data communication method according to claim 1, characterized in that: Before the step of adding a local data buffer on the gateway end preset by the central control host to allow the return of the last data collection value within a preset period of time, the method further includes: Based on the data reporting cycle preset by the central control host, obtain the data update mode of the IoT device, wherein the data update mode specifically includes scheduled reporting, event triggering and on-demand request; Determine whether the data update mode matches the central control host; If not, a data caching strategy for the IoT device is constructed, and the effective time range of the data cache is dynamically adjusted according to the data update frequency. According to the data caching strategy, data caching is restricted to preset non-applicable devices, wherein the non-applicable devices specifically include camera video streams and transient event monitoring devices.
3. The protocol-based IoT central control host data communication method according to claim 1, characterized in that: The step of sending a preset data refresh request to the central control host further includes: Based on the communication data format of the IoT device, detecting the communication mode of the IoT device, wherein the communication data format specifically includes JSON, XML, and binary stream; Determining whether the communication method needs to enable preset encrypted communication; If so, construct the corresponding data request content according to the communication address of the IoT device, and dynamically adjust the request interval of the data request content according to the data update requirement, wherein the communication address specifically includes the IP domain name, port number and authentication method, and the data request content specifically includes specifying the target device ID, setting the data time range and increasing the request priority.
4. The protocol-based IoT central control host data communication method according to claim 1, characterized in that: The step of determining whether the data update parameter detects a preset update anomaly also includes: Based on the preset data update interval of the IoT device, identifying the corresponding data change rate; Determining whether the data change rate exceeds a preset change threshold; If not, the field integrity during data update is obtained, and based on the field integrity, abnormal devices with abnormal data are detected, and preset data re-collection requests are sent to the abnormal devices in batches through the central control host, wherein the field integrity specifically includes field value and field format.
5. The protocol-based IoT central control host data communication method according to claim 1, characterized in that: The step of determining whether the return of the previous data collection value exceeds a preset number of times also includes: Based on the heartbeat detection preset by the central control host, identifying the communication status of the IoT device; Determining whether the communication status is offline; If not, the timeout information of the IoT device is collected, and the data packet loss rate when the data is updated is obtained according to the timeout information, and the data packet loss rate is compared with the data receiving timestamp preset by the central control host to detect the corresponding delay and lost data.
6. The protocol-based IoT central control host data communication method according to claim 1, characterized in that: The step of collecting data update parameters of the IoT devices based on the IoT devices preset by the central control host further includes: Based on the operation log of the IoT device, the communication quality between the central control host and the IoT device is detected, wherein the operation log specifically includes the average online rate, the number of offline times and the offline time period, and the communication quality specifically includes network delay, packet loss rate and signal strength; Determining whether the communication quality reaches a preset quality threshold; If not, the central control host identifies the preset high packet loss device, dynamically adjusts the data reporting interval according to the communication quality, and adaptively reduces the data transmission frequency according to the data reporting interval.
7. A protocol-based IoT central control host data communication system, characterized in that: include: A collection module, used to collect data update parameters of the IoT devices based on the IoT devices preset by the central control host, wherein the data update parameters specifically include a data update timestamp and a data value; A judging module, used to judge whether the data update parameter detects a preset update anomaly, wherein the update anomaly specifically includes an unstable update cycle and no update for a long time; An execution module, for dividing the frequency devices of the IoT devices according to the data update requirements of the IoT devices, unifying the preset time base to calculate the data collection interval based on the frequency devices, adding a local data buffer on the gateway end preset by the central control host, and allowing the return of the last data collection value within a preset period of time, wherein the frequency devices specifically include high-frequency devices, medium-frequency devices and low-frequency devices; A second judgment module is used to judge whether the return of the previous data collection value exceeds a preset number of times; A second execution module is configured to send a preset data refresh request to the central control host if the number of data updates exceeds the limit, shorten the preset polling cycle based on the data refresh request, forcibly obtain the latest data, compare the latest data with the previous data collection value, calculate the missing estimated value of the data update demand according to the pre-recorded historical data trend, and fill the missing estimated value into the missing data; Wherein, the execution module further includes: A collection unit, used for collecting the data synchronization frequency of the frequency device based on the use requirements of the central control host; A judging unit, used to judge whether the data synchronization frequency matches the data update requirement; The execution unit is used to dynamically adjust the preset data synchronization mechanism according to the cache hierarchical structure preset by the central control host, and activate the differential data detection preset by the central control host according to the data synchronization mechanism, wherein the cache hierarchical structure specifically includes a local cache layer, an edge computing layer and a cloud storage layer, the data synchronization mechanism specifically includes on-demand synchronization and batch synchronization, and the differential data detection specifically synchronizes only the changed data to reduce data redundancy.
8. The protocol-based IoT central control host data communication system according to claim 7 is characterized in that: Also includes: An acquisition module, configured to acquire a data update mode of the IoT device based on a data reporting cycle preset by the central control host, wherein the data update mode specifically includes timed reporting, event triggering, and on-demand request; A third judgment module is used to judge whether the data update mode matches the central control host; The third execution module is used to, if not, construct a data caching strategy for the IoT device, dynamically adjust the effective time range of the data cache according to the data update frequency, and limit data caching to preset non-applicable devices based on the data caching strategy, wherein the non-applicable devices specifically include camera video streams and transient event monitoring devices.
Citation Information
Patent Citations
Data offline caching method oriented to mine network-free scene
CN118869480A
Data processing method and device and computer storage medium
CN119377976A