Real-time hierarchical distribution method for power cloud resources of digital power grid

By dividing resource pools in power cloud resource management, dynamically adjusting network topology and routing strategies, combining load prediction and dynamic adjustment of resource allocation strategies, and using incremental resource migration and consistent hashing algorithms, the global optimization configuration of power cloud resources is realized, solving the resource requirements of key equipment and sensitive loads of the power grid, and improving the overall resource utilization efficiency.

CN119603304APending Publication Date: 2025-03-11CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 65 Cited by

Patent Information

Application Number
CN202411455835.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In power cloud resource management, how to achieve global optimized allocation of resources while ensuring the priority of key equipment and sensitive loads of the power grid, face complex problems such as resource isolation and sharing balance, load prediction accuracy, dynamic adjustment strategies, data consistency and business continuity.

Method used

By dividing power cloud resources into multiple sub-resource pools, setting up dedicated resource pools for key grid equipment and sensitive loads, dynamically adjusting network topology and routing strategies, combining load prediction and dynamic adjustment of resource allocation strategies, incremental resource migration and consistent hashing algorithms are used to achieve load balancing, and predict resource utilization through long and short-term memory networks, and dynamically adjusting resource allocation ratios through converged equipment hierarchical hierarchical results.

Benefits of technology

The global optimization configuration of power cloud resources is realized, ensuring that key equipment and sensitive loads obtain sufficient computing resources, while improving overall resource utilization efficiency and ensuring the stable and efficient operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603304A_ABST
    Figure CN119603304A_ABST
Patent Text Reader

Abstract

The invention provides a digital power grid power cloud resource real-time hierarchical distribution method, which comprises the steps of dividing power cloud resources into a plurality of sub-resource pools according to a physical architecture and a topological structure of a digital power grid, setting a special resource pool for key equipment and sensitive loads of the power grid, and dynamically adjusting network topology and a routing strategy. A low-delay and high-reliability network transmission channel is provided through a priority queue and a bandwidth guarantee mechanism; for each sub-resource pool, extracting periodicity, tendency and randomness characteristics of a load by analyzing historical load data and a current system state of power grid equipment, and updating a load prediction result in real time; after incremental resources are migrated, a power grid control request is routed to a corresponding computing node by adopting a consistent Hash algorithm in a sub-resource pool, load balancing is realized by dynamically adjusting the number and distribution of virtual nodes of a Hash ring, and weights of the virtual nodes are dynamically adjusted according to load optimization indexes of the nodes so as to adapt to power grid load changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method for real-time hierarchical allocation of digital power grid power cloud resources. Background Art

[0002] In the power cloud resource management, there is a complex technical challenge: how to achieve global optimization of resource configuration while ensuring the priority of key grid equipment and sensitive loads. This involves multiple interrelated issues. First, it is necessary to divide sub-resource pools according to the physical architecture and topology of the grid, and set up dedicated resource pools for key equipment, which requires finding a balance between resource isolation and sharing. Secondly, the accuracy of load forecasting directly affects the efficiency of resource allocation. How to integrate historical data and real-time status, extract load characteristics and update forecast results in a timely manner is a major difficulty. Furthermore, the resource allocation strategy needs to be dynamically adjusted to adapt to the changes in grid load, which requires a trade-off between multiple performance indicators to find the optimal solution. In addition, how to ensure data consistency and business continuity while minimizing migration overhead during incremental resource migration is also a challenge. Finally, how to combine resource utilization prediction with equipment importance classification to improve overall resource utilization efficiency while meeting key business needs is a core issue that needs in-depth research. These issues are intertwined and together constitute the technical difficulties of power cloud resource management. Summary of the invention

[0003] The present invention provides a method for real-time hierarchical allocation of digital power grid power cloud resources, which mainly includes:

[0004] According to the physical architecture and topology of the digital power grid, including dividing the power cloud resources into multiple sub-resource pools, setting up dedicated resource pools for key power grid equipment and sensitive loads, dynamically adjusting the network topology and routing strategy, and providing low-latency and highly reliable network transmission channels through priority queues and bandwidth guarantee mechanisms;

[0005] For each sub-resource pool, by analyzing the historical load data of the power grid equipment and the current system status, the periodicity, trend and randomness characteristics of the load are extracted, and the load forecast results are updated in real time;

[0006] Dynamically adjust resource allocation strategies based on prediction results, incorporate resource utilization, system response time, and migration overhead indicators into the objective function, and solve the optimal solution set, from which the best resource allocation plan that meets current business needs is selected. By setting reasonable thresholds for utilization and system load indicators, determine whether to trigger the expansion and contraction threshold based on the best resource allocation plan. If the threshold is not exceeded, maintain the current resource allocation state, and if the threshold is exceeded, trigger expansion and contraction;

[0007] When the system load index exceeds the threshold, resources need to be expanded or reduced. An incremental resource migration strategy is adopted to divide the power grid business data and computing tasks to be migrated into multiple small batches, establish a data synchronization channel between the source node and the target node, ensure data consistency through atomic operations, and dynamically adjust the batch size and migration rate according to the migration progress to complete the incremental resource migration;

[0008] After incremental resource migration, the consistent hashing algorithm is used to route power grid control requests to the corresponding computing nodes within the sub-resource pool. Load balancing is achieved by dynamically adjusting the number and distribution of virtual nodes in the hash ring, and the weights of virtual nodes are dynamically adjusted according to the node load optimization index to adapt to changes in power grid load.

[0009] Using load optimization indicators, we build resource utilization prediction models for different types of resources, including CPU, memory, and disk. We use long short-term memory networks to model their usage trends and correct short-term fluctuations. We set dynamic thresholds to adaptively adjust the resource allocation granularity and obtain resource utilization prediction results, maximizing resource utilization while ensuring grid control performance.

[0010] According to the differences in resource requirements of heterogeneous equipment in the power system, the hierarchical analysis method is used to classify the equipment according to their importance and sensitivity, and the equipment stratification and classification results are obtained. The resource utilization prediction results are integrated with the equipment stratification and classification results, and the allocation ratio of resources at each level is dynamically adjusted to ensure that key equipment and sensitive loads always have sufficient computing resources. At the same time, the resource requirements of non-critical businesses are taken into account to achieve global optimal configuration of power cloud resources.

[0011] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0012] The present invention discloses a real-time hierarchical allocation method for power cloud resources in a digital power grid. The method divides the power cloud resources into multiple sub-resource pools, sets a dedicated resource pool for key power grid equipment and sensitive loads, and dynamically adjusts the network topology and routing strategy to provide a low-latency and highly reliable network transmission channel. By analyzing the historical load data and current system status of power grid equipment, extracting load characteristics and updating load prediction results in real time, dynamically adjusting the resource allocation strategy according to the prediction results, incorporating resource utilization, system response time, and migration overhead indicators into the objective function, solving the optimal solution set, and selecting the best resource allocation scheme. According to the best resource allocation scheme, it is determined whether to trigger the expansion and contraction threshold, and if the threshold is exceeded, the expansion and contraction is triggered. An incremental resource migration strategy is adopted to ensure data consistency and dynamically adjust the migration rate. After the incremental resource migration, a consistent hashing algorithm is adopted to achieve load balancing, and the virtual node weight is dynamically adjusted according to the node load optimization index. The resource utilization is predicted by a long short-term memory network, and a dynamic threshold is set to adaptively adjust the resource allocation granularity to maximize resource utilization. According to the equipment hierarchical classification results, the allocation ratio of resources at each level is dynamically adjusted to ensure that key equipment and sensitive loads obtain sufficient computing resources, and realize the global optimization configuration of power cloud resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 The present invention is a flowchart of a method for real-time hierarchical allocation of digital power grid power cloud resources.

[0014] Figure 2 A schematic diagram of a real-time hierarchical allocation method for digital power grid power cloud resources according to the present invention.

[0015] Figure 3 It is another schematic diagram of a real-time hierarchical allocation method of digital power grid power cloud resources according to the present invention. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] like Figure 1-3 In this embodiment, a method for real-time hierarchical allocation of digital power grid power cloud resources may specifically include:

[0018] S101. Based on the physical architecture and topology of the digital power grid, including dividing the power cloud resources into multiple sub-resource pools, setting up dedicated resource pools for key power grid equipment and sensitive loads, dynamically adjusting the network topology and routing strategies, and providing low-latency and highly reliable network transmission channels through priority queues and bandwidth guarantee mechanisms.

[0019] The total amount of power cloud resources and the distribution of power grid equipment are obtained, and the power cloud resources are divided into multiple sub-resource pools, wherein dedicated resource pools are set for key power grid equipment and sensitive loads; the minimum-maximum fairness algorithm is used to monitor the resource usage of the sub-resource pools in real time, and if the resource usage of a sub-resource pool exceeds a preset threshold, the resource allocation is dynamically adjusted; according to the resource allocation result, the Dijkstra shortest path algorithm is used to calculate the optimal network topology, and the network configuration instructions are issued to the network device through the OpenFlow protocol; the link status data of the network device is received, the optimal transmission path is calculated using the OSPF protocol, and the routing configuration is issued to the network device; according to the routing configuration, the weighted fair queuing algorithm is used to prioritize the data packets, and the bandwidth of each priority queue is limited and guaranteed through the flow control module to obtain a low-latency and highly reliable network transmission channel.

[0020] Specifically, according to the total amount of power cloud resources and the distribution of power grid equipment, the power cloud resources are divided into multiple sub-resource pools, and dedicated resource pools are set for key power grid equipment and sensitive loads. The resource pool management module is used to manage each sub-resource pool, and the resource usage of each sub-resource pool is monitored in real time through the minimum-maximum fairness algorithm to dynamically adjust resource allocation. The algorithm first allocates the minimum demand for each sub-resource pool, and then evenly distributes the remaining resources to the sub-resource pools with unmet demands until all resources are allocated or all sub-resource pools meet their demands. The network topology management module is used to monitor the network link status in real time. According to the link load and delay data, the Dijkstra shortest path algorithm is used to calculate the optimal network topology structure, and the network configuration instructions are issued through the OpenFlow protocol to dynamically adjust the network topology structure.

[0021] The OpenFlow protocol allows direct access to and operation of the forwarding plane of network devices, achieving refined control of network traffic. The routing policy management module is used to set different routing policies according to the service type and priority, and the OSPF (Open Shortest Path First) protocol is used to calculate the optimal transmission path. The routing configuration is sent to the network device through the router configuration delivery module to provide differentiated network transmission channels for services of different priorities. The OSPF protocol calculates the shortest path tree based on the link state database, sets different link metrics according to the service priority, and achieves differentiated routing. The network resource management module is used to set different queue priorities and bandwidth guarantee parameters according to the service priority, and the weighted fair queuing (WFQ) algorithm is used to prioritize the data packets. The traffic control module is used to limit and guarantee the bandwidth of each priority queue, providing a low-latency and highly reliable network transmission channel for key services. The WFQ algorithm assigns weights to each queue to ensure that high-priority services obtain more bandwidth resources. The traffic control module uses the token bucket algorithm for traffic shaping, limits the maximum sending rate of each queue, and guarantees the minimum bandwidth. In the power cloud resource division, assuming that the total resource volume is 100 units, 5 sub-resource pools are set. Among them, the minimum requirement of the dedicated resource pool for key equipment is 20 units, the minimum requirement of the dedicated resource pool for sensitive loads is 15 units, and the minimum requirement of the other three common resource pools is 10 units each. Applying the minimum-maximum fairness algorithm, the minimum requirement is met first, and the remaining 35 units of resources are evenly distributed to the five resource pools, each of which gets an additional 7 units. The final allocation result is: 27 units for the key equipment resource pool, 22 units for the sensitive load resource pool, and 17 units for each of the other three resource pools. The network topology management module detects that the load of a certain link reaches 80% and the delay exceeds 50 milliseconds. Use the Dijkstra algorithm to calculate the new optimal path and increase the weight value of the link by 50%. The OpenFlow controller sends flow table entries to the switch through the OpenFlow protocol, redefines the forwarding rules of the data packet, and diverts the traffic from the high-load link to the low-load link. The new network topology reduces the link load to 60% and the delay to 30 milliseconds. The routing policy management module sets the link metric of the OSPF protocol according to the service priority. For the highest priority service, the link metric is set to 50% of the baseline value; for the second highest priority service, it is set to 75% of the baseline value; the baseline value remains unchanged for ordinary services. The OSPF protocol calculates the shortest path tree based on these metrics and selects the optimal transmission path for services of different priorities. The router configuration delivery module sends the calculated routing table to each network device to achieve differentiated routing. In the network resource management module, the weighted fair queuing algorithm assigns weights to queues of different priorities. Assume that three priority queues are set, and the weights of the high, medium, and low priority queues are 4, 2, and 1 respectively.On a link with a bandwidth of 100Mbps, the high priority queue gets 57Mbps bandwidth, the medium priority queue gets 29Mbps bandwidth, and the low priority queue gets 14Mbps bandwidth. The traffic control module uses a token bucket algorithm for traffic shaping. The token generation rate matches the guaranteed bandwidth of the queue, and the bucket size is set to the maximum value of the burst traffic. When there are insufficient tokens, the excess packets are cached or discarded to ensure that the output traffic is smooth and meets the preset bandwidth limit.

[0022] S102: For each sub-resource pool, by analyzing the historical load data of the power grid equipment and the current system status, extract the periodicity, trend and randomness characteristics of the load, and update the load prediction result in real time.

[0023] The historical load data and current system status data of the power grid equipment are obtained, and the three-times standard deviation principle is used to detect abnormal values. The missing values ​​are filled by the mean interpolation method to obtain a valid load data set; based on the effective load data set, the spectrum analysis is performed using the fast Fourier transform, and the main periodic components are determined by peak detection to obtain a periodic load pattern; for the periodic load pattern, the three-parameter exponential smoothing method is used for trend analysis, and the smoothing parameters are optimized by minimizing the mean square error to obtain a trend load pattern; based on the periodic load pattern and the trend load pattern, a comprehensive load feature is formed, and the future load is predicted using the autoregressive moving average model, and the model parameters are estimated by the least squares method; if the p-value of the model residual is less than the preset threshold, the sliding window method is used to update the model input in combination with the current system status data, and the load prediction result is adjusted in real time.

[0024] Specifically, the historical load data and current system status data of power grid equipment are obtained from the database. For the equipment in each sub-resource pool, the Pandas library is used to preprocess the raw data. The 3σ principle is used to detect outliers, and data that exceeds the range of plus or minus 3 times the standard deviation of the mean is marked as abnormal. For missing values, the mean interpolation method is used to fill in the missing values, and the mean value of the historical data in this time period is calculated to replace the missing values. Through the above processing, a valid load data set is obtained. The preprocessed load data is spectrally analyzed using fast Fourier transform to identify the periodic characteristics of the load. The find_peaks function in the scipy library is used for peak detection, and the relative height threshold is set to 0.5 and the minimum interval is 24 hours. According to the detected peak frequency, the main periodic components, such as daily cycles, weekly cycles, or seasonal cycles, are determined. These periodic load patterns are passed as input to subsequent steps. The three-parameter exponential smoothing method (Holt-Winters method) is used to perform trend analysis on the load data. The initial smoothing parameters α = 0.2 (horizontal component), β = 0.1 (trend component), and γ = 0.05 (seasonal component) are set. These parameters are optimized by minimizing the mean square error. Calculate the moving average and weighting coefficient, extract the long-term trend and short-term fluctuation characteristics of the load, and obtain the trend load pattern. Combine the periodic load pattern and the trend load pattern to form a comprehensive load feature. According to the comprehensive load feature, the autoregressive moving average model is used to predict the future load. The model order is determined by the AIC criterion, and the model parameters are estimated by the least squares method. The residual analysis of the prediction results is performed, and the Ljung-Box test is used to determine the white noise characteristics of the residual. If the p value is less than 0.05, it indicates that there are still uncaptured patterns in the residual, and the model parameters need to be adjusted. Combined with the current system status data, including real-time load, temperature, and humidity, the sliding window method is used to update the model input and adjust the prediction results in real time. The prediction is updated every 15 minutes to ensure the real-time and accuracy of the load prediction. In actual application, the hourly load data and current system status of 10 transformers in a sub-resource pool for the past 365 days were obtained from the database of a power company. The data was preprocessed using the Pandas library, and it was found that 2% of the data points were missing and 5% of the data points were outliers. The 3σ principle is used to detect outliers, and data that exceeds the range of plus or minus 3 times the standard deviation of the mean is marked as abnormal. For missing values, the average value of the historical data in this time period is calculated for filling. After processing, a valid load data set is obtained, with a total of 87,600 data points. The preprocessed data is subjected to a fast Fourier transform to obtain a spectrum diagram. The find_peaks function of the scipy library is used for peak detection, and the relative height threshold is set to 0.5 and the minimum spacing is 24 hours. The test results show that the main periodic components are 24 hours (daily cycle) and 168 hours (weekly cycle). Based on this, a periodic load pattern is constructed as the basis for subsequent analysis.The Holt-Winters three-parameter exponential smoothing method is used for trend analysis. The initial setting of smoothing parameters is α=0.2, β=0.1, γ=0.05. These parameters are optimized by minimizing the mean square error, and finally α=0.3, β=0.15, γ=0.08 are obtained. The long-term trend is calculated to show an annual growth rate of 2.5%, and the short-term fluctuation range is ±10%. The periodic load pattern and the trend load pattern are combined to form a comprehensive load characteristic. Based on the comprehensive load characteristics, the autoregressive moving average model is used for prediction. The model order is determined to be ARIMA(2,1,2) by the AIC criterion. The model parameters are estimated using the least squares method. The Ljung-Box test is performed on the prediction results, and the p value is 0.08, which is greater than 0.05, indicating that the residual basically conforms to the white noise characteristics. Combined with the current system status data, including real-time load (currently 85% of the peak), temperature (28℃), and humidity (65%), a 30-minute sliding window is used to update the model input. The forecast is updated every 15 minutes and the latest forecast shows that the load will increase by 7% in the next 4 hours to 91% of the peak.

[0025] S103. Dynamically adjust the resource allocation strategy according to the prediction results, incorporate resource utilization, system response time, and migration overhead indicators into the objective function, solve the optimal solution set, and select the best resource allocation plan that meets the current business needs. By setting reasonable thresholds for utilization and system load indicators, determine whether to trigger the expansion and contraction threshold according to the best resource allocation plan. If the threshold is not exceeded, the current resource allocation state is maintained, and if the threshold is exceeded, expansion and contraction is triggered.

[0026] Construct a resource allocation objective function, wherein the objective function includes three parameters: utilization, response time, and migration overhead; use a genetic algorithm to solve the objective function and obtain multiple candidate resource allocation schemes that meet the constraints; according to the candidate resource allocation schemes, use the exponential moving average method to calculate the dynamic thresholds of resource utilization and response time; obtain the dynamic thresholds, compare the optimal resource allocation scheme with the current resource allocation state, and calculate the smoothed difference value; according to the smoothed difference value, determine whether to trigger the expansion and contraction threshold; if the expansion and contraction threshold is triggered, use the best adaptation algorithm for resource allocation; use a polling load balancing strategy to evenly distribute the new load to the available resources.

[0027] Specifically, the resource allocation objective function f(x) = w1 utilization + w2 / response time - w3 migration cost is constructed based on the prediction results, where w1, w2, and w3 are weight coefficients, which are set to 0.5, 0.3, and 0.2 respectively. The genetic algorithm is used to solve the objective function, and the population size is set to 100, the crossover rate is 0.8, the mutation rate is 0.1, and the number of iterations is 1000. In this way, multiple optimal solution sets that meet the constraints are obtained as candidate resource allocation schemes. The best solution that meets the current business needs is selected from the candidate resource allocation schemes. The dynamic thresholds of resource utilization and response time are calculated using the exponential moving average method. The calculation formula is: EMA(t) = α*current value + (1-α)*EMA(t-1), where α is set to 0.2. The upper threshold of resource utilization is set to 1.1 times the EMA value, the upper threshold of system response time is set to 1.2 times the EMA value, and the upper threshold of migration cost is set to 5% of the total resources. The scheme that is closest but does not exceed these thresholds is selected as the best resource allocation scheme. Compare the optimal resource allocation scheme with the current resource allocation status, and calculate the utilization difference and system load difference of the three types of resources, CPU, memory, and storage. Introduce a smoothing factor β = 0.8, and calculate the smoothed difference value: smoothed difference = β * current difference + (1-β) * previous cycle difference. Set the CPU expansion trigger threshold to a positive smoothing difference exceeding 15%, and the shrinkage trigger threshold to a negative smoothing difference exceeding 20%; the expansion and shrinkage trigger thresholds for memory and storage are set to 10% and 25% respectively. Determine whether to trigger expansion and shrinkage based on these thresholds. If the expansion and shrinkage thresholds are triggered, adjust the resource configuration according to the optimal resource allocation scheme. Use the best adaptation algorithm for resource allocation, sort the resources to be allocated by size, and find the smallest free resource block that can accommodate it. Use the polling load balancing strategy to evenly distribute the new load to the available resources. When formulating a migration plan, give priority to source nodes with lower loads and target nodes with higher loads to minimize migration overhead. If a conflict or failure occurs during resource allocation, roll back to the previous stable state, record the cause of the failure, and wait for the next scheduling cycle to retry. If the expansion and contraction threshold is not triggered, the current resource allocation state is maintained unchanged and the system operation state continues to be monitored. In the resource dispatching system of a certain power company, the resource allocation objective function f(x) = 0.5 utilization + 0.3 / response time - 0.2 migration overhead is constructed based on the prediction results. The genetic algorithm is used to solve the problem, and the population size is set to 100, the crossover rate is 0.8, the mutation rate is 0.1, and the iteration is 1000 times. 10 candidate resource allocation schemes are obtained, with a utilization range of 80%-95%, a response time of 150ms-250ms, and a migration overhead of 3%-7%. The dynamic threshold is calculated using the exponential moving average method, and the α value is 0.2. The current EMA utilization is 85% and the response time is 200ms. Set the upper threshold: utilization 93.5%, response time 240ms, and migration overhead 5%.The best solution is selected: utilization 92%, response time 230ms, migration overhead 4.8%. Compared with the current state (utilization 78%, response time 260ms), the difference is calculated and a smoothing factor β=0.8 is introduced. The CPU utilization smoothing difference is 14%, memory 9%, and storage 6%. The CPU does not trigger expansion (threshold 15%), the memory triggers expansion (threshold 10%), and the storage does not trigger (threshold 25%). According to the best solution, 2GB of memory resources are allocated using the best adaptation algorithm. The newly added load of 50 concurrent requests is allocated to 5 servers through a polling strategy. Select source node A with a load of 40% to migrate 100MB of data to target node B with a load of 85%. Network jitter occurs during the migration process, and the operation is immediately rolled back, the reason for "network instability" is recorded, and wait for the next scheduling cycle to try again.

[0028] Establish an explainable mechanism for resource allocation decisions, record the decision basis and reasoning process at key decision nodes, and form a decision path diagram. When resource allocation anomalies occur, trace back through the decision path to locate the cause of the problem, and adjust the optimization goals, constraints, and decision rules accordingly.

[0029] Construct a directed acyclic graph structure to record the key decision nodes in the resource allocation process; connect the decision nodes through directed edges to form a decision path graph; use an adjacency list to store the decision path graph, and each decision node maintains a list of child nodes. Use the forward linking reasoning method to implement rule reasoning, extract predefined rule sets from the expert knowledge base; generate supplementary rules through the decision tree learning algorithm; analyze the input data of each decision node, apply the matching rules one by one, and generate the reasoning process; store the reasoning process and intermediate results in the corresponding decision node. Set the normal range thresholds for resource utilization and response time; if the actual indicator value is detected to be beyond the expected range, trigger the anomaly detection mechanism. Starting from the abnormal point, trace back along the decision path graph structure, analyze the input data, decision rules and reasoning process of each decision node; by comparing the expected results and actual results of each decision node, calculate the degree of deviation, and locate the root node that causes the abnormality. For the located problem nodes, extract their decision rules and constraints; use genetic algorithms to optimize decision rule parameters and encode rule parameters as chromosomes; design a function with the degree of improvement of abnormal indicators as fitness; iteratively optimize parameters through selection, crossover and mutation operations; adjust the weights of each indicator in the optimization objective function according to the backtracking results; write the optimized rules and parameters back to the decision rule library.

[0030] Specifically, a directed acyclic graph (DAG) structure is constructed to record the key decision nodes in the resource allocation process. Each node contains a timestamp, input data, decision rule ID, and output result. The nodes are connected by directed edges to form a complete decision path diagram. The adjacency list is used to store the DAG, and each node maintains a list of child nodes for fast traversal and backtracking. The forward linking reasoning method is used to implement rule reasoning. The predefined rule set is extracted from the expert knowledge base, and the supplementary rules are generated through the decision tree learning algorithm. The input data of each decision node is analyzed, and the matching rules are applied one by one to generate the reasoning process. The reasoning steps and intermediate results are stored in the corresponding decision node, including the rule ID used, matching conditions, and reasoning results. The normal range thresholds for resource utilization and response time are set. When the actual indicator value is detected to be beyond the expected range, the anomaly detection mechanism is triggered. Starting from the anomaly point, trace back along the DAG structure to analyze the input data, decision rules, and reasoning process of each decision node. By comparing the expected results and actual results of each node, the degree of deviation is calculated, and the root node causing the anomaly is located. For the located problem node, its decision rules and constraints are extracted. Genetic algorithm is used to optimize decision rule parameters, rule parameters are encoded as chromosomes, and a function with the degree of improvement of abnormal indicators as fitness is designed. Parameters are iteratively optimized through selection, crossover and mutation operations. According to the backtracking results, the weights of each indicator in the optimization objective function are adjusted to reflect the sensitivity of the current system state to different indicators. The optimized rules and parameters are written back to the decision rule library to achieve adaptive adjustment of the decision mechanism. In a power resource dispatching system, a directed acyclic graph (DAG) structure containing 100 nodes is constructed to record the decision process of resource allocation. Each node stores a timestamp (accurate to milliseconds), input data (such as current load 80%, response time 150ms), decision rule ID (such as Rule_001) and output results (such as allocating 2GB of memory). Adjacency lists are used to store DAG, with an average of 3 child nodes per node. The system extracts 500 predefined rules from the expert knowledge base and generates 200 supplementary rules through the decision tree learning algorithm. The forward chaining reasoning method is used to apply matching rules to the input data one by one. For example, when it is detected that the CPU utilization exceeds 90%, Rule_002 is triggered and it is recommended to add 1 CPU core. The system sets normal range thresholds for key indicators: CPU utilization 75%-95%, memory utilization 70%-90%, and response time <200ms. When the CPU utilization is detected to reach 98%, the anomaly detection mechanism is triggered. Starting from the anomaly point, the system traces back 15 nodes along the DAG structure and finds that at a decision node 10 minutes ago, the memory utilization was mistakenly misjudged as 70% (actually 90%), resulting in the failure to allocate additional memory in time, which in turn caused CPU overload. For this problem node, the system extracts 5 relevant decision rules and 2 constraints.The parameters of these rules were optimized using a genetic algorithm, with a population size of 100 and 50 iterations. After optimization, the accuracy of memory threshold judgment was improved to ±2%. The system updated the decision rule library accordingly and increased the weight of memory usage in the optimization objective function from 0.3 to 0.4, reflecting the current system's sensitivity to memory resources.

[0031] S104. When the system load index exceeds the threshold, resources need to be expanded or reduced. An incremental resource migration strategy is adopted to divide the power grid business data and computing tasks to be migrated into multiple small batches, establish a data synchronization channel between the source node and the target node, ensure data consistency through atomic operations, and dynamically adjust the batch size and migration rate according to the migration progress to complete the incremental resource migration.

[0032] Obtain system load indicators, and set resource expansion and contraction thresholds according to the system load indicators; collect system load data through a resource monitoring module, and if the system load data continuously exceeds the resource expansion and contraction threshold, determine to start resource migration; use a consistent hashing algorithm to divide the power grid business data and computing tasks to be migrated into multiple small batches to obtain data batches to be migrated; use a weighted polling load balancing algorithm to determine the number of data batches to be migrated according to the processing capabilities of the source node and the target node; establish a two-way data synchronization channel between the source node and the target node; use a timestamp-based version number mechanism to assign a unique version number to each data item; resolve data conflicts by comparing the version numbers to obtain the latest version of the data; use a two-phase commit protocol to migrate data; verify data consistency in the commit phase, and roll back the operation if the verification fails; ensure the atomicity of data migration through the two-phase commit protocol; obtain the migration progress, and dynamically adjust the batch size and migration rate according to the migration progress; use a PID controller as the core of the adaptive adjustment algorithm to calculate the deviation between the actual migration speed and the target speed; if the deviation is positive, increase the batch size or increase the number of migration concurrency; if the deviation is negative, reduce the batch size or reduce the migration rate.

[0033] Specifically, resource expansion and contraction thresholds are set according to system load indicators. For CPU-intensive tasks, resource expansion is triggered when CPU utilization exceeds 85%, and resource contraction is triggered when it is less than 30%. For memory-intensive tasks, resource expansion is triggered when memory utilization exceeds 80%, and resource contraction is triggered when it is less than 25%. System load data is collected every 5 seconds through the resource monitoring module, and resource migration is initiated when the sampling results exceed the threshold for 10 consecutive times. The consistent hashing algorithm is used to divide the power grid business data and computing tasks to be migrated into multiple small batches, and the size of each batch is initially set to 10MB. The weighted polling load balancing algorithm is used to assign weights according to the processing capabilities of the source node and the target node, and the initial batch number is calculated. For computing tasks, the task execution status and context information are recorded to ensure that execution can be resumed after migration. A two-way data synchronization channel is established between the source node and the target node, and a timestamp-based version number mechanism is used to ensure data consistency. Each data item is assigned a unique version number, which consists of a 64-bit timestamp and a 32-bit sequence number. During data transmission, conflicts are resolved by comparing version numbers and the latest version is retained. The two-phase commit protocol is used to ensure the atomicity of data migration. The data consistency is verified in the commit phase. If the verification fails, the operation is rolled back. The batch size and migration rate are dynamically adjusted according to the migration progress, and the PID (proportional-integral-differential) controller is used as the core of the adaptive adjustment algorithm. The target migration speed is set to 100MB / s, and the deviation between the actual migration speed and the target speed is calculated every 10 seconds. If the deviation is positive, the batch size is increased or the number of migration concurrency is increased; if the deviation is negative, the batch size is reduced or the migration rate is reduced. For computing tasks, after the migration is completed, the task state recovery mechanism is used to restart the task according to the recorded context information. In this way, the incremental migration of power grid business data and computing tasks is achieved. In the resource scheduling system of a power company, dynamic resource expansion and contraction thresholds are set. For CPU-intensive tasks, such as real-time load forecasting, expansion is triggered when the average value of CPU utilization for 10 consecutive 5-second samples exceeds 85%, and contraction is triggered when it is lower than 30%. For memory-intensive tasks, such as massive data analysis, expansion is triggered when the average value of memory utilization for 10 consecutive samples exceeds 80%, and contraction is triggered when it is lower than 25%. After the system detects that 1TB of data and 100 computing tasks need to be migrated, the consistent hashing algorithm is used to divide the data into 100,000 batches of 10MB. These batches are assigned to 5 target nodes through a weighted polling algorithm with a weight ratio of 3:3:2:1:1. A 10Gbps bidirectional synchronization channel is established between the source node and the target node, and a timestamp-based version number mechanism is used to ensure data consistency. The version number of each data item consists of the current timestamp (accurate to milliseconds) and a sequence number from 0 to 9999. A two-phase commit protocol is used, and the SHA-256 hash value is used to verify data integrity during the commit phase.The system sets the target migration speed to 1GB / s and uses a PID controller to dynamically adjust parameters. The P value is set to 0.5, the I value is 0.1, and the D value is 0.05. The deviation is calculated every 10 seconds. When the actual speed is 800MB / s, the system increases the batch size from 10MB to 12MB and increases the number of concurrent transmissions from 100 to 120. For computing tasks, after the migration is completed, the system resumes the execution state on the target node based on the recorded context information, and the average recovery time does not exceed 500ms.

[0034] During the migration process, the load conditions of the source and target nodes and the network bandwidth runtime data are collected in real time, and performance bottlenecks or abnormal conditions are continuously monitored and accurately located. The migration strategy is dynamically adjusted according to the fault type and impact scope, including pausing migration, limiting the flow, and retrying, to ensure the stability and reliability of the migration.

[0035] A distributed monitoring agent is used to collect CPU utilization, memory usage, disk I / O, and network throughput in real time on the source node and the target node to obtain load data. Based on the load data, anomaly detection is performed using the isolation forest algorithm, and dynamic thresholds are set for different indicators. If an indicator exceeds the threshold, an abnormal alarm is triggered, and the time, duration, and scope of the abnormality are recorded. The abnormal alarm information is obtained, and the abnormal symptoms are classified using the decision tree algorithm. Based on the classification results of the decision tree algorithm, a dynamically adjusted migration strategy is executed. Based on the execution of the migration strategy, the migration progress, resource usage, and abnormal events are displayed in real time through the Web interface.

[0036] Specifically, a distributed monitoring agent is used to collect CPU utilization, memory usage, disk I / O, and network throughput in real time on the source node and the target node. The collected load data is stored in the InfluxDB time series database, and the sampling interval is set to 5 seconds. The historical data of the last 24 hours is retained. The continuous query function of InfluxDB is used to calculate the average value of the indicators in the last 5 minutes every 1 minute for subsequent analysis. The isolated forest algorithm is used to detect anomalies in the collected load data, and dynamic thresholds are set for different indicators. For CPU and memory usage, the moving average and standard deviation of the past hour are calculated, and the threshold is set to the average plus 3 times the standard deviation; for network throughput, considering daily fluctuations, the threshold is set to 1.5 times the 95% quantile of the past 24 hours. When an indicator exceeds the threshold, an abnormal alarm is triggered, the time, duration, and impact range of the abnormality are recorded, and the alarm information is pushed to the fault diagnosis module. According to the abnormal alarm information, the fault diagnosis module is called for precise positioning. The decision tree algorithm is used to classify abnormal symptoms, and the features include CPU usage, memory usage, disk I / O rate, network packet loss rate, and network delay. The optimal features are selected by information gain ratio, and a decision tree is constructed. The fault types are subdivided into three categories: network congestion (including packet loss, high latency), resource exhaustion (CPU overload, insufficient memory, full disk), and service crash. The corresponding processing strategies are selected for different fault types. Dynamically adjusted migration strategies are implemented, and the rule engine is used to generate processing strategies based on the fault type and historical processing effects. If network congestion is detected, the adaptive current limiting mechanism is activated to dynamically adjust the migration rate to 80% of the current available bandwidth; if resource exhaustion is found, the migration task checkpoint is saved, the migration is suspended and waits for resource release, and the migration is resumed from the most recent checkpoint after resource recovery; if a service crash occurs, the exponential backoff retry mechanism is activated, with an initial waiting time of 30 seconds, and the waiting time doubles after each retry failure, with a maximum of 3 retries. At the same time, the migration progress, resource usage, and abnormal events are displayed in real time through the Web interface, and a visual monitoring panel is provided to facilitate timely discovery and processing of problems, ensuring the stability and reliability of the migration process. In a data center migration project of a power company, a distributed monitoring agent was deployed to collect performance indicators of source and target nodes every 5 seconds. Use InfluxDB to store this data and keep 24-hour history. Through continuous query, the average value of the last 5 minutes is calculated every minute. For example, the CPU usage fluctuates from 70% to 95%, the memory usage is stable at 85%, and the network throughput fluctuates between 500Mbps and 2Gbps. The Isolation Forest algorithm performs anomaly detection on this data, setting the CPU and memory usage thresholds to the 1-hour moving average plus 3 times the standard deviation, and the network throughput threshold to 1.5 times the 24-hour 95% quantile. When it is detected that the CPU usage exceeds 98% for 10 minutes, an abnormal alarm is triggered.The decision tree algorithm then analyzes the anomaly, selects features by information gain ratio, and constructs a 5-layer deep decision tree. The diagnosis result is displayed as "CPU resource exhaustion", which belongs to the resource exhaustion type of fault. The rule engine generates a processing strategy based on this diagnosis, triggers the migration task checkpoint save, and suspends the 3 virtual machine migration tasks currently in progress. The system records the checkpoint information, including the amount of data migrated (280GB) and the amount of remaining data (120GB). After waiting for 5 minutes, the CPU utilization rate dropped to 75%, and the system automatically resumed the migration from the checkpoint. At the same time, the Web monitoring panel is updated in real time, showing that the migration progress has recovered from 70% to 71%, and the estimated remaining time is 40 minutes.

[0037] S105. After incremental resource migration, the consistent hashing algorithm is used to route the power grid control request to the corresponding computing node within the sub-resource pool. Load balancing is achieved by dynamically adjusting the number and distribution of virtual nodes in the hash ring, and the weight of the virtual node is dynamically adjusted according to the node's load optimization index to adapt to changes in the power grid load.

[0038] According to the number and performance parameters of computing nodes in the sub-resource pool, the consistent hash ring is initialized, a preset number of virtual nodes are allocated to each physical node, and the virtual nodes are evenly distributed on the hash ring to obtain the initial request routing mapping relationship. A dynamic monitoring mechanism is adopted to collect the performance indicators of computing nodes at preset time intervals, and the comprehensive load score of the computing node is calculated according to the performance indicators and their corresponding preset weight values. If the comprehensive load score is lower than the preset first threshold, a preset number of virtual nodes are added to the computing node; if the comprehensive load score is higher than the preset second threshold, a preset number of virtual nodes are reduced for the computing node. For the virtual nodes, a weighted polling algorithm is used to allocate weights, wherein the weight value is obtained by a preset weight calculation formula. The number of requests is allocated according to the node weight ratio, and nodes with weights higher than the preset threshold receive more requests. The historical load data is analyzed by the ARI MA model to predict the load changes in the future. If the predicted load change exceeds the preset threshold, the virtual node redistribution mechanism is triggered. For power grid control requests, the requests are divided into different priorities according to the preset priority classification rules, and different routing strategies are adopted according to the priorities.

[0039] Specifically, according to the number and performance parameters of computing nodes in the sub-resource pool, the consistent hash ring is initialized, 100 virtual nodes are allocated to each physical node, the hash value of the virtual node is calculated by the MD5 hash algorithm, and the virtual nodes are evenly distributed on the hash ring to form the initial request routing mapping relationship. When a new physical node is added, 100 virtual nodes are allocated to it and inserted into the hash ring; when a physical node is deleted, its corresponding virtual node is removed, and the affected request is rerouted to the next virtual node in the clockwise direction. A dynamic monitoring mechanism is adopted to collect the CPU utilization, memory utilization, disk I / O and network throughput of the computing node every 5 seconds, and the weighted average method is used to calculate the comprehensive load score of the node. The CPU utilization weight is set to 0.4, the memory utilization weight is set to 0.3, the disk I / O weight is set to 0.2, and the network throughput weight is set to 0.1. The number of virtual nodes is dynamically adjusted according to the load score. For nodes with a load score lower than 0.3, 20 virtual nodes are added; for nodes with a load score higher than 0.7, 20 virtual nodes are reduced. The weighted polling algorithm is used to assign weights to virtual nodes. The weight value calculation formula is: weight = 1 / (α*resource utilization + β*response time), where α and β are adjustable system parameters, and the initial values ​​are both set to 0.5. When routing requests, the number of requests is allocated according to the node weight ratio, and the node with higher weight receives more requests. When a request arrives, the hash value of the request is calculated, and the first virtual node is found clockwise on the hash ring. Then, whether to process the request is determined based on the weight of the physical node to which the virtual node belongs. Real-time load forecasting is performed through the ARI MA model, and the load change within the next 30 minutes is predicted based on the historical load data of the past 24 hours. If the predicted load change exceeds 20%, the virtual node redistribution mechanism is triggered. At the same time, the power grid control requests are classified and prioritized, and the requests are divided into high priority (such as emergency control instructions), medium priority (such as regular monitoring data) and low priority (such as historical data query). High priority requests are directly sent to the node with the lowest load, and medium and low priority requests are routed according to the consistent hashing algorithm. In this way, a rapid response to power grid load changes and efficient use of resources are achieved. In the intelligent dispatch center of a power company, the sub-resource pool contains 10 computing nodes. The system initializes the consistent hash ring and allocates 100 virtual nodes to each node, with a total of 1,000 virtual nodes distributed on the hash ring. When a high-performance node is added, the system automatically allocates 100 virtual nodes to it, and the hash ring expands to 1,100 virtual nodes. Dynamic monitoring shows that the CPU utilization of node 1 is 75%, the memory utilization is 80%, the disk I / O is 500IOPS, the network throughput is 2Gbps, and the comprehensive load score is calculated to be 0.745. The system then reduces the number of virtual nodes of node 1 to 80. At the same time, the comprehensive load score of node 2 is 0.28, and the system increases its virtual nodes to 120.The weighted polling algorithm calculates that the weight of node 1 is 0.63, and the weight of node 2 is 1.25. When a high-priority control request with a hash value of 0x3F5A8 arrives, the system directly routes it to node 2, which has the lowest current load. The next medium-priority request with a hash value of 0x7B2C1 falls within the virtual node range of node 3, and the system routes it to node 3 using the consistent hashing algorithm. The ARI MA model predicts that the system load will increase by 25% in 30 minutes, triggering the virtual node redistribution mechanism. The system automatically adjusts the number of virtual nodes on each node so that nodes with lighter loads can handle more requests.

[0040] S106. Using load optimization indicators, we build resource utilization prediction models for different types of resources, including CPU, memory, and disk. We use long short-term memory networks to model their usage trends and correct short-term fluctuations. We adaptively adjust the resource allocation granularity by setting dynamic thresholds to obtain resource utilization prediction results, thereby maximizing resource utilization while ensuring grid control performance.

[0041] For CPU, memory, and disk resource types, historical resource utilization data is obtained and preprocessed using a long short-term memory network model. According to the preprocessed data, short-term fluctuations are corrected by a sliding window method. If an outlier is identified using the z-score method, the outlier is subjected to local weighted regression smoothing. According to the smoothed data, a dynamic resource utilization threshold is set. If the predicted resource utilization exceeds the dynamic resource utilization threshold, adaptive adjustment of the resource allocation granularity is triggered. Based on the prediction results and the dynamic threshold, a multi-level resource allocation granularity adjustment strategy is implemented. The multi-level resource allocation granularity adjustment strategy includes: high priority service resource allocation, medium priority service resource allocation, and low priority service resource allocation. A power grid control performance indicator is obtained from the multi-level resource allocation granularity adjustment strategy. It is determined whether the power grid control performance indicator is close to a preset threshold. If the power grid control performance indicator is close to a preset threshold, resource allocation for high priority services is prioritized. By compressing the resource quota of low priority services, a resource allocation scheme that maximizes overall resource utilization is obtained.

[0042] Specifically, for the three resource types of CPU, memory, and disk, long short-term memory network models are constructed respectively. The historical resource utilization data is collected for preprocessing, including data normalization and missing value filling. The number of neurons in the input layer is set to 24, the hidden layer is 2 layers with 128 neurons in each layer, and the output layer is 1 neuron. The Adam optimizer is used, the learning rate is set to 0.001, the batch size is 64, the number of training rounds is 100, and the optimal model is selected through cross-validation to predict the resource utilization in the next hour. The sliding window method is used to correct short-term fluctuations, and the window size is set to 30 minutes, sliding every 5 minutes. The z-score method is used to identify outliers, and data points with a z-score greater than 3 are marked as abnormal. For outliers, the local weighted regression smoothing technique is used for processing, the weight function uses the Gaussian kernel function, and the bandwidth parameter is set to 0.7. The corrected data is used as input and re-prediction is performed to improve the prediction accuracy. According to the power grid control performance requirements, dynamic resource utilization thresholds are set, including CPU resource thresholds, memory resource thresholds, and disk resource thresholds. . For CPU resources, the initial threshold is set to 80%. Considering the burst load, the threshold can be exceeded in a short time. The initial threshold of memory resources is set to 75%. Considering the risk of memory leakage, a slowly increasing threshold adjustment strategy is set. The initial threshold of disk resources is set to 70%. Considering the risk of file system performance degradation, a step-by-step threshold adjustment is adopted. The threshold is dynamically adjusted using the exponential smoothing method, and the smoothing coefficient is set to 0.2. When the predicted resource utilization exceeds the threshold, the adaptive adjustment of the resource allocation granularity is triggered. Based on the prediction results and dynamic thresholds, a multi-level resource allocation granularity adjustment strategy is implemented. Three priority levels, high, medium, and low, are set to correspond to different business types. High-priority businesses (such as real-time control instructions) use the finest granularity allocation, 0.1 core / 0.1GB memory / 1GB disk; medium-priority businesses (such as data acquisition) use medium granularity, 0.5 core / 0.5GB memory / 5GB disk; low-priority businesses (such as offline analysis) use coarse granularity, 1 core / 1GB memory / 10GB disk. At the same time, power grid control performance indicators are set, including control instruction response time not exceeding 100ms, data acquisition delay not exceeding 1s, and control accuracy error not exceeding 0.1%. When the performance index approaches the threshold, the resource allocation of high-priority services is prioritized, and the resource quota of low-priority services is compressed when necessary to maximize the overall resource utilization while ensuring the control performance of the power grid. In a smart grid dispatching center, the system builds long and short-term memory network models for CPU, memory, and disk resources respectively. Taking CPU resources as an example, historical data from the past 30 days were collected, with a total of 43,200 data points. After data preprocessing, 24 input neurons, 2 hidden layers with 128 neurons each, and 1 output neuron were set. After 100 rounds of training, the root mean square error of the model on the test set dropped to 0.03.The prediction shows that the CPU usage will rise from the current 65% to 78% in the next hour. The system then starts the sliding window mechanism with a window size of 30 minutes and slides every 5 minutes. The z-score method detects 3 outliers with z-scores of 3.2, 3.5, and 3.8. The local weighted regression smoothing technique is used to process these outliers, and the bandwidth parameter of the Gaussian kernel function is set to 0.7. After processing, the predicted CPU usage value is corrected to 75%. Based on this, the system dynamically adjusts the CPU resource threshold from the initial 80% to 82%. At the same time, it is detected that a high-priority real-time control instruction task is coming, which is expected to require 0.3 cores of CPU resources. The system immediately starts a multi-level resource allocation strategy to allocate 0.3 cores of CPU to the task, and at the same time reduces the CPU allocation of a low-priority offline analysis task from 1 core to 0.7 cores. Throughout the process, the system continuously monitors the control instruction response time and keeps it within 95ms, meeting the performance requirement of no more than 100ms. Through this refined resource management, the system has increased the CPU resource utilization from the original 65% to 79% while ensuring the power grid control performance, significantly improving resource utilization efficiency.

[0043] In the resource allocation process, the dependencies between different resources of power grid equipment are combined and used as constraints in resource allocation decisions to avoid performance bottlenecks and failure risks caused by resource dependencies and improve the safety and stability of the power grid.

[0044] A power grid equipment resource dependency graph is constructed, wherein the dependency graph stores resource dependencies between devices through a graph database, wherein nodes represent devices and edges represent dependencies; a resource allocation constraint matrix is ​​designed according to the dependency graph, wherein rows of the constraint matrix represent devices, columns represent resource types, and matrix elements represent resource allocation constraints; a dynamic resource allocation adjustment mechanism is implemented by real-time monitoring of resource usage of each device, wherein the adjustment mechanism sets multi-level early warning thresholds; if it is detected that the resource usage rate of a certain device exceeds a preset threshold, an improved greedy algorithm is used to perform local resource adjustment, wherein the greedy algorithm selects adjacent devices with the strongest dependency and calculates the amount of schedulable resources; the historical failure rate of equipment, resource usage volatility, dependency strength, and equipment importance score are obtained, and a resource allocation risk assessment model is established, wherein the risk assessment model uses a random forest algorithm to train a risk prediction model and performs a risk score on each resource allocation decision.

[0045] Specifically, a resource dependency graph of power grid equipment is constructed, and the resource dependency between devices is stored in a graph database. Nodes represent devices, and edges represent dependencies. The dependency weight is determined based on historical data analysis. The resource usage correlation coefficient between two devices in the past 30 days is calculated, and the correlation coefficient is mapped to the interval of 0-1 as the weight. A depth-first search algorithm is used to traverse the dependency graph, identify critical paths and potential bottlenecks, and store the results in a relational database for subsequent constraint matrix construction. A resource allocation constraint matrix is ​​designed, where the rows of the matrix represent devices, the columns represent resource types, and the matrix elements represent resource allocation constraints. According to the dependency graph results, resource allocation ratio constraints are set between related devices. Constraints include minimum demand (based on historical minimum usage), maximum load (based on device specifications), and dependency coefficients (based on weight conversion). The simplex method is used as a linear programming solver, and the objective function is set to maximize overall resource utilization to solve the optimal resource allocation solution that meets all constraints. A dynamic resource allocation adjustment mechanism is implemented, and multi-level warning thresholds are set by real-time monitoring of the resource usage of each device: warning (80%), severe (90%), and critical (95%). When it is detected that the resource utilization rate of a certain device exceeds the preset threshold, the resource reallocation process is triggered. The improved greedy algorithm is used for local resource adjustment: first, the adjacent device with the strongest dependency is selected, the amount of dispatchable resources is calculated, and the resources are gradually allocated until the demand is met or there are no available resources. If the local adjustment cannot be solved, the global reallocation is initiated. A resource allocation risk assessment model is established, and the input features include: historical equipment failure rate, resource usage volatility, dependency strength, and equipment importance score. The features are standardized and the principal component analysis is used for dimensionality reduction. The random forest algorithm is used to train the risk prediction model, the number of trees is set to 100, the maximum depth is set to 10, and the parameters are optimized using cross-validation. Risk scores are given to each resource allocation decision, and the risk threshold is set to 0.7. When the risk score exceeds the threshold, the emergency handling process is automatically called, including the activation of backup resources and load transfer, to ensure the stable operation of the system. In a smart grid dispatching center, the system constructed a resource dependency graph containing 500 device nodes. By analyzing the historical data of the past 30 days, the resource usage correlation coefficient between devices is calculated. For example, the correlation coefficient between substations A and B is 0.85, which is mapped to a dependency weight of 0.85. The depth-first search algorithm identifies three critical paths and five potential bottlenecks. Based on this information, the system generates a 500x4 resource allocation constraint matrix, including four resource types: CPU, memory, storage, and network bandwidth. The simplex method is used to solve the linear programming problem and obtain the initial optimal resource allocation plan. Real-time monitoring shows that the CPU usage of substation C reaches the warning threshold of 82%, triggering the resource reallocation process.The improved greedy algorithm first selects the substation D (weight 0.9) with the strongest dependency on C, and dispatches 0.5 cores of CPU resources from D to C, reducing the CPU usage of C to 75%. At the same time, the risk assessment model scores this adjustment, with input features including the recent failure rate of C station 1.2%, resource usage fluctuation coefficient 0.15, dependency strength with D station 0.9, and importance score 9.2 (full score 10). After standardization and principal component analysis dimensionality reduction, the random forest model (100 trees, maximum depth 10) gives a risk score of 0.65, which is lower than the threshold of 0.7. The system confirms that this adjustment is safe and effective.

[0046] S107. According to the differences in resource requirements of heterogeneous devices in the power system, the hierarchical analysis method is used to classify the importance and sensitivity of the devices to obtain the device classification results. The resource utilization prediction results are integrated with the device classification results to dynamically adjust the allocation ratio of resources at each level to ensure that key equipment and sensitive loads always have sufficient computing resources, while taking into account the resource requirements of non-critical businesses, and realizing the global optimization configuration of power cloud resources.

[0047] The equipment evaluation model is constructed by using the hierarchical analysis method to obtain two first-level indicators of equipment importance and sensitivity. The first-level indicators are divided into business impact, fault impact, and resource consumption second-level indicators. According to the equipment evaluation model, the equipment hierarchical classification results are obtained, including three levels: critical, important, and ordinary. A resource utilization prediction model is constructed based on the long short-term memory network to predict four types of resources: CPU, memory, storage, and network bandwidth. If it is detected that the resource utilization exceeds the preset threshold, the resource reallocation process is triggered. The resource reallocation process includes: designing a resource allocation optimization algorithm, taking the equipment hierarchical classification results as constraints, and the resource utilization prediction results as objective functions. The resource quotas of each level of equipment are adjusted in real time through the resource pool management module, and the resource quota adjustment is based on the calculation results of the resource allocation optimization algorithm. According to the resource quota adjustment results, the resource allocation scheme evaluation is performed to calculate the deviation between the actual resource utilization and the predicted value. If the deviation exceeds the preset threshold, the optimization iteration of the resource allocation scheme is triggered to achieve continuous global optimization configuration of power cloud resources.

[0048] Specifically, the equipment evaluation model is constructed by using the hierarchical analysis method, and two first-level indicators, namely equipment importance and sensitivity, are set, which are divided into business impact, fault impact, and resource consumption. Each indicator is quantified by the expert scoring method. The business impact is based on the criticality score of the business supported by the equipment (1-10 points), the fault impact is based on the average fault duration and impact range calculated based on historical fault data, and the resource consumption is calculated based on the average resource utilization rate in the past 30 days. The paired comparison method is used to determine the weight of each indicator, and the heterogeneous equipment in the power system is scored. According to the scoring results, the equipment is divided into three levels: critical, important, and ordinary. A resource utilization prediction model is constructed based on the long short-term memory network, targeting four types of resources: CPU, memory, storage, and network bandwidth. The network structure includes 1 input layer (24 neurons, corresponding to 24 hours of historical data), 2 hidden layers (128 neurons in each layer), and 1 output layer (24 neurons, predicting the next 24 hours of data). The historical resource usage data and the current system status are input, and the equipment level is input into the network as one of the features to predict the resource utilization curve for the next 24 hours, and the expected usage of various resources is obtained. Design a resource allocation optimization algorithm, take the equipment stratification and grading results as constraints, and the resource utilization prediction results as the objective function. The objective function is designed to maximize the overall resource utilization while ensuring the resource demand satisfaction rate of each level of equipment. Genetic algorithm is used to solve the optimal resource allocation scheme. The encoding method is real number encoding, and each gene represents the resource allocation ratio of a device. Set the population size to 100, the crossover rate to 0.8, the mutation rate to 0.1, and the number of iterations to 1000. The fitness function considers the weighted sum of resource utilization and the demand satisfaction rate of each level of equipment. The selection operation uses the roulette method, the crossover operation uses arithmetic crossover, and the mutation operation uses uniform mutation. Implement a dynamic resource adjustment mechanism and set resource utilization thresholds, CPU and memory to 85%, storage to 80%, and network bandwidth to 90%. When it is detected that the utilization of a certain type of resource exceeds the threshold, the resource reallocation process is triggered. Prioritize the resource demand of key level equipment, and set the minimum guaranteed resource volume for important level and ordinary level equipment, which is 80% and 60% of the predicted demand, respectively. The resource quota of each level of equipment is adjusted in real time through the resource pool management module. The resource allocation plan is evaluated every 5 minutes to calculate the deviation between the actual resource utilization and the predicted value. When the deviation exceeds 10%, the optimization iteration of the resource allocation plan is triggered to achieve continuous global optimization configuration of power cloud resources. In a smart grid dispatching center, the system evaluated and optimized resources for 1,000 heterogeneous devices. In the evaluation model constructed by the hierarchical analysis method, the weights of business impact, fault impact and resource consumption are 0.5, 0.3 and 0.2 respectively. The expert rating shows that the business impact score of the main controller is 9.5, the average fault duration in the past 30 days is 15 minutes, the impact range covers 80% of users, and the resource consumption rate is 75%. After calculation, the total score of the device is 9.1, which is classified as a critical level.The long short-term memory network prediction model training used historical data from the past 90 days and achieved 95% accuracy on the test set. The prediction results show that the CPU utilization of the main controller will climb from 70% to 88% in the next 24 hours, triggering the resource reallocation process. The genetic algorithm began to optimize resource allocation with a population size of 100. After 1,000 iterations, the optimal solution was obtained: an additional 20% of CPU resources were allocated to the main controller, while 4% of CPU resources were recovered from each of the five ordinary-level devices. The resource pool management module executed this solution, increasing the CPU quota of the main controller from 4 cores to 4.8 cores. The evaluation after 5 minutes showed that the CPU utilization of the main controller dropped to 75%, with a deviation of 5% from the predicted value, and no new round of optimization needed to be triggered.

[0049] The above only lists some preferred embodiments of the present invention, but the present invention is not limited thereto, and many improvements and changes can be made. As long as the improvements and changes are made on the basis of the basic principles of the present invention, they should be regarded as falling within the protection scope of the present invention.

Claims

1. A real-time hierarchical allocation method for digital power grid power cloud resources, characterized in that: The method comprises: According to the physical architecture and topology of the digital power grid, including dividing the power cloud resources into multiple sub-resource pools, setting up dedicated resource pools for key power grid equipment and sensitive loads, dynamically adjusting the network topology and routing strategy, and providing low-latency and highly reliable network transmission channels through priority queues and bandwidth guarantee mechanisms; For each sub-resource pool, by analyzing the historical load data of the power grid equipment and the current system status, the periodicity, trend and randomness characteristics of the load are extracted, and the load forecast results are updated in real time; Dynamically adjust resource allocation strategies based on prediction results, incorporate resource utilization, system response time, and migration overhead indicators into the objective function, and solve the optimal solution set, from which the best resource allocation plan that meets current business needs is selected. By setting reasonable thresholds for utilization and system load indicators, determine whether to trigger the expansion and contraction threshold based on the best resource allocation plan. If the threshold is not exceeded, maintain the current resource allocation state, and if the threshold is exceeded, trigger expansion and contraction; When the system load index exceeds the threshold, resources need to be expanded or reduced. An incremental resource migration strategy is adopted to divide the power grid business data and computing tasks to be migrated into multiple small batches, establish a data synchronization channel between the source node and the target node, ensure data consistency through atomic operations, and dynamically adjust the batch size and migration rate according to the migration progress to complete the incremental resource migration; After incremental resource migration, the consistent hashing algorithm is used to route power grid control requests to the corresponding computing nodes within the sub-resource pool. Load balancing is achieved by dynamically adjusting the number and distribution of virtual nodes in the hash ring, and the weights of virtual nodes are dynamically adjusted according to the node load optimization index to adapt to changes in power grid load. Using load optimization indicators, we build resource utilization prediction models for different types of resources, including CPU, memory, and disk. We use long short-term memory networks to model their usage trends and correct short-term fluctuations. We set dynamic thresholds to adaptively adjust the resource allocation granularity and obtain resource utilization prediction results, maximizing resource utilization while ensuring grid control performance. According to the differences in resource requirements of heterogeneous equipment in the power system, the hierarchical analysis method is used to classify the equipment according to their importance and sensitivity, and the equipment stratification and classification results are obtained. The resource utilization prediction results are integrated with the equipment stratification and classification results, and the allocation ratio of resources at each level is dynamically adjusted to ensure that key equipment and sensitive loads always have sufficient computing resources. At the same time, the resource requirements of non-critical businesses are taken into account to achieve global optimal configuration of power cloud resources.

2. The method according to claim 1, wherein: The physical architecture and topology of the digital power grid include dividing the power cloud resources into multiple sub-resource pools, setting up dedicated resource pools for key power grid equipment and sensitive loads, dynamically adjusting the network topology and routing strategy, and providing a low-latency and highly reliable network transmission channel through priority queues and bandwidth guarantee mechanisms, including: Obtain the total amount of power cloud resources and the distribution of power grid equipment, and divide the power cloud resources into multiple sub-resource pools, wherein dedicated resource pools are set for key power grid equipment and sensitive loads; The resource usage of the sub-resource pools is monitored in real time using a minimum-maximum fairness algorithm. If the resource usage of a sub-resource pool exceeds a preset threshold, resource allocation is dynamically adjusted. According to the resource allocation result, the optimal network topology is calculated using the Dijkstra shortest path algorithm, and network configuration instructions are sent to network devices through the OpenFlow protocol; receiving link status data of the network device, and calculating the optimal transmission path using the OSPF protocol, Sending routing configuration to the network device; According to the routing configuration, a weighted fair queuing algorithm is used to perform priority queuing processing on data packets, and bandwidth is limited and guaranteed for each priority queue through a flow control module, thereby obtaining a low-latency and highly reliable network transmission channel.

3. The method according to claim 1, wherein: For each sub-resource pool, by analyzing the historical load data and current system status of the power grid equipment, the periodicity, trend and randomness characteristics of the load are extracted, and the load forecast results are updated in real time, including: Obtain the historical load data and current system status data of power grid equipment, use the triple standard deviation principle to detect outliers, and use the mean interpolation method to fill in missing values ​​to obtain a valid load data set; According to the effective load data set, a spectrum analysis is performed using a fast Fourier transform, and a main periodic component is determined by peak detection to obtain a periodic load pattern; For the periodic load pattern, a three-parameter exponential smoothing method is used to perform trend analysis, and the smoothing parameters are optimized by minimizing the mean square error to obtain a trend load pattern; According to the periodic load pattern and the trend load pattern, a comprehensive load characteristic is formed, the future load is predicted by using an autoregressive moving average model, and the model parameters are estimated by a least square method; If the p-value of the model residual is less than a preset threshold, the model input is updated using a sliding window method in combination with the current system status data to adjust the load prediction result in real time.

4. The method according to claim 1, wherein: The resource allocation strategy is dynamically adjusted according to the prediction results, resource utilization, system response time, and migration overhead indicators are included in the objective function, and the optimal solution set is solved, from which the best resource allocation plan that meets the current business needs is selected, and reasonable thresholds are set for utilization and system load indicators. According to the best resource allocation plan, it is determined whether to trigger the expansion and contraction threshold. If the threshold is not exceeded, the current resource allocation state is maintained, and if the threshold is exceeded, expansion and contraction is triggered, including: Constructing a resource allocation objective function, wherein the objective function includes three parameters: utilization, response time, and migration overhead; Using a genetic algorithm to solve the objective function, a plurality of candidate resource allocation schemes satisfying constraint conditions are obtained; According to the candidate resource allocation scheme, the dynamic thresholds of resource utilization and response time are calculated using the exponential moving average method; Obtaining the dynamic threshold, comparing the optimal resource allocation solution with the current resource allocation state, and calculating a smoothed difference value; Determining whether to trigger a scaling threshold according to the smoothed difference value; If the expansion / contraction threshold is triggered, the best adaptation algorithm is used to allocate resources; Use a round-robin load balancing strategy to evenly distribute the new load to available resources; It also includes: establishing an explainable mechanism for resource allocation decisions, recording the decision basis and reasoning process at key decision nodes to form a decision path diagram; when resource allocation anomalies occur, tracing back through the decision path to locate the cause of the problem, and adjusting the optimization goals, constraints and decision rules in a targeted manner, specifically including: constructing a directed acyclic graph structure to record key decision nodes in the resource allocation process; connecting the decision nodes through directed edges to form a decision path diagram; using an adjacency list to store the decision path diagram, and each decision node maintains a list of child nodes; using a forward-linking reasoning method to implement rule reasoning, extracting a predefined rule set from an expert knowledge base; generating supplementary rules through a decision tree learning algorithm; analyzing the input data of each decision node, applying matching rules one by one, and generating a reasoning process; storing the reasoning process and intermediate results The method comprises the following steps: storing the resource utilization and the response time in the corresponding decision node; setting the normal range thresholds of the resource utilization and the response time; triggering the anomaly detection mechanism if the actual indicator value is detected to be beyond the expected range; starting from the anomaly point, tracing back along the decision path graph structure, analyzing the input data, decision rules and reasoning process of each decision node; calculating the degree of deviation by comparing the expected results and the actual results of each decision node, and locating the root node causing the anomaly; extracting the decision rules and constraints of the located problem nodes; optimizing the decision rule parameters by using the genetic algorithm, and encoding the rule parameters as chromosomes; designing a function with the degree of improvement of the abnormal indicator as the fitness; iteratively optimizing the parameters by selection, crossover and mutation operations; adjusting the weights of each indicator in the optimization objective function according to the tracing results; and writing the optimized rules and parameters back to the decision rule library.

5. The method according to claim 1, wherein: When the system load index exceeds the threshold, resources need to be expanded or reduced. An incremental resource migration strategy is adopted to divide the power grid service data and computing tasks to be migrated into multiple small batches, establish a data synchronization channel between the source node and the target node, ensure data consistency through atomic operations, and dynamically adjust the batch size and migration rate according to the migration progress to complete the incremental resource migration, including: Obtaining a system load indicator, and setting a resource expansion / contraction threshold according to the system load indicator; Collecting system load data through the resource monitoring module, and if the system load data continuously exceeds the resource expansion and contraction threshold, determining to start resource migration; The consistent hashing algorithm is used to divide the power grid business data and computing tasks to be migrated into multiple small batches to obtain batches of data to be migrated; According to the processing capabilities of the source and target nodes, a weighted round-robin load balancing algorithm is used to determine the number of data batches to be migrated; Establish a bidirectional data synchronization channel between the source node and the target node; Use a timestamp-based version number mechanism to assign a unique version number to each data item; Resolve data conflicts by comparing the version numbers to obtain the latest version of data; Use a two-phase commit protocol for data migration; Verify data consistency during the commit phase and roll back the operation if verification fails; The atomicity of data migration is ensured through the two-phase commit protocol; Get the migration progress and dynamically adjust the batch size and migration rate according to the migration progress; The PID controller is used as the core of the adaptive adjustment algorithm to calculate the deviation between the actual migration speed and the target speed; If the deviation is positive, increase the batch size or increase the number of concurrent migrations; If the deviation is negative, reduce the batch size or reduce the migration rate; It also includes: during the migration process, real-time collection of the load conditions and network bandwidth runtime data of the source node and the target node, continuous monitoring and precise positioning of performance bottlenecks or abnormal conditions, and dynamic adjustment of the migration strategy according to the fault type and impact scope, including suspension of migration, current limiting, and retry, to ensure the stability and reliability of the migration, specifically including: using a distributed monitoring agent to collect CPU utilization, memory usage, disk I / O, and network throughput on the source node and the target node in real time to obtain load data; based on the load data, using the isolation forest algorithm to perform anomaly detection, and setting dynamic thresholds for different indicators; if an indicator exceeds the threshold, triggering an abnormal alarm, recording the time, duration, and impact scope of the abnormality; obtaining abnormal alarm information, and using a decision tree algorithm to classify abnormal symptoms; executing a dynamically adjusted migration strategy based on the classification results of the decision tree algorithm; and displaying the migration progress, resource usage, and abnormal events in real time through a Web interface based on the execution of the migration strategy.

6. The method according to claim 1, wherein: After the incremental resource migration, the consistent hashing algorithm is used to route the power grid control request to the corresponding computing node within the sub-resource pool, and load balancing is achieved by dynamically adjusting the number and distribution of virtual nodes in the hash ring, and dynamically adjusting the weight of the virtual node according to the load optimization index of the node to adapt to the change of power grid load, including: Initialize the consistent hash ring according to the number and performance parameters of the computing nodes in the sub-resource pool, allocate a preset number of virtual nodes to each physical node, and evenly distribute the virtual nodes on the hash ring to obtain an initial request routing mapping relationship; A dynamic monitoring mechanism is used to collect the performance indicators of computing nodes at preset time intervals, and the comprehensive load score of the computing nodes is calculated based on the performance indicators and their corresponding preset weight values; If the comprehensive load score is lower than a preset first threshold, adding a preset number of virtual nodes to the computing node; If the comprehensive load score is higher than a preset second threshold, reducing a preset number of virtual nodes for the computing node; For the virtual nodes, a weighted round-robin algorithm is used to assign weights, wherein the weight values ​​are obtained by a preset weight calculation formula; The number of requests is allocated according to the node weight ratio, and nodes with weights higher than a preset threshold receive more requests; Analyze historical load data through the ARIMA model to predict load changes in the future; If the predicted load change exceeds the preset threshold, the virtual node redistribution mechanism is triggered; For power grid control requests, the requests are classified into different priorities according to preset priority classification rules, and different routing strategies are adopted according to the priorities.

7. The method according to claim 1, wherein: The load optimization index is used to build resource utilization prediction models for different types of resources, including CPU, memory, and disk. The long short-term memory network is used to model their usage trends and correct short-term fluctuations. The resource allocation granularity is adaptively adjusted by setting dynamic thresholds to obtain resource utilization prediction results, and the resource utilization is maximized under the premise of ensuring the control performance of the power grid, including: For CPU, memory and disk resource types, historical resource utilization data is obtained and preprocessed using the long short-term memory network model; Based on the preprocessed data, correct the short-term fluctuations by using a sliding window method; If an outlier is identified using the z-score method, a local weighted regression smoothing process is performed on the outlier; According to the smoothed data, a dynamic resource utilization threshold is set; If the predicted resource utilization exceeds the dynamic resource utilization threshold, adaptive adjustment of the resource allocation granularity is triggered; Based on the prediction result and the dynamic threshold, a multi-level resource allocation granularity adjustment strategy is implemented; The multi-level resource allocation granularity adjustment strategy includes: high priority service resource allocation, medium priority service resource allocation and low priority service resource allocation; Obtaining a power grid control performance indicator from the multi-level resource allocation granularity adjustment strategy; Determining whether the power grid control performance indicator is close to a preset threshold; If the power grid control performance index approaches a preset threshold, resource allocation for high-priority services is prioritized; By compressing the resource quota of low-priority services, a resource allocation solution that maximizes overall resource utilization is obtained; It also includes: in the resource allocation process, combining the dependency relationship between different resources of power grid equipment, using the resource dependency relationship as a constraint condition in the resource allocation decision, avoiding performance bottlenecks and failure risks caused by resource dependency, and improving the safety and stability level of the power grid, specifically including: constructing a power grid equipment resource dependency graph, the dependency graph stores the resource dependency relationship between devices through a graph database, wherein nodes represent devices and edges represent dependencies; designing a resource allocation constraint matrix according to the dependency graph, wherein rows of the constraint matrix represent devices, columns represent resource types, and matrix elements represent resource allocation constraints; realizing a dynamic resource allocation adjustment mechanism by real-time monitoring of the resource usage of each device, wherein the adjustment mechanism sets a multi-level early warning threshold; if it is detected that the resource usage rate of a certain device exceeds a preset threshold, an improved greedy algorithm is used to adjust local resources, wherein the greedy algorithm selects the adjacent device with the strongest dependency relationship and calculates the amount of dispatchable resources; obtaining the historical failure rate of the equipment, resource usage volatility, dependency strength, and equipment importance score, and establishing a resource allocation risk assessment model, wherein the risk assessment model uses a random forest algorithm to train a risk prediction model and performs a risk score on each resource allocation decision.

8. The method according to claim 1, wherein: According to the resource demand differences of heterogeneous devices in the power system, the hierarchical analysis method is used to hierarchically classify the devices according to their importance and sensitivity, and the device hierarchical classification results are obtained. The resource utilization prediction results are integrated with the device hierarchical classification results, and the allocation ratio of resources at each level is dynamically adjusted to ensure that key devices and sensitive loads always obtain sufficient computing resources, while taking into account the resource requirements of non-critical businesses, and realizing the global optimization configuration of power cloud resources, including: The equipment evaluation model is constructed by using the hierarchical analysis method to obtain two primary indicators of equipment importance and sensitivity. The primary indicators include business impact, failure impact and resource consumption. Obtain equipment stratification and grading results according to the equipment evaluation model, including three levels: critical, important and ordinary; A resource utilization prediction model is built based on the long short-term memory network to predict four types of resources: CPU, memory, storage, and network bandwidth. If it is detected that the resource utilization exceeds the preset threshold, the resource reallocation process is triggered; The resource reallocation process includes: designing a resource allocation optimization algorithm, taking the equipment stratification and classification results as constraint conditions, and taking the resource utilization prediction results as objective functions; The resource quota of each level of equipment is adjusted in real time through the resource pool management module, and the resource quota adjustment is based on the calculation result of the resource allocation optimization algorithm; Based on the resource quota adjustment result, perform resource allocation scheme evaluation and calculate the deviation between the actual resource utilization and the predicted value; If the deviation exceeds a preset threshold, an optimization iteration of the resource allocation scheme is triggered to achieve continuous global optimization configuration of power cloud resources.

Citation Information

Cited By

  • Distributed monitoring bandwidth adjusting method and system capable of realizing adaptive scheduling

    CN119814686A

  • Electrical automation remote control system

    CN119892716A

  • An electrical automation remote control system

    CN119892716B

  • Electric energy meter data distributed storage method based on improved PoS consensus

    CN119902721A

  • Network resource allocation method and device, computer program product and electronic equipment

    CN119996341A