Internet of Things data transmission method and device, electronic equipment and storage medium
By employing a hierarchical storage and transmission strategy based on device type and priority in the Internet of Things (IoT), the problem of emergency data being blocked in IoT data transmission is solved, achieving efficient and stable data transmission.
Patent Information
- Application Number
- CN202610030229.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2046-01-12
AI Technical Summary
In large-scale IoT networking scenarios, existing IoT data transmission methods fail to effectively distinguish between different types of data, resulting in urgent data being easily blocked by ordinary monitoring data, high transmission latency, link congestion, inability to adapt to the concurrent transmission needs of large-scale IoT devices, and poor data transmission stability.
By acquiring data packets from IoT devices in the sensing layer, and based on the mapping relationship between device type and priority, the data is stored in a hierarchical manner in the cache, and then transmitted to the IoT data transmission platform in priority order. A hierarchical transmission queue and scheduling strategy is adopted to ensure that urgent data is transmitted first and to avoid congestion.
It enables efficient transmission of emergency data, reduces transmission latency, minimizes data congestion, and improves the stability and efficiency of data transmission in large-scale IoT device networking scenarios.
Smart Images

Figure CN121509475A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data transmission technology, and more specifically, relates to an Internet of Things (IoT) data transmission method and apparatus, electronic device, and storage medium. Background Technology
[0002] In large-scale IoT networking scenarios, the types of IoT devices at the sensing layer are diverse, and the importance and real-time requirements of the data they generate vary significantly. Existing IoT data transmission methods mostly employ indiscriminate transmission modes, leading to the easy blocking of urgent data such as alarms by ordinary monitoring data, resulting in problems such as excessive transmission latency and link congestion. Simultaneously, the mixed storage and scheduling of various types of data further exacerbates the chaotic transmission order, reduces data transmission efficiency, and fails to meet the concurrent transmission needs of large-scale IoT devices, ultimately resulting in poor data transmission stability. Summary of the Invention
[0003] The purpose of this application is to provide an IoT data transmission method, device, electronic device, and storage medium to improve the stability of data transmission in large-scale IoT device networking scenarios.
[0004] A first aspect of this application provides an Internet of Things (IoT) data transmission method, including: Acquire data packets from IoT devices in the sensing layer. The data packets include IoT data collected by the IoT devices in the sensing layer and the type of IoT devices in the sensing layer, including alarm devices, control devices, and monitoring devices. Based on the type and the first target mapping relationship, the priority of the data packet is determined. The first target mapping relationship is the mapping relationship between the device type and the data packet priority. Different types correspond to different data packet priorities. The data packet priorities include: first-level priority, second-level priority and third-level priority. Data packets are stored in the corresponding buffer based on their priority, and there is a mapping relationship between the data packet priority and the buffer. Based on the priority of the data packets, a data transmission queue is determined, and the data packets are transmitted to the IoT data transmission platform according to the transmission strategy corresponding to the data transmission queue. The priority of the data transmission queue corresponds one-to-one with the priority of the data packets. The transmission strategies corresponding to the data transmission queues include: If the first-priority queue contains first-priority data packets, then transmit the first-priority data packets. If the first-priority queue is empty and the second-priority queue contains second-priority data packets, then the second-priority data packets will be transmitted. If the first-priority queue is empty and the second-priority queue is empty, and the third-priority queue contains third-priority data packets, then the third-priority data packets will be transmitted.
[0005] A second aspect of this application provides an Internet of Things (IoT) data transmission device, comprising: The data acquisition module is used to acquire data packets from IoT devices in the sensing layer. The data packets include IoT data collected by the IoT devices in the sensing layer and the type of IoT devices in the sensing layer, including alarm devices, control devices and monitoring devices. The priority determination module is used to determine the priority of data packets based on the type and the first target mapping relationship. The first target mapping relationship is the mapping relationship between device type and data packet priority. Different types correspond to different data packet priorities. Data packet priorities include: first-level priority, second-level priority and third-level priority. The data caching module is used to store data packets into the corresponding cache area based on the priority of the data packets. There is a mapping relationship between the priority of the data packets and the cache area. The data transmission module is used to determine the data transmission queue based on the priority of the data packet, and transmit the data packet to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The priority of the data transmission queue corresponds one-to-one with the priority of the data packet. The transmission strategies corresponding to the data transmission queues include: If the first-priority queue contains first-priority data packets, then transmit the first-priority data packets. If the first-priority queue is empty and the second-priority queue contains second-priority data packets, then the second-priority data packets will be transmitted. If the first-priority queue is empty and the second-priority queue is empty, and the third-priority queue contains third-priority data packets, then the third-priority data packets will be transmitted.
[0006] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described Internet of Things (IoT) data transmission method.
[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described Internet of Things (IoT) data transmission method.
[0008] The beneficial effects of the IoT data transmission method, apparatus, electronic device, and storage medium provided in this application embodiment are as follows: After the sensing layer IoT device in this application embodiment collects data, it generates a data packet containing the device type and IoT data, and sends it to the edge node; after receiving the data packet, the edge node parses the device type identifier and determines the priority of the data packet by querying the first target mapping relationship; then, it stores the data packet in the corresponding priority buffer and synchronizes it to the corresponding transmission queue; the transmission scheduling module prioritizes the scheduling of data packets in the high-priority queue according to the preset transmission strategy, and transmits them to the IoT data transmission platform through the transmission network, realizing hierarchical data transmission scheduling. This application embodiment achieves hierarchical data processing by binding device type and priority, ensuring that emergency data such as alarms are transmitted first, avoiding being blocked by ordinary monitoring data, and reducing the transmission delay of emergency data; the partitioned buffer design of the edge node ensures the independence and security of data storage of different priorities; the cooperation between the hierarchical transmission queue and the scheduling strategy reasonably allocates transmission link resources, reduces the occurrence of data congestion, and improves the data transmission stability in large-scale IoT device networking scenarios. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic flowchart illustrating an embodiment of the Internet of Things (IoT) data transmission method provided in this application; Figure 2 This is a structural block diagram of an Internet of Things (IoT) data transmission device provided in an embodiment of this application; Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0012] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.
[0013] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.
[0014] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0015] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of an IoT data transmission method provided in this application. The IoT data transmission method provided in this application embodiment can be executed by an electronic device, and the method may include: S101: Obtain data packets from IoT devices in the sensing layer. The data packets include IoT data collected by the IoT devices in the sensing layer and the type of IoT devices in the sensing layer, including alarm devices, control devices, and monitoring devices.
[0016] In this embodiment, the sensing layer IoT device is the terminal device of the sensing layer of the IoT architecture. It interacts directly with the physical environment and is responsible for collecting various physical quantities, status information or executing control commands. It is the source of IoT data.
[0017] A data message is a standardized data transmission unit generated by IoT devices in the sensing layer after collecting data. It encapsulates the IoT data collected by the device and the device's own type information, enabling reliable transmission and parsing between IoT nodes.
[0018] IoT data is the raw information of the physical world collected by IoT devices in the sensing layer, such as temperature, humidity, pressure, equipment operating status, and fault alarm signals.
[0019] Alarm devices are a type of IoT device in the sensing layer, used to collect data related to emergency events or abnormal states, such as fire sensors, equipment fault monitors, and gas leak alarms. The data they transmit is directly related to safety or system stability.
[0020] Control devices are a type of IoT device in the sensing layer, used to transmit device control commands or command execution feedback data, such as motor drivers, valve controllers, and industrial control computers. The data they transmit is associated with the device's operation and control logic.
[0021] Monitoring devices are a type of IoT device in the sensing layer. They are used to periodically collect data on routine environmental or equipment parameters, such as temperature and humidity sensors, flow sensors, and voltage sensors. The data they transmit is mainly for routine monitoring, and the real-time requirements are relatively low.
[0022] In this embodiment, the sensing layer IoT devices are deployed on the field side of the IoT sensing scenario, such as in a smart factory scenario. Alarm devices specifically include fire sensors and equipment fault monitors, used to collect emergency data such as fire alarm signals and equipment fault signals. Control devices specifically include motor drivers and valve controllers, used to collect equipment operating status feedback data and receive and execute control commands. Monitoring devices specifically include temperature and humidity sensors, pressure sensors, and flow sensors, used to periodically collect routine parameter data of the environment or equipment. When generating data packets, the sensing layer IoT devices embed a device type identifier field in the packet header. This field uses 2-bit binary identification: 00 indicates alarm devices, 01 indicates control devices, 10 indicates monitoring devices, and 11 is a reserved extension bit. The IoT data consists of raw data collected by the devices, such as ambient temperature data collected by fire sensors, operating current data collected by motor drivers, and ambient humidity data collected by temperature and humidity sensors.
[0023] S102: Determine the priority of the data packet based on the type and the first target mapping relationship. The first target mapping relationship is the mapping relationship between the device type and the data packet priority. Different types correspond to different data packet priorities. The data packet priorities include: first-level priority, second-level priority and third-level priority.
[0024] In this embodiment, the first target mapping relationship is a mapping table pre-configured and stored in the IoT data transmission platform. The mapping table clearly records the correspondence rules between device types and priorities. Specifically, alarm devices correspond to first-level priority, control devices correspond to second-level priority, and monitoring devices correspond to third-level priority. This mapping table can be remotely updated through the IoT data transmission platform to adapt to changes in business requirements of different application scenarios.
[0025] Data packet priority is a level of priority based on the importance and real-time requirements of the data, including first-level priority, second-level priority, and third-level priority. The priority determines the scheduling order of data packets during transmission.
[0026] In this embodiment, the IoT data transmission method can be applied to the edge node layer. The sensing layer IoT devices send data packets with a priority field to their respective edge nodes; the edge nodes pre-store a first target mapping relationship. When an edge node receives a data packet, it first parses the device type information in the packet, and then binds different types of devices to their corresponding packet priorities by querying the first target mapping relationship. For example, alarm devices used to transmit emergency information are assigned the highest priority, control devices used to transmit regular commands are assigned the medium priority, and monitoring devices used to transmit ordinary monitoring data are assigned the lowest priority, thereby establishing a judgment standard for subsequent differentiated transmission scheduling.
[0027] S103: Store data packets in the corresponding buffer based on their priority. There is a mapping relationship between data packet priority and buffer.
[0028] In this embodiment, the cache area is a storage area deployed within the edge node, which corresponds one-to-one with the priority of the data packets. It is used to temporarily store the data packets to be transmitted, realize the isolated storage of data with different priorities, and avoid data mixing and loss.
[0029] In this embodiment, the cache is deployed in edge nodes, which are local computing nodes close to the IoT devices in the sensing layer, specifically industrial-grade edge gateways. Once the priority of a data packet is determined, the edge node delivers the packet to the corresponding priority cache. First-priority data packets enter the first-priority cache, second-priority data packets enter the second-priority cache, and third-priority data packets enter the third-priority cache. Partitioned caching prevents data packets of different priorities from being mixed and overwritten during storage, while providing a stable data source for subsequent transmission queue scheduling, ensuring that high-priority data is not squeezed out of storage resources by low-priority data.
[0030] S104: Based on the priority of the data packet, determine the data transmission queue, and transmit the data packet to the IoT data transmission platform according to the transmission strategy corresponding to the data transmission queue. The priority of the data transmission queue corresponds one-to-one with the priority of the data packet. The transmission strategies corresponding to the data transmission queues include: If the first-priority queue contains first-priority data packets, then transmit the first-priority data packets. If the first-priority queue is empty and the second-priority queue contains second-priority data packets, then the second-priority data packets will be transmitted. If the first-priority queue is empty and the second-priority queue is empty, and the third-priority queue contains third-priority data packets, then the third-priority data packets will be transmitted.
[0031] In this embodiment, the data transmission queue is a logical queue deployed within the edge node, which corresponds one-to-one with the buffer and the priority of the data packets. Data packets in the buffer will be synchronized to the corresponding queue and wait for scheduling by the transmission scheduling module.
[0032] The transmission strategy is a set of rules for scheduling data transmission queues. Higher priority queues are transmitted first, that is, the first priority queue is scheduled first, followed by the second and third priority queues in turn, to ensure the timeliness of the transmission of important data.
[0033] The IoT data transmission platform is a cloud or edge data management platform in the IoT architecture. It is responsible for receiving data packets transmitted by edge nodes, parsing, storing, analyzing and applying the data, and serves as a centralized processing center for IoT data.
[0034] In this embodiment, the data transmission queue is a logical queue within the transmission scheduling module of the edge node. It also features a first-level priority queue, a second-level priority queue, and a third-level priority queue, each corresponding to a buffer. Data packets in the buffers are synchronized to their corresponding transmission queues via the data migration module. The transmission strategy corresponding to each data transmission queue is implemented through the scheduling algorithm of the transmission scheduling module. This algorithm monitors the status of each priority queue in real time and uses a hardware interrupt mechanism to ensure the priority scheduling of the first-level priority queue. When a data packet exists in the first-level priority queue, a high-priority interrupt signal is triggered, suspending the scheduling process of other queues and prioritizing the use of transmission link resources to transmit first-level priority data packets. The scheduling process of the second-level priority queue is only triggered when the interrupt signal of the first-level priority queue is released (i.e., the queue is empty). When neither the first-level nor the second-level priority queues have data packets, the scheduling process switches to the third-level priority queue. This hierarchical scheduling strategy ensures the timeliness of important data transmission and prevents urgent data from being blocked by ordinary data.
[0035] As can be seen from the above, in this embodiment, after the sensing layer IoT device collects data, it generates a data packet containing the device type and IoT data, and sends it to the edge node. After receiving the data packet, the edge node parses the device type identifier and determines the priority of the data packet by querying the first target mapping relationship. Then, it stores the data packet in the corresponding priority buffer and synchronizes it to the corresponding transmission queue. The transmission scheduling module prioritizes the scheduling of data packets in the high-priority queue according to the preset transmission strategy and transmits them to the IoT data transmission platform through the transmission network, realizing hierarchical data transmission scheduling. This embodiment achieves hierarchical data processing by binding device type and priority, ensuring that emergency data such as alarms are transmitted first, avoiding being blocked by ordinary monitoring data, and reducing the transmission delay of emergency data. The partitioned buffer design of the edge node ensures the independence and security of data storage for different priorities. The cooperation between the hierarchical transmission queue and the scheduling strategy rationally allocates transmission link resources, reduces the occurrence of data congestion, and improves the data transmission stability in large-scale IoT device networking scenarios.
[0036] In one embodiment of this application, the method further includes: If the data packet has a priority of level three, the target data compression algorithm is determined based on the data packet's data type, and the data packet is compressed based on the target data compression algorithm to obtain a compressed data packet. The data types include structured data and unstructured data; the compressed data packet carries a compression identifier. The compression identifier is used to indicate the type of target data compression algorithm; the types of target data compression algorithms include differential encoding compression algorithms and dictionary encoding compression algorithms. This includes storing data packets in corresponding buffers based on their priority, including: The compressed data packets are stored in the corresponding buffer based on their priority.
[0037] In this embodiment, the data type can be determined by parsing the payload format of the data message. Structured data is numerical data with a fixed format and field definition, such as temperature and humidity values collected by a temperature and humidity sensor, and pressure values collected by a pressure sensor. This type of data is stored in the message payload in key-value pair format. Unstructured data is text data without a fixed format, such as device status description text and remarks information of monitoring data. This type of data is stored in the message payload in string format.
[0038] The selection of the target data compression algorithm can be achieved through the compression algorithm selection module in the edge node. This module has built-in data type recognition logic, which can automatically parse the data packet payload format and determine the data type, and then match the corresponding compression algorithm. The differential encoding compression algorithm specifically adopts an improved differential encoding, which calculates and stores the difference between two adjacent data points, and only stores the complete data when the difference exceeds a preset fluctuation threshold, reducing the storage of duplicate data. The dictionary encoding compression algorithm specifically adopts the LZ77 algorithm, which replaces the repeated words in the packet payload with the index values in the dictionary table by establishing a common vocabulary dictionary table. The dictionary table is pre-established based on common monitoring data text and contains high-frequency words such as "normal operation", "parameter stable", and "monitoring normal".
[0039] The compression identifier is a 1-bit field in the data packet header; 0 indicates differential encoding compression, and 1 indicates LZ77 dictionary encoding compression. After compression, the compression module can recalculate the data packet length and update the length field in the packet header. Compressed level 3 priority data packets are still stored in the level 3 buffer, with the storage method consistent with uncompressed data, each corresponding to an independent storage address space in the level 3 buffer.
[0040] In this embodiment, when an edge node receives a data packet with a level 3 priority, it first parses the packet payload format to determine the data type; it then matches the corresponding target data compression algorithm according to the data type and compresses the packet payload; after adding a compression identifier and an update length field to the packet header, it stores the compressed data packet in a level 3 buffer, and subsequently synchronizes it to a level 3 priority queue for transmission; after receiving the compressed data packet, the IoT data transmission platform selects the corresponding decompression algorithm according to the compression identifier, decompresses the payload data, and restores it to the original data.
[0041] As can be seen from the above, this embodiment adopts a differentiated compression algorithm for different data types of three-level priority data, which improves compression efficiency, effectively reduces the size of data packets, reduces the occupation of transmission bandwidth, and alleviates the congestion pressure of transmission links; the setting of compression identifiers ensures that the IoT data transmission platform can accurately match the decompression algorithm and ensure the normal parsing of data; the compressed data is stored in the corresponding cache area without changing the original priority storage logic, ensuring the compatibility of the overall technical solution.
[0042] In one embodiment of this application, determining the target data compression algorithm based on the data type of the data packet includes: If the data type of the data packet is structured data, then the differential encoding compression algorithm will be used as the target data compression algorithm. If the data packet is of unstructured data type, then dictionary encoding compression algorithm will be used as the target data compression algorithm.
[0043] In this embodiment, the differential encoding compression algorithm for structured data is implemented as follows: The first step is to extract the structured numerical sequence from the data message, such as five sets of temperature data continuously collected by the temperature and humidity sensor: 25℃, 26℃, 25℃, 27℃, and 26℃. The second step is to calculate the difference between adjacent data, using the first set of data as the baseline value, and the differences between subsequent data are 1℃, -1℃, 2℃, and -1℃ respectively. The third step is to set the fluctuation threshold to 3℃ and determine whether the difference exceeds the threshold. Since all the differences here do not exceed the threshold, only the baseline value of 25℃ and the subsequent difference sequence are stored. The fourth step is to encapsulate the baseline values and difference sequences according to a preset format to form compressed load data.
[0044] In this embodiment, the dictionary encoding compression algorithm for unstructured data is implemented as follows: The first step is to load a pre-built dictionary table containing 100 high-frequency words for IoT monitoring scenarios. Each word corresponds to a unique 4-digit decimal index, for example, "normal operation" corresponds to 0001 and "parameter stability" corresponds to 0002. The second step is to parse the unstructured text data in the data message, such as "the device is operating normally and the parameters are stable"; The third step is to replace the high-frequency words in the text with the corresponding dictionary indices. The replaced data is "device0001, 0002". The fourth step is to encapsulate the replaced index sequence into compressed payload data, and at the same time, supplement the dictionary table version information in the compression identifier to ensure that the matching dictionary table is used during decompression.
[0045] The data type judgment logic is integrated into the compression algorithm selection module of the edge node. It is achieved by parsing the format identifier of the data packet payload. A 1-bit data type identifier field is set in the data packet header, where 0 indicates structured data and 1 indicates unstructured data. This identifier field is embedded by the IoT device in the perception layer according to the type of collected data when generating the data packet.
[0046] In this embodiment, after receiving a three-level priority data packet, the edge node compression algorithm selection module first parses the data type identifier field in the packet header to determine the data type of the data packet. If it is structured data, the differential encoding compression algorithm module is called to compress the payload data. If it is unstructured data, the dictionary encoding compression algorithm module is called to compress the payload data. After compression, a data packet containing a compression identifier is generated and stored in the three-level buffer.
[0047] As can be seen from the above, this embodiment selects an appropriate compression algorithm based on the characteristics of structured and unstructured data. Structured data is characterized by strong data correlation and high repetition, and the differential encoding compression algorithm can effectively reduce redundant data. Unstructured data is characterized by high repetition of text words, and the dictionary encoding compression algorithm can quickly replace high-frequency words, resulting in high compression efficiency and short compression time. By using a precise matching compression algorithm, the overall compression effect of the three-level priority data is improved, further reducing bandwidth usage and ensuring data transmission efficiency.
[0048] In one embodiment of this application, if the data packet has a priority of level three, and no data packet is transmitted within a preset time, the method further includes: The current transmission link bandwidth is divided into shared bandwidth and dedicated bandwidth, with the data transmission capacity of shared bandwidth being greater than that of dedicated bandwidth. Data packets are transmitted to the IoT data transmission platform using dedicated bandwidth; Shared bandwidth is used to transmit first-priority data packets or second-priority data packets.
[0049] In this embodiment, the preset time is a time threshold pre-configured in the edge node transmission scheduling module and is implemented by a software timer. When a level 3 priority data packet enters the level 3 priority queue, the timer starts counting. If the preset time is reached and the packet is still not scheduled for transmission, the dedicated bandwidth transmission mechanism is triggered.
[0050] The allocation of transmission link bandwidth can be achieved through the bandwidth management module of the edge nodes, employing a software-level bandwidth allocation strategy without altering the physical characteristics of the transmission link. The ratio of shared bandwidth to dedicated bandwidth can be dynamically determined based on the total bandwidth of the transmission link. The principle is that the data transmission capacity of the shared bandwidth is greater than that of the dedicated bandwidth. For example, when the total bandwidth is 100Mbps, 90Mbps of shared bandwidth is allocated and 10Mbps of dedicated bandwidth is allocated; when the total bandwidth is 1Gbps, 900Mbps of shared bandwidth is allocated and 100Mbps of dedicated bandwidth is allocated.
[0051] The bandwidth management module monitors the bandwidth occupancy status of the transmission link in real time. When the shared bandwidth is not fully utilized, level 3 priority data packets can temporarily use idle shared bandwidth resources for transmission. Dedicated bandwidth is only used for transmission when the shared bandwidth is fully utilized by level 1 or level 2 priority data packets, and level 3 priority data packets have not been transmitted for a preset time. Dedicated bandwidth serves as a backup transmission resource for level 3 priority data packets and is not used by level 1 or level 2 priority data packets.
[0052] In this embodiment, after a Level 3 priority data packet enters the Level 3 priority queue, the transmission scheduling module waits for scheduling according to the transmission strategy. At the same time, the software timer starts counting. If the packet is not scheduled for transmission within a preset time, the bandwidth management module divides the transmission link bandwidth into shared bandwidth and dedicated bandwidth. The transmission scheduling module switches the transmission path and transmits the Level 3 priority data packet to the IoT data transmission platform through the dedicated bandwidth. The shared bandwidth is used exclusively for transmitting Level 1 priority data packets and Level 2 priority data packets to ensure the transmission resources for high-priority data.
[0053] As can be seen from the above, this embodiment provides a backup transmission resource for the three-priority data by allocating dedicated bandwidth, which avoids the backlog or loss of the three-priority data due to long-term waiting for the transmission of high-priority data, and ensures the final transmission integrity of ordinary monitoring data; the shared bandwidth prioritizes the transmission of high-priority data, and the dedicated bandwidth serves as a backup, which realizes the reasonable allocation of transmission resources among data of different priorities, and takes into account both the real-time nature of high-priority data and the transmission guarantee of low-priority data.
[0054] In one embodiment of this application, after transmitting the data packet to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue, the method further includes: If no confirmation of receipt is received from the IoT data transmission platform within the target preset confirmation time, the data packet will be retransmitted to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The methods for determining the target preset confirmation time include: Determine the current link bandwidth utilization rate. Based on the range of the current link bandwidth utilization rate and the second target mapping relationship, determine the current basic preset confirmation time. The second target mapping relationship is the mapping relationship between the range of link bandwidth utilization rate and the basic preset confirmation time. Different ranges of link bandwidth utilization rate include the first load range, the second load range, and the third load range. The basic preset confirmation time of the first load range is less than the basic preset confirmation time of the second load range, and the basic preset confirmation time of the second load range is less than the basic preset confirmation time of the third load range. Based on the priority of the data packets, the basic preset confirmation time is weighted and adjusted to obtain the target preset confirmation time.
[0055] In this embodiment, the link bandwidth utilization rate can be collected in real time by the bandwidth monitoring module of the edge node. The bandwidth monitoring module adopts the traffic statistics method, which calculates the ratio of the actual amount of data transmitted by the transmission link per unit time to the maximum transmission capacity of the link. The collection period is 100ms to ensure the real-time nature of the monitoring data.
[0056] The three load ranges of link bandwidth utilization are divided by preset thresholds. The first load range is when the bandwidth utilization is less than 30%, which indicates that the link load is low. The second load range is when the bandwidth utilization is greater than or equal to 30% and less than or equal to 80%, which indicates that the link load is moderate. The third load range is when the bandwidth utilization is greater than 80%, which indicates that the link load is high.
[0057] The second target mapping relationship is a pre-configured mapping table stored in the storage module of the edge node. Specifically, the basic preset confirmation time for the first load interval is 100ms, the basic preset confirmation time for the second load interval is 200ms, and the basic preset confirmation time for the third load interval is 500ms. This mapping table can be adjusted according to the characteristics of different transmission links.
[0058] The weighting coefficients for weighted adjustment are pre-configured: 0.2 for Level 1 priority data packets, 0.3 for Level 2 priority data packets, and 0.5 for Level 3 priority data packets. The weighted adjustment is calculated as: Target preset acknowledgment time = Basic preset acknowledgment time × Weighting coefficient. For example, if the current link bandwidth utilization is in the third load range and the basic preset acknowledgment time is 500ms, then if the data packet is of Level 1 priority, the target preset acknowledgment time = 500ms × 0.2 = 100ms; if it is of Level 3 priority, the target preset acknowledgment time = 500ms × 0.5 = 250ms.
[0059] The confirmation message is a response message generated by the IoT data transmission platform after receiving a data packet. This message contains information such as the unique identifier of the data packet and the receiving timestamp, and is returned to the edge node through the original transmission link. The edge node is equipped with a reception monitoring module for the confirmation message, which monitors in real time whether the confirmation message for the corresponding data packet has been received within the target preset confirmation time.
[0060] In this embodiment, after the edge node transmits the data packet to the IoT data transmission platform, it starts the confirmation reception timer. At the same time, the bandwidth monitoring module collects the current link bandwidth utilization, determines its load range, and obtains the basic preset confirmation time through the second target mapping relationship. The corresponding weight coefficient is selected according to the priority of the data packet, and the target preset confirmation time is calculated. If the receiving monitoring module does not receive the confirmation reception instruction within the target preset confirmation time, it determines that the data packet transmission has failed, puts the data packet back into the corresponding transmission queue, and transmits it again according to the original transmission strategy. If the confirmation reception instruction is received, it determines that the transmission is successful and completes the data packet transmission process.
[0061] As can be seen from the above, this embodiment dynamically determines the target preset acknowledgment time by combining link bandwidth utilization and data packet priority. In high-load link scenarios, the basic acknowledgment time is extended to avoid misjudgment and retransmission; the acknowledgment time for high-priority data is shortened to ensure its rapid retransmission and guarantee real-time performance; the acknowledgment time for low-priority data is appropriately extended to reduce the occupation of link resources by retransmission; and the reliability of data transmission is improved and the utilization efficiency of transmission resources is optimized through a differentiated acknowledgment and retransmission mechanism.
[0062] In one embodiment of this application, the method further includes: Configure an initial capacity for the buffer corresponding to the priority of each data packet. The initial capacity allocation ratio is positively correlated with the priority of the data packet corresponding to the buffer. Real-time monitoring of the current link bandwidth utilization range and the percentage of data packets to be transmitted in each priority data transmission queue; the percentage is the proportion of the number of data packets to be transmitted in each priority data transmission queue to the total number of data packets to be transmitted in all priority data transmission queues. If the link bandwidth utilization is in the third load range and the proportion of data packets to be transmitted in the first priority data transmission queue is higher than the preset proportion threshold, then the capacity of the first priority buffer area will be expanded according to the preset adjustment ratio, and the capacity of the third priority buffer area will be reduced, with the scale of the reduction matching the scale of the expansion. If the link bandwidth utilization is in the first load range and the proportion of data packets to be transmitted in the third priority data transmission queue is higher than the preset proportion threshold, then the capacity of the third priority buffer area will be expanded according to the preset adjustment ratio, while the capacity of the first priority buffer area will be reduced, and the scale of the reduction will match the scale of the expansion. If the link bandwidth utilization is in the second load range, the initial capacity of each priority buffer remains unchanged.
[0063] In this embodiment, the initial capacity allocation can be achieved through the cache management module of the edge node. The initial capacity allocation ratio is Level 1 cache: Level 2 cache: Level 3 cache = 5:3:2. The total cache capacity of the edge node is 16GB. Based on this, the initial capacity of Level 1 cache is calculated to be 8GB, Level 2 cache is 4.8GB, and Level 3 cache is 3.2GB. This allocation ratio can be pre-configured and adjusted according to the business needs of the application scenario.
[0064] The monitoring method for link bandwidth utilization is the same as described above, and the criteria for classifying the first, second, and third load intervals are also the same. The number of data packets to be transmitted in each priority data transmission queue is counted in real time by the transmission queue management module. The percentage of each priority is calculated by dividing the number of data packets to be transmitted for a certain priority by the total number of data packets to be transmitted for first-priority, second-priority, and third-priority levels. For example, if the number of data packets to be transmitted in the first-priority queue is 500, the second-priority queue is 300, and the third-priority queue is 200, for a total of 1000, then the percentage of first-priority data packets is 50%.
[0065] The preset percentage threshold is a pre-configured percentage threshold, specifically 30%. This threshold is stored in the configuration file of the cache management module and can be adjusted according to actual business scenarios. The preset adjustment percentage can be 20%, meaning that when the adjustment conditions are met, the capacity of the target cache area can be increased by 20%, while the capacity of other corresponding cache areas is reduced by the same amount to ensure that the total cache capacity of the edge nodes remains unchanged.
[0066] For example, if the initial capacity of the L1 cache is 8GB, and it is expanded by 20% to 9.6GB, then the capacity of the L3 cache needs to be reduced by 1.6GB, so the L3 cache capacity will be reduced from 3.2GB to 1.6GB.
[0067] Cache capacity adjustment can be achieved through the dynamic partition adjustment function of the cache management module. When the target cache capacity needs to be expanded, the cache management module can send a capacity expansion instruction to the storage management unit of the edge node to expand the corresponding logical partition address space. When the cache capacity needs to be reduced, the cache management module first scans the data packets in the cache that have not entered the transmission queue, and deletes the data packets with the earliest generation time according to the order of generation timestamps, until the required capacity reduction scale is released, and then sends a capacity reduction instruction to complete the adjustment of the logical partition.
[0068] In this embodiment, after configuring the initial capacity for each priority buffer, the cache management module monitors the range of link bandwidth utilization in real time and simultaneously calculates the percentage of data packets to be transmitted in each priority transmission queue. If the link is in the third load range and the percentage of first-priority packets is higher than 30%, the capacity of the first-priority buffer is increased by 20%, while the capacity of the third-priority buffer is reduced by the same amount. If the link is in the first load range and the percentage of third-priority packets is higher than 30%, the capacity of the third-priority buffer is increased by 20%, while the capacity of the first-priority buffer is reduced by the same amount. If the link is in the second load range and the data transmission pressure of each priority is moderate, the initial capacity remains unchanged to ensure the reasonable allocation of cache resources.
[0069] As can be seen from the above, this embodiment achieves dynamic adaptive adjustment of the buffer capacity. When the link is under high load and high-priority data surges, the high-priority buffer is expanded to ensure that urgent data is not lost. When the link is under low load and there is a lot of low-priority data, the low-priority buffer is expanded to alleviate data backlog, while reducing the capacity of idle high-priority buffers to improve the utilization of storage resources. During the capacity adjustment process, the orderly deletion of untransmitted data is ensured to avoid loss of effective data and improve the adaptability of edge node buffer resources.
[0070] In one embodiment of this application, the IoT data includes: data corresponding to each of multiple IoT parameters; the method further includes: If at least one IoT parameter in the IoT data exceeds the corresponding data anomaly threshold, the priority of the data packet is adjusted based on the priority adjustment rule to obtain the adjusted data packet; the data anomaly thresholds for IoT data from different types of sensing layer IoT devices are different. This includes storing data packets in corresponding buffers based on their priority, including: The data packets are stored in the corresponding buffer based on their adjusted priority. The priority adjustment rules include: The original level 3 priority is promoted to level 2 priority, the original level 2 priority is promoted to level 1 priority, and the original level 1 priority remains unchanged.
[0071] In this embodiment, the data corresponding to each of the multiple IoT parameters are multi-dimensional data collected by the IoT devices in the sensing layer, such as temperature and humidity parameter data collected by the temperature and humidity sensor, and operating current, operating temperature, and speed parameter data collected by the motor driver.
[0072] The data anomaly threshold is a pre-configured threshold range for each IoT parameter. Different types of sensing layer IoT devices have different anomaly thresholds, which are specifically configured and distributed to the corresponding sensing layer IoT devices and edge nodes through the IoT data transmission platform. For example, for alarm-type devices like fire sensors, the temperature anomaly threshold is greater than 60℃; for control-type devices like motor drivers, the operating current anomaly threshold is greater than 10A; and for monitoring-type devices like temperature and humidity sensors, the temperature anomaly threshold is greater than 35℃ or less than 0℃, and the humidity anomaly threshold is greater than 85% or less than 20%. The data anomaly threshold can be customized based on the environment and device characteristics of the application scenario.
[0073] Priority adjustment rules are stored in the priority adjustment module of the edge node. When the edge node receives a data packet, it first parses the parameter data in the IoT data and compares each parameter data with the corresponding abnormal threshold. If at least one parameter data exceeds the abnormal threshold, the priority adjustment process is triggered, and the priority of the data packet is increased according to the adjustment rules. If all parameter data are within the abnormal threshold range, the original priority remains unchanged. For example, the temperature data collected by the temperature and humidity sensor of the monitoring device is 40℃, which exceeds the abnormal threshold of 35℃. The original priority is level three, and it is increased to level two after adjustment. The operating current collected by the motor driver of the control device is 12A, which exceeds the abnormal threshold of 10A. The original priority is level two, and it is increased to level one after adjustment. The temperature data collected by the fire sensor of the alarm device is 70℃, which exceeds the abnormal threshold. The original priority is level one, and it remains unchanged.
[0074] The adjusted data packet will update the priority identifier field in the packet header. This field uses 2 bits, where 00 represents level 1 priority, 01 represents level 2 priority, and 10 represents level 3 priority. The adjusted data packet will then be stored in the corresponding new priority buffer. If the data packet is already temporarily stored in the original priority buffer, the buffer management module will delete the corresponding data packet from the original buffer to avoid redundant data storage.
[0075] In this embodiment, the sensing layer IoT device collects data containing multiple IoT parameters and generates a data packet, which is then sent to the edge node. The edge node parses the IoT parameter data in the data packet and compares it with the pre-configured corresponding data anomaly threshold. If any parameter data exceeds the anomaly threshold, the priority of the data packet is increased based on the priority adjustment rules, and the priority identifier is updated. The adjusted data packet is stored in the buffer corresponding to the new priority, and subsequent transmission is scheduled according to the transmission queue and transmission strategy corresponding to the new priority. If all parameter data is normal, the original priority is maintained and the data is stored in the corresponding buffer.
[0076] As can be seen from the above, this embodiment realizes dynamic priority adjustment based on the abnormal state of data content, breaking the limitation of static priority division based solely on device type. This allows abnormal ordinary monitoring data and control data to be transmitted with higher priority, ensuring timely reporting and handling of abnormal data and reducing delays in handling abnormal situations. Different types of devices are configured with different abnormal thresholds, improving the accuracy and adaptability of priority adjustment. The adjusted data packets are stored in the corresponding buffer area to ensure the orderly scheduling of subsequent transmission.
[0077] In one embodiment of this application, the method further includes: a step of dynamically selecting a transmission link based on data packet priority and transmission link status, specifically including: A third target mapping relationship is pre-configured. The third target mapping relationship is the mapping relationship between data packet priority and transmission link type. The transmission link type includes low-latency high-reliability link and low-cost wide-coverage link. Among them, first-level priority data packets correspond to low-latency high-reliability links, and second- and third-level priority data packets correspond to low-cost wide-coverage links. Real-time monitoring of the current status parameters of each transmission link, including link packet loss rate, link delay, and the range of link bandwidth utilization; If the low-latency high-reliability link corresponding to the first-priority data packet is in the third load range and the link packet loss rate is higher than the preset packet loss threshold, the first-priority data packet will be temporarily switched to the backup low-latency high-reliability link for transmission, and the link abnormality information will be reported to the IoT data transmission platform. If the low-cost wide-coverage link corresponding to a level 2 or 3 priority data packet is in the third load range, and the proportion of data packets to be transmitted is higher than the preset proportion threshold, then some level 2 or 3 priority data packets will be diverted to idle low-latency high-reliability links for transmission. The proportion of diverted packets is positively correlated with the proportion of idle bandwidth of the low-latency high-reliability link. After the data packet transmission is completed, if it is a temporary switch or diversion transmission, the default transmission link corresponding to the third target mapping relationship will be restored; if the switch is caused by a link failure, the backup link will be used until the original link status is restored to the preset normal threshold range.
[0078] In this embodiment, the third target mapping relationship is a mapping table pre-configured and stored in the edge node link management module. The mapping table records the correspondence rules between priority and transmission link type. Among them, low-latency and high-reliability links are used to ensure the real-time performance and reliability of first-priority data (such as alarm data); low-cost and wide-coverage links are used to transmit second- and third-priority data (such as control command feedback and ordinary monitoring data), which are suitable for large-scale low-speed device access. In practical applications, other models of modules / gateways for the two types of links can also be selected, and this embodiment does not limit this.
[0079] Link status parameters are monitored through the link monitoring module on the edge node: the link packet loss rate can be calculated by periodically sending probe messages, i.e., sending a fixed-length probe message to the link peer every 50ms, and calculating the difference between the total number of probe messages sent and the total number of response messages received within a preset time. The ratio of this difference to the total number of messages sent is the link packet loss rate. The link latency is obtained by recording the difference between the timestamp of the probe message sending and the timestamp of the received response message, and taking the average of multiple measurements as the current link latency. The link bandwidth utilization is monitored in the same way as above. The preset packet loss threshold can be configured to 1%, and the preset percentage threshold can be configured to 30%, both stored in the configuration file of the link management module, and can be adjusted according to the actual link characteristics.
[0080] The backup low-latency, high-reliability link and the primary low-latency, high-reliability link are the same type of industrial private network link, covered by different operators or different base stations, to ensure that the primary and backup links are independent of each other and avoid the simultaneous failure of the primary and backup links due to the same fault point. The link anomaly information includes the abnormal link identifier, the anomaly type (high load / high packet loss), the timestamp of the anomaly, and the current link status parameters, etc., and is reported to the IoT data transmission platform through the backup link in the form of structured data packets. After receiving the report, the platform triggers a link anomaly alarm to notify the operation and maintenance personnel.
[0081] The specific implementation logic of traffic offloading is as follows: The link management module calculates the idle bandwidth ratio of the low-latency high-reliability link in real time. The idle bandwidth ratio = (maximum transmission bandwidth of the link - currently occupied bandwidth) / maximum transmission bandwidth of the link × 100%; the proportion of offloaded packets does not exceed the idle bandwidth ratio. For example, if the idle bandwidth ratio of the low-latency high-reliability link is 20%, then at most 20% of the secondary or tertiary priority packets to be transmitted will be offloaded to this link; when offloading, tertiary priority packets are selected first. If the number of tertiary priority packets is insufficient, secondary priority data packets will be supplemented to ensure that the transmission resources of primary priority data packets are not affected.
[0082] The link recovery mechanism is implemented through continuous monitoring by the link monitoring module: For temporary switching (high load / high packet loss on the primary link but no failure) or traffic diversion, when the original link status parameters recover to the preset normal threshold (outside the third load range, packet loss rate ≤ preset packet loss threshold), the link management module triggers link switching and restores data packet transmission to the default link corresponding to the third target mapping relationship; for switching caused by link failure, the link monitoring module performs status detection on the original faulty link every 100ms until the original link status recovers to the normal threshold range, and then performs recovery operation. If the original link continues to fail for more than the preset duration (e.g., 10 minutes), the backup link is switched to the primary link, and the default link configuration in the third target mapping relationship is updated.
[0083] In this embodiment, the link management module preloads the third target mapping relationship, and data packets are matched with the corresponding default transmission links according to their own priorities. The link monitoring module collects status parameters such as packet loss rate, latency, and bandwidth utilization of each link in real time. If the default low-latency high-reliability link for first-priority data is in the third load range and the packet loss rate exceeds the threshold, the first-priority data packets are immediately switched to the backup link for transmission and the anomaly is reported. If the default low-cost wide-coverage link for second- and third-priority data is in the third load range and the proportion of packets to be transmitted exceeds the threshold, some second- and third-priority packets are diverted to the idle link according to the idle bandwidth proportion of the low-latency high-reliability link. After the data transmission is completed, a decision is made on whether to switch back to the default link based on the recovery status of the original link to ensure the reasonable allocation of link resources.
[0084] As can be seen from the above, this embodiment achieves differentiated link resource adaptation by binding priority with link type. This ensures low-latency and high-reliability transmission of first-priority data while controlling the transmission cost of second- and third-priority data through low-cost links. The dynamic switching and diversion mechanism based on link status avoids the impact of a single link failure on data transmission, improving the reliability of core data transmission. The diversion strategy makes full use of idle link resources, alleviating congestion pressure on low-cost links and reducing the backlog of low-priority data. The primary and backup link switching and recovery mechanism ensures redundant backup of link resources, further improving the stability and fault resistance of data transmission in large-scale IoT networking scenarios.
[0085] Based on the same inventive concept, this application also provides an IoT data transmission device for implementing the IoT data transmission method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more IoT data transmission device embodiments provided below can be found in the limitations of the IoT data transmission method described above, and will not be repeated here.
[0086] This application provides an Internet of Things (IoT) data transmission device, such as... Figure 2 As shown, the IoT data transmission device 20 includes: a data acquisition module 21, a priority determination module 22, a data caching module 23, and a data transmission module 24; The data acquisition module 21 is used to acquire data packets from the sensing layer IoT devices. The data packets include IoT data collected by the sensing layer IoT devices and the type of sensing layer IoT devices, including alarm devices, control devices and monitoring devices. The priority determination module 22 is used to determine the priority of data packets based on the type and the first target mapping relationship. The first target mapping relationship is the mapping relationship between device type and data packet priority. Different types correspond to different data packet priorities. The data packet priorities include: first-level priority, second-level priority and third-level priority. The data caching module 23 is used to store data packets into the corresponding cache area based on the priority of the data packets, and there is a mapping relationship between the data packet priority and the cache area; The data transmission module 24 is used to determine the data transmission queue based on the priority of the data packet, and transmit the data packet to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The priority of the data transmission queue corresponds one-to-one with the priority of the data packet. The transmission strategies corresponding to the data transmission queues include: If the first-priority queue contains first-priority data packets, then transmit the first-priority data packets. If the first-priority queue is empty and the second-priority queue contains second-priority data packets, then the second-priority data packets will be transmitted. If the first-priority queue is empty and the second-priority queue is empty, and the third-priority queue contains third-priority data packets, then the third-priority data packets will be transmitted.
[0087] In one embodiment of this application, the IoT data transmission device 20 further includes a compression module, specifically used for: If the data packet has a priority of level three, the target data compression algorithm is determined based on the data packet's data type, and the data packet is compressed based on the target data compression algorithm to obtain a compressed data packet. The data types include structured data and unstructured data; the compressed data packet carries a compression identifier. The compression identifier is used to indicate the type of target data compression algorithm; the types of target data compression algorithms include differential encoding compression algorithms and dictionary encoding compression algorithms. Specifically, the data caching module 23 is used for: The compressed data packets are stored in the corresponding buffer based on their priority.
[0088] In one embodiment of this application, the compression module is further configured to: If the data type of the data packet is structured data, then the differential encoding compression algorithm will be used as the target data compression algorithm. If the data packet is of unstructured data type, then dictionary encoding compression algorithm will be used as the target data compression algorithm.
[0089] In one embodiment of this application, if the data packet has a priority of level three, and no data packet is transmitted within a preset time, the IoT data transmission device 20 further includes a bandwidth allocation module, specifically used for: The current transmission link bandwidth is divided into shared bandwidth and dedicated bandwidth, with the data transmission capacity of shared bandwidth being greater than that of dedicated bandwidth. Data packets are transmitted to the IoT data transmission platform using dedicated bandwidth; Shared bandwidth is used to transmit first-priority data packets or second-priority data packets.
[0090] In one embodiment of this application, after transmitting the data packet to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue, the IoT data transmission device 20 further includes: a receiving confirmation module, specifically used for: If no confirmation of receipt is received from the IoT data transmission platform within the target preset confirmation time, the data packet will be retransmitted to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The methods for determining the target preset confirmation time include: Determine the current link bandwidth utilization rate. Based on the range of the current link bandwidth utilization rate and the second target mapping relationship, determine the current basic preset confirmation time. The second target mapping relationship is the mapping relationship between the range of link bandwidth utilization rate and the basic preset confirmation time. Different ranges of link bandwidth utilization rate include the first load range, the second load range, and the third load range. The basic preset confirmation time of the first load range is less than the basic preset confirmation time of the second load range, and the basic preset confirmation time of the second load range is less than the basic preset confirmation time of the third load range. Based on the priority of the data packets, the basic preset confirmation time is weighted and adjusted to obtain the target preset confirmation time.
[0091] In one embodiment of this application, the IoT data transmission device 20 further includes: a buffer configuration module, specifically used for: Configure an initial capacity for the buffer corresponding to the priority of each data packet. The initial capacity allocation ratio is positively correlated with the priority of the data packet corresponding to the buffer. Real-time monitoring of the current link bandwidth utilization range and the percentage of data packets to be transmitted in each priority data transmission queue; the percentage is the proportion of the number of data packets to be transmitted in each priority data transmission queue to the total number of data packets to be transmitted in all priority data transmission queues. If the link bandwidth utilization is in the third load range and the proportion of data packets to be transmitted in the first priority data transmission queue is higher than the preset proportion threshold, then the capacity of the first priority buffer area will be expanded according to the preset adjustment ratio, and the capacity of the third priority buffer area will be reduced, with the scale of the reduction matching the scale of the expansion. If the link bandwidth utilization is in the first load range and the proportion of data packets to be transmitted in the third priority data transmission queue is higher than the preset proportion threshold, then the capacity of the third priority buffer area will be expanded according to the preset adjustment ratio, while the capacity of the first priority buffer area will be reduced, and the scale of the reduction will match the scale of the expansion. If the link bandwidth utilization is in the second load range, the initial capacity of each priority buffer remains unchanged.
[0092] In one embodiment of this application, the IoT data includes: data corresponding to each of multiple IoT parameters; the IoT data transmission device 20 further includes: a priority adjustment module, specifically used for: If at least one IoT parameter in the IoT data exceeds the corresponding data anomaly threshold, the priority of the data packet is adjusted based on the priority adjustment rule to obtain the adjusted data packet; the data anomaly thresholds for IoT data from different types of sensing layer IoT devices are different. This includes storing data packets in corresponding buffers based on their priority, including: The data packets are stored in the corresponding buffer based on their adjusted priority. The priority adjustment rules include: The original level 3 priority is promoted to level 2 priority, the original level 2 priority is promoted to level 1 priority, and the original level 1 priority remains unchanged.
[0093] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 2 The functions of the data acquisition module 21, priority determination module 22, data caching module 23, and data transmission module 24 are shown.
[0094] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0095] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0096] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store information such as transmission strategies and data packets.
[0097] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation methods described in the IoT data transmission method provided in the embodiments of this application, or they can execute the implementation methods of the electronic devices described in the embodiments of this application, which will not be repeated here.
[0098] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0099] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0100] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0101] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0102] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.
[0103] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0104] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0105] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for transmitting data in the Internet of Things (IoT), characterized in that, include: Acquire data packets from IoT devices in the sensing layer. The data packets include IoT data collected by the IoT devices in the sensing layer and the type of the IoT devices in the sensing layer, including alarm devices, control devices, and monitoring devices. Based on the type and the first target mapping relationship, the priority of the data packet is determined. The first target mapping relationship is the mapping relationship between device type and data packet priority. Different types correspond to different data packet priorities. The data packet priorities include: first-level priority, second-level priority and third-level priority. The data packets are stored in the corresponding buffer based on their priority, and there is a mapping relationship between the data packet priority and the buffer. Based on the priority of the data packet, a data transmission queue is determined, and the data packet is transmitted to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The priority of the data transmission queue corresponds one-to-one with the priority of the data packet. The transmission strategy corresponding to the data transmission queue includes: If the first-priority queue contains a first-priority data packet, then the first-priority data packet is transmitted. If the first-priority queue is empty and the second-priority queue contains second-priority data packets, then the second-priority data packets are transmitted. If the first-priority queue is empty and the second-priority queue is empty, and the third-priority queue contains third-priority data packets, then the third-priority data packets are transmitted.
2. The IoT data transmission method as described in claim 1, characterized in that, Also includes: If the priority of the data packet is level three, then a target data compression algorithm is determined based on the data type of the data packet, and the data packet is compressed based on the target data compression algorithm to obtain a compressed data packet. The data type includes structured data and unstructured data. The compressed data packet carries a compression identifier. The compression identifier is used to indicate the type of the target data compression algorithm; the type of the target data compression algorithm includes differential encoding compression algorithm and dictionary encoding compression algorithm. The step of storing the data packet in the corresponding buffer based on the data packet's priority includes: The compressed data packets are stored in the corresponding buffer based on their priority.
3. The IoT data transmission method as described in claim 2, characterized in that, The step of determining the target data compression algorithm based on the data packet data type includes: If the data type of the data packet is structured data, then the difference encoding compression algorithm is used as the target data compression algorithm; If the data type of the data packet is unstructured data, then the dictionary encoding compression algorithm will be used as the target data compression algorithm.
4. The IoT data transmission method as described in claim 3, characterized in that, If the data packet has a priority of level three, and the data packet is not transmitted within a preset time, the method further includes: The current transmission link bandwidth is divided into shared bandwidth and dedicated bandwidth, wherein the data transmission capacity of the shared bandwidth is greater than that of the dedicated bandwidth; The data packets are transmitted to the IoT data transmission platform using the dedicated bandwidth. The shared bandwidth is used to transmit the first-priority data packets or the second-priority data packets.
5. The IoT data transmission method as described in claim 1, characterized in that, After transmitting the data packet to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue, the method further includes: If no confirmation receipt instruction is received from the IoT data transmission platform within the target preset confirmation time, the data packet will be retransmitted to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The method for determining the target preset confirmation time includes: The current link bandwidth utilization rate is determined. Based on the interval in which the current link bandwidth utilization rate falls and the second target mapping relationship, the current basic preset confirmation time is determined. The second target mapping relationship is the mapping relationship between the interval of link bandwidth utilization rate and the basic preset confirmation time. The different intervals of link bandwidth utilization rate include a first load interval, a second load interval, and a third load interval. The basic preset confirmation time of the first load interval is less than the basic preset confirmation time of the second load interval, and the basic preset confirmation time of the second load interval is less than the basic preset confirmation time of the third load interval. The target preset confirmation time is obtained by weighting the basic preset confirmation time according to the priority of the data packets.
6. The IoT data transmission method as described in claim 5, characterized in that, Also includes: Configure an initial capacity for the buffer corresponding to the priority of each data packet. The initial capacity allocation ratio is positively correlated with the priority of the data packet corresponding to the buffer. Real-time monitoring of the current link bandwidth utilization range and the percentage of data packets to be transmitted in each priority data transmission queue; the percentage is the proportion of the number of data packets to be transmitted in each priority data transmission queue to the total number of data packets to be transmitted in all priority data transmission queues. If the link bandwidth utilization is in the third load range and the proportion of data packets to be transmitted in the first priority data transmission queue is higher than the preset proportion threshold, then the capacity of the first priority buffer area will be expanded according to the preset adjustment ratio, and the capacity of the third priority buffer area will be reduced, with the scale of the reduction matching the scale of the expansion. If the link bandwidth utilization is in the first load range and the proportion of data packets to be transmitted in the third priority data transmission queue is higher than the preset proportion threshold, then the capacity of the third priority buffer area will be expanded according to the preset adjustment ratio, while the capacity of the first priority buffer area will be reduced, and the scale of the reduction will match the scale of the expansion. If the link bandwidth utilization is in the second load range, the initial capacity of each priority buffer remains unchanged.
7. The IoT data transmission method as described in claim 1, characterized in that, The IoT data includes: data corresponding to each of the multiple IoT parameters, and also includes: If at least one IoT parameter in the IoT data exceeds the corresponding data anomaly threshold, the priority of the data packet is adjusted based on the priority adjustment rule to obtain the adjusted data packet; the data anomaly thresholds corresponding to IoT data of different types of sensing layer IoT devices are different. The step of storing the data packet in the corresponding buffer based on the data packet's priority includes: The data packets are stored in the corresponding buffer based on the adjusted priority of the data packets; The priority adjustment rules include: The original level 3 priority is promoted to level 2 priority, the original level 2 priority is promoted to level 1 priority, and the original level 1 priority remains unchanged.
8. An Internet of Things (IoT) data transmission device, characterized in that, include: The data acquisition module is used to acquire data packets from the sensing layer IoT devices. The data packets include IoT data collected by the sensing layer IoT devices and the type of the sensing layer IoT devices, which includes alarm devices, control devices, and monitoring devices. The priority determination module is used to determine the priority of the data packet based on the type and the first target mapping relationship. The first target mapping relationship is the mapping relationship between device type and data packet priority. Different types correspond to different data packet priorities. The data packet priorities include: first-level priority, second-level priority and third-level priority. A data caching module is used to store the data packets into the corresponding cache area based on the priority of the data packets, wherein there is a mapping relationship between the data packet priority and the cache area; The data transmission module is used to determine a data transmission queue based on the priority of the data packet, and to transmit the data packet to the IoT data transmission platform based on the transmission strategy corresponding to the data transmission queue. The priority of the data transmission queue corresponds one-to-one with the priority of the data packet. The transmission strategy corresponding to the data transmission queue includes: If the first-priority queue contains a first-priority data packet, then the first-priority data packet is transmitted. If the first-priority queue is empty and the second-priority queue contains second-priority data packets, then the second-priority data packets are transmitted. If the first-priority queue is empty and the second-priority queue is empty, and the third-priority queue contains third-priority data packets, then the third-priority data packets are transmitted.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Congestion processing method, network equipment and storage medium
CN113810309A
Message processing method and device and storage medium
CN114500402A
Real-time data processing system and method for Internet of Things
CN120567800A
Mass data cross-security domain transmission high-low priority queue hierarchical scheduling method based on Internet of Things equipment
CN120750876A
Cashier system data synchronization method and system, intelligent terminal and storage medium
CN121210566A
Cited By
Intelligent energy monitoring data management platform based on cloud computing
CN122093482A