Power Internet of Things operating system kernel optimization method for coping with high-concurrency tasks

Through multi-dimensional time series feature prediction and comprehensive node scoring, the minimum number of active nodes and the optimal wake-up time in the power IoT operating system are determined, and the energy consumption and response problems of node rotation under high concurrency tasks are solved, and energy optimization and equipment life are achieved. extend.

CN119127320APending Publication Date: 2024-12-13GUANGZHOU KETENG INFORMATION TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411092827.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the power IoT operating system, edge nodes need to operate at full time to cope with high concurrent tasks, resulting in huge energy consumption and shortened equipment life. Simple shutdown of some nodes may not meet the processing requirements during peak periods, and high real-time requirements are high In the power system, dynamic node rotation needs seamless connection, and improper wake-up timing will affect energy consumption and system response.

Method used

By obtaining multi-dimensional power parameters, constructing multi-dimensional time series features, predicting load values, determining the minimum number of active nodes, using hierarchical analysis method to comprehensively score nodes, filtering subsets of nodes whose wake-up time is less than the task delay threshold, and selecting nodes with the highest comprehensive score. As an active node, and when the load exceeds the processing capacity, the target node to be awakened and the optimal wake-up time are determined.

Benefits of technology

While meeting the delay constraints, it efficiently wakes up nodes, optimizes energy use, extends equipment life, and ensures the meeting of high concurrent data processing requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127320A_ABST
    Figure CN119127320A_ABST
Patent Text Reader

Abstract

According to the power Internet of Things operating system kernel optimization method for coping with the high-concurrency task, the minimum number of active nodes is determined through multi-granularity load prediction and node comprehensive scoring, the target node to be awakened and the optimal awakening moment are determined, and aiming at the high-concurrency data processing requirement, the time delay constraint is met, and meanwhile, the optimal awakening time of the target node to be awakened is obtained. And nodes are efficiently awakened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to Internet of Things technology, and in particular to a method for optimizing the kernel of an electric power Internet of Things operating system for coping with high-concurrency tasks. Background Art

[0002] In the optimization of the kernel of the power Internet of Things operating system, we are faced with a difficult technical problem. The edge nodes in the current system need to run all the time to cope with high-concurrency tasks, which leads to huge energy consumption and shortened equipment life. However, if we simply shut down some nodes to save energy, it may not be able to meet the processing needs during peak periods.

[0003] One possible solution is to implement a dynamic node rotation mechanism, but this also brings a series of new challenges. Especially in the application scenario of power system, which has extremely high requirements for real-time performance, it is necessary to ensure seamless connection during the rotation process and grasp the timing of waking up dormant nodes to avoid unnecessary energy consumption caused by waking up too early and the negative impact of waking up too late on system response. Summary of the invention

[0004] The present invention provides a method for optimizing the kernel of an electric power Internet of Things operating system for coping with high-concurrency tasks, which can efficiently wake up nodes while satisfying delay constraints.

[0005] In a first aspect, the present invention provides a method for optimizing the kernel of an electric power Internet of Things operating system for coping with high-concurrency tasks, comprising:

[0006] Obtain the multi-dimensional power parameters of each node in the power Internet of Things at multiple sampling times, and construct multi-dimensional time series features with the multi-dimensional power parameters at multiple sampling times;

[0007] Predicting load forecast values ​​of the electric power Internet of Things at multiple time granularities based on the multi-dimensional time series characteristics;

[0008] Determine the minimum number of active nodes required at each time granularity based on the load forecast value;

[0009] A hierarchical analysis method is used to comprehensively score the node based on the energy efficiency score, network bandwidth, and hardware aging degree of the node to obtain a comprehensive score of the node;

[0010] Filter out a subset of nodes whose wake-up time is less than the task delay threshold from all nodes, and select K nodes with the highest comprehensive scores from the subset of nodes as active nodes, where K is equal to the minimum number of active nodes;

[0011] Determining whether the load prediction value exceeds the processing capacity of the active node;

[0012] When the load prediction value exceeds the processing capacity of the active node, determining a target node to be awakened and an optimal awakening time;

[0013] When the wake-up time arrives, the target node is woken up.

[0014] Optionally, predicting the load forecast value of the electric power Internet of Things at multiple time granularities based on the multi-dimensional time series characteristics includes:

[0015] Using a sliding window to process the multidimensional time series features to obtain a sequence feature set including multiple time scales;

[0016] The sequence feature set is processed using a long short-term memory network to predict the load prediction value of the node at multiple time granularities.

[0017] Optionally, determining the minimum number of active nodes required at each time granularity based on the load forecast value includes:

[0018] Comparing the load forecast value of the node with the historical load value to determine the abnormal node with abnormal load;

[0019] Mapping the load prediction value of the abnormal node to the computing resource demand of the abnormal node using a resource utilization model;

[0020] Dynamically allocate computing resource requirements through a priority queue algorithm;

[0021] According to the dynamically allocated computing resource requirements, a greedy algorithm is used to determine the minimum number of active nodes required at each time granularity.

[0022] Optionally, before using the hierarchical analysis method to comprehensively score the node based on the energy efficiency score, network bandwidth, and hardware aging degree of the node to obtain the comprehensive score of the node, the method further includes:

[0023] A plurality of operating status indicators of the node are obtained, and a random forest algorithm is used to process the plurality of operating status indicators to obtain an energy efficiency score of the node.

[0024] Optionally, a node subset whose wake-up time is less than the task delay threshold is selected from all nodes, and K nodes with the highest comprehensive scores are selected from the node subset as active nodes, where K is equal to the minimum number of active nodes, including:

[0025] Filter out a subset of nodes whose wake-up time is less than the task delay threshold from all nodes;

[0026] A greedy algorithm is used to select K nodes with the highest comprehensive scores from the node subset as active nodes, where K is equal to the minimum number of active nodes.

[0027] Optionally, when the load prediction value exceeds the processing capacity of the active node, determining a target node to be awakened and an optimal awakening time includes:

[0028] When the load prediction value exceeds the processing capacity of the active node, an adaptive threshold algorithm is used to determine whether a new node needs to be awakened;

[0029] If so, the number of nodes required to be added is calculated using a linear optimization algorithm, with the total processing capacity satisfying the load forecast value and the upper limit of the single-node processing capacity as constraints;

[0030] Select the target nodes to be awakened with the required number of nodes from the idle node list;

[0031] Using support vector regression to fit the wake-up time curve of the target node;

[0032] The optimal wake-up time of the target node is calculated from the wake-up time curve using a dynamic programming algorithm.

[0033] Optionally, when the wake-up time arrives, after waking up the target node, the method further includes:

[0034] Controlling the target node to obtain status data from neighboring nodes connected to the target node to achieve status synchronization of the target node;

[0035] Slicing the power task into multiple subtasks;

[0036] The subtasks are dynamically allocated in real time among the activated nodes according to the load level of each activated node, and the activated nodes include the active nodes and the target nodes.

[0037] Optionally, controlling the target node to obtain status data from a neighboring node connected to the target node to achieve status synchronization of the target node includes:

[0038] The state of the target node is synchronized by using incremental update and multi-level cache mechanism;

[0039] Dividing the priority of gradual synchronization according to the importance and change frequency of the target node;

[0040] The status synchronization of the target node is performed according to the priority from high to low.

[0041] Optionally, the power task is sliced ​​into multiple subtasks, including:

[0042] According to the real-time requirements of abnormality detection of power Internet of Things devices and the delay sensitivity of power trading tasks, a directed acyclic graph is constructed, wherein the directed acyclic graph represents the dependency relationship between tasks;

[0043] The directed acyclic graph is processed by a topological sorting algorithm to determine the order of task execution and divide the task into multiple subtasks.

[0044] Optionally, dynamically allocating the subtasks in real time among the activated nodes according to the load level of each activated node includes:

[0045] Calculate the latest start time and the latest end time of the subtask to obtain the time constraint;

[0046] Based on historical load data and current system status, predict the load level of each activated node in the future time period;

[0047] An adaptive task scheduling mechanism based on a genetic algorithm is adopted to dynamically allocate the subtasks in real time among the activated nodes according to time constraints and the load level of each activated node.

[0048] The present invention provides a method for optimizing the kernel of an electric power Internet of Things operating system for coping with high-concurrency tasks, obtains multi-dimensional power parameters of each node in the electric power Internet of Things at multiple sampling moments, and constructs multi-dimensional time series features with the multi-dimensional power parameters at multiple sampling moments, predicts the load prediction values ​​of the electric power Internet of Things at multiple time granularities based on the multi-dimensional time series features, determines the minimum number of active nodes required at each time granularity based on the load prediction values, uses a hierarchical analysis method to comprehensively score the nodes based on their energy efficiency scores, network bandwidth, and hardware aging levels, obtains a comprehensive score of the nodes, filters out a subset of nodes whose wake-up time is less than a task delay threshold from all nodes, selects K nodes with top comprehensive scores from the node subset as active nodes, wherein K is equal to the minimum number of active nodes, determines whether the load prediction value exceeds the processing capacity of the active node, and when the load prediction value exceeds the processing capacity of the active node, determines the target node to be awakened and the optimal wake-up time, and wakes up the target node when the wake-up time arrives. The present invention determines the minimum number of active nodes, the target nodes to be awakened and the optimal awakening time through multi-granularity load prediction and node comprehensive scoring. It can efficiently wake up the nodes while meeting the delay constraints for high concurrent data processing requirements.

[0049] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A flowchart of a method for optimizing the kernel of an electric power Internet of Things operating system for coping with high-concurrency tasks provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0053] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] Figure 1A flowchart of a method for optimizing the kernel of an electric power Internet of Things operating system for high-concurrency tasks provided by an embodiment of the present invention. This embodiment is applicable to situations where high-concurrency tasks are being handled in an electric power Internet of Things operating system. The method can be performed by a device for optimizing the kernel of an electric power Internet of Things operating system for high-concurrency tasks provided by an embodiment of the present invention. The device can be implemented by software and / or hardware and is usually configured in an electronic device, such as Figure 1 As shown in FIG. 1 , the kernel optimization method of the power Internet of Things operating system for high-concurrency tasks includes the following steps:

[0057] S101. Obtain multi-dimensional power parameters of each node in the power Internet of Things at multiple sampling times, and construct multi-dimensional time series features with the multi-dimensional power parameters at multiple sampling times.

[0058] In an embodiment of the present invention, for each node in the power Internet of Things, various power parameters such as load value, voltage, current and power factor of the node at multiple sampling times are obtained, and the various power parameters are dedimensionalized and normalized to construct multidimensional time series features.

[0059] S102. Predict the load forecast value of the power Internet of Things at multiple time granularities based on multi-dimensional time series characteristics.

[0060] In an embodiment of the present invention, load forecast values ​​of the power Internet of Things at multiple time granularities are predicted based on multi-dimensional time series characteristics.

[0061] In some embodiments of the present invention, a sliding time window is used to process multidimensional time series features to obtain a multi-scale time series feature set, which is input into a long short-term memory network. The long short-term memory network performs multi-granularity load forecasting on power Internet of Things devices (nodes) to predict the load forecast values ​​of the nodes at multiple time granularities.

[0062] For example, when constructing multidimensional time series features, for the IoT devices (nodes) of a distribution station, the data collection frequency is set to once every 5 minutes, and the power load data granularity is 15 minutes. Considering that the power grid topology of the distribution station includes 3 trunk lines and 12 branch lines, a time series feature including 10 dimensions such as load value, voltage, current, and power factor is constructed. The feature data is processed using a sliding time window. The window size is set to 24 hours and the sliding step is 1 hour. Five statistical indicators such as the mean, standard deviation, peak value, valley value, and median in the window are calculated. A multi-scale time series feature set is generated according to the three time granularities of hourly, daily, and weekly levels. Based on the constructed multi-scale time series feature set, a long short-term memory network is used to perform multi-granular load forecasting on power IoT devices. The network structure includes 2 LSTM layers, 128 neurons in each layer, and the output layer is a fully connected layer. By setting the prediction time step to 1 hour, 24 hours, and 168 hours, multi-granular load forecasting at the hourly, daily, and weekly levels is achieved.

[0063] S103: Determine the minimum number of active nodes required at each time granularity based on the load forecast value.

[0064] In an embodiment of the present invention, the load forecast results are mapped to the computing resource requirements of the edge nodes, and the minimum number of active nodes required at each time granularity is determined in combination with the reliability constraints of the distribution automation control tasks and the high-concurrency data processing requirements of the power Internet of Things.

[0065] In some embodiments of the present invention, the load prediction value of the node is compared with the historical load value to determine the abnormal node with abnormal load, and the load prediction value of the abnormal node is mapped to the computing resource demand of the abnormal node using a resource utilization model. The computing resource demand is dynamically allocated through a priority queue algorithm, and based on the dynamically allocated computing resource demand, a greedy algorithm is used to determine the minimum number of active nodes required at each time granularity.

[0066] Exemplarily, the anomaly detection index is calculated based on the deviation between the load forecast value and the historical data, and the threshold of the 3σ criterion is set to 0.05 to determine whether the equipment is abnormal. According to the load forecast results and anomaly detection results, the resource utilization model is used to map the predicted load value and the abnormal state to the computing resource requirements of the edge node. The resource utilization model includes three indicators: CPU utilization, memory occupancy, and storage space utilization. Combined with the reliability constraints of the distribution automation control task, the task response time threshold is set to 100 milliseconds, and the data processing throughput threshold is set to 1000 / second. The computing resource requirements are dynamically allocated through the priority queue algorithm. According to the dynamically allocated computing resource requirements, a threshold-based greedy algorithm is used to determine the minimum number of active nodes required at each time granularity.

[0067] S104, using the hierarchical analysis method to comprehensively score the node based on the node's energy efficiency score, network bandwidth, and hardware aging degree, to obtain a comprehensive score of the node.

[0068] In the embodiment of the present invention, the node energy efficiency score, network bandwidth, and hardware aging degree are comprehensively scored using the hierarchical analysis method to obtain a comprehensive score of the node.

[0069] In some embodiments of the present invention, a plurality of operating status indicators of a node are obtained, and a random forest algorithm is used to process the plurality of operating status indicators to obtain an energy efficiency score of the node. Exemplarily, a node energy efficiency evaluation model is established based on a plurality of operating status indicators such as the CPU usage rate, memory occupancy rate, storage read and write speed, and network bandwidth utilization rate of the node, and a random forest algorithm is used to process the plurality of operating status indicators to obtain an energy efficiency score of the node. The node is comprehensively scored by the energy efficiency score, network bandwidth, and hardware aging degree of the node using the hierarchical analysis method to obtain a comprehensive score of the node. The hierarchical analysis method sets the network bandwidth, hardware aging degree, and energy efficiency score as evaluation indicators, and constructs a judgment matrix to calculate the weight vector.

[0070] Exemplarily, the computing resource utilization, storage capacity occupancy ratio, and operating status indicators of the power Internet of Things devices are obtained, and the node CPU usage, memory occupancy, storage read and write speed, network bandwidth and other data are regularly collected through the SNMP protocol. In view of the dynamic changes in node energy consumption levels, the random forest algorithm is used to establish a node energy efficiency evaluation model. The input features include CPU usage, memory occupancy, storage read and write speed, and network bandwidth utilization, and the node energy efficiency score is output. Combined with the dynamic changes in node network bandwidth and the differences in hardware aging, the hierarchical analysis method is used to comprehensively score the node based on the node's energy efficiency score, network bandwidth, and hardware aging degree to obtain the node's comprehensive score. The random forest algorithm is used to construct a node energy efficiency evaluation model, using 100 decision trees, with a maximum depth of 10 for each tree. The input features are the above four indicators, and the energy efficiency score of 0 to 100 is output. In the hierarchical analysis method, the network bandwidth weight is set at 0.3, the hardware aging weight is set at 0.2, and the energy efficiency score weight is set at 0.5. The hardware aging degree is calculated based on the equipment usage time, its annual depreciation of 20% and the average annual number of failures, where each failure reduces 10 points and the full score is 100 points.

[0071] S105. Filter out a node subset whose wake-up time is less than the task delay threshold from all nodes, and select K nodes with the highest comprehensive scores from the node subset as active nodes, where K is equal to the minimum number of active nodes.

[0072] In an embodiment of the present invention, based on the node wake-up time and the task delay threshold, combined with the minimum number of active nodes, a node with the highest comprehensive score and meeting the task delay threshold is selected as the active node.

[0073] In some embodiments of the present invention, a subset of nodes whose wake-up time is less than the task delay threshold is screened out from all nodes, and a greedy algorithm is used to select K nodes with the highest comprehensive scores from the node subset as active nodes, where K is equal to the minimum number of active nodes.

[0074] Exemplarily, a node subset whose wake-up time is less than the task delay threshold is selected from all nodes, and the task delay threshold is set according to the matching degree between the node wake-up time and the task delay constraint. If the node subset exists, a greedy algorithm is used to select the node with the highest comprehensive score from the node subset as the active node; if the node subset does not exist, the task delay threshold is reset.

[0075] S106: Determine whether the load prediction value exceeds the processing capacity of the active node.

[0076] In an embodiment of the present invention, the processing capacity of the current active node is obtained according to the predicted load value, and an adaptive threshold algorithm is used to determine whether the load prediction value exceeds the processing capacity of the active node. The adaptive threshold is dynamically adjusted based on the standard deviation of historical load fluctuations.

[0077] S107: When the load prediction value exceeds the processing capacity of the active node, determine the target node to be awakened and the optimal awakening time.

[0078] In the embodiment of the present invention, when the load prediction value exceeds the processing capacity of the active node, the target node to be awakened and the optimal awakening time are further determined.

[0079] In some embodiments of the present invention, when the load prediction value exceeds the processing capacity of the active node, an adaptive threshold algorithm is used to determine whether a new node needs to be woken up. If so, the total processing capacity satisfies the load prediction value and the upper limit of the single node processing capacity is used as a constraint. The required number of new nodes is calculated through a linear optimization algorithm, and the required number of new target nodes to be awakened are selected from the idle node list. Support vector regression is used to fit the wake-up time curve of the target node, and a dynamic programming algorithm is used to calculate the optimal wake-up time of the target node from the wake-up time curve.

[0080] Exemplarily, the processing capacity of the current active node is obtained according to the predicted load level, and an adaptive threshold algorithm is used to determine whether a new node needs to be awakened. The adaptive threshold is dynamically adjusted based on the standard deviation of historical load fluctuations. If the predicted load value exceeds the product of the total processing capacity of the current active node and the adaptive threshold, the node awakening process is triggered, and the number of new nodes required is calculated by a linear optimization algorithm. The objective function of the linear optimization algorithm is to minimize the number of new nodes. The constraints include that the total processing capacity meets the predicted load and the upper limit of the processing capacity of a single node. The required number of new nodes is obtained, and the target nodes to be awakened with the required number of new nodes are selected from the idle node list. The support vector regression is used to fit the target node awakening time curve. Combined with the task delay constraint, the optimal node awakening time is calculated by the dynamic programming algorithm. The dynamic programming algorithm state is defined as the set of awakened nodes. The state transition equation is combined with the wake-up time and the processing capacity increment setting. The node with the shortest wake-up time and satisfying the delay constraint is selected from the idle node list as the target node for final awakening.

[0081] S108. When the wake-up time arrives, wake up the target node.

[0082] In the embodiment of the present invention, when the wake-up time arrives, the target node is woken up.

[0083] S109: Control the target node to obtain status data from neighboring nodes connected to the target node, so as to achieve status synchronization of the target node.

[0084] In the embodiment of the present invention, the state synchronization of the target node is performed by incremental update and multi-level cache mechanism, the priority of gradual synchronization is divided according to the importance and change frequency of the target node, and the state synchronization of the target node is performed in descending order of priority.

[0085] Exemplarily, the global state information of the newly awakened target node is obtained, and the state items that need to be updated are identified by using a version number comparison mechanism. The state difference is identified and located according to the version number comparison result. If the state difference is identified, the state change is recorded using a bitmap marking method, and each bit in the bitmap corresponds to a state item, 1 indicates a change, and 0 indicates no change. For the recorded state change, the difference data is compressed to generate an incremental update package. After obtaining the incremental update package, a multi-level cache structure is constructed, and the multi-level cache structure includes a local memory cache, a local disk cache, and a distributed cache. The cache content is managed and the cache expiration time is set in the multi-level cache structure. The Bloom filter is used to determine whether the state exists in the multi-level cache structure. If the Bloom filter judgment result is positive, a secondary confirmation mechanism is adopted. If it is confirmed that the state does not exist in the multi-level cache structure, a two-phase commit protocol is introduced to ensure the data consistency of the distributed cache and reduce the number of remote synchronization requests.

[0086] Exemplarily, for the global state information synchronization of the newly awakened target node, the version number comparison mechanism is used to identify the state items that need to be updated, the Merkle tree structure is used to efficiently identify and locate the state difference, and the bitmap marking method is used to record the state change. Each bit in the bitmap corresponds to a state item, 1 indicates change, and 0 indicates no change. The LZ77 algorithm is used to compress the difference data and generate an incremental update package. A multi-level cache structure is constructed, including local memory cache, local disk cache and distributed cache. The LRU (least recently used) algorithm is used to manage the cache content and set the cache expiration time. The Bloom filter is used to quickly determine whether the state exists in the cache. For the false positive that may be caused by the Bloom filter, a secondary confirmation mechanism is used. The two-phase commit protocol is introduced to ensure the data consistency of the distributed cache and reduce the number of remote synchronization requests. The incremental state propagation mechanism is implemented, and the state propagation algorithm is designed based on the Gossip protocol. The new node randomly selects K neighboring nodes to send a state request, and the message structure contains the version number and the state summary. The receiving node returns its latest state, and the newly awakened target node uses the version vector to resolve conflicts, merge partial states from multiple neighboring nodes, and form a temporary global view. According to the importance and change frequency of state information, the random forest algorithm is used to classify the state, and the characteristics include state change frequency, impact range, data size, etc. It is divided into three priorities: high, medium, and low, and the corresponding synchronization frequency is set. The high priority state is synchronized in real time, the medium priority state is synchronized every 5 minutes, and the low priority state is synchronized every hour. The synchronization process is controlled by the task queue and priority scheduler, the node resource occupation is monitored, the synchronization frequency is dynamically adjusted, and the occupation of node resources is reduced. In a certain power Internet of Things system, the newly awakened node needs to synchronize global information containing 1 million state items. Using a 64-bit version number, 500,000 items that need to be updated are identified by comparison. Using a Merkle tree with a depth of 20, the leaf node corresponds to a single state item, and the difference can be located in O(logn) time. The bitmap marking method uses 62,500 bytes (500,000 bits) to record changes. The LZ77 algorithm compresses the difference data to 30% of the original size. In the multi-level cache, the local memory cache capacity is 256MB, the local disk cache is 2GB, and the distributed cache is 10GB. The LRU algorithm retains the data accessed in the last 2 hours. The Bloom filter sets the false positive rate to 0.1% and uses 3 hash functions. The two-phase commit protocol takes an average of 100ms. In the Gossip protocol, each node selects 5 neighboring nodes, the message contains a 32-byte version number and a 64-byte status summary, and the propagation cycle is 10 seconds. The version vector uses an 8-byte timestamp to resolve conflicts. The random forest algorithm uses 100 decision trees, and the features include 10 indicators such as the number of state changes in the past 24 hours, the number of downstream nodes affected, and the size of the data. In the classification results, 20% are high priority, 50% are medium priority, and 30% are low priority.The upper limit of the task queue length is 1000, and the priority scheduler checks the queue status every 100ms. When the node CPU usage exceeds 80%, the synchronization frequency is reduced by 50%, and the resource usage is controlled below 30%.

[0087] S110: Slice the power task and divide the power task into multiple subtasks.

[0088] When the newly awakened node completes state synchronization, the task is sliced ​​according to the real-time requirements of power IoT device anomaly detection and the delay sensitivity of power tasks.

[0089] For example, according to the real-time requirements of anomaly detection of power Internet of Things devices and the delay sensitivity of power trading tasks, a directed acyclic graph is constructed. The directed acyclic graph represents the dependency relationship between tasks. The directed acyclic graph is processed by a topological sorting algorithm to determine the order of task execution and divide the task into multiple subtasks.

[0090] S111. Dynamically allocate subtasks in real time among the activated nodes according to the load level of each activated node. The activated nodes include active nodes and target nodes.

[0091] In an embodiment of the present invention, the latest start time and the latest end time of the subtask are calculated to obtain the time constraint, and the load level of each activated node in the future time period is predicted based on the historical load data and the current system status. An adaptive task scheduling mechanism based on a genetic algorithm is adopted to dynamically allocate subtasks among the activated nodes in real time based on the time constraint and the load level of each activated node.

[0092] Exemplarily, the latest start time and the latest end time of each subtask are calculated using the critical path algorithm to obtain the task slicing results and time constraints. The ARIMA time series prediction model is used to predict the load level of each node in the future based on historical load data and the current system state. The polynomial regression model is used to establish the relationship between node energy consumption and load, and the energy consumption of nodes under different loads is estimated. Combined with node processing power and network delay, the task allocation optimization objective function is constructed, including factors such as delay constraints, load balancing and energy consumption minimization. An adaptive task scheduling mechanism based on genetic algorithm is designed to match task slices (subtasks) with node resources. When the population is initialized, nodes with low load and low energy consumption are considered, and new scheduling schemes are generated through crossover and mutation operations. Fitness evaluation comprehensively considers delay satisfaction, load balancing and total energy consumption. Iteration optimization is performed until the preset convergence condition or the maximum number of iterations is reached. A dynamic voltage and frequency adjustment mechanism based on PID controller is implemented to monitor the real-time load of nodes. Multiple load thresholds and corresponding frequency gears are set, and the PID controller automatically adjusts the CPU frequency and voltage according to the load deviation. An adaptive control mechanism is introduced to dynamically adjust PID parameters according to the load change trend to achieve more accurate frequency regulation. Through task redistribution and dynamic adjustment mechanisms, the performance of the current task allocation scheme is periodically evaluated. If performance degradation or new nodes are detected, the rescheduling process is triggered to ensure that the system continues to operate in the optimal state. Assuming that the task dependencies are represented by a directed acyclic graph containing 100 nodes, the topological sorting algorithm completes the execution order determination within 5 milliseconds. The critical path algorithm calculates that the longest path is 15 tasks, and the total delay constraint is 300 milliseconds. The ARIMA model uses the load data of the past 7 days to predict the load of each node in the next 1 hour, and the average prediction error is controlled within 5%. The polynomial regression model uses a cubic polynomial to fit the energy consumption curve, R 2 Reach 0.95. The weights of the task allocation optimization objective function are set as: delay satisfaction 0.5, load balancing 0.3, and energy consumption minimization 0.2. The initial population size of the genetic algorithm is 100, the crossover probability is 0.8, the mutation probability is 0.1, and the maximum number of iterations is 1000. The convergence condition is that the optimal solution has not been improved for 50 consecutive generations. The initial values ​​of the PID controller parameters are Kp=0.5, Ki=0.2, Kd=0.1, and the sampling period is 100 milliseconds. Set 5 load thresholds (20%, 40%, 60%, 80%, 95%) corresponding to 6 frequency gears. The adaptive mechanism evaluates the PID parameters every 10 minutes, with an adjustment range of ±20%. The trigger condition for task reallocation is that the performance drops by more than 10% or the number of newly added nodes exceeds 5% of the total nodes. When processing 1000 concurrent tasks, the average response time is controlled within 50 milliseconds, and the average node load is maintained at around 65%, saving 20% ​​energy consumption compared to fixed frequency operation.

[0093] According to the prediction time scale and prediction area, including substations, distribution lines, and user groups, the load prediction tasks are dynamically divided; a hierarchical prediction system is established from user groups to substations, with the bottom layer used for refined predictions at the user group and distribution line levels, the middle layer for substation-level predictions, and the top layer for regional power grid predictions. The prediction frequency and accuracy of each layer are dynamically adjusted according to its importance in the power grid and the predicted value of load fluctuation frequency to optimize resource allocation at each layer.

[0094] The load forecasting tasks are dynamically segmented to obtain a list of forecasting tasks at three levels: user group, distribution line, and substation. A long short-term memory neural network is used to perform refined forecasting of user group and distribution line-level forecasting tasks, and the long short-term memory neural network contains two LSTM layers; the middle-level substation is predicted based on the user group and distribution line-level forecasting results; the substation forecasting results are obtained, and the top-level regional power grid is predicted using a random forest algorithm, which uses the substation forecast value as an input feature and combines regional macroeconomic indicators to generate a regional total load forecast. According to the regional total load forecasting results, the latest data is obtained through a sliding time window, and the forecasting model is continuously optimized, and the size of the sliding time window is set to a preset value.

[0095] Exemplarily, according to the prediction time scale and prediction area, the dynamic time warping algorithm is used to dynamically segment the load forecasting task, and the task is divided into three levels: user group, distribution line, and substation. By setting the distance threshold to control the segmentation granularity, a list of forecasting tasks at each level is obtained as the input of the subsequent forecasting step. For the bottom-level user group and distribution line level forecasting, a long short-term memory neural network is used for refined forecasting. The network structure contains 2 LSTM layers, 128 neurons in each layer, and a ReLU activation function is used. The input features include historical load data, weather information, time characteristics, etc. The training samples are generated by the sliding window method. The window size is set to 24 hours, the step length is 1 hour, and different forecast steps are set to meet the short-term, medium-term, and long-term forecasting needs. For the mid-level substation level forecasting, the autoregressive integral moving average model is used to integrate the bottom-level forecasting results, and the optimal model order is selected by the AIC information criterion. Considering the load contribution of each distribution line within the coverage area of ​​the substation, the weighted average weight is determined by the correlation coefficient calculated by historical data, the total load of the substation is calculated, and the forecast correction is combined with the substation's own historical data. In the top-level regional power grid forecast, the random forest algorithm is used to summarize the forecast results of each substation, and the substation forecast value is used as the input feature. Combined with regional macroeconomic indicators, large-scale power equipment scheduling plans and other information, the regional total load forecast is generated. The Gini index is used to calculate the feature importance and dynamically adjust the input feature set. According to the importance index of each level in the power grid and the predicted value of load fluctuation frequency, the forecast frequency and accuracy are dynamically adjusted to optimize the allocation of computing resources. The online learning mechanism is introduced to continuously optimize the forecast model using the latest data of the sliding time window, evaluate the forecast accuracy through the root mean square error, and feedback to adjust the forecast strategy. It is assumed that the dynamic time warping algorithm divides the load data of 1 million users into 1,000 user groups, 100 distribution lines and 10 substations. The distance threshold is set to 0.1 to achieve dynamic task segmentation. The long short-term memory neural network is used for prediction at the user group and distribution line levels. The two-layer LSTM contains 128 neurons each and uses the ReLU activation function. The input features include 20 parameters such as load data, temperature, humidity, etc. in the past 7 days. The sliding window size is 24 hours, the step size is 1 hour, the short-term prediction step size is 1 hour, the medium-term is 24 hours, and the long-term is 7 days. The substation-level prediction adopts the ARIMA model, and the optimal order is selected by the AIC criterion, which is ARIMA(2,1,2) on average. The contribution weight of the distribution line is calculated by the Pearson correlation coefficient, ranging from 0.05 to 0.3. The random forest algorithm uses 100 decision trees to predict the total regional load. The input features include 10 substation prediction values ​​and 5 macroeconomic indicators. The feature importance analysis shows that the weight of the substation prediction value accounts for 85%, and the economic indicator accounts for 15%. The prediction frequency is adjusted according to the importance index, once an hour for the user group, once every 15 minutes for the distribution line, and once every 5 minutes for the substation.Online learning uses the last 24 hours of data and updates model parameters every hour. The root mean square error is used to evaluate accuracy, with an average error of 3% at the user group level, 2% at the distribution line, 1.5% at the substation, and 1% at the total regional load.

[0096] The prediction time granularity is dynamically adjusted according to the load characteristics and importance of different regions, and the distribution tasks are divided based on the regional geographical location, power consumption characteristics and grid topology. Adjacent distribution lines or user groups with similar power consumption patterns are combined for prediction.

[0097] Acquire regional load characteristic data, which include power consumption, volatility and peak-to-valley difference; use streaming K-means algorithm to cluster the regional load characteristic data to obtain three importance levels of high, medium and low; set the corresponding prediction time granularity according to the importance level area. Construct a spatial adjacency matrix based on geographic information system data and power grid topology data, and the spatial adjacency matrix is ​​determined by calculating the Euclidean distance and connection relationship between distribution lines; perform graph segmentation on the spatial adjacency matrix, and select the eigenvector corresponding to the eigenvalue of the Laplace matrix as the clustering basis; divide the power grid into multiple sub-areas according to the eigenvector. Acquire and analyze user power consumption data to obtain the similarity of user power consumption patterns; if the similarity of power consumption patterns between user groups exceeds a preset threshold, merge these user groups into a combined prediction task. Establish a multi-objective optimization model, and the objective function of the multi-objective optimization model includes prediction error, computing resource consumption and time granularity; use genetic algorithm to solve the multi-objective optimization model to obtain the optimal prediction scheme; perform the prediction task according to the optimal prediction scheme to obtain the prediction result. The prediction result is evaluated to obtain a prediction accuracy evaluation result; if the prediction accuracy evaluation result is lower than a preset accuracy threshold, the parameters of the multi-objective optimization model are adjusted; and the multi-objective optimization model is re-executed until the prediction accuracy evaluation result reaches the preset accuracy threshold.

[0098] Exemplarily, the streaming K-means algorithm is used to dynamically analyze the regional load characteristics, and the regions are divided into three levels of importance: high, medium, and low according to the characteristics of power consumption, volatility, and peak-to-valley difference. The power consumption threshold is set to 1000 kWh per day, the volatility threshold is set to 0.2 standard deviation, and the peak-to-valley difference threshold is set to 30%. The prediction time granularity is dynamically set for different levels, with high-importance areas predicted every 5 minutes, medium areas every 15 minutes, and low-importance areas predicted every hour. Combining the geographic information system and the power grid topology data, a spatial adjacency matrix is ​​constructed, and the adjacency is determined by calculating the Euclidean distance and connection relationship between distribution lines. The spectral clustering algorithm is used for graph segmentation, and the eigenvector corresponding to the second smallest eigenvalue of the Laplace matrix is ​​selected as the clustering basis. The power grid is divided into multiple sub-areas, each of which contains several adjacent distribution lines as the basic unit of task segmentation. The dynamic time warping algorithm is used to analyze the similarity of users' power consumption patterns, setting the window size to 24 hours, the step size to 1 hour, and the Euclidean distance as the similarity metric. The user groups with similar electricity consumption characteristics are aggregated into a prediction unit, and the similarity threshold is set to 0.85. When the similarity of electricity consumption patterns between user groups exceeds the threshold, these user groups are merged into a combined prediction task. A multi-objective optimization model is established. The objective function includes minimizing the prediction error, computing resource consumption and time granularity. The constraints include prediction accuracy not less than 95% and computing resource utilization not more than 80%. The optimal prediction scheme is solved by genetic algorithm, real number coding is adopted, the population size is set to 100, the crossover probability is 0.8, and the mutation probability is 0.1. The fitness function is designed as a weighted sum method, and the weights are dynamically adjusted to balance multiple objectives. A prediction result evaluation mechanism is introduced, and the root mean square error and mean absolute percentage error are used to evaluate the prediction accuracy. The prediction strategy is dynamically adjusted according to the evaluation results to achieve adaptive optimization of the prediction task. In a power Internet of Things system, the streaming K-means algorithm processes the real-time load data of 1 million users and updates the clustering results every 5 minutes. Areas with an average daily power consumption of more than 1000kWh, a volatility standard deviation greater than 0.2, and a peak-to-valley difference of more than 30% are classified as high importance, accounting for 20%; medium areas account for 50%, and low importance areas account for 30%. The spatial adjacency matrix is ​​constructed based on 10,000 distribution nodes, and the spectral clustering algorithm divides the power grid into 500 sub-areas. The dynamic time warping algorithm analyzes the power consumption data of the 24-hour window with a step length of 1 hour, processes 100 million power consumption records, and identifies 2,000 similar user groups. The multi-objective optimization model is solved using a genetic algorithm with a population size of 100, 500 iterations, and an average convergence time of 2 minutes. The evaluation of the prediction results shows that the average prediction error is 1.2% for high-importance areas, 1.8% for medium areas, and 2.5% for low-importance areas. The prediction frequency is dynamically adjusted, and the high-importance area is predicted every 3 minutes during the peak period, and the computing resource utilization rate reaches 78%.Through combined prediction, 10 adjacent distribution lines are used as a prediction unit, reducing the amount of calculation by 30%. The entire system runs on a distributed cluster, including 100 computing nodes, and processes 10TB of data per day, meeting the power grid company's load forecasting needs in different regions and time scales.

[0099] In the above embodiment, according to the calculated optimal wake-up time, combined with the global state information synchronization time overhead, the reverse time calculation method is used to determine the wake-up preparation start time point, the estimated preparation time and synchronization time overhead are subtracted from the optimal wake-up time, and the future load change trend is estimated through the ARIMA model. The wake-up preparation start time point is dynamically adjusted to ensure that the preparation work is completed before the optimal wake-up time. At the wake-up preparation start time point, multi-threaded parallel execution of preheating tasks, including memory pre-allocation, cache preheating, network connection pre-establishment, etc., these preparation tasks are managed through priority queues, combined with the high concurrency characteristics of the power Internet of Things, and the consistent hashing algorithm is used for load balancing. The hash ring is divided into intervals equal to the number of nodes, and mapped to the corresponding intervals according to the task identifier, so as to achieve the minimum time overhead node wake-up and task uniform distribution. In the load forecasting of the power Internet of Things, the predicted load level is updated every 15 minutes, and the total processing capacity of the current active nodes is 10,000 tasks / hour. The adaptive threshold algorithm is calculated based on the load fluctuations in the past 24 hours, and the initial value is set to 85%. For every 0.1 increase in the standard deviation, the threshold is lowered by 1%. If the predicted load exceeds 8,500 tasks / hour, the node wake-up process is triggered. The linear programming algorithm sets the objective function to minimize the number of new nodes, and the constraints include that the total processing capacity is greater than the predicted load and the upper limit of the single node processing capacity is 2000 tasks / hour. Support vector regression uses the RBF kernel function with parameters C=1.0 and epsilon=0.1 to fit the node wake-up time curve. In the dynamic programming algorithm, the state is defined as (the number of awakened nodes and the remaining required processing capacity), and the state transition considers the wake-up time and the processing capacity increment. The task delay constraint is set to 5 minutes, and the global state information synchronization time overhead is estimated to be 30 seconds. The reverse time calculation method subtracts 40 seconds from the optimal wake-up time, which is the estimated 30-second synchronization time plus a 10-second safety margin, to obtain the wake-up preparation start time point. The ARIMA model parameters are set to (1,1,1) and are trained based on the load data of the past 7 days. The multi-threaded parallel warm-up task includes 4 threads for memory pre-allocation, cache pre-warming, network connection pre-establishment and configuration loading. The priority queue is executed in the order of memory, network, cache, and configuration. The consistent hashing algorithm uses the MD5 hash function to evenly distribute the hash ring of 0-2^32-1 to the nodes, and the tasks are mapped to the corresponding nodes through hash values. The average time from load prediction to node wake-up and task allocation does not exceed 3 minutes, which meets the requirements of high concurrency scenarios.

[0100] Based on the geographical distribution of power Internet of Things devices, data transmission delay and task processing time limit, the optimal wake-up time is calculated for each node to be awakened. According to the hierarchical structure of the power Internet of Things, including substations, distribution rooms, and user ends, a hierarchical node wake-up plan is formulated to ensure that each level can work together to cope with high-concurrency data processing needs.

[0101] According to the geographical distribution information and device type of the equipment, a hierarchical clustering algorithm is used to divide the equipment into three levels: substation, distribution room, and user end; the hierarchical clustering algorithm is layered according to the device type, and then distance clustering is performed based on geographic coordinates in each layer. The average distance and data transmission delay between devices in each level are obtained, and a multi-objective optimization model is established in combination with the task processing time limit; the objective function of the multi-objective optimization model includes minimizing the total wake-up time and maximizing the processing capacity utilization, and the constraints include the upper limit of the transmission delay and the processing time limit requirements; the optimal wake-up time of each node to be awakened is obtained by solving the multi-objective optimization model. Based on the three levels of substation, distribution room, and user end, the hierarchical analysis method is used to determine the weight coefficient of each level; the hierarchical analysis method constructs a judgment matrix, performs pairwise comparisons to determine the relative importance of each level, and calculates the characteristic vector to obtain the weight; according to the weight coefficient, combined with the data processing volume and time sensitivity of each level, a node wake-up priority scoring formula is constructed. A hierarchical node wake-up plan is formulated using a dynamic programming algorithm. The state of the dynamic programming algorithm is defined as the set of awakened nodes and the amount of remaining tasks. The state transition equation is obtained by combining the node wake-up time and the task processing capacity. The node wake-up plan includes setting a hierarchical quota during the state transition process to ensure balanced wake-up of nodes at different levels. The optimal wake-up sequence is obtained by solving the dynamic programming algorithm. According to the hierarchical node wake-up plan, a workflow scheduler based on a directed acyclic graph is used to execute the wake-up task. The edges in the directed acyclic graph represent the dependencies between nodes. The execution order is determined by topologically sorting the directed acyclic graph. If it is detected that the node wake-up time exceeds a predetermined threshold or the actual processing capacity is lower than expected, the next node to be awakened is selected from the priority list, and the wake-up plan is dynamically adjusted.

[0102] For example, according to the geographical distribution information of power Internet of Things devices, a hierarchical clustering algorithm is used to divide the devices into three levels: substation, distribution room, and user end. The devices are first stratified according to the device type, and then the distance clustering is performed based on the geographical coordinates in each layer. The average distance and data transmission delay between devices in each layer are calculated. Combined with the task processing time limit, a multi-objective optimization model is established. The objective function includes minimizing the total wake-up time and maximizing the processing capacity utilization. The constraints include the upper limit of the transmission delay and the processing time limit requirements, and the optimal wake-up time of each node to be awakened is solved. For the three levels of substation, distribution room, and user end, the hierarchical analysis method is used to determine the weight coefficient of each level, construct a judgment matrix, determine the relative importance of each level by pairwise comparison, and calculate the characteristic vector to obtain the weight. Combined with the data processing volume and time sensitivity of each level, the node wake-up priority scoring formula is established as priority score = level weight * (0.6 * data processing volume + 0.4 * time sensitivity), calculate the priority score of each node to be awakened, and generate a node wake-up priority sorting list. According to the node wake-up priority list, a hierarchical node wake-up plan is formulated using a dynamic programming algorithm. The state is defined as (set of awakened nodes, remaining task volume). The state transition equation considers the node wake-up time and task processing capacity. In the state transition process, the hierarchical quota is set to ensure the balanced wake-up of nodes at different levels. The optimal wake-up sequence is solved to obtain a wake-up plan that meets the needs of high concurrent data processing at all levels. Based on the formulated hierarchical node wake-up plan, a workflow scheduler based on a directed acyclic graph is used to execute the wake-up task. The dependencies between nodes are represented as edges in the graph, and the execution order is determined by topological sorting. Multiple nodes without dependencies are woken up simultaneously through parallel processing technology, and the wake-up status and data processing capacity of nodes at all levels are monitored in real time. If the node wake-up time is detected to exceed the predetermined threshold or the actual processing capacity is lower than 80% of the expected value, the standby node wake-up mechanism is triggered, and the next node to be awakened is selected from the priority list. The wake-up plan is dynamically adjusted to ensure the collaborative processing capacity of each level. In a city power Internet of Things system, a hierarchical clustering algorithm is used to divide 10,000 devices into 3 substations, 50 distribution rooms and 9,947 user-end devices. The average distance between substations is 20 kilometers, and the data transmission delay is 10 milliseconds; the average distance between distribution rooms is 5 kilometers, and the transmission delay is 5 milliseconds; the average distance between user-end equipment is 500 meters, and the transmission delay is 2 milliseconds. The multi-objective optimization model sets the total wake-up time weight to 0.6 and the processing capacity utilization weight to 0.4. The optimal wake-up time for substation nodes is T+30 seconds, for distribution room nodes is T+60 seconds, and for user-end nodes is T+90 seconds. The analytic hierarchy process constructs a 3x3 judgment matrix, and the weights of substation, distribution room, and user end are calculated to be 0.5, 0.3, and 0.2, respectively. The data processing volume and time sensitivity are standardized to the range of 0-1, and substituted into the priority scoring formula to calculate the score of each node.The dynamic programming algorithm sets the state transfer interval to 5 seconds, the hierarchical quota is 20% for substations, 30% for distribution rooms, and 50% for user terminals, and solves the optimal wake-up sequence. The workflow scheduler builds a directed acyclic graph containing 300 nodes and sets 10 parallel execution threads. The node wake-up time threshold is set to 1.5 times the expected value, and the processing capacity threshold is set to 80% of the expected value. It takes about 5 minutes from device clustering to node wake-up plan generation, which meets the high-concurrency data processing requirements of the power Internet of Things, and nodes at all levels work together to cope with peak loads.

[0103] A parallel wake-up strategy is adopted to activate multiple edge nodes at the same time to form a computing cluster that can cope with high-concurrency tasks in the power Internet of Things. The parallel wake-up strategy includes giving priority to waking up high-performance edge nodes at the substation level and configuring them as data aggregation and preliminary analysis centers; for medium-sized edge nodes in the distribution network, a group wake-up method is adopted to ensure load balancing within the area; and lightweight wake-up is implemented for small edge devices at the user end.

[0104] Node weights are set according to the substation level, distribution network level and user-side level, and the node weights reflect device performance; for high-performance edge nodes at the substation level, a priority queue is established, and the priority queue is used to manage the node wake-up order; if it is determined that the substation-level node needs to be awakened, the high-performance edge node is activated; a preset configuration script is obtained, and the preset configuration script includes data receiving buffer size settings and task distribution rules; for medium-sized edge nodes at the distribution network level, the K-means clustering algorithm is used to divide nodes with similar geographical locations into multiple groups, where the K value is set to the square root of the number of distribution network nodes; if it is determined that the distribution network level node needs to be awakened, the awakening is performed in parallel within the group and / or serially between groups; for small edge devices at the user-side level, it is determined whether the user-side level node needs to be incrementally updated; if it is determined that the user-side level node needs to be incrementally updated, the configuration file version comparison and incremental transmission are performed; according to the node awakening priority list of the substation level, distribution network level and user-side level, the nodes at each level are awakened sequentially.

[0105] For example, according to the topological structure of the power Internet of Things, the Kernighan-Lin algorithm is used to divide the network into three levels: substation, distribution network and user end. The node weight is set to reflect the device performance, and the edge weight represents the quality of the network connection. A parallel wake-up strategy is designed for each level, and multiple edge nodes are activated simultaneously through multi-threaded concurrent execution to obtain a wake-up priority list of nodes at each level. For high-performance edge nodes at the substation level, a priority queue is used to manage the wake-up order, and the node is activated through the Wake-on-LAN protocol. After startup, the preset configuration script is automatically loaded to configure the node as a data aggregation and preliminary analysis center. The preset configuration script includes data receiving buffer size settings, such as 1GB and task distribution rules, such as dynamic allocation based on load, setting data receiving buffer and task distribution rules. For medium-sized edge nodes in the distribution network, a group wake-up method is implemented, and the nodes with similar geographical locations are divided into multiple groups using the K-means clustering algorithm, and the K value is set to the square root of the number of nodes in the distribution network. A wake-up strategy of parallel within the group and serial between groups is adopted, and the task allocation ratio of the nodes within each group is dynamically adjusted through the consistent hashing algorithm to achieve load balancing. For small edge devices at the user end, including smart meter gateways, a lightweight wake-up process is adopted to send wake-up commands through the LoRaWAN network, and the incremental configuration update mechanism is used to transmit only the necessary configuration information. The incremental update process includes configuration file version comparison, difference calculation and incremental transmission, which reduces the amount of data transmission during the wake-up process and realizes fast wake-up and task preparation. Through the above steps, an efficient and collaborative computing cluster is formed, and nodes at all levels are awakened in sequence according to the priority list to jointly cope with high-concurrency tasks of the power Internet of Things. In a provincial power Internet of Things system, the Kernighan-Lin algorithm is used to divide the network into 3 substations, 50 distribution networks and 10,000 user-end nodes. The algorithm sets the weight of substation nodes to 100, the weight of distribution network nodes to 50, the weight of user-end nodes to 10, and the edge weight is set according to the network delay, ranging from 1 to 100. The parallel wake-up strategy uses 16 threads to execute simultaneously, and the generated priority list is sorted according to the node weight and network connection quality. For the high-performance edge nodes at the three substation levels, the magic packet is sent through the Wake-on-LAN protocol to wake up. After waking up, the preset configuration script is loaded, and a 2GB data receiving buffer is set. The task distribution rule adopts the shortest queue priority algorithm. For 50 distribution network nodes, the K-means clustering algorithm (K=7) is used to divide them into 7 groups. The consistent hashing algorithm is used for load balancing within the group, and the hash ring is divided into 1024 virtual nodes. For 10,000 user-end devices, the wake-up command is sent through the LoRaWAN network, which has a frequency band of 433MHz and a bandwidth of 125kHz. In the incremental configuration update mechanism, the version comparison uses the MD5 checksum, the difference calculation uses binary comparison, and the incremental transmission uses the MQTT protocol.The entire parallel wake-up process takes about 5 minutes, with an average wake-up time of 10 seconds for substation nodes, 30 seconds for distribution network nodes, and 60 seconds for user-end devices. The formed computing cluster can handle 1 million data collection and analysis tasks per second, meeting the high concurrency requirements of the power Internet of Things.

[0106] The embodiment of the present invention provides a method for optimizing the kernel of an electric power Internet of Things operating system for coping with high-concurrency tasks, obtains multi-dimensional power parameters of each node in the electric power Internet of Things at multiple sampling times, and constructs multi-dimensional time series features with the multi-dimensional power parameters at multiple sampling times, predicts the load prediction value of the electric power Internet of Things at multiple time granularities based on the multi-dimensional time series features, determines the minimum number of active nodes required at each time granularity based on the load prediction value, uses a hierarchical analysis method to comprehensively score the nodes based on their energy efficiency scores, network bandwidth, and hardware aging, and obtains a comprehensive score of the nodes, filters out a subset of nodes whose wake-up time is less than a task delay threshold from all nodes, and selects K nodes with the highest comprehensive scores from the node subset as active nodes, where K is equal to the minimum number of active nodes, determines whether the load prediction value exceeds the processing capacity of the active node, and when the load prediction value exceeds the processing capacity of the active node, determines the target node to be awakened and the optimal wake-up time, and wakes up the target node when the wake-up time arrives. The present invention determines the minimum number of active nodes, the target nodes to be awakened and the optimal awakening time through multi-granularity load prediction and node comprehensive scoring. It can efficiently wake up the nodes while meeting the delay constraints for high concurrent data processing requirements.

[0107] Figure 2 A schematic diagram of the structure of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0108] like Figure 2As shown, the electronic device includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0109] A number of components in the electronic device are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0110] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for optimizing the kernel of an electric power Internet of Things operating system for high-concurrency tasks.

[0111] In some embodiments, the method for optimizing the kernel of the power Internet of Things operating system for high-concurrency tasks may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for optimizing the kernel of the power Internet of Things operating system for high-concurrency tasks described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for optimizing the kernel of the power Internet of Things operating system for high-concurrency tasks in any other appropriate manner (e.g., by means of firmware).

[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0118] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the power Internet of Things operating system kernel optimization method for coping with high-concurrency tasks as provided in any embodiment of the present application.

[0119] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for optimizing the kernel of an electric power Internet of Things operating system for high-concurrency tasks, characterized in that: include: Obtain the multi-dimensional power parameters of each node in the power Internet of Things at multiple sampling times, and construct multi-dimensional time series features with the multi-dimensional power parameters at multiple sampling times; Predicting load forecast values ​​of the electric power Internet of Things at multiple time granularities based on the multi-dimensional time series characteristics; Determine the minimum number of active nodes required at each time granularity based on the load forecast value; A hierarchical analysis method is used to comprehensively score the node based on the energy efficiency score, network bandwidth, and hardware aging degree of the node to obtain a comprehensive score of the node; Filter out a subset of nodes whose wake-up time is less than the task delay threshold from all nodes, and select K nodes with the highest comprehensive scores from the subset of nodes as active nodes, where K is equal to the minimum number of active nodes; Determining whether the load prediction value exceeds the processing capacity of the active node; When the load prediction value exceeds the processing capacity of the active node, determining a target node to be awakened and an optimal awakening time; When the wake-up time arrives, the target node is woken up.

2. The method according to claim 1, characterized in that Predicting the load forecast value of the electric power Internet of Things at multiple time granularities based on the multi-dimensional time series characteristics includes: Using a sliding window to process the multidimensional time series features to obtain a sequence feature set including multiple time scales; The sequence feature set is processed using a long short-term memory network to predict the load prediction value of the node at multiple time granularities.

3. The method according to claim 1, characterized in that Determining the minimum number of active nodes required at each time granularity based on the load forecast value includes: Comparing the load forecast value of the node with the historical load value to determine the abnormal node with abnormal load; Mapping the load prediction value of the abnormal node to the computing resource demand of the abnormal node using a resource utilization model; Dynamically allocate computing resource requirements through a priority queue algorithm; According to the dynamically allocated computing resource requirements, a greedy algorithm is used to determine the minimum number of active nodes required at each time granularity.

4. The method according to any one of claims 1 to 3, characterized in that: Before comprehensively scoring the node based on the energy efficiency score, network bandwidth, and hardware aging degree of the node using the hierarchical analysis method to obtain the comprehensive score of the node, the method further includes: A plurality of operating status indicators of the node are obtained, and a random forest algorithm is used to process the plurality of operating status indicators to obtain an energy efficiency score of the node.

5. The method according to any one of claims 1 to 3, characterized in that: A node subset whose wake-up time is less than the task delay threshold is selected from all nodes, and K nodes with the highest comprehensive scores are selected from the node subset as active nodes, where K is equal to the minimum number of active nodes, including: Filter out a subset of nodes whose wake-up time is less than the task delay threshold from all nodes; A greedy algorithm is used to select K nodes with the highest comprehensive scores from the node subset as active nodes, where K is equal to the minimum number of active nodes.

6. The method according to any one of claims 1 to 3, characterized in that: When the load prediction value exceeds the processing capacity of the active node, determining a target node to be awakened and an optimal awakening time includes: When the load prediction value exceeds the processing capacity of the active node, an adaptive threshold algorithm is used to determine whether a new node needs to be awakened; If so, the number of nodes required to be added is calculated using a linear optimization algorithm, with the total processing capacity satisfying the load forecast value and the upper limit of the single-node processing capacity as constraints; Select the target nodes to be awakened with the required number of nodes from the idle node list; Using support vector regression to fit the wake-up time curve of the target node; The optimal wake-up time of the target node is calculated from the wake-up time curve using a dynamic programming algorithm.

7. The method according to any one of claims 1 to 3, characterized in that: When the wake-up time arrives, after waking up the target node, the method further includes: Controlling the target node to obtain status data from neighboring nodes connected to the target node to achieve status synchronization of the target node; Slicing the power task into multiple subtasks; The subtasks are dynamically allocated in real time among the activated nodes according to the load level of each activated node, and the activated nodes include the active nodes and the target nodes.

8. The method according to claim 7, characterized in that Controlling the target node to obtain status data from a neighboring node connected to the target node to achieve status synchronization of the target node, including: The state of the target node is synchronized by using incremental update and multi-level cache mechanism; Prioritize the step-by-step synchronization according to the importance and change frequency of the target node; The status synchronization of the target node is performed according to the priority from high to low.

9. The method according to claim 7, characterized in that: The power task is sliced ​​into multiple subtasks, including: According to the real-time requirements of abnormality detection of power Internet of Things devices and the delay sensitivity of power trading tasks, a directed acyclic graph is constructed, wherein the directed acyclic graph represents the dependency relationship between tasks; The directed acyclic graph is processed by a topological sorting algorithm to determine the order of task execution and divide the task into multiple subtasks.

10. The method according to claim 7, characterized in that According to the load level of each activated node, the subtasks are dynamically allocated in real time among the activated nodes, including: Calculate the latest start time and the latest end time of the subtask to obtain the time constraint; Based on historical load data and current system status, predict the load level of each activated node in the future time period; An adaptive task scheduling mechanism based on a genetic algorithm is adopted to dynamically allocate the subtasks in real time among the activated nodes according to time constraints and the load level of each activated node.

Citation Information

Cited By

  • Internet of Things system based on multilayer hybrid networking and interactive communication method

    CN120499216A