Cloud side-end integrated communication gateway system and gateway module thereof
By combining the clock skew calibration module and the data folding engine module, the problem of disordered data transmission caused by clock skew of edge devices is solved. This enables dynamic calibration of device clock drift and timely transmission of high-priority data, improving the system's responsiveness and resource utilization efficiency.
Patent Information
- Application Number
- CN202511630939.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-01-13
AI Technical Summary
In existing technologies, the clock frequency of edge devices deviates from that of the gateway, causing the arrival order of data frames to be inconsistent with the actual sending order. Furthermore, the time synchronization protocol fails to effectively solve the dynamic drift problem, affecting the timeliness and reliability of data transmission. In particular, it cannot support the timely response to high-priority data such as emergency alarms in asynchronous acquisition scenarios.
By employing a clock skew calibration module, a data folding engine module, a gateway defolding module, and a dynamic bandwidth allocation module, and periodically calibrating verification frames and device priorities, dynamic calibration of device clock skew and time window mapping of data frames are achieved, ensuring timely transmission of high-priority data and correct data order.
It effectively solves the problem of data frame order disorder caused by clock drift, improves the system's ability to respond to emergencies, ensures the timely transmission and safe response of high-priority data, and avoids resource waste.
Smart Images

Figure CN121333469A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to an integrated cloud-edge-device communication gateway system and its gateway module. Background Technology
[0002] In distributed systems such as industrial IoT, smart grids, and vehicle-to-everything (V2X) that integrate cloud, edge, and device collaboration, a massive number of edge devices, such as sensors, actuators, and smart terminals, need to interact with the cloud in real time through communication gateways. However, existing technologies have the following problems. First, edge devices typically use low-cost crystal oscillators, whose clock frequencies deviate from those of the gateway and drift with temperature and aging. This clock deviation causes data frames sent by the devices to arrive at the gateway in a different order than the actual transmission order. For example, in industrial automation scenarios, an emergency alarm frame from sensor A might arrive at the gateway later than a normal monitoring frame from sensor B due to a slower clock, preventing the cloud from triggering a timely safety response. With the explosive growth in the number of edge devices, existing technologies use time synchronization protocols NTP / PTP and data aggregation transmission. However, for time synchronization protocols NTP / PTP, only the initial calibration problem of clock deviation is solved, without considering the periodic verification of dynamic drift. Calibration errors will still accumulate during long-term operation. For data aggregation transmission, it is necessary to wait for all devices to have their data ready before transmitting them uniformly. It cannot support asynchronous acquisition scenarios, such as fault-triggered sensors, and has low fault tolerance, causing inconvenience to actual use.
[0003] Therefore, it is necessary to provide a new cloud-edge-device integrated communication gateway system and its gateway module to solve the above-mentioned technical problems. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides an integrated cloud-edge-device communication gateway system and its gateway module.
[0005] The cloud-edge-device integrated communication gateway system provided by this invention includes: a clock skew calibration module, a data folding engine module, a gateway defolding module, and a dynamic bandwidth allocation module, wherein the clock skew calibration module, the data folding engine module, the gateway defolding module, and the dynamic bandwidth allocation module are connected through a communication network; The clock deviation calibration module is used to send a calibration start frame to the device that is accessing the gateway for the first time. After receiving the frame, the device records the local timestamp and replies with a calibration response frame. The gateway records the arrival time of the response frame, calculates the two-way time difference, and calculates the average deviation as the initial calibration value through multiple samplings. At this time, the gateway periodically sends a calibration verification frame, repeats the above process, updates the average deviation to adapt to clock drift, and then stores the calibrated device clock deviation value into the device clock table for the data folding engine module to call. The data folding engine module is used to map application layer data frames generated in normal business communication to sub-time slots of the time window using the device clock deviation value and device priority of the clock deviation calibration module, generate folded frames and output folded frames to the gateway defolding module for restoration, calculate the ratio of the number of sub-time slots actually used in each time window to the total number of sub-time slots to generate the window utilization value, and record the window parameters to the transmission log for analysis and optimization by the dynamic bandwidth allocation module. The gateway defolding module is used to parse the header information of the folded frame and the length of the data segment of each sub-time slot, calculate the amount of data processed per unit time, generate the network load value, and combine the device clock deviation value of the clock deviation calibration module to back-calculate the original transmission time. After reassembling the data and verifying its integrity, it is uploaded to the application layer and the transmission status is fed back to the dynamic bandwidth allocation module to drive dynamic bandwidth adjustment. The dynamic bandwidth allocation module is used to adjust the time window parameters and the calibration cycle of the clock deviation calibration module in real time based on the network load fed back by the gateway defolding module and the window utilization of the data folding engine module, and to send new parameters to the data folding engine module and the clock deviation calibration module, forming a closed-loop control cycle of monitoring-adjustment-feedback.
[0006] Preferably, the calibration start frame is actively sent by the gateway to devices that are accessing for the first time or that need to be recalibrated. The fields of the calibration start frame include a unique identifier, an initial timestamp, a frame type identifier, and an optional verification field.
[0007] Preferably, the calibration response frame is a response frame generated by the device after receiving the calibration start frame and sent back to the gateway, and it carries the device's local clock information. The fields of the calibration response frame include device ID, local timestamp, frame type identifier, and optional verification field.
[0008] Preferably, the initial timestamp is the local timestamp when the frame was sent from the gateway.
[0009] Preferably, the time window is a fixed time period defined for data transmission in the data folding engine module, which aggregates and schedules data frames from multiple devices according to the time dimension.
[0010] Preferably, in the gateway defolding module, the header information includes a time window identifier and a sub-time slot distribution, and the network load value is the ratio of the actual data volume to the theoretical maximum bandwidth.
[0011] Preferably, in the gateway defolding module, the reassembled data is the data fragments in multiple sub-time slots of the folded frame spliced together into a complete service data frame according to the original transmission time order, wherein the original transmission time is the local clock time.
[0012] Preferably, the specific operation steps of the data folding engine module are as follows: Step 1.1 Mapping Preparation and Time Window Division: First, obtain the device clock deviation value from the clock deviation calibration module. The gateway predefines device priority rules and defines a fixed-duration time window. The time window is divided into multiple sub-time slots, and each sub-time slot corresponds to the transmission time slot of a device. When allocating the time window, the data frames of high-priority devices are mapped to the earlier sub-time slots first. If multiple devices compete for the same sub-time slot, the device with higher priority will get the transmission right first, and the device with lower priority will have to wait for the next cycle or be adjusted to other idle sub-time slots. Step 1.2 Data Frame Mapping and Folding: Application layer data frames generated during normal business communication are mapped to sub-time slots within a time window based on device clock offset and device priority, thus generating folded frames. Step 1.3, Output and Statistics: Output the folded frame to the gateway defolding module, and at the same time, calculate the ratio of the number of sub-time slots actually used in each time window to the total number of sub-time slots, generate the window utilization value, and record the window parameters to the transmission log.
[0013] Preferably, the specific operation steps of the gateway defolding module are as follows: Step 2.1, Parse the folded frame header: After receiving the folded frame, first extract the window number and timestamp within the time window identifier, confirm the time period to which the data belongs, parse the number of sub-time slots within the sub-time slots and the start and end positions of each sub-time slot, clarify the position of each device's data in the time window, and obtain the data segment length of each sub-time slot, including obtaining the number of bytes occupied by the data in each sub-time slot. Step 2.2 Calculate network load: After the interpretation is completed, calculate the total amount of data actually processed by the gateway per unit time based on the data segment length of all sub-time slots within the time window. Calculate the ratio of the actual data volume to the theoretical maximum bandwidth to obtain the network load value, which indicates the current network busyness. The theoretical maximum bandwidth is the hardware or configuration limit of the gateway. Step 2.3, reverse the original transmission time: From the device clock table of the clock deviation calibration module, query the clock deviation value corresponding to each device in the current folded frame. For the data segment of each sub-time slot, correct the gateway receiving time according to the clock deviation value of the device to which the data segment belongs in each sub-time slot, that is, correct the arrival time of the folded frame. At this time, reverse the local clock time of the actual data frame sent by the device, that is, reverse the original transmission time of the device. Step 2.4, Data Reassembly and Verification: Based on the original transmission time, sort the data segments of all sub-time slots, and then splice the sorted data segments in the order of the original transmission time to restore the complete service data frame. Perform integrity verification on the reassembled service data frame using Cyclic Redundancy Check (CRC). If the verification fails, mark the service data frame as abnormal and feed it back to the dynamic bandwidth allocation module for further processing. Step 2.5, Upload and Feedback: Upload the verified service data frames to the application layer of the device and feed back the transmission status to the dynamic bandwidth allocation module.
[0014] The cloud-edge-device integrated communication gateway module includes a clock deviation calibration unit, which is used to monitor and calibrate the clock deviation between the device and the gateway; The data folding processing unit is used to compress application layer data frames generated in normal business communication into a time window for transmission by using the calibrated device clock deviation value and device priority, generating folded frames and optimizing window utilization. The gateway defolding and reassembly unit is used to parse folded frames, restore the original data and verify its integrity, and generate network load metrics. The dynamic bandwidth allocation unit is used to adjust the time window parameters and calibration cycle in real time based on network load indicators and window utilization, forming a closed-loop control.
[0015] Compared with related technologies, the cloud-edge-device integrated communication gateway system and its gateway module provided by the present invention have the following beneficial effects: 1. This invention solves the problem of data order disorder caused by clock deviation to a certain extent by using the device clock deviation value to back-calculate the original transmission time in the gateway defolding module, reconstructing the data and verifying its integrity before uploading it to the application layer, so that the data can be uploaded in the actual transmission order. 2. Traditional time synchronization protocols only complete the initial calibration, while this invention continuously tracks the dynamic drift of the device clock by periodically sending calibration verification frames. This achieves closed-loop control of the process from initial calibration to dynamic verification to real-time correction, ensuring that the clock deviation remains within a controllable range during long-term operation. To a certain extent, this avoids the problem of data frame sequence disorder caused by clock drift. Furthermore, by combining device priority with the calibrated clock deviation value, time windows are prioritized for high-priority data such as emergency alarms and real-time control, and the sub-time slot with the highest calibration accuracy is prioritized to occupy the slot. This avoids being blocked by ordinary monitoring frames due to a slow clock, significantly improving the timeliness of safety response. 3. This invention uses a data folding engine to map data frames from different devices to sub-time slots within the same time window, thereby decoupling asynchronous acquisition from synchronous transmission. This allows emergency event data to be transmitted preferentially without waiting for other devices, significantly improving the system's responsiveness to sudden events. Furthermore, it automatically merges idle sub-slots during low-load periods and expands high-priority sub-slots during high-load periods, avoiding resource waste caused by traditional fixed time slot allocation. Attached Figure Description
[0016] Figure 1 This is a structural block diagram of the cloud-edge-device integrated communication gateway system provided by the present invention; Figure 2 This is a flowchart illustrating the cloud-edge-device integrated communication gateway module. Detailed Implementation
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0018] Please refer to the following: Figures 1 to 2 ,in, Figure 1 This is a structural block diagram of the cloud-edge-device integrated communication gateway system provided by the present invention; Figure 2 This is a flowchart illustrating the cloud-edge-device integrated communication gateway module.
[0019] Example 1 For reference Figure 1 As shown, the cloud-edge-device integrated communication gateway system includes a clock deviation calibration module, which is used to dynamically monitor and calibrate the clock deviation between the device and the gateway, obtain the device clock deviation value, and store it in the device clock table. The calibration start frame is actively sent by the gateway to devices that are accessing for the first time or that need to be recalibrated. The fields of the calibration start frame include a unique identifier, an initial timestamp, a frame type identifier, and an optional verification field. A unique identifier used to identify the target device; Initial timestamp, the local timestamp when the frame was sent from the gateway, in microseconds; Frame type identifier, used by the device to identify that this frame is a calibration start command, is a fixed field, such as 0xAAAA; Optional verification fields: such as using CRC checksums, the purpose of which is to ensure the integrity of frame transmission; The calibration response frame is a response frame generated by the device after receiving the calibration start frame and sent back to the gateway. It contains the device's local clock information. The fields of the calibration response frame include device ID, local timestamp, frame type identifier, and optional verification fields. The data folding engine module is used to map application layer data frames generated in normal business communication to sub-time slots of the time window by utilizing the device clock deviation value and device priority of the clock deviation calibration module, generating folded frames and outputting the folded frames to the gateway defolding module for restoration, calculating the ratio of the number of sub-time slots actually used in each time window to the total number of sub-time slots to generate the window utilization value, and recording the window parameters to the transmission log for analysis and optimization by the dynamic bandwidth allocation module. The time window is a fixed time period for data transmission in the data folding engine module, such as 10ms or 100ms. It is used to aggregate and schedule data frames from multiple devices according to the time dimension. It is a logical time container and achieves parallel transmission of data from multiple devices through sub-time slots. Sub-time slot division: Each window is divided into multiple sub-time slots, and each sub-time slot corresponds to a transmission time slot of a device; The gateway defolding module is used to parse the header information of the folded frame and the length of the data segment of each sub-time slot, calculate the amount of data processed per unit time, generate the network load value, and combine the device clock deviation value of the clock deviation calibration module to back-calculate the original transmission time. After reassembling the data and verifying its integrity, it is uploaded to the application layer and the transmission status is fed back to the dynamic bandwidth allocation module to drive dynamic bandwidth adjustment. The original time is the local clock time when the device actually sends data frames. Reassembling data involves splicing data segments from multiple sub-time slots within a folded frame into a complete service data frame in the original transmission time order. The dynamic bandwidth allocation module is used to adjust the time window parameters and the calibration cycle of the clock deviation calibration module in real time based on the network load fed back by the gateway defolding module and the window utilization of the data folding engine module, and to send new parameters to the data folding engine module and the clock deviation calibration module, forming a closed-loop control cycle of monitoring-adjustment-feedback. Among them, network load refers to the ratio of the actual amount of data transmitted in the network per unit time, such as per second, to the theoretical maximum bandwidth, reflecting the current network busyness level; Window utilization rate: refers to the ratio of the number of sub-time slots actually used within a time window to the total number of sub-slots in the data folding engine module, reflecting the utilization efficiency of window resources; It should be noted that the system continuously tracks the dynamic drift of the device clock by periodically sending calibration verification frames. The gateway actively sends a calibration start frame to the device, and the device replies with a calibration response frame containing local clock information. The gateway calculates the device's clock deviation value by measuring the two-way time difference and updates this value periodically to adapt to clock drift. Traditional time synchronization protocols, such as NTP / PTP, only complete the initial calibration, while this system ensures that the clock deviation remains within a controllable range through periodic calibration. Furthermore, in the data folding engine module, the system not only utilizes the calibrated clock deviation value but also combines it with device priority. High-priority data, such as emergency alarm data and real-time control data, are preferentially allocated to the sub-time slot with the highest calibration accuracy within the time window. By allocating more precise transmission time slots to high-priority data, the system avoids the situation where high-priority data is blocked by ordinary monitoring frames due to slow clock speeds, thereby ensuring the timely transmission and correct order of high-priority data. This avoids data frame order disorder caused by the accumulation of clock drift during long-term operation. Specifically, by using the device clock deviation value to back-calculate the original transmission time in the gateway defolding module, reconstructing the data and verifying its integrity before uploading it to the application layer, the problem of data order disorder caused by clock deviation is solved to a certain extent, enabling the data to be uploaded in the actual transmission order. Furthermore, traditional time synchronization protocols only complete initial calibration, while this invention continuously tracks the dynamic drift of the device clock by periodically sending calibration verification frames. This achieves closed-loop control of the process from initial calibration to dynamic verification to real-time correction, ensuring that the clock deviation remains within a controllable range during long-term operation. To a certain extent, this avoids the problem of data frame sequence disorder caused by clock drift. In addition, by combining device priority with the calibrated clock deviation value, time windows are prioritized for high-priority data such as emergency alarms and real-time control, and the sub-time slot with the highest calibration accuracy is prioritized to avoid being blocked by ordinary monitoring frames due to a slow clock, thus significantly improving the timeliness of safety response.
[0020] Furthermore, by using a data folding engine to map data frames from different devices to sub-time slots within the same time window, the asynchronous acquisition and synchronous transmission are decoupled. This allows emergency event data to be transmitted preferentially without waiting for other devices, significantly improving the system's responsiveness to emergencies. Additionally, idle sub-slots are automatically merged during low-load periods, and high-priority sub-slots are expanded during high-load periods, avoiding resource waste caused by traditional fixed time slot allocation.
[0021] Example 2 For reference Figure 1 As shown, the following analysis applies to the data folding engine module: For example, in the industrial IoT scenario of a smart factory, there are a large number of edge devices, such as temperature sensors, pressure sensors, and motor speed sensors. These devices interact with the cloud in real time through a communication gateway. Since each edge device uses a low-cost crystal oscillator, the clock frequency deviates from that of the gateway and will drift with temperature and aging, which affects the data transmission order and efficiency. First, based on the set parameters: Set the time window to 100ms, meaning that each 100ms period is a data transmission and processing cycle; Set sub-time slots: Divide each 100ms time window into 10 sub-time slots, each sub-time slot with a duration of 10ms, and each sub-time slot corresponds to a different edge device. That is, sub-time slot 1 corresponds to temperature sensor 1, sub-time slot 2 corresponds to pressure sensor 1, and so on. Set device priority: This is set according to the importance and real-time requirements of the device data. For example, the emergency alarm data sent when the temperature sensor detects an abnormal temperature is set to the highest priority, which is 3. The normal temperature monitoring data is set to the medium priority, which is 2. The regular monitoring data of the motor speed sensor is set to the lowest priority, which is 1. Implementation: The clock skew calibration module continuously and dynamically monitors and calibrates the clock skew between the device and the gateway. Assuming that at a certain moment, the following clock skew values are obtained from the device and stored in the device clock table:
[0022] At the start of a certain time window, each edge device begins generating application-layer data frames for normal business communication: Temperature sensor 1: When the local clock time is 10:00:00.000000, a normal temperature monitoring data frame is generated. The data content is: temperature: 25℃, and the data frame length is 10 bytes. Pressure sensor 1: When the local clock time is 10:00:00.000010, a pressure monitoring data frame is generated. The data content is pressure: 1.2MPa, and the data frame length is 12 bytes. Motor speed sensor 1: When the local clock time is 10:00:00.000020, a speed monitoring data frame is generated. The data content is speed: 1500 r / min. The data frame length is 14 bytes. At this point, the data folding engine module maps the aforementioned data frames to sub-time slots within the time window based on the device clock offset value and device priority provided by the clock offset calibration module: Although the data generated by pressure sensor 1 is later than that of temperature sensor 1, the clock deviation of temperature sensor 1 is +50 microseconds and that of pressure sensor 1 is -30 microseconds. After clock deviation adjustment, the data of pressure sensor 1 arrives at the gateway's logical time reference point earlier. At the same time, the data priority of temperature sensor 1 is 2, the data priority of pressure sensor 1 is also 2, and the data priority of motor speed sensor 1 is 1. Based on the correspondence between the device and the sub-time slot and the above analysis, the data folding module maps the data frame of temperature sensor 1 to the first 10 bytes of sub-time slot 1, maps the data frame of pressure sensor 1 to the first 12 bytes of sub-time slot 2, and maps the data frame of motor speed sensor 1 to the first 14 bytes of sub-time slot 3. It is worth noting that if the remaining space in a sub-time slot is insufficient to accommodate a complete data frame, the remaining portion will be carried over to the beginning of the next available sub-time slot. The data folding engine module combines the data segments mapped to each sub-time slot into a folded frame. The header information of the folded frame includes a time window identifier, a window start time of 10:00:00.000000, a window duration of 100ms, and 10 sub-time slots. The data portion of the folded frame arranges the data segments of each device sequentially according to the order of the sub-time slots. For example, the first 10 bytes of the folded frame's data portion contain data from temperature sensor 1, followed by 12 bytes from pressure sensor 1, then 14 bytes from motor speed sensor 1, and so on. The data folding engine module sends the generated folded frame to the gateway defolding module, while simultaneously counting the number of sub-time slots actually used within the time window. In this example, 3 sub-time slots were actually used, and the total number of sub-time slots is 10. Therefore, the window utilization value is: It also records window parameters, such as window start time, window duration, and sub-time slot division, to the transmission log for analysis and optimization by the dynamic bandwidth allocation module.
[0023] Example 3 For reference Figure 2 As shown, the cloud-edge-device integrated communication gateway module is applicable to the cloud-edge-device integrated communication gateway system of any one of claims 1-9, and includes a clock deviation calibration unit for monitoring and calibrating the clock deviation between the device and the gateway; The operation steps are as follows: First, the gateway actively sends a calibration start frame to the device that is accessing for the first time or needs to be recalibrated. This frame contains a unique identifier, an initial timestamp (i.e., the local timestamp when the gateway sends the frame), a frame type identifier, and an optional verification field. After receiving the calibration start frame, the device records the local timestamp and replies with a calibration response frame. This frame contains the device ID, the local timestamp, the frame type identifier, and an optional verification field. The gateway records the arrival time of the calibration response frame, calculates the bidirectional time difference, and calculates the average deviation as the initial calibration value through multiple samplings. The gateway periodically sends calibration verification frames, repeats the above process, updates the average deviation to adapt to clock drift, and stores the device clock deviation value obtained after calibration in the device clock table for the data folding processing unit to call. For example: Suppose the gateway sends a calibration start frame to device A with an initial timestamp of 10:00:00.000000. Device A receives the frame at 10:00:00.000050 local time and replies with a calibration response frame at 10:00:00.000060 local timestamp. The gateway receives the response frame at 10:00:00.000100. Under symmetrical transmission delay conditions, the clock deviation between device A and the gateway is calculated to be +10 microseconds. The data folding processing unit is used to compress application layer data frames generated in normal business communication into a time window for transmission by using the calibrated device clock deviation value and device priority, generating folded frames and optimizing window utilization. The operation steps are as follows: Obtain the device clock deviation value from the clock deviation calibration unit. The gateway predefines device priority rules and defines a fixed-duration time window, such as 100ms. The time window is divided into multiple sub-time slots, each corresponding to the transmission time slot of a device. Data frames of high-priority devices are mapped to the earlier sub-time slots. Application layer data frames generated during normal business communication are mapped to the sub-time slots of the time window according to the device clock deviation value and device priority, generating folded frames. The folded frames are output to the gateway defolding and reassembly unit. At the same time, the ratio of the number of sub-time slots actually used in each time window to the total number of sub-slots is calculated to generate a window utilization value, and the window parameters are recorded to the transmission log. For example: the time window is set to 100ms and divided into 10 sub-time slots. Device A has high-priority data frames and device B has low-priority data frames. They need to be transmitted within the time window. According to the clock deviation calibration result, the data frames of device A are preferentially mapped to sub-time slot 1 and the data frames of device B are mapped to sub-time slot 2. The data folding processing unit combines these two data frames into a folded frame and calculates the window utilization rate as 20%. That is, out of a total of 10 sub-time slots, 2 sub-time slots are used. The gateway defolding and reassembly unit is used to parse folded frames, restore the original data and verify its integrity, and generate network load metrics. The operation steps are as follows: After receiving the folded frame, extract header information such as the time window identifier and sub-time slot distribution. Based on the data segment length of the sub-time slot, calculate the total amount of data actually processed by the gateway per unit time, generate the ratio of the actual data volume to the theoretical maximum bandwidth, i.e., the network load value. Combined with the device clock deviation value of the clock deviation calibration unit, deduce the original transmission time of the device. Based on the deduce original transmission time, sort the data segments of all sub-time slots, restore them to complete service data frames, and use Cyclic Redundancy Check (CRC) code for integrity verification. Upload the verified service data frames to the application layer of the device and feed back the transmission status to the dynamic bandwidth allocation unit. For example, when a gateway receives a folded frame containing data segments from device A and device B, it parses the header information to determine that the data segment from device A is located in sub-time slot 1 and the data segment from device B is located in sub-time slot 2. Combining this with the clock offset calibration value, it deduces the original transmission time of device A and device B. After sorting and reassembling the data segments, it uses CRC check to confirm data integrity and finally uploads the complete service data frame to the application layer. The dynamic bandwidth allocation unit is used to adjust the time window parameters and calibration cycle in real time according to network load indicators and window utilization, forming a closed-loop control.
[0024] The dynamic bandwidth allocation unit is used to adjust the time window parameters and calibration cycle in real time according to network load indicators and window utilization, forming a closed-loop control. Operation steps: Based on the network load value fed back by the gateway defolding and reassembly unit and the window utilization value of the data folding processing unit, dynamically adjust the size of the time window and the allocation of sub-time slots. For example, when the network load is high, increase the time window or increase the number of sub-time slots for high-priority devices. Based on the network conditions and device clock stability, dynamically adjust the clock deviation calibration cycle. When the network conditions are unstable or the device clock drift is large, shorten the calibration cycle to ensure the accuracy of clock synchronization. Send the adjusted parameters to the data folding processing unit and the clock deviation calibration unit to form a closed-loop control cycle of monitoring-adjustment-feedback to continuously optimize network performance. For example, the dynamic bandwidth allocation unit detects that the network load is consistently high and the window utilization is close to saturation. To deal with this situation, the unit decides to increase the time window to 150ms and reallocate sub-time slots, increasing the number of sub-time slots for high-priority devices. At the same time, due to the unstable network conditions, the unit shortens the clock deviation calibration cycle from once per hour to once every half hour to ensure the accuracy of clock synchronization. The adjusted parameters are sent to the data folding processing unit and the clock deviation calibration unit to form a closed-loop control cycle.
[0025] The circuits and controls involved in this invention are all existing technologies and will not be described in detail here.
[0026] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A cloud-edge-device integrated communication gateway system, characterized in that, It includes a clock skew calibration module, which is used to dynamically monitor and calibrate the clock skew between the device and the gateway, obtain the device clock skew value and store it in the device clock table; The data folding engine module is used to map application layer data frames generated in normal business communication to sub-time slots of the time window by utilizing the device clock deviation value and device priority of the clock deviation calibration module, generating folded frames and outputting the folded frames to the gateway defolding module for restoration, calculating the ratio of the number of sub-time slots actually used in each time window to the total number of sub-time slots to generate the window utilization value, and recording the window parameters to the transmission log for analysis and optimization by the dynamic bandwidth allocation module. The gateway defolding module is used to parse the header information of the folded frame and the length of the data segment of each sub-time slot, calculate the amount of data processed per unit time, generate the network load value, and combine the device clock deviation value of the clock deviation calibration module to back-calculate the original transmission time. After reassembling the data and verifying its integrity, it is uploaded to the application layer and the transmission status is fed back to the dynamic bandwidth allocation module to drive dynamic bandwidth adjustment. The dynamic bandwidth allocation module is used to adjust the time window parameters and the calibration cycle of the clock deviation calibration module in real time based on the network load fed back by the gateway defolding module and the window utilization of the data folding engine module. It also sends new parameters to the data folding engine module and the clock deviation calibration module to form a closed-loop control cycle of monitoring-adjustment-feedback.
2. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 1, characterized in that, The calibration start frame is actively sent by the gateway to devices that are accessing for the first time or that need to be recalibrated. The fields of the calibration start frame include a unique identifier, an initial timestamp, a frame type identifier, and an optional verification field.
3. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 2, characterized in that, The calibration response frame is a response frame generated by the device after receiving the calibration start frame and sent back to the gateway. It also includes the device's local clock information. The fields of the calibration response frame include device ID, local timestamp, frame type identifier, and optional verification field.
4. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 3, characterized in that, The clock deviation calibration module includes sending a calibration start frame to the device that is accessing the gateway for the first time. After receiving the frame, the device records its local timestamp and replies with a calibration response frame. The gateway records the arrival time of the response frame, calculates the bidirectional time difference, and calculates the average deviation as the initial calibration value through multiple samplings. At this time, the gateway periodically sends a calibration verification frame, repeats the above process, updates the average deviation to adapt to clock drift, and then stores the calibrated device clock deviation value into the device clock table for use by the data folding engine module. The initial timestamp is the local timestamp when the frame is sent from the gateway.
5. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 4, characterized in that, The time window defines a fixed time period for data transmission in the data folding engine module, and aggregates and schedules data frames from multiple devices according to the time dimension.
6. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 5, characterized in that, In the gateway defolding module, the header information includes a time window identifier and a sub-time slot distribution, and the network load value is the ratio of the actual data volume to the theoretical maximum bandwidth.
7. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 6, wherein in the gateway defolding module, the reconstructed data is the process of splicing data segments within multiple sub-time slots of the folded frame into a complete service data frame according to the original transmission time order, wherein, The original transmission time is the local clock time.
8. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 7, characterized in that, The specific operation steps of the data folding engine module are as follows: Step 1.1 Mapping Preparation and Time Window Division: First, obtain the device clock deviation value from the clock deviation calibration module. The gateway predefines device priority rules and defines a fixed-duration time window. The time window is divided into multiple sub-time slots, and each sub-time slot corresponds to the transmission time slot of a device. When allocating the time window, the data frames of high-priority devices are mapped to the earlier sub-time slots first. If multiple devices compete for the same sub-time slot, the device with higher priority will get the transmission right first, and the device with lower priority will have to wait for the next cycle or be adjusted to other idle sub-time slots. Step 1.2 Data Frame Mapping and Folding: Application layer data frames generated during normal business communication are mapped to sub-time slots within a time window based on device clock offset and device priority, thus generating folded frames. Step 1.3, Output and Statistics: Output the folded frame to the gateway defolding module, and at the same time, calculate the ratio of the number of sub-time slots actually used in each time window to the total number of sub-time slots, generate the window utilization value, and record the window parameters to the transmission log.
9. The cloud-edge-device integrated communication gateway system and its gateway module according to claim 8, characterized in that, The specific operation steps of the gateway de-folding module are as follows: Step 2.1, Parse the folded frame header: After receiving the folded frame, first extract the window number and timestamp within the time window identifier, confirm the time period to which the data belongs, parse the number of sub-time slots within the sub-time slots and the start and end positions of each sub-time slot, clarify the position of each device's data in the time window, and obtain the data segment length of each sub-time slot, including obtaining the number of bytes occupied by the data in each sub-time slot. Step 2.2 Calculate network load: After the interpretation is completed, calculate the total amount of data actually processed by the gateway per unit time based on the data segment length of all sub-time slots within the time window. Calculate the ratio of the actual data volume to the theoretical maximum bandwidth to obtain the network load value, which indicates the current network busyness. The theoretical maximum bandwidth is the hardware or configuration limit of the gateway. Step 2.3, reverse the original transmission time: From the device clock table of the clock deviation calibration module, query the clock deviation value corresponding to each device in the current folded frame. For the data segment of each sub-time slot, correct the gateway receiving time according to the clock deviation value of the device to which the data segment belongs in each sub-time slot, that is, correct the arrival time of the folded frame. At this time, reverse the local clock time of the actual data frame sent by the device, that is, reverse the original transmission time of the device. Step 2.4, Data Reassembly and Verification: Based on the original transmission time, sort the data segments of all sub-time slots, and then splice the sorted data segments in the order of the original transmission time to restore the complete service data frame. Perform integrity verification on the reassembled service data frame using Cyclic Redundancy Check (CRC). If the verification fails, mark the service data frame as abnormal and feed it back to the dynamic bandwidth allocation module for further processing. Step 2.5, Upload and Feedback: Upload the verified service data frames to the application layer of the device and feed back the transmission status to the dynamic bandwidth allocation module.
10. A cloud-edge-device integrated communication gateway module, applicable to the cloud-edge-device integrated communication gateway system according to any one of claims 1-9, comprising a clock deviation calibration unit for monitoring and calibrating the clock deviation between the device and the gateway; The data folding processing unit is used to compress application layer data frames generated in normal business communication into a time window for transmission by using the calibrated device clock deviation value and device priority, generating folded frames and optimizing window utilization. The gateway defolding and reassembly unit is used to parse folded frames, restore the original data and verify its integrity, and generate network load metrics. The dynamic bandwidth allocation unit is used to adjust the time window parameters and calibration cycle in real time based on network load indicators and window utilization, forming a closed-loop control.