A power internet of things terminal resource self-adaptive cooperative collection system and method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO
- Filing Date
- 2026-06-02
- Publication Date
- 2026-07-03
AI Technical Summary
[0007]综上所述,电力物联网终端在硬件资源供给、无线链路质量保障及核心业务实时性支撑等方面仍面临三重刚性约束,现有采集方案下,难以在资源受限、链路抖动的前提下兼顾故障特征采集完整性与继电保护业务零中断要求
[0046] This invention adopts a "resource-link-service three-in-one collaborative" architecture:
Smart Images

Figure CN122340143A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power Internet of Things (IoT) communication technology, and in particular to a power IoT terminal resource adaptive collaborative acquisition system and method. Background Technology
[0002] With the comprehensive advancement of the construction of new power systems, a massive number of power Internet of Things (IoT) terminals, such as distribution automation terminals (DTUs / FTUs), smart meters, and distributed energy controllers, are being widely deployed at the end of the power grid. These terminals act as the "eyes" and "ears" of the power grid, capturing its operational status in real time. They are key devices supporting the grid's observability, measurability, and controllability, and are also an important foundation for the stable operation of the new power system. These terminals are scattered, surrounded by complex electromagnetic environments, and use various communication methods. The stability of communication directly affects the normal operation of power services and the operational safety of the power grid.
[0003] However, under the existing technological framework, power Internet of Things (IoT) terminals face the following three rigid constraints:
[0004] Constraint C1 (Hardware Resource Constraint): Power terminals generally use embedded processors, with physical memory typically ranging from 32MB to 128MB; after the operating system and power service processes are initialized, they already occupy 80% to 85% of the total memory. When the probe process's resource usage exceeds 3% of the CPU and 4MB of memory, the system watchdog circuit will trigger a reset, causing the relay protection service to be interrupted.
[0005] Constraint C2 (Link Quality Constraint): The RSSI of the wireless link fluctuates drastically in the range of -110dBm to -60dBm, and the duration of the link availability window is unpredictable; the fault characteristic data has temporal irreproducibility, and fault events during the link unavailability period will be permanently lost.
[0006] Constraint C3 (Service Real-Time Constraint): Relay protection services require end-to-end response delays of no more than 20ms (differential protection) to 100ms (GOOSE message). The competition of probe processes for CPU time slices will directly affect the scheduling delay of P0-level service processes, and any resource preemption scheme is not feasible.
[0007] In summary, power IoT terminals still face three rigid constraints in terms of hardware resource supply, wireless link quality assurance, and real-time support for core services. Under existing data acquisition schemes, it is difficult to simultaneously ensure the integrity of fault feature acquisition and zero-interruption requirements for relay protection services under conditions of limited resources and link jitter. Therefore, it is necessary to develop an adaptive collaborative data acquisition method that can adapt to the heterogeneous environment of power IoT terminals and achieve efficient fault feature acquisition without affecting the operation of core power services under the triple constraints of hardware resources, link quality, and service real-time performance.
[0008] Therefore, this application proposes an adaptive collaborative acquisition system and method for power Internet of Things terminal resources. Summary of the Invention
[0009] The purpose of this invention is to provide an adaptive collaborative acquisition system and method for power Internet of Things (IoT) terminal resources.
[0010] The present invention provides a power Internet of Things (IoT) terminal resource adaptive collaborative acquisition system and method, which adopts the following technical solution:
[0011] A power Internet of Things (IoT) terminal resource adaptive collaborative acquisition system and method, wherein the power IoT terminal resource adaptive collaborative acquisition system includes a terminal, the terminal comprising:
[0012] The power business semantic perception module is used to read the / proc / [pid] / cmdline file byte by byte to obtain the startup command strings of all active processes on the terminal, and perform the longest prefix matching between the command strings and the keyword feature vectors in the preset power business feature fingerprint database to identify the type of power core business process currently activated on the terminal in real time.
[0013] The nonlinear sampling frequency decision module periodically reads fields 14 and 15 of the / proc / [pid] / stat file to obtain the user-mode and kernel-mode CPU clock ticks for each power service process, and calculates the CPU utilization P within a unit statistical period. cpu The current link quality indicator value is obtained by sending the AT command AT+CSQ to the wireless communication module and parsing the RSSI field in the response message. After obtaining the above parameters, the current sampling frequency F is calculated according to the following piecewise nonlinear mapping function. sample ;
[0014] The resource game Pareto optimization module, by designating the data acquisition probe process as participant A and the power business process set as participant B, ensures that the CPU utilization of the data acquisition probe process does not exceed the rated resource limit. As a hard constraint, construct the following utility function and solve for the Nash equilibrium point using the iterative steepest descent method. Where F is the optimal sampling frequency under equalization conditions; T cpu CPU utilization under balanced conditions;
[0015] The lightweight data communication module uses the shm_open() system call to create a fixed-size 512KB POSIX shared memory segment for exchanging acquisition status data between various functional modules, uses the mmap() system call to map the / proc virtual file system to the process address space in a zero-copy manner, and uses the pipe() system call to create anonymous pipes to transmit control commands between modules.
[0016] Furthermore, the nonlinear sampling frequency decision module, the power business semantic perception module, and the lightweight data communication module communicate linearly in series via data streams, and the resource game Pareto optimization module is embedded in and controls the nonlinear sampling decision module.
[0017] Furthermore, the core power business process types include distribution automation feeder terminal (FTU) processes, distribution distribution unit (DTU) processes, smart meter concentrator processes, and distributed photovoltaic inverter control processes. The power business semantic perception module assigns business weight coefficients to the currently activated business types based on the recognition results. The weighting coefficients satisfy And the difference between adjacent weights is not less than the preset distinguishing threshold. .
[0018] Furthermore, the sampling frequency F sample The calculations include:
[0019] The power service semantic perception module identified that the relay protection service was active and P cpu Increment over two consecutive statistical periods When using the exponential decay model for calculation:
[0020] ;
[0021] Where t is the time offset from the load step time, and k1 is the attenuation coefficient. To retain only the lowest frequency of relay protection Trip signals and SOE event acquisition, This is the maximum sampling frequency allowed by the system;
[0022] When the power service semantic perception module identifies the activation of a relay-free protection type service, and the received signal strength RSSI corresponding to the link quality indicator value is >-85dBm, the logarithmic gain mode is used for calculation:
[0023] ;
[0024] in, The current terminal normalized load level, k2 is the gain coefficient. The reference sampling frequency is used.
[0025] Furthermore, the calculation relationship of the utility function is as follows:
[0026] ;
[0027] ;
[0028] in, This represents the real-time CPU utilization of the probe. To reduce response time for power business processes, The maximum allowable response delay is specified in the business SLA; the maximum number of iterations for the iterative solution shall not exceed 100, and the convergence criterion is... ,by This serves as the output frequency of the nonlinear sampling frequency decision module.
[0029] The total memory usage of the shm_open() system, the mmap() system, and the pipe() system is less than 4MB.
[0030] Furthermore, the power service semantic perception module includes a service load prediction submodule, and the service load submodule has a maintenance length of [missing information]. The sliding historical load time series is used to perform first-order differencing and extract periodic extreme points to identify the load cycle of the power service process, and to predict the load at the current time t. Peak service load within ,when At that time, an early warning signal is sent to the nonlinear sampling frequency decision module to trigger the intensive pre-collection phase: before the predicted load peak arrives. Within the time window, the sampling frequency will be forcibly increased to The fault characteristic data collected within the current time window will be completely cached in the POSIX shared memory segment.
[0031] Furthermore, the nonlinear sampling frequency decision module incorporates an idle period compensation acquisition mechanism, which is as follows:
[0032] When continuous Within each statistical period When RSSI > -85dBm, the system enters full-compensation acquisition mode and sets the current sampling frequency to [value missing]. The compensated acquisition duration of the full acquisition mode; The calculation is as follows:
[0033] ;
[0034] in, This estimates the number of samples missed during the preceding high-load period. This is the average time cost per sampling session. After compensation, the system automatically recovers to the set time. .
[0035] Furthermore, the process of the resource game Pareto optimization module solving for the Nash equilibrium is as follows:
[0036] Step S1: Initialize the sampling frequency Initialize the CPU time slice allocation for the business process. ;
[0037] Step S2: Fix By using binary search in Solving within the interval makes Maximize Search accuracy is no less than ;
[0038] Step S3: Fix The wait queue duration of the business process is obtained by reading the first field of the / proc / [pid] / schedstat file, and the current response latency is calculated. Updated using gradient descent: Step length ;
[0039] Step S4: Determine the convergence condition If satisfied, output The iteration is terminated; if the condition is not met and the iteration count n < 100, the process returns to step S2; if convergence is not achieved after 100 iterations, the last 10 iterations are used. mean as Output.
[0040] Furthermore, step S2 solves... Simultaneously, the system performs hierarchical compression processing on the collected fault characteristic data:
[0041] P0 level data, including relay protection action timing and SOE event records, is written to the POSIX shared memory segment without loss of original sampling accuracy, without performing any compression processing;
[0042] For P1 level data, current / voltage fault waveform records are decomposed into 4 levels of wavelet coefficients by Haar wavelet transform. Coefficients with an energy ratio of more than 95% are retained and the remaining coefficients are set to zero. Run-length encoding is performed on the processed coefficient sequence, with a target compression ratio of not less than 6:1.
[0043] For P2 level data, which records device status variables and telemetry data, only the difference between two consecutive acquisition results is recorded. Skip the current write operation when the dead zone threshold is reached;
[0044] The above-mentioned graded processing is forcibly activated when RSSI < -100dBm and the predicted duration of the link available window does not exceed 500ms, and is deactivated when RSSI ≥ -85dBm, restoring full-precision acquisition.
[0045] The beneficial effects of the adaptive collaborative acquisition system for power Internet of Things terminal resources provided by this invention are as follows:
[0046] This invention adopts a "resource-link-service three-in-one collaborative" architecture:
[0047] Power business semantic awareness layer: It uses dual channels, namely, the longest prefix matching of / proc / [pid] / cmdline and the identification of the / proc / [pid] / net / tcp port, to perceive the business type in a user space application layer manner (non-eBPF kernel mode), without requiring a specific system version and kernel.
[0048] Nonlinear sampling decision layer: Drives the switching of segmented nonlinear mapping function parameters with business lifecycle states (PRE_ALERT→PEAK→IDLE_COMP→NORMAL four-state machine), automatically yielding during peak business periods and accurately compensating during idle periods.
[0049] Pareto optimization layer: Using / proc / self / stat and / proc / [pid] / schedstat as data sources, it solves the Nash equilibrium point between the probe process and the business process online at a period of 100ms to ensure that the sampling frequency remains optimal under the constraint of ≤3% resources.
[0050] Lightweight communication layer: POSIX shared memory 512KB + mmap zero copy + anonymous pipe combination, compressing the memory usage of the communication module from 52MB~68MB in D1 to ≤4MB, eliminating the risk of memory overflow.
[0051] A method for adaptive collaborative acquisition of power Internet of Things (IoT) terminal resources, employing the aforementioned adaptive collaborative acquisition system for power IoT terminal resources, includes the following steps:
[0052] S1. Heterogeneous environment deployment and probe initialization: The heterogeneous environment deployment adopts a unified adaptation layer to shield the underlying differences. Typical hybrid networking areas in the distribution network are selected as the implementation targets. Lightweight soft probes are compiled for the heterogeneous operating systems running on the terminals. The collection SDK needs to adopt a layered decoupling mode design to shield the underlying differences.
[0053] The probe sends the soft needle to the terminal application layer via remote OTA. After the probe is started, it automatically reads the terminal's basic information IMSI, IMEI, ICCID and the current cellular module status.
[0054] S2. Implementation of Power Business Semantic Awareness: The power business semantic awareness module obtains the startup command strings of all active processes on the terminal by reading the ` / proc / [pid] / cmdline` file byte by byte, and performs longest prefix matching between the command strings and a pre-set power business feature fingerprint database. Based on the identification result, a business importance weight coefficient is assigned to the currently active business type: W. DTU =0.9, W FTU =0.75, W AMI =0.5, W PV =0.3, and the difference between adjacent weights δ=0.15 satisfies the distinction requirement;
[0055] S3. Nonlinear Sampling Frequency Decision: The nonlinear sampling frequency decision module periodically reads fields 14 and 15 of the / proc / [pid] / stat file to obtain the user-mode and kernel-mode CPU clock ticks of each power service process, and calculates the CPU utilization P within a unit statistical period. cpu The current link quality indicator value is obtained by sending the AT command AT+CSQ to the wireless communication module and parsing the RSSI field in the response message.
[0056] When the current link quality indicator value shows that relay protection services are active, and P cpu Increment ΔP over two consecutive statistical periods cpu When it exceeds 30%, the exponential decay mode is triggered;
[0057] When the current link quality indicator shows that no relay protection services are active and RSSI > -85dBm, logarithmic gain mode is adopted;
[0058] S4. Resource Game Pareto Optimization: A resource game Pareto optimization module is used, designating the data acquisition probe process as participant A and the power business process set as participant B. The CPU utilization of the data acquisition probe process is capped at ρ. max =3% is used as a hard constraint to introduce a utility function and solve iteratively;
[0059] S5, Lightweight data communication implementation: A lightweight data communication module is used to create a fixed-size 512KB POSIX shared memory segment through the shm_open() system call, to map the / proc virtual file system to the process address space in a zero-copy manner through the mmap() system call, and to create an anonymous pipe through the pipe() system call to pass control instructions between modules. Attached Figure Description
[0060] Figure 1 This is a schematic diagram of the resource-link-service integrated collaborative architecture of the present invention;
[0061] Figure 2 This is a schematic diagram of the nonlinear sampling frequency mapping function curve in this invention;
[0062] Figure 3 This is a flowchart of the Nash equilibrium iterative solution process in this invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "comprising" and similar expressions used herein mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but does not exclude other elements or objects.
[0064] Example 1:
[0065] See Figures 1 to 3 As shown, this embodiment of the invention provides a power Internet of Things (IoT) terminal resource adaptive collaborative acquisition system, including a terminal, the terminal comprising:
[0066] The power business semantic perception module is used to read the / proc / [pid] / cmdline file byte by byte to obtain the startup command strings of all active processes on the terminal, and perform the longest prefix matching between the command strings and the keyword feature vectors in the preset power business feature fingerprint database to identify the type of power core business process currently activated on the terminal in real time.
[0067] The nonlinear sampling frequency decision module periodically reads fields 14 and 15 of the / proc / [pid] / stat file to obtain the user-mode and kernel-mode CPU clock ticks for each power service process, and calculates the CPU utilization P within a unit statistical period. cpu The current link quality indicator value is obtained by sending the AT command AT+CSQ to the wireless communication module and parsing the RSSI field in the response message. After obtaining the above parameters, the current sampling frequency F is calculated according to the following piecewise nonlinear mapping function. sample ;
[0068] The resource game Pareto optimization module, by designating the data acquisition probe process as participant A and the power business process set as participant B, ensures that the CPU utilization of the data acquisition probe process does not exceed the rated resource limit. As a hard constraint, construct the following utility function and solve for the Nash equilibrium point using the iterative steepest descent method. ,(F, ) represents the optimal parameter pair when the probe process and the service process reach a Nash equilibrium state after a game, where F is the optimal sampling frequency in the equilibrium state; T cpu CPU utilization under balanced conditions;
[0069] The lightweight data communication module uses the shm_open() system call to create a fixed-size 512KB POSIX shared memory segment for exchanging acquisition status data between various functional modules, uses the mmap() system call to map the / proc virtual file system to the process address space in a zero-copy manner, and uses the pipe() system call to create anonymous pipes to transmit control commands between modules.
[0070] In this embodiment, the nonlinear sampling frequency decision module, the power business semantic perception module, and the lightweight data communication module communicate linearly in series via data streams, and the resource game Pareto optimization module is embedded in and controls the nonlinear sampling decision module.
[0071] In this embodiment, the core power business process types include distribution automation feeder terminal (FTU) processes, distribution distribution unit (DTU) processes, smart meter concentrator processes, and distributed photovoltaic inverter control processes. The power business semantic perception module assigns business weight coefficients to the currently activated business types based on the recognition results. "B" priority ϵ{W DTU W FTU W AMI W PV "}" is a mathematical set expression used to represent the "business priority weight assignment logic", where Bpriority: represents the "business priority weight variable" assigned to the currently active business. It is not a fixed value, but is dynamically determined based on the identified business type. DTU W FTU W AMI W PV} represents a discrete set of weight constants, containing fixed weight values corresponding to the four predefined core power services in the system. The weight coefficients satisfy... And the difference between adjacent weights is not less than the preset distinguishing threshold. .
[0072] In this embodiment, the sampling frequency F sample The calculations include:
[0073] The power service semantic perception module identified that the relay protection service was active and P cpu Increment over two consecutive statistical periods When using the exponential decay model for calculation:
[0074] ;
[0075] Where F(t) represents the real-time sampling frequency that decays dynamically over time, t is the time offset from the load step time, and k1 is the attenuation coefficient. To retain only the lowest frequency of relay protection Trip signals and SOE event acquisition, This is the maximum sampling frequency allowed by the system;
[0076] When the power service semantic perception module identifies the activation of a relay-free protection type service, and the received signal strength RSSI corresponding to the link quality indicator value is >-85dBm, the logarithmic gain mode is used for calculation:
[0077] ;
[0078] in, The current terminal normalized load level, k2 is the gain coefficient. The reference sampling frequency is used.
[0079] In this embodiment, the calculation relationship of the utility function is as follows:
[0080] ;
[0081] ;
[0082] Here, UA represents the utility value of the probe process (the higher the value, the higher the probe's satisfaction with the current resource allocation). The probe uses UA to pursue "high sampling frequency + low CPU usage," while UB is the utility value of the power service process (the higher the value, the higher the service process's satisfaction with the current resource allocation). The service uses UB to pursue "low response latency." This represents the real-time CPU utilization of the probe. To reduce response time for power business processes, The maximum allowable response delay is specified in the business SLA; the maximum number of iterations for the iterative solution shall not exceed 100, and the convergence criterion is... , This represents the absolute value of the change in sampling frequency between the nth iteration and the (n-1)th iteration, reflecting the fluctuation range of the frequency during the iteration process. As the output frequency of the nonlinear sampling frequency decision module This represents the final sampling frequency at which the probe process and the power business process achieve Pareto optimality in resource allocation after solving for the Nash equilibrium point through iterative algorithms (such as the steepest descent method).
[0083] In this embodiment, the total memory usage of the shm_open() system, the mmap() system, and the pipe() system is less than 4MB.
[0084] In this embodiment, the power service semantic perception module includes a service load prediction submodule, and the maintenance length of the service load submodule is [missing information]. The sliding historical load time series is used to perform first-order differencing and extract periodic extreme points to identify the load cycle of the power service process, and to predict the load at the current time t. Peak service load within ∆t is used to predict the length of the time window. It represents the time range from the current time t to predict the peak business load. At that time, among them Indicating the load peak warning threshold, a warning signal is sent to the nonlinear sampling frequency decision module, triggering the intensive pre-collection phase: before the predicted load peak arrives. Within the time window, This indicates the time window before the load peak arrives, forcibly increasing the sampling frequency to [a higher value]. The fault characteristic data collected within the current time window will be completely cached in the POSIX shared memory segment, whereby... This represents the system's maximum sampling frequency. During the intensive pre-collection phase, the system forcibly increases the sampling frequency to this value to maximize data collection density and ensure that fault characteristics during peak load periods are not missed. It is the upper limit of the sampling frequency preset by the system.
[0085] In this embodiment, the nonlinear sampling frequency decision module incorporates an idle period compensation acquisition mechanism, which is as follows:
[0086] When continuous Within each statistical period When RSSI > -85dBm, the system enters full-compensation acquisition mode and sets the current sampling frequency to [value missing]. The compensated acquisition duration of the full acquisition mode; The calculation is as follows:
[0087] ;
[0088] in, This estimates the number of samples missed during the preceding high-load period. This is the average time cost per sampling session. After compensation, the system automatically recovers to the set time. .
[0089] In this embodiment, the resource game Pareto optimization module solves for the Nash equilibrium as follows:
[0090] Step 1: Initialize the sampling frequency Where F(0) represents the initial sampling frequency of the iteration and the initial CPU time slice allocation for the service process. ;
[0091] Step 2: Fix By using binary search in Solving within the interval makes Maximize Search accuracy is no less than ;
[0092] Step 3: Fix The wait queue duration of the business process is obtained by reading the first field of the / proc / [pid] / schedstat file, and the current response latency is calculated. Updated using gradient descent: Step length ;
[0093] Step 4: Determine the convergence condition , |F (n+1) -F (n) |<0.01·F base This represents the convergence criterion for iteration, used to determine whether the iterative process has reached a steady state. Let F represent the sampling frequency after the nth iteration. (n+1) -F (n) | represents the frequency change between two consecutive iterations, 0.01· Indicates the convergence threshold (e.g.) When the frequency is 10Hz, the threshold is 0.1Hz. When the frequency change is less than this threshold, the iteration is considered to have converged, and the optimization process stops. If the condition is met, the output is... The iteration is terminated; if the condition is not met and the iteration count n < 100, the process returns to step S2; if convergence is not achieved after 100 iterations, the last 10 iterations are used. mean as Output.
[0094] In this embodiment, step two is solved. At the same time, This represents the optimal sampling frequency after iterative convergence. The system performs hierarchical compression processing on the collected fault feature data.
[0095] P0 level data, including relay protection action timing and SOE event records, is written to the POSIX shared memory segment without loss of original sampling accuracy, without performing any compression processing;
[0096] For P1 level data, current / voltage fault waveform records are decomposed into 4 levels of wavelet coefficients by Haar wavelet transform. Coefficients with an energy ratio of more than 95% are retained and the remaining coefficients are set to zero. Run-length encoding is performed on the processed coefficient sequence, with a target compression ratio of not less than 6:1.
[0097] For P2 level data, which records device status variables and telemetry data, only the difference between two consecutive acquisition results is recorded. When the dead zone threshold is reached, the current write operation is skipped. This logic represents the difference judgment logic for P2 level data. This logic is used for compression of P2 level data (device status variables, telemetry data). By "difference judgment", unnecessary data storage is reduced, saving POSIX shared memory space.
[0098] The above-mentioned graded processing is forcibly activated when RSSI < -100dBm and the predicted duration of the link available window does not exceed 500ms, and is deactivated when RSSI ≥ -85dBm, restoring full-precision acquisition.
[0099] Example 2:
[0100] An adaptive collaborative acquisition method for power Internet of Things (IoT) terminal resources includes:
[0101] S1. Heterogeneous environment deployment and probe initialization;
[0102] By shielding underlying differences through a unified adaptation layer, its specific architecture is as follows: Figure 1 As shown, a typical hybrid network area in the distribution network was selected as the implementation target. Lightweight soft probes were compiled and adapted for the heterogeneous operating systems running on the terminals. The data acquisition SDK needs to adopt a layered decoupling design, using a unified adaptation layer to shield the differences at the underlying layers. The data acquisition SDK is developed based on the C language, has low resource consumption, and consumes only about 3MB of memory and 300KB of flash memory during runtime, with CPU utilization below 3%.
[0103] Probe deployment: The soft probe is delivered to the terminal application layer via remote OTA. After the probe is activated, it automatically reads the terminal's basic information, including IMSI, IMEI, ICCID, and the current cellular module status.
[0104] S2, Implementation of semantic awareness for power business;
[0105] The power business semantic awareness module obtains the startup command strings of all active processes on the terminal by reading the / proc / [pid] / cmdline file byte by byte, and performs longest prefix matching between the command strings and the preset power business feature fingerprint database.
[0106] The fingerprint database contains the following key feature vectors: Distribution Automation Feeder Terminal (FTU) process (keywords: "ftu_daemon", "feeder_terminal"), Distribution Terminal (DTU) process (keywords: "dtu_core", "distribution_terminal"), Smart Meter Concentrator process (keywords: "ami_collector", "meter_agg"), and Distributed Photovoltaic Inverter (PV Inverter) control process (keywords: "pv_inverter", "solar_ctrl").
[0107] Assign a business importance weight coefficient to the currently active business type based on the identification results: W DTU =0.9, W FTU =0.75, W AMI =0.5, W PV =0.3, and the adjacent weight difference δ=0.15 meets the distinction requirement.
[0108] S3, Nonlinear sampling frequency decision;
[0109] This embodiment details the working mechanism of the nonlinear sampling frequency decision module. The module periodically obtains the user-mode and kernel-mode CPU clock tick counts for each power service process by reading fields 14 and 15 of the ` / proc / [pid] / stat` file, and calculates the CPU utilization P within a unit statistical period. cpu The current link quality indicator value is obtained by sending the AT command AT+CSQ to the wireless communication module and parsing the RSSI field in the response message.
[0110] Example of exponential decay mode application:
[0111] When it is detected that relay protection services are active, and P cpu When the increment ΔPcpu > 30% over two consecutive statistical periods, an exponential decay mode is triggered. Let F... min =1Hz, =100Hz, k1=1.15 (calculated from ttransition=2s), then the frequency change within 2 seconds after the load step is: F=100Hz at t=0s, F=31.5Hz at t=1s, and F=5.4Hz at t=2s. This attenuation curve matches the physical law of the RL circuit in the transient response of power short-circuit fault.
[0112] Logarithmic gain mode application example:
[0113] When relay-free protection services are activated and RSSI > -85dBm, logarithmic gain mode is adopted. Let F base =10Hz, k2=0.5, P load =0.4, then F(t)=10×(1+0.5×ln(1.4)) is approximately equal to 11.7Hz. This mode moderately increases the sampling frequency during the idle period of the service to accumulate data redundancy for possible subsequent fault collection.
[0114] S4, Resource Game Pareto Optimization;
[0115] This embodiment details the Nash equilibrium solution process of the resource game Pareto optimization module. The module designates the data acquisition probe process as participant A and the power business process set as participant B, ensuring that the CPU utilization of the data acquisition probe process does not exceed ρ. max =3% is a hard constraint.
[0116] Utility function definition: U A (F,T cpu )=(F / F max )·(1-ρ probe / ρ max This formula quantifies the probe's utility by multiplying the "sampling frequency gain" by the "CPU usage penalty." A higher sampling frequency (i.e., F / ...) will result in a higher benefit. The larger the value, the lower its own CPU usage (1-ρ). probe / ρ max The larger the value of the probe (U), the greater its effectiveness. A The higher the sampling frequency, the better. This design reflects the contradictory goals of the probe—high sampling frequency and low CPU usage—and is one of the core bases for solving the Nash equilibrium problem, embodying the probe's desire for a high sampling frequency while minimizing resource consumption. B (F, T) cpu )=1- / This reflects the goal of minimizing latency in business processes.
[0117] Iterative solution process: Initialization =10Hz, =100ms. Fixed T cpu By using a binary search to solve for U in the [1,100]Hz interval, A Maximize ;fixed The system calculates the current response latency by reading / proc / [pid] / schedstat and updates it using gradient descent. Repeat the iteration until |F (n+1) -F (n) |<0.1Hz or reaching the upper limit of 100 iterations.
[0118] S5, lightweight data communication implementation;
[0119] This embodiment details the implementation of the lightweight data communication module. The module creates a fixed-size 512KB POSIX shared memory segment using the shm_open() system call, maps the / proc virtual file system to the process address space using the mmap() system call in a zero-copy manner, and creates an anonymous pipe using the pipe() system call to transmit control instructions between modules.
[0120] The shared memory segment layout is shown in Table 1 below:
[0121] Table 1 Shared Memory Segment Space Layout Table
[0122]
[0123] The shared memory segment implements multi-process concurrent access control through a POSIX semaphore initialized by sem_init(). The initial value of the semaphore is 1, and the lock holding time for each process to access the shared memory for a single time does not exceed 500 microseconds.
[0124] Thus, this invention completes a full process from heterogeneous adaptation, business semantic awareness, nonlinear sampling decision-making, resource game optimization to lightweight communication. The above methods effectively solve the challenges of resource constraints and heterogeneous compatibility in the power Internet of Things, enabling reliable collection of key fault characteristics without affecting core power business operations.
[0125] While embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations fall within the scope and spirit of the invention as set forth in the claims. Furthermore, the invention described herein may have other embodiments and can be implemented or carried out in various ways.
Claims
1. A power Internet of Things (IoT) terminal resource adaptive collaborative acquisition system, characterized in that, Includes a terminal, the terminal comprising: The power business semantic perception module is used to read the / proc / [pid] / cmdline file byte by byte to obtain the startup command strings of all active processes on the terminal, and perform the longest prefix matching between the command strings and the keyword feature vectors in the preset power business feature fingerprint database to identify the type of power core business process currently activated on the terminal in real time. The nonlinear sampling frequency decision module periodically reads fields 14 and 15 of the / proc / [pid] / stat file to obtain the user-mode and kernel-mode CPU clock ticks for each power service process, and calculates the CPU utilization P within a unit statistical period. cpu The current link quality indicator value is obtained by sending the AT command AT+CSQ to the wireless communication module and parsing the RSSI field in the response message. After obtaining the above parameters, the current sampling frequency F is calculated according to the following piecewise nonlinear mapping function. sample ; The resource game Pareto optimization module, by designating the data acquisition probe process as participant A and the power business process set as participant B, ensures that the CPU utilization of the data acquisition probe process does not exceed the rated resource limit. As a hard constraint, a utility function is constructed and the Nash equilibrium point is solved using the iterative steepest descent method. Where F is the optimal sampling frequency under equalization conditions; T cpu CPU utilization under balanced conditions; The lightweight data communication module uses the shm_open() system call to create a fixed-size 512KB POSIX shared memory segment for exchanging acquisition status data between various functional modules, uses the mmap() system call to map the / proc virtual file system to the process address space in a zero-copy manner, and uses the pipe() system call to create anonymous pipes to transmit control commands between modules. The nonlinear sampling frequency decision module, the power business semantic perception module, and the lightweight data communication module communicate linearly in series via data streams, and the resource game Pareto optimization module is embedded in and controls the nonlinear sampling decision module.
2. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 1, characterized in that, The core power business process types include distribution automation feeder terminal (FTU) processes, distribution distribution unit (DTU) processes, smart meter concentrator processes, and distributed photovoltaic inverter control processes. The power business semantic perception module assigns business weight coefficients to the currently activated business types based on the recognition results. The weighting coefficients satisfy And the difference between adjacent weights is not less than the preset distinguishing threshold. .
3. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 2, characterized in that, The sampling frequency F sample The calculations include: The power service semantic perception module identified that the relay protection service was active and P cpu Increment over two consecutive statistical periods When using the exponential decay model for calculation: ; Where t is the time offset from the load step time, and k1 is the attenuation coefficient. To retain only the lowest frequency of relay protection Trip signals and SOE event acquisition, This is the maximum sampling frequency allowed by the system; When the power service semantic perception module detects the activation of a relay-free protection service, and the received signal strength (RSSI) corresponding to the link quality indicator value is greater than the signal threshold, the logarithmic gain mode is used for calculation: ; Among them, P load The current terminal normalized load level, k2 is the gain coefficient. The reference sampling frequency is used.
4. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 3, characterized in that, The calculation relationship of the utility function is as follows: ; ; in, This represents the real-time CPU utilization of the probe. To reduce response time for power business processes, The maximum allowable response time is specified by the business SLA; the maximum number of iterations for iterative solution shall not exceed 100, and the convergence criterion is... and convergence This serves as the output frequency of the nonlinear sampling frequency decision module.
5. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 4, characterized in that, The total memory usage of the shm_open() system, the mmap() system, and the pipe() system is less than 4MB.
6. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 5, characterized in that, The power service semantic perception module includes a service load prediction submodule, and the maintenance length of the service load submodule is [missing information]. The sliding historical load time series is used to perform first-order differencing and extract periodic extreme points to identify the load cycle of the power service process, and to predict the load at the current time t. Peak service load within ,when hour, A warning signal is sent to the nonlinear sampling frequency decision module to trigger the intensive pre-collection phase, based on a preset warning threshold: before the predicted load peak arrives. Within the time window, the sampling frequency will be forcibly increased to F. max The fault characteristic data collected within the current time window will be completely cached in the POSIX shared memory segment.
7. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 6, characterized in that, The nonlinear sampling frequency decision module incorporates an idle period compensation acquisition mechanism, which is as follows: When continuous Within each statistical period When RSSI > -85dBm, the system enters full-compensation acquisition mode and sets the current sampling frequency to [value missing]. The compensated acquisition duration of the full acquisition mode; The calculation is as follows: ; in, This estimates the number of samples missed during the preceding high-load period. This is the average time cost per sampling session. After compensation, the system automatically recovers to the set time. .
8. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 7, characterized in that, The process of solving for Nash equilibrium using the resource game Pareto optimization module is as follows: Step 1: Initialize the sampling frequency Initialize the CPU time slice allocation for the business process. ; Step 2: Fix By using binary search in Solving within the interval makes Maximize Search accuracy is no less than ; Step 3: Fix The wait queue duration of the business process is obtained by reading the first field of the / proc / [pid] / schedstat file, and the current response latency is calculated. Updated using gradient descent: Step length ; Step 4: Determine the convergence condition If satisfied, output The iteration is terminated; if the condition is not met and the iteration count n < 100, the process returns to step S2; if convergence is not achieved after 100 iterations, the last 10 iterations are used. mean as Output.
9. The power Internet of Things terminal resource adaptive collaborative acquisition system according to claim 8, characterized in that, The solution in step two Simultaneously, the system performs hierarchical compression processing on the collected fault characteristic data: P0 level data, including relay protection action timing and SOE event records, is written to the POSIX shared memory segment without loss of original sampling accuracy, without performing any compression processing; For P1 level data, current / voltage fault waveform records are decomposed into 4 levels of wavelet coefficients by Haar wavelet transform. Coefficients with an energy ratio of more than 95% are retained and the remaining coefficients are set to zero. Run-length encoding is performed on the processed coefficient sequence, with a target compression ratio of not less than 6:
1. For P2 level data, which records device status variables and telemetry data, only the difference between two consecutive acquisition results is recorded. Skip the current write, where This is the dead zone threshold; The above-mentioned graded processing is forcibly activated when RSSI < -100dBm and the predicted duration of the link available window does not exceed 500ms, and is deactivated when RSSI ≥ -85dBm, restoring full-precision acquisition.
10. A method for adaptive collaborative acquisition of power Internet of Things (IoT) terminal resources, characterized in that, The method is implemented using the power Internet of Things terminal resource adaptive collaborative acquisition system according to any one of claims 1 to 9, wherein the method includes: S1. Heterogeneous environment deployment and probe initialization: The heterogeneous environment deployment adopts a unified adaptation layer to shield the underlying differences. Typical hybrid networking areas in the distribution network are selected as the implementation targets. Lightweight soft probes are compiled for the heterogeneous operating systems running on the terminals. The collection SDK needs to adopt a layered decoupling mode design to shield the underlying differences. The probe sends the soft needle to the terminal application layer via remote OTA. After the probe is started, it automatically reads the terminal's basic information IMSI, IMEI, ICCID and the current cellular module status. S2. Implementation of Power Business Semantic Awareness: The power business semantic awareness module obtains the startup command strings of all active processes on the terminal by reading the ` / proc / [pid] / cmdline` file byte by byte, and performs longest prefix matching between the command strings and a pre-set power business feature fingerprint database. Based on the identification result, a business importance weight coefficient is assigned to the currently active business type: W. DTU =0.9, W FTU =0.75, W AMI =0.5, W PV =0.3, and the difference between adjacent weights δ=0.15 satisfies the distinction requirement; S3. Nonlinear Sampling Frequency Decision: The nonlinear sampling frequency decision module periodically reads fields 14 and 15 of the / proc / [pid] / stat file to obtain the user-mode and kernel-mode CPU clock ticks of each power service process, and calculates the CPU utilization P within a unit statistical period. cpu The current link quality indicator value is obtained by sending the AT command AT+CSQ to the wireless communication module and parsing the RSSI field in the response message. When the current link quality indicator value shows that relay protection services are active, and P cpu Increment ΔP over two consecutive statistical periods cpu When it exceeds 30%, the exponential decay mode is triggered; When the current link quality indicator shows that no relay protection services are active and RSSI > -85dBm, logarithmic gain mode is adopted; S4. Resource Game Pareto Optimization: A resource game Pareto optimization module is used, designating the data acquisition probe process as participant A and the power business process set as participant B. The CPU utilization of the data acquisition probe process is capped at ρ. max =3% is used as a hard constraint to introduce a utility function and solve iteratively; S5, Lightweight data communication implementation: A lightweight data communication module is used to create a fixed-size 512KB POSIX shared memory segment through the shm_open() system call, to map the / proc virtual file system to the process address space in a zero-copy manner through the mmap() system call, and to create an anonymous pipe through the pipe() system call to pass control instructions between modules.