An internet of things data acquisition and building intelligent power distribution control method

By implanting eBPF probes in the kernel mode of edge nodes for zero-copy interception and unified memory pool mapping, combined with latency jitter perception and resource isolation scheduling, the problems of protocol conversion delay and latency jitter of edge control nodes are solved, and lossless acquisition of high-concurrency heterogeneous data and deterministic power distribution control are realized.

CN123145289APending Publication Date: 2026-11-20CHONGQING XITONGRUI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611446089.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing multi-protocol gateway solutions suffer from large protocol conversion delays in building smart power distribution IoT edge control scenarios, failing to meet millisecond-level real-time requirements. Furthermore, edge nodes lack computing resource isolation and dynamic scheduling methods when collecting high-concurrency heterogeneous data, resulting in control loop latency jitter and making it difficult to balance lossless acquisition of high-concurrency heterogeneous data with deterministic power distribution control.

Method used

By implanting eBPF probes in the kernel mode of edge nodes for zero-copy interception and combining them with memory mapping reading from a unified memory pool, adaptive identification and parsing of heterogeneous protocols can be achieved. At the same time, dynamic isolation scheduling of computing power is performed through latency jitter perception and resource risk assessment to ensure the determinism and low latency of power distribution control commands.

Benefits of technology

It significantly reduces protocol parsing latency, improves the system's adaptability to new heterogeneous devices, avoids latency jitter during control command processing, and ensures the safety and real-time performance of the power distribution system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145289A_ABST
    Figure CN123145289A_ABST
Patent Text Reader

Abstract

The application discloses a kind of Internet of Things data acquisition and building intelligent power distribution control method, the present application relates to industrial Internet of Things automatic control technical field, this method is in edge node kernel state implantation eBPF probe, to original data packet is carried out zero-copy interception in XDP mounting point, similar degree matching and self-learning clustering are carried out to protocol feature vector in combination with semantic tree, the plug-and-play type identification of heterogeneous protocol is realized, analysis result is with memory mapping mode to unified memory pool to be read by control logic, multiple data copying and context switching between user state and kernel state are saved, simultaneously, through microsecond level timer collection time delay and carry out smooth estimation, in combination with queue length calculation resource risk assessment value, when assessment value reaches trigger condition, to control loop task and conventional acquisition task Implementation central processing unit affinity binding and cache isolation, realize physical level computing power hard isolation, and after risk is removed, resource is elastically recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial Internet of Things (IoT) automatic control technology, specifically to an IoT data acquisition and intelligent building power distribution control method. Background Technology

[0002] In the large-scale application of existing industrial IoT and building intelligent power distribution systems, edge control nodes need to connect to a massive number of smart meters, environmental sensors, protection relays, and distribution cabinet programmable logic controllers. The underlying communication environment is characterized by a highly heterogeneous coexistence of multiple brands and protocols. The communication protocols involved mainly include commonly used protocol standards in the industrial and power automation fields such as Modbus RTU / TCP, OPC UA, and IEC 61850. The former is mostly used for communication of industrial field equipment, while the latter is mostly used for substation automation systems. As a key link in the cloud-edge-device collaborative architecture, edge computing is responsible for processing field data locally and issuing real-time control commands. Its computing and network resources are relatively limited compared to the cloud.

[0003] To achieve the collection of the aforementioned heterogeneous data, the common practice in the industry is to deploy a multi-protocol conversion gateway at the edge. The typical implementation process of this type of solution is as follows: the heterogeneous devices in the field first send the data to the gateway device.

[0004] The protocol conversion software running in user space on the gateway device parses and converts different protocol packets one by one according to pre-configured static mapping rules, such as register address mapping table and packet format conversion table;

[0005] The conversion process involves multiple data copies and context switches between kernel mode and user mode;

[0006] After conversion, the unified format data is uploaded to the edge controller or cloud platform through the network interface for the control logic to read and use. In addition, under the edge computing cloud-edge-device collaborative architecture, due to the limited computing and network resources at the edge, when faced with sudden large-scale concurrent data collection, the latency jitter of the control loop is easily caused by resource crowding. Existing technologies usually use fixed priority queues or simple time-slice round-robin scheduling to allocate tasks, lacking a dedicated protection mechanism for the control loop.

[0007] The existing technical solutions mentioned above have the following drawbacks: First, due to the long-standing technical limitation of existing technologies, which require multiple copies in user space to ensure processing security and stability, the identification and parsing of heterogeneous protocols have not been attempted to be implemented in the kernel space with a zero-copy path. Traditional gateways use static configuration rules and multiple user space protocol stack conversions. Each protocol conversion requires completing a complete link of receiving, parsing, copying, converting, copying again, and sending, resulting in processing delays of hundreds of milliseconds in the protocol conversion stage. Ultimately, this makes it impossible for power distribution control systems that rely on this gateway to meet the real-time control requirements at the millisecond or even microsecond level. Secondly, due to the limited computing power resources of edge nodes and the lack of task-level resource isolation methods in existing technologies, when the concurrency of acquisition tasks suddenly increases, control loop tasks and regular acquisition tasks compete for hardware resources such as central processing units and caches. This leads to unpredictable latency jitter in the processing and issuance of control commands, which may ultimately cause delays in critical protection actions such as circuit breaker opening and closing, threatening the safe operation of the power distribution system. Therefore, how to simultaneously ensure lossless acquisition of high-concurrency heterogeneous data and deterministic and low-latency issuance of power distribution control commands under limited edge computing power is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0008] The technical problem to be solved by this invention is that in the edge control scenario of building intelligent power distribution IoT, the existing multi-protocol gateway solution has the problem of large protocol conversion delay and cannot meet the millisecond-level real-time requirements of power distribution control.

[0009] Meanwhile, when faced with high-concurrency heterogeneous data acquisition tasks, edge nodes lack effective means of isolating computing resources and dynamically scheduling them, resulting in time delay jitter in the power distribution control loop, making it difficult to simultaneously meet the two core requirements of lossless acquisition of high-concurrency heterogeneous data and deterministic power distribution control.

[0010] To address the aforementioned technical problems, this invention provides an Internet of Things (IoT) data acquisition and intelligent building power distribution control method, the overall technical solution of which comprises two mutually synergistic parts.

[0011] The first part is the edge node kernel-mode heterogeneous protocol adaptive fusion acquisition scheme: implanting eBPF probes into the XDP mount point of the kernel network stack and network card driver layer of the edge node operating system to intercept the raw data packets received by the network card with zero copy.

[0012] Extract the protocol feature information of the intercepted packets and construct feature vectors;

[0013] The feature vector is matched with the protocol feature template vector stored in each node of the pre-set semantic tree. If a match is found, the parsing function corresponding to the matched node is called to perform structured parsing of the message.

[0014] If no match is found, the feature vectors of multiple consecutive unidentified messages are clustered, and new protocol determination rules and parsing functions are generated based on the clustering results and inserted as new nodes into the semantic tree, thereby realizing self-learning recognition of heterogeneous protocols.

[0015] The parsed structured data is directly written to a unified memory pool allocated in the kernel mode, which is then read concurrently by the power distribution control logic in user mode and kernel mode through memory mapping. This eliminates the need for multiple data copies and context switches between user mode and kernel mode as in traditional solutions.

[0016] The second part is a delay jitter perception and dynamic computing power isolation scheduling scheme for control loop: a timer is set in kernel mode to continuously collect the arrival timestamp of data packets, calculate the processing delay of adjacent data packets and perform smooth estimation to obtain jitter estimation value;

[0017] Simultaneously calculate the current data collection task queue length and the CPU core utilization rate;

[0018] The resource risk assessment value is calculated by combining the jitter estimate and the queue length.

[0019] When the evaluation value reaches the preset trigger condition, the central processing unit affinity binding interface is called to bind the power distribution control loop task and the regular acquisition task to independent core groups respectively, and the cache isolation mechanism is enabled to allocate independent cache space to the core group running the power distribution control loop task, so that the power distribution control loop task runs and issues power distribution control commands in physically isolated core and cache space.

[0020] After isolation is completed, the jitter estimate is continuously monitored. Once it falls below the preset threshold and remains stable within the preset time window, the isolation is lifted and the corresponding computing resources are reintegrated into the regular scheduling.

[0021] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:

[0022] 1. This invention achieves zero-copy interception by implanting an eBPF probe in kernel mode and combines it with a unified memory pool memory mapping reading method, thereby eliminating the latency overhead caused by frequent data copying and context switching between user mode and kernel mode in traditional solutions, and significantly reducing the processing latency of the protocol parsing stage;

[0023] 2. This invention achieves plug-and-play recognition of communication protocols of heterogeneous devices through similarity matching and self-learning clustering mechanism of intelligent semantic tree, without the need for manual pre-configuration of static mapping rules, thus improving the system's adaptability to new heterogeneous devices;

[0024] 3. This invention, through a resource risk assessment model based on latency jitter and queue length, can detect potential resource contention risks in advance;

[0025] 4. This invention implements physical-level hard isolation of computing resources between power distribution control loop tasks and regular data acquisition tasks by combining central processor affinity binding with a high-speed cache isolation mechanism. This avoids the impact of sudden traffic fluctuations in data acquisition tasks on the control command processing, ensures the determinism and low latency of power distribution control command issuance, and reduces the safety hazards of power distribution systems caused by the lag in critical protection actions such as circuit breaker opening and closing.

[0026] 5. This invention achieves a dynamic balance between deterministic assurance and resource utilization efficiency in computing resources through continuous monitoring in an isolated state and an elastic resource recovery mechanism after threshold fallback. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the overall system architecture in an embodiment of the present invention;

[0028] Figure 2 This is a flowchart of the kernel-mode multi-protocol adaptive fusion processing in an embodiment of the present invention;

[0029] Figure 3 This is a flowchart of latency jitter perception and dynamic isolation scheduling of computing power in an embodiment of the present invention. Detailed Implementation

[0030] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0031] The technical solution of the present invention will be further described below with reference to specific embodiments. These embodiments are only used to explain the present invention and are not intended to limit the scope of protection of the present invention.

[0032] I. System Overall Architecture

[0033] The IoT data acquisition and intelligent building power distribution control system provided in this embodiment includes a heterogeneous device layer, edge control nodes, and a cloud management platform. The heterogeneous device layer includes smart meters, environmental sensors, protection relays, and programmable logic controllers for distribution cabinets deployed at the building's power distribution site. These devices are connected via Modbus. The edge control node establishes communication connections with protocols such as RTU / TCP and IEC61850. The edge control node is configured with a heterogeneous multi-core processor and a network card at the hardware layer. The heterogeneous multi-core processor includes at least one first-type processor core and at least one second-type processor core. In this embodiment, the first-type processor core adopts a processor core with high real-time determinism, and the second-type processor core adopts a general-purpose processor core. The two types of cores together constitute a computing resource pool for running the operating system and various tasks. The operating system layer of the edge control node is divided into kernel space and user space. The kernel space deploys network card drivers, eBPF probes, kernel-mode unified memory pool, and central processing unit affinity and cache isolation control modules. The user space deploys power distribution control logic and human-machine interface. The cloud management platform connects to the edge control node through the network, receives the operating status data reported by the edge control node, and issues management configuration commands.

[0034] The data flow in the system is as follows: the raw packets generated by the heterogeneous device layer enter the edge control node through the network interface. The eBPF probe in the kernel space intercepts and parses the packets in the early stage of the network card driver's packet receiving path. The parsed structured data is written into a unified memory pool. The power distribution control logic in the user space reads the structured data through memory mapping and generates power distribution control instructions in combination with the resource risk assessment results. Finally, the instructions are sent to actuators such as circuit breakers through the network interface or fieldbus. At the same time, relevant operating status data is reported to the cloud management platform through the network.

[0035] II. Kernel-mode lossless multi-protocol adaptive fusion acquisition method based on eBPF

[0036] This embodiment abandons the traditional static rule mapping method based on user-space gateways and directly implants eBPF probes into the kernel network stack and network card driver layer of the edge control node operating system. Combined with semantic tree, it realizes the identification and dynamic mapping of heterogeneous protocol feature fingerprints. The specific process is as follows.

[0037] The edge control node operating system loads an eBPF probe program at the XDP mount point of the kernel network stack and network card driver layer. This program performs early zero-copy interception of raw data packets received by the network card before they enter the regular kernel protocol stack path, avoiding the additional overhead caused by the data packets undergoing processing through the regular protocol stack. The intercepted raw packets undergo feature extraction, including header field distribution, byte order, start flag, function code position, length field offset, and checksum method. These features are then organized into a feature vector, denoted as [feature vector]. .

[0038] eigenvectors The input is a pre-defined semantic tree, which is traversed and matched layer by layer. Each non-leaf node in the semantic tree stores a feature template vector of a known protocol, such as Modbus or IEC 61850. The similarity between the feature vector and the template vector is used to determine whether the protocol node has been matched. The similarity is calculated using cosine similarity, and the calculation method is as follows:

[0039]

[0040] in, This represents the protocol feature vector extracted from the message to be identified;

[0041] This represents the known protocol feature template vector stored in the semantic tree node;

[0042] This represents the dot product of two vectors;

[0043] , Let these represent the magnitudes of the two vectors respectively;

[0044] Let be the cosine similarity between the two, with values ​​ranging from 1 to 2. The closer the value is to 1, the closer the message to be identified is to the protocol template.

[0045] Set similarity threshold In this embodiment, the value is taken as 0.85. If a semantic tree node satisfies... If the protocol node is hit, the parsing function bound to that node is directly called to perform structured parsing of the message;

[0046] If none of the nodes in the semantic tree meet the condition, it is determined to be an unknown protocol and enters the self-learning mode. In the self-learning mode, the system performs incremental clustering on the feature vectors of multiple consecutive unknown protocol messages. In this embodiment, when the number of clustered samples of a certain type of feature vector reaches a preset threshold of 50, a new protocol determination rule and corresponding parsing function are generated based on the common features of the samples of that type, and it is inserted as a new node into the corresponding position of the semantic tree to complete the dynamic update of the semantic tree structure and realize plug-and-play recognition of heterogeneous devices.

[0047] The structured data obtained after parsing is directly written into a unified memory pool allocated in the kernel space according to a predefined unified data model. It is then read concurrently by the power distribution control logic in both user space and kernel space through memory mapping. The entire process eliminates the need for multiple data copies and context switches between user space and kernel space as in traditional solutions, thereby reducing the latency caused by protocol fusion processing from hundreds of milliseconds in traditional solutions to microseconds.

[0048] III. Delay jitter sensing and dynamic computing power isolation scheduling method for control loop

[0049] This embodiment addresses the control latency jitter issue caused by high-concurrency data acquisition at edge nodes by establishing a dynamic resource allocation adaptive model. When resource contention risk is detected, hard isolation of computing power is triggered. The specific process is as follows.

[0050] A microsecond-precision timer is set in the operating system kernel mode of the edge control node to continuously collect the arrival timestamp of each data packet from the underlying communication bus and network interface, and calculate the... Next and first The processing delay between data packets is denoted as . The time delay jitter is smoothly estimated using the exponentially weighted moving average method, and the calculation method is as follows:

[0051] ;

[0052] in, Indicates the first The jitter smoothing estimate obtained after sampling;

[0053] This represents the previous jitter estimate;

[0054] This is the smoothing coefficient, and its value range is... In this embodiment, the value is set to 0.3, which is used to control the weighting ratio between historical estimates and current observation deviations. A larger value indicates a higher sensitivity to the current observation;

[0055] , They represent the first Second and third The processing latency of the next data packet in the kernel mode of the edge node, in microseconds.

[0056] Synchronously calculate the length of the current data collection task queue. The system uses the CPU core utilization rate to form the current load status information of the edge nodes. Combined with the jitter estimate and queue length information, a resource risk assessment value is calculated.

[0057] ;

[0058] in, Indicates the first The resource risk assessment value obtained from this assessment;

[0059] , These represent the weighting coefficients of the jitter factor and the queue factor, respectively. In this embodiment, their values ​​are 0.6 and 0.4, and they satisfy the following conditions: ;

[0060] This represents a preset jitter threshold, which is set to 200 microseconds in this embodiment;

[0061] This represents the pre-set queue length threshold, which is set to 100 in this embodiment.

[0062] Determine whether the resource risk assessment value meets the requirements. If the condition is met, it is determined that the current edge node poses a risk of causing control loop delay jitter, and a hard isolation operation is triggered.

[0063] If the conditions are not met, the current conventional resource scheduling method will be maintained. When isolation is triggered, the system will call the central processing unit affinity binding interface provided by the operating system to physically isolate the pre-divided control core group, which consists of first-type processor cores, from the acquisition core group, which runs conventional acquisition tasks and consists of second-type processor cores, during runtime.

[0064] Simultaneously, a cache coloring or cache partitioning mechanism is enabled to allocate independent cache space to the control core group, preventing resource contention and cache pollution caused by shared cache between control tasks and acquisition tasks. After isolation is completed, power distribution control circuit tasks, including the generation and issuance of circuit breaker opening and closing control commands, run on independent core and independent cache partitions. Their execution process is not affected by sudden traffic fluctuations of regular acquisition tasks, thereby ensuring the determinism and low latency of command issuance.

[0065] The system continuously monitors the load and jitter of each core in the isolated state as described above. When the jitter estimate is... Falling back to the threshold After remaining stable within a preset time window (in this embodiment, the time window is set to 500 milliseconds), the computing power isolation is released, and the surplus computing power originally allocated to the control core group is dynamically reclaimed and reintegrated into the resource scheduling pool of regular acquisition tasks, thereby realizing the flexible utilization of computing power resources.

[0066] IV. Device and Storage Medium Examples

[0067] In addition, the present invention also provides an edge control node, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the various steps of the aforementioned Internet of Things data acquisition and building intelligent power distribution control method. The edge control node may be an industrial gateway device, an edge computing server, or an embedded control device with a built-in heterogeneous multi-core processor deployed at the building power distribution site.

[0068] The present invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the various steps of the aforementioned Internet of Things data acquisition and building intelligent power distribution control method. The computer-readable storage medium includes, but is not limited to, non-volatile storage media capable of storing computer programs, such as flash memory, solid-state drive storage media, and read-only memory.

[0069] It should be noted that the specific values ​​involved in the above embodiments are merely examples to facilitate understanding of the technical solutions of the present invention. Those skilled in the art can adjust the above parameters according to factors such as the type of field equipment, communication protocol type, and edge node hardware configuration in actual application scenarios. All technical solutions implemented by adopting the kernel-mode zero-copy protocol fusion acquisition method and the jitter perception computing power dynamic isolation scheduling method of the present invention fall within the protection scope of the present invention.

[0070] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for IoT data acquisition and intelligent building power distribution control, characterized in that, include: eBPF probes are implanted at the XDP mount points of the kernel network stack and network card driver layer of the operating system at the edge node to intercept the raw data packets received by the network card with zero copy and obtain the packets to be identified. Extract the protocol feature information of the message to be identified and construct a feature vector; The feature vector is matched with the protocol feature template vector stored in each node of the preset semantic tree. If a match is found, the parsing function corresponding to the matched node is called to perform structured parsing on the message to be identified, and structured data is obtained. If no match is found, incremental clustering is performed on the feature vectors of multiple consecutive unidentified messages to be identified. When the number of clustered samples of the same type of feature vectors reaches a preset threshold, a new protocol determination rule and parsing function are generated based on the common features of the samples of that type, and inserted as a new node into the semantic tree. The structured data is written into a unified kernel-mode memory pool, allowing user-mode and kernel-mode power distribution control logic to read it concurrently via memory mapping. The arrival timestamps of data packets are continuously collected, the processing delay of adjacent data packets is calculated, and the processing delay is smoothed to obtain a jitter estimate. Statistics on the current collection task queue length and the CPU core utilization rate; Calculate the resource risk assessment value based on the jitter estimate and the length of the data acquisition task queue; When the resource risk assessment value reaches the preset trigger condition, the central processing unit affinity binding interface is invoked to bind the power distribution control loop task and the regular acquisition task to independent core groups respectively, and the cache isolation mechanism is enabled to allocate independent cache space for the core group bound to the power distribution control loop task, so that the power distribution control loop task runs in physically isolated core and cache space, and generates power distribution control commands to be sent to the circuit breaker.

2. The method according to claim 1, characterized in that, The similarity matching method is as follows: calculate the cosine similarity between the feature vector and the protocol feature template vector, and determine that a match is hit when the cosine similarity is not less than a preset similarity threshold.

3. The method according to claim 1, characterized in that, The method for clustering the feature vectors of multiple consecutive unidentified messages to be identified is as follows: incremental clustering is performed on the feature vectors, and when the number of clustered samples of the same type of feature vectors reaches a preset threshold, a new protocol judgment rule and parsing function are generated based on the common features of the samples of that type.

4. The method according to claim 1, characterized in that, The method for smoothing the processing delay is as follows: the current jitter estimate is determined as the sum of the absolute values ​​of the difference between the previous jitter estimate and the current processing delay and the previous processing delay, respectively, according to the first weight coefficient and the second weight coefficient, where the sum of the first weight coefficient and the second weight coefficient is 1.

5. The method according to claim 1, characterized in that, The resource risk assessment value is obtained by multiplying the ratio of the jitter estimate to the preset jitter threshold and the ratio of the acquisition task queue length to the preset queue length threshold by the corresponding weighting coefficients and then adding them together. The sum of the two weighting coefficients is 1.

6. The method according to claim 1, characterized in that, The triggering condition is that the resource risk assessment value is not less than 1.

7. The method according to claim 1, characterized in that, Also includes: After the physical isolation is completed, the jitter estimate is continuously monitored. When the jitter estimate falls below the preset jitter threshold and remains stable within the preset time window, the isolation of the core group bound to the power distribution control loop task is lifted, and the computing resources of the core group are re-included in the resource scheduling of the regular acquisition task.

8. The method according to claim 1, characterized in that, The independent core groups include a control core group composed of first-type processor cores and a data acquisition core group composed of second-type processor cores. The power distribution control loop task is bound to the control core group for operation, and the regular data acquisition task is bound to the data acquisition core group for operation.

9. An edge control node, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the Internet of Things data acquisition and building intelligent power distribution control method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the Internet of Things data acquisition and building intelligent power distribution control method as described in any one of claims 1 to 8.