Load balancing method and device for real-time monitoring system of power distribution network and storage medium

The linear regression model and SARIMA model are used to predict the power grid server load, which realizes the dynamic allocation of power grid server load, solves the problem of power grid load balancing being difficult to adapt to seasonal changes, and improves the system response speed and stability.

CN118733262APending Publication Date: 2024-10-01SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410822674.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing load balancing technology is difficult to adapt to the seasonal changes and real-time requirements of the power grid load, and cannot effectively allocate the power grid server load, resulting in prolonged system response time and resource waste.

Method used

The linear regression model is used to predict the task execution time and the SARIMA model is used to predict the peak and off-peak periods of the power grid server, and the server with the off-peak period greater than the task execution time is matched. If there is no qualified server, the server with the smallest load or the smallest number of links is selected for execution. tasks to ensure reasonable allocation of resources and rapid response.

Benefits of technology

It achieves effective distribution of power grid server load, avoids over-concentration of resources at a single point, improves the response speed and overall stability of the system, and adapts to seasonal changes in power grid load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733262A_ABST
    Figure CN118733262A_ABST
Patent Text Reader

Abstract

The invention discloses a load balancing method and device for a real-time monitoring system of a power distribution network and a medium. The method comprises the steps of firstly obtaining a to-be-allocated task; and then predicting task execution time by using a linear regression model trained based on historical data, and predicting peak and low peak periods of server load by using an SARIMA model. In the matching stage, the system preferentially selects the server with the low-peak time period larger than the task execution time and the minimum load, and selects the server with the least task links to execute the task when no appropriate server exists. The problem that the load of the power grid server cannot be effectively distributed in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of load balancing, and in particular to a load balancing method, device and storage medium of a real-time monitoring system of a power distribution network. Background Art

[0002] As the scale and complexity of power systems continue to expand, the stability and reliability of power grids have become an important concern for the power industry. As one of the key technologies to ensure the stable operation of power grids, the performance of power grid monitoring systems directly affects the quality and efficiency of power supply.

[0003] Traditional power grid monitoring systems often adopt a centralized architecture, and their processing capabilities are limited by the computing resources of a single or a few monitoring centers. This results in longer system response times under high load conditions, and may even lead to processing bottlenecks, affecting the real-time monitoring and rapid response capabilities of the power grid. To solve this problem, cloud computing technology has been introduced into the field of power grid monitoring. The elastic computing resources and large-scale data storage capabilities provided by cloud services enable power grid monitoring systems to process large-scale data more flexibly and efficiently, and achieve optimal resource allocation.

[0004] However, the seasonal variation of grid load poses new challenges to load balancing strategies. For example, during the winter heating period or the summer cooling period, the grid load will increase significantly, while it is relatively light in other seasons. Existing load balancing technologies mostly use static allocation or simple polling strategies, which are difficult to adapt to the seasonal variation of grid load and real-time requirements, and cannot effectively distribute grid server load. Summary of the invention

[0005] The present invention provides a load balancing method, device and storage medium for a real-time monitoring system of a power distribution network, so as to solve the problem in the prior art that the load of a power grid server cannot be effectively distributed.

[0006] In a first aspect, the present application provides a load balancing method for a distribution network real-time monitoring system, comprising:

[0007] Obtain tasks to be assigned in the power grid system;

[0008] Predicting the execution time of the tasks to be assigned according to a preset linear regression model, wherein the linear regression model is trained on an initial linear regression model according to the historical execution time data of each type of tasks;

[0009] Predicting the peak time period and off-peak time period of the power grid server according to a preset SARIMA model, wherein the SARIMA model is trained on an initial SARIMA model according to historical load data of the power grid server;

[0010] Match a power grid server whose off-peak time period is greater than the execution time of the task to be assigned; if there are multiple qualified power grid servers, select the server with the smallest load among the power grid servers to execute the task to be assigned; if there are no qualified power grid servers, select a server with the least number of task links in the power grid server pool to execute the task to be assigned.

[0011] This application uses a linear regression model to accurately predict the task execution time, ensuring the timeliness of task allocation. Secondly, the SARIMA model can predict the peak and off-peak periods of the power grid server, thereby realizing the reasonable planning of the power grid server load. When there are multiple servers that meet the conditions, the server with the smallest load is selected to perform the task, which helps to avoid excessive concentration of resources at a single point and balance the overall system load. If there is no power grid server in the off-peak period, the server with the least number of task links is selected. This flexible strategy ensures that task requirements can be responded to quickly in any case, thereby realizing the effective distribution of power grid server load.

[0012] As a preferred embodiment of the first aspect, the SARIMA model is obtained by training on the initial SARIMA model according to the historical load data of the power grid server, specifically:

[0013] Obtain historical load data from power grid servers;

[0014] Use historical load data to fit the initial SARIMA model to obtain SARIMA model parameters;

[0015] The initial SARIMA model is trained according to the SARIMA model parameters to obtain the SARIMA model.

[0016] As a preferred embodiment of the first aspect, the use of historical load data to fit the initial SARIMA model to obtain SARIMA model parameters is specifically:

[0017] The process of fitting the initial SARIMA model using historical load data is as follows:

[0018] y t =φ1y t-1 +φ2y t-2 +…+φ p y t-p +θ1∈ t-1 +θ2∈ t-2 +…+θ q ∈ t-q +Φ1Y t-s +Φ2Y t-2s +…

[0019] +Φ P Y t-Ps+Θ1E t-s +Θ2E t-2s +…+Θ Q E t-Qs +∈ t

[0020] Where: y t represents the grid server load at time t;

[0021] φ i represents the non-seasonal autoregressive coefficient, φ i Indicates the impact at the previous time point;

[0022] θ i represents the non-seasonal moving average order, θ i represents the impact of the first i non-seasonal periodic error terms;

[0023] Φ i represents the seasonal autoregressive coefficient, Φ i represents the impact of the previous i seasonal cycles;

[0024] Θ i represents the seasonal moving average order, Θ i Represents the error impact of the previous i seasonal cycles; ∈ t represents the random error term; s represents the length of the seasonal cycle; Y t-s represents the actual grid server load at time ts; E t-s represents the random error term at time ts;

[0025] As a preferred embodiment of the first aspect, the peak time period and off-peak time period of the power grid server are predicted according to the preset SARIMA model, specifically:

[0026] According to the power grid server load predicted by the SARIMA model, the quartiles of the power grid server load are calculated, and the upper quartile is used as the peak threshold, and the lower quartile is used as the low peak threshold;

[0027] The time period when the load exceeds the peak threshold is identified as the peak time period, and the time period when the load is lower than the low-peak threshold is identified as the low-peak time period.

[0028] In this preferred embodiment, the present application obtains a SARIMA model by training with historical load data of power grid servers. The SARIMA model can accurately capture the seasonal changes and non-seasonal trends of power grid load, improve the accuracy of prediction of peak and off-peak periods of power grid server load, make the load balancing strategy more adaptable to the actual operation of the power grid, and optimize resource allocation.

[0029] As a preferred embodiment of the first aspect, the distribution network real-time monitoring system further includes an infrastructure layer;

[0030] The infrastructure layer includes power grid servers, power grid storage devices and power grid network devices;

[0031] The power grid server is deployed redundantly, and redundant power grid servers are deployed in multiple geographical locations, and the workload is distributed through a load balancing method;

[0032] The power grid storage device adopts data replication to copy key monitoring data between multiple storage devices, and implements a data fast recovery mechanism by setting up redundant array independent disks;

[0033] The power grid network equipment adopts multiple network paths and optimizes network traffic through dynamic routing protocols and software-defined network technology.

[0034] In this preferred embodiment, the construction of the real-time monitoring system for the distribution network of the present application significantly improves the reliability and efficiency of the system through a layered integration method. The system realizes dynamic optimization distribution of workloads through the deployment of redundant power grid servers at the infrastructure layer, combined with an intelligent load balancing strategy. At the same time, the advanced data replication technology and rapid recovery mechanism of the power grid storage device ensure the security and integrity of key monitoring data. In addition, the multi-path configuration of the power grid network equipment, supplemented by dynamic routing and software-defined network technology, further optimizes network traffic and ensures the efficiency and stability of data transmission. In summary, the design of the system realizes comprehensive and real-time monitoring of the distribution network, and improves the intelligence level and overall stability of power grid operation.

[0035] In a second aspect, the present application provides a load balancing device for a real-time monitoring system of a power distribution network. The load balancing device comprises: an acquisition module, a prediction module and a matching module;

[0036] The acquisition module is used to acquire the tasks to be assigned in the power grid system;

[0037] The prediction module is used to predict the execution time of the task to be assigned according to a preset linear regression model, wherein the linear regression model is trained on the initial linear regression model according to the historical execution time data of each type of task;

[0038] Predicting the peak time period and off-peak time period of the power grid server according to a preset SARIMA model, wherein the SARIMA model is trained on an initial SARIMA model according to historical load data of the power grid server;

[0039] The matching module is used to match power grid servers whose off-peak time period is greater than the execution time of the task to be assigned; if there are multiple qualified power grid servers, the server with the smallest load among the power grid servers is selected to execute the task to be assigned; if there are no qualified power grid servers, a server with the least number of task links is selected from the power grid server pool to execute the task to be assigned.

[0040] This device uses three modules to divide the work and coordinate work to better discover and deal with problems that arise in the load balancing device of the real-time monitoring system of the distribution network. The linear regression model is used to accurately predict the task execution time, ensuring the timeliness of task allocation. Secondly, the SARIMA model can predict the peak and off-peak periods of the power grid server, thereby realizing the reasonable planning of the power grid server load. When there are multiple servers that meet the conditions, the server with the smallest load is selected to perform the task, which helps to avoid excessive concentration of resources at a single point and balance the overall system load. If there is no power grid server in the off-peak period, the server with the least number of task links is selected. This flexible strategy ensures that task requirements can be quickly responded to in any case, thereby realizing the effective distribution of the power grid server load.

[0041] As a preferred embodiment of the second aspect, the SARIMA model is obtained by training on the initial SARIMA model according to the historical load data of the power grid server, specifically:

[0042] Obtain historical load data from power grid servers;

[0043] Use historical load data to fit the initial SARIMA model to obtain SARIMA model parameters;

[0044] The initial SARIMA model is trained according to the SARIMA model parameters to obtain the SARIMA model.

[0045] As a preferred embodiment of the second aspect, the use of historical load data to fit the initial SARIMA model to obtain SARIMA model parameters is specifically:

[0046] The process of fitting the initial SARIMA model using historical load data is as follows:

[0047] y t =φ1y t-1 +φ2y t-2 +…+φ p y t-p +θ1∈ t-1 +θ2∈ t-2 +…+θ q ∈ t-q +Φ1Y t-s +Φ2Y t-2s +…

[0048] +Φ P Y t-Ps +Θ1E t-s +Θ2E t-2s +…+Θ Q E t-Qs +∈ t

[0049] Where: y t represents the power grid server load at time t;

[0050] φ i represents the non-seasonal autoregressive coefficient, φ i Indicates the impact at the previous time point;

[0051] θ i represents the non-seasonal moving average order, θ i represents the impact of the first i non-seasonal periodic error terms;

[0052] Φ i represents the seasonal autoregressive coefficient, Φ i represents the impact of the previous i seasonal cycles;

[0053] Θ i represents the seasonal moving average order, Θ i Represents the error impact of the previous i seasonal cycles; ∈ t represents the random error term; s represents the length of the seasonal cycle; Y t-s represents the actual grid server load at time ts; E t-s represents the random error term at time ts;

[0054] As a preferred embodiment of the second aspect, the peak time period and off-peak time period of the power grid server are predicted according to the preset SARIMA model, specifically:

[0055] According to the power grid server load predicted by the SARIMA model, the quartiles of the power grid server load are calculated, and the upper quartile is used as the peak threshold, and the lower quartile is used as the low peak threshold;

[0056] The time period when the load exceeds the peak threshold is identified as the peak time period, and the time period when the load is lower than the low-peak threshold is identified as the low-peak time period.

[0057] In this preferred embodiment, the present application obtains a SARIMA model by training with historical load data of power grid servers. The SARIMA model can accurately capture the seasonal changes and non-seasonal trends of power grid load, improve the accuracy of prediction of peak and off-peak periods of power grid server load, make the load balancing strategy more adaptable to the actual operation of the power grid, and optimize resource allocation.

[0058] As a preferred embodiment of the second aspect, the real-time monitoring system for a power distribution network includes an infrastructure layer;

[0059] The infrastructure layer includes power grid servers, power grid storage devices and power grid network devices;

[0060] The power grid server is deployed redundantly, and redundant power grid servers are deployed in multiple geographical locations, and the workload is distributed through a load balancing method;

[0061] The power grid storage device adopts data replication to copy key monitoring data between multiple storage devices, and implements a data fast recovery mechanism by setting up redundant array independent disks;

[0062] The power grid network equipment adopts multiple network paths and optimizes network traffic through dynamic routing protocols and software-defined network technology.

[0063] In this preferred embodiment, the construction of the real-time monitoring system for the distribution network of the present application significantly improves the reliability and efficiency of the system through a layered integration method. The system realizes dynamic optimization distribution of workloads through the deployment of redundant power grid servers at the infrastructure layer, combined with an intelligent load balancing strategy. At the same time, the advanced data replication technology and rapid recovery mechanism of the power grid storage device ensure the security and integrity of key monitoring data. In addition, the multi-path configuration of the power grid network equipment, supplemented by dynamic routing and software-defined network technology, further optimizes network traffic and ensures the efficiency and stability of data transmission. In summary, the design of the system realizes comprehensive and real-time monitoring of the distribution network, and improves the intelligence level and overall stability of power grid operation.

[0064] In a third aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a load balancing method for a real-time monitoring system for a power distribution network as described. Its beneficial effects are the same as those of the load balancing method for a real-time monitoring system for a power distribution network provided in the first aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 : A flow chart of an embodiment of a load balancing method for a distribution network real-time monitoring system provided by the present application;

[0066] Figure 2 : A structural diagram of an embodiment of a load balancing device of a distribution network real-time monitoring system provided in the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] Embodiment 1

[0069] Please refer to Figure 1 , which is a load balancing method for a distribution network real-time monitoring system provided by an embodiment of the present invention.

[0070] In this embodiment, the process of the load balancing method of the real-time monitoring system of the power distribution network in this application is described in detail through steps S01-S04.

[0071] S01: Obtaining tasks to be assigned in the power grid system;

[0072] S02: predicting the execution time of the task to be assigned according to a preset linear regression model, wherein the linear regression model is trained on an initial linear regression model according to the historical execution time data of each type of task;

[0073] Among them, the linear regression model is as follows:

[0074] y=β0+β1x1+β2x2+…+β n x n +∈;

[0075] Where: y represents the task execution time; β i represents the regression coefficient; ∈ represents the error term; x n Characteristic variables representing resource consumption;

[0076] The linear regression model selects to collect historical execution time data for each type of task, and records it according to the task type (for example, data collection task, data processing task, predictive analysis task, etc.) and consumed resources (CPU, memory, bandwidth, etc.).

[0077] S03: predicting the peak time period and off-peak time period of the power grid server according to a preset SARIMA model, wherein the SARIMA model is obtained by training the initial SARIMA model according to the historical load data of the power grid server;

[0078] As a preferred embodiment of the first embodiment, the SARIMA model is obtained by training the initial SARIMA model based on the historical load data of the power grid server, specifically:

[0079] Obtain historical load data from power grid servers;

[0080] Use historical load data to fit the initial SARIMA model to obtain SARIMA model parameters;

[0081] The initial SARIMA model is trained according to the SARIMA model parameters to obtain the SARIMA model.

[0082] As a preferred embodiment of the first embodiment, the use of historical load data to fit the initial SARIMA model to obtain SARIMA model parameters is specifically:

[0083] The process of fitting the initial SARIMA model using historical load data is as follows:

[0084] y t =φ1y t-1 +φ2y t-2 +…+φ p y t-p +θ1∈ t-1 +θ2∈ t-2 +…+θ q ∈ t-q +Φ1Y t-s +Φ2Y t-2s +…

[0085] +Φ P Y t-Ps +Θ1E t-s +Θ2E t-2s +…+Θ Q E t-Qs +∈ t

[0086] Where: y t represents the grid server load at time t;

[0087] φ i represents the non-seasonal autoregressive coefficient, φ i Indicates the impact at the previous time point;

[0088] θ i represents the non-seasonal moving average order, θ i represents the impact of the first i non-seasonal periodic error terms;

[0089] Φ i represents the seasonal autoregressive coefficient, Φ i represents the impact of the previous i seasonal cycles;

[0090] Θ i represents the seasonal moving average order, Θ i Represents the error impact of the previous i seasonal cycles; ∈ t represents the random error term; s represents the length of the seasonal cycle; Y t-srepresents the actual grid server load at time ts; E t-s represents the random error term at time ts;

[0091] Where: p represents the autoregressive (AR) order; q represents the moving average (MA) order; P represents the seasonal autoregressive (SAR) order; Q represents the seasonal moving average (SMA) order;

[0092] The SARIMA model parameters include power grid server load, seasonal autoregressive coefficient, non-seasonal autoregressive coefficient, seasonal moving average order, non-seasonal moving average order, seasonal cycle length and random error term;

[0093] The SARIMA model can reflect the seasonal variation of power grid server load.

[0094] As a preferred embodiment of the first embodiment, the peak time period and off-peak time period of the power grid server are predicted according to the preset SARIMA model, specifically:

[0095] According to the power grid server load predicted by the SARIMA model, the quartiles of the power grid server load are calculated, and the upper quartile is used as the peak threshold, and the lower quartile is used as the low peak threshold;

[0096] The time period when the load exceeds the peak threshold is identified as the peak time period, and the time period when the load is lower than the low-peak threshold is identified as the low-peak time period.

[0097] S04: Match a power grid server whose off-peak time period is greater than the execution time of the task to be assigned; if there are multiple qualified power grid servers, select the server with the smallest load among the power grid servers to execute the task to be assigned; if there are no qualified power grid servers, select a server with the least number of task links in the power grid server pool to execute the task to be assigned.

[0098] As a preferred embodiment of the first embodiment, the real-time monitoring system for the power distribution network includes an infrastructure layer;

[0099] The infrastructure layer includes power grid servers, power grid storage devices and power grid network devices;

[0100] The power grid server is deployed redundantly, and redundant power grid servers are deployed in multiple geographical locations, and the workload is distributed through a load balancing method;

[0101] The power grid storage device adopts data replication to copy key monitoring data between multiple storage devices, and implements a data fast recovery mechanism by setting up redundant array independent disks;

[0102] The power grid network equipment adopts multiple network paths and optimizes network traffic through dynamic routing protocols and software-defined network technology.

[0103] As a preferred embodiment of the first embodiment, the power grid storage device adopts a master-slave configuration;

[0104] The main storage device configured in the main data center is set as the source point of data replication. At the same time, slave storage devices are configured in multiple geographically dispersed remote data centers, which serve as the target nodes of data replication. The system uses asynchronous replication technology to transfer data from the main storage device to each slave storage device during the non-peak period of power grid use to reduce the impact on real-time system performance.

[0105] After the first deployment of the power grid monitoring system or a large-scale data update, the system will perform a full replication operation to ensure complete data consistency between the primary storage device and all slave storage devices. In addition, based on the predefined replication strategy, the system will periodically perform incremental replication tasks to synchronize all data changes since the last replication.

[0106] To improve system reliability, once a failure of the primary storage device is detected, the power grid monitoring system will automatically switch to the nearest slave storage device, allowing it to immediately assume the responsibilities of the primary storage device. When the failure of the primary storage device is repaired, the system will not only restore its functions, but also perform a reverse replication operation to ensure that all data changes on the slave storage device during the period are synchronized back to the now restored primary storage device, thereby maintaining the integrity and up-to-dateness of the data.

[0107] As a preferred embodiment of Example 1, the real-time monitoring system for the distribution network includes a platform layer, which uses containerization technology to achieve rapid deployment and seamless migration of applications; and realizes dynamic adjustment of resources through the automatic expansion service of the cloud platform; and adopts a microservice architecture design to ensure that each service runs independently.

[0108] The specific implementation steps of the containerization technology are as follows:

[0109] Define the Dockerfile:

[0110] Create a Dockerfile text document that contains all the commands and instructions to build a given application image;

[0111] Execute the docker build command in the directory of the Dockerfile text document to create a container image;

[0112] Test the newly created image in the local test environment to ensure that it runs as expected;

[0113] Storage and management images:

[0114] Use the docker tag command to tag the built image, and push the tagged image to the container repository using the docker push command;

[0115] Deploy the container:

[0116] Create a YAML file that defines the Kubernetes deployment, including the required Pods, containers, and configurations.

[0117] Create a Kubernetes cluster based on the cloud service;

[0118] Use kubectl apply -f<deployment-file.yaml> The command deploys the container to the Kubernetes cluster;

[0119] Manage and scale applications:

[0120] Configure monitoring and logging systems to monitor application performance and health;

[0121] Use Kubernetes’ autoscaling capabilities to increase or decrease the number of Pods based on load and performance metrics;

[0122] Use Kubernetes' rolling update feature to update applications without interruption;

[0123] Application Migration:

[0124] Use kubectl commands or Kubernetes migration tools to migrate workloads from one cluster to another.

[0125] As a preferred embodiment of the first embodiment, the real-time monitoring system for the power distribution network includes a software layer, and the software layer also includes a failover application, which automatically switches to a backup system or server when a service interruption is detected.

[0126] As a preferred embodiment of the first embodiment, the real-time monitoring system for the power distribution network includes network fault detection and identification;

[0127] Network fault detection and identification is responsible for continuously monitoring network performance and device status to ensure network stability and efficiency. Once the system detects a link failure or significant performance degradation, it will automatically trigger an alarm mechanism to remind operation and maintenance personnel to take corresponding measures.

[0128] When a fault is detected, the system's dynamic routing function immediately intervenes, automatically recalculates the data transmission path, and redirects data traffic to the still healthy network links in real time to bypass damaged or poorly performing parts, ensuring the continuity of data transmission and the availability of network services.

[0129] When the original link failure is repaired and restored to normal operation, the dynamic routing system will come into play again, monitoring and verifying the health of the link. If the link is confirmed to be stable and reliable, the dynamic routing will orderly migrate the data traffic back to the original main link, restore the network traffic to the optimal path, and ensure the efficient use of network resources and the stability of network services.

[0130] Embodiment 1 of the present application uses a linear regression model to accurately predict the task execution time, ensuring the timeliness of task allocation. Secondly, the SARIMA model can predict the peak and off-peak periods of the power grid server, thereby realizing the reasonable planning of the power grid server load. When multiple servers meet the conditions, the server with the smallest load is selected to perform the task, which helps to avoid excessive concentration of resources at a single point and balances the overall system load. If there is no power grid server in the off-peak period, the server with the least number of task links is selected. This flexible strategy ensures that task requirements can be responded to quickly in any case, thereby realizing the effective distribution of the power grid server load.

[0131] Embodiment 2

[0132] Please refer to Figure 2 , which is a load balancing device of a distribution network real-time monitoring system provided in an embodiment of the present application.

[0133] In this embodiment, the load balancing device includes an acquisition module 10 , a prediction module 20 and a matching module 30 .

[0134] The acquisition module 10 is used to acquire tasks to be assigned in the power grid system;

[0135] The prediction module 20 is used to predict the execution time of the task to be assigned according to a preset linear regression model, wherein the linear regression model is trained on the initial linear regression model according to the historical execution time data of each type of task;

[0136] As a preferred embodiment of the second embodiment, the linear regression model is as follows:

[0137] y=β0+β1x1+β2x2+…+β n x n +∈;

[0138] Where: y represents the task execution time; β i represents the regression coefficient; ∈ represents the error term; x nCharacteristic variables representing resource consumption;

[0139] The linear regression model selects to collect historical execution time data for each type of task, and records it according to the task type (for example, data collection task, data processing task, predictive analysis task, etc.) and consumed resources (CPU, memory, bandwidth, etc.).

[0140] As a preferred embodiment of the second embodiment, the peak time period and the off-peak time period of the power grid server are predicted according to a preset SARIMA model, wherein the SARIMA model is obtained by training on an initial SARIMA model according to historical load data of the power grid server;

[0141] As a preferred embodiment of the second embodiment, the SARIMA model is obtained by training the initial SARIMA model based on the historical load data of the power grid server, specifically:

[0142] Obtain historical load data from power grid servers;

[0143] Use historical load data to fit the initial SARIMA model to obtain SARIMA model parameters;

[0144] The initial SARIMA model is trained according to the SARIMA model parameters to obtain the SARIMA model.

[0145] As a preferred embodiment of the second embodiment, the use of historical load data to fit the initial SARIMA model to obtain SARIMA model parameters is specifically:

[0146] The process of fitting the initial SARIMA model using historical load data is as follows:

[0147] y t =φ1y t-1 +φ2y t-2 +…+φ p y t-p +θ1∈ t-1 +θ2∈ t-2 +…+θ q ∈ t-q +Φ1Y t-s +Φ2Y t-2s +…

[0148] +Φ P Y t-Ps +Θ1E t-s +Θ2E t-2s +…+Θ Q E t-Qs +∈ t

[0149] Where: y trepresents the power grid server load at time t;

[0150] φ i represents the non-seasonal autoregressive coefficient, φ i Indicates the impact at the previous time point;

[0151] θ i represents the non-seasonal moving average order, θ i represents the impact of the first i non-seasonal periodic error terms;

[0152] Φ i represents the seasonal autoregressive coefficient, Φ i represents the impact of the previous i seasonal cycles;

[0153] Θ i represents the seasonal moving average order, Θ i Represents the error impact of the previous i seasonal cycles; ∈ t represents the random error term; s represents the length of the seasonal cycle; Y t-s represents the actual grid server load at time ts; E t-s represents the random error term at time ts;

[0154] Where: p represents the autoregressive (AR) order; q represents the moving average (MA) order; P represents the seasonal autoregressive (SAR) order; Q represents the seasonal moving average (SMA) order;

[0155] The SARIMA model parameters include power grid server load, seasonal autoregressive coefficient, non-seasonal autoregressive coefficient, seasonal moving average order, non-seasonal moving average order, seasonal cycle length and random error term;

[0156] The SARIMA model can reflect the seasonal variation of power grid server load.

[0157] As a preferred embodiment of the second embodiment, the peak time period and off-peak time period of the power grid server are predicted according to the preset SARIMA model, specifically:

[0158] According to the power grid server load predicted by the SARIMA model, the quartiles of the power grid server load are calculated, and the upper quartile is used as the peak threshold, and the lower quartile is used as the low peak threshold;

[0159] The time period when the load exceeds the peak threshold is identified as the peak time period, and the time period when the load is lower than the low-peak threshold is identified as the low-peak time period.

[0160] The matching module 30 is used to match power grid servers whose off-peak time period is greater than the execution time of the task to be assigned; if there are multiple qualified power grid servers, the server with the smallest load among the power grid servers is selected to execute the task to be assigned; if there are no qualified power grid servers, a server with the least number of task links is selected from the power grid server pool to execute the task to be assigned.

[0161] As a preferred embodiment of the second embodiment, the real-time monitoring system for the power distribution network includes an infrastructure layer;

[0162] The infrastructure layer includes power grid servers, power grid storage devices and power grid network devices;

[0163] The power grid server is deployed redundantly, and redundant power grid servers are deployed in multiple geographical locations, and the workload is distributed through a load balancing method;

[0164] The power grid storage device adopts data replication to copy key monitoring data between multiple storage devices, and implements a data fast recovery mechanism by setting up redundant array independent disks;

[0165] The power grid network equipment adopts multiple network paths and optimizes network traffic through dynamic routing protocols and software-defined network technology.

[0166] As a preferred embodiment of the second embodiment, the power grid storage device adopts a master-slave configuration;

[0167] The main storage device configured in the main data center is set as the source point of data replication. At the same time, slave storage devices are configured in multiple geographically dispersed remote data centers, which serve as the target nodes of data replication. The system uses asynchronous replication technology to transfer data from the main storage device to each slave storage device during the non-peak period of power grid use to reduce the impact on real-time system performance.

[0168] After the first deployment of the power grid monitoring system or a large-scale data update, the system will perform a full replication operation to ensure complete data consistency between the primary storage device and all slave storage devices. In addition, based on the predefined replication strategy, the system will periodically perform incremental replication tasks to synchronize all data changes since the last replication.

[0169] To improve system reliability, once a failure of the primary storage device is detected, the power grid monitoring system will automatically switch to the nearest slave storage device, allowing it to immediately assume the responsibilities of the primary storage device. When the failure of the primary storage device is repaired, the system will not only restore its functions, but also perform a reverse replication operation to ensure that all data changes on the slave storage device during the period are synchronized back to the now restored primary storage device, thereby maintaining the integrity and up-to-dateness of the data.

[0170] As a preferred embodiment of Example 2, the real-time monitoring system for the distribution network includes a platform layer, which uses containerization technology to achieve rapid deployment and seamless migration of applications; and realizes dynamic adjustment of resources through the automatic expansion service of the cloud platform; and adopts a microservice architecture design to ensure that each service runs independently.

[0171] The specific implementation steps of the containerization technology are as follows:

[0172] Define the Dockerfile:

[0173] Create a Dockerfile text document that contains all the commands and instructions to build a given application image;

[0174] Execute the docker build command in the directory of the Dockerfile text document to create a container image;

[0175] Test the newly created image in the local test environment to ensure that it runs as expected;

[0176] Storage and management images:

[0177] Use the docker tag command to tag the built image, and push the tagged image to the container repository using the docker push command;

[0178] Deploy the container:

[0179] Create a YAML file that defines the Kubernetes deployment, including the required Pods, containers, and configurations.

[0180] Create a Kubernetes cluster based on the cloud service;

[0181] Use kubectl apply -f<deployment-file.yaml> The command deploys the container to the Kubernetes cluster;

[0182] Manage and scale applications:

[0183] Configure monitoring and logging systems to monitor application performance and health;

[0184] Use Kubernetes’ autoscaling capabilities to increase or decrease the number of Pods based on load and performance metrics;

[0185] Use Kubernetes' rolling update feature to update applications without interruption;

[0186] Application Migration:

[0187] Use kubectl commands or Kubernetes migration tools to migrate workloads from one cluster to another.

[0188] As a preferred embodiment of the second embodiment, the real-time monitoring system for the power distribution network includes a software layer, and the software layer also includes a failover application, which automatically switches to a backup system or server when a service interruption is detected.

[0189] As a preferred embodiment of the second embodiment, the real-time monitoring system for the power distribution network includes network fault detection and identification;

[0190] Network fault detection and identification is responsible for continuously monitoring network performance and device status to ensure network stability and efficiency. Once the system detects a link failure or significant performance degradation, it will automatically trigger an alarm mechanism to remind operation and maintenance personnel to take corresponding measures.

[0191] When a fault is detected, the system's dynamic routing function immediately intervenes, automatically recalculates the data transmission path, and redirects data traffic to the still healthy network links in real time to bypass damaged or poorly performing parts, ensuring the continuity of data transmission and the availability of network services.

[0192] When the original link failure is repaired and restored to normal operation, the dynamic routing system will come into play again, monitoring and verifying the health of the link. If the link is confirmed to be stable and reliable, the dynamic routing will orderly migrate the data traffic back to the original main link, restore the network traffic to the optimal path, and ensure the efficient use of network resources and the stability of network services.

[0193] The load balancing device of the real-time monitoring system of the distribution network in the second embodiment of the present application uses three modules to divide the work and coordinate the work, which can better discover and deal with problems arising in the load balancing device of the real-time monitoring system of the distribution network. The linear regression model is used to accurately predict the task execution time, ensuring the timeliness of task allocation. Secondly, the SARIMA model can predict the peak and off-peak periods of the power grid server, thereby realizing the reasonable planning of the power grid server load. When there are multiple servers that meet the conditions, the server with the smallest load is selected to perform the task, which helps to avoid excessive concentration of resources at a single point and balances the overall system load. If there is no power grid server in the off-peak period, the server with the least number of task links is selected. This flexible strategy ensures that the task requirements can be responded to quickly in any case, thereby realizing the effective distribution of the power grid server load.

[0194] Embodiment three:

[0195] An embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the load balancing method of the real-time monitoring system of the power distribution network;

[0196] Wherein, the load balancing method of the real-time monitoring system of the distribution network, if implemented in the form of a software functional unit and used as an independent product, can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0197] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A load balancing method for a real-time monitoring system of a distribution network, characterized in that: include: Obtain tasks to be assigned in the power grid system; Predicting the execution time of the tasks to be assigned according to a preset linear regression model, wherein the linear regression model is trained on an initial linear regression model according to the historical execution time data of each type of tasks; Predicting the peak time period and off-peak time period of the power grid server according to a preset SARIMA model, wherein the SARIMA model is trained on an initial SARIMA model according to historical load data of the power grid server; Match a power grid server whose off-peak time period is greater than the execution time of the task to be assigned; if there are multiple qualified power grid servers, select the server with the smallest load among the power grid servers to execute the task to be assigned; if there are no qualified power grid servers, select a server with the least number of task links in the power grid server pool to execute the task to be assigned.

2. The load balancing method of the real-time monitoring system of the power distribution network according to claim 1, characterized in that: The SARIMA model is trained on the initial SARIMA model based on the historical load data of the power grid server, specifically: Obtain historical load data from power grid servers; Use historical load data to fit the initial SARIMA model to obtain SARIMA model parameters; The initial SARIMA model is trained according to the SARIMA model parameters to obtain the SARIMA model.

3. The load balancing method of the real-time monitoring system of the power distribution network according to claim 2, characterized in that: The SARIMA model parameters are obtained by fitting the initial SARIMA model using historical load data, specifically: The process of fitting the initial SARIMA model using historical load data is as follows: y t =φ1y t-1 +φ2y t-2 +…+φ p y t-p +θ1∈ t-1 +θ2∈ t-2 +…+θ q ∈ t-q +Φ1Y t-s +Φ2Y t-2s +…+F P Y t-Ps +Θ1E t-s +Θ2E t-2s +…+Θ Q E t-Qs +∈ t Where: y t represents the grid server load at time t; φ i represents the non-seasonal autoregressive coefficient, φ i Indicates the impact at the previous time point; θ i represents the non-seasonal moving average order, θ i represents the impact of the first i non-seasonal periodic error terms; Φ i represents the seasonal autoregressive coefficient, Φ i represents the impact of the previous i seasonal cycles; Θ i represents the seasonal moving average order, Θ i Represents the error impact of the previous i seasonal cycles; ∈ t represents the random error term; s represents the length of the seasonal cycle; Y t-s represents the actual grid server load at time ts; E t-s represents the random error term at time ts; The SARIMA model parameters include power grid server load, seasonal autoregressive coefficient, non-seasonal autoregressive coefficient, seasonal moving average order, non-seasonal moving average order, seasonal cycle length and random error term; The SARIMA model can reflect the seasonal variation of power grid server load.

4. The load balancing method of a distribution network real-time monitoring system according to claim 1, characterized in that: The peak time period and off-peak time period of the power grid server are predicted according to the preset SARIMA model, specifically: According to the power grid server load predicted by the SARIMA model, the quartiles of the power grid server load are calculated, and the upper quartile is used as the peak threshold, and the lower quartile is used as the low peak threshold; The time period when the load exceeds the peak threshold is identified as the peak time period, and the time period when the load is lower than the low-peak threshold is identified as the low-peak time period.

5. The load balancing method of a distribution network real-time monitoring system according to claim 1, characterized in that: Also includes: The real-time monitoring system of the distribution network includes the infrastructure layer; The infrastructure layer includes power grid servers, power grid storage devices and power grid network devices; The power grid server is deployed redundantly, and redundant power grid servers are deployed in multiple geographical locations, and the workload is distributed through a load balancing method; The power grid storage device adopts data replication to copy key monitoring data between multiple storage devices, and implements a data fast recovery mechanism by setting up redundant array independent disks; The power grid network equipment adopts multiple network paths and optimizes network traffic through dynamic routing protocols and software-defined network technology.

6. A load balancing device for a real-time monitoring system of a distribution network, characterized in that: include: Acquisition module, prediction module and matching module; The acquisition module is used to acquire the tasks to be assigned in the power grid system; The prediction module is used to predict the execution time of the task to be assigned according to a preset linear regression model, wherein the linear regression model is trained on the initial linear regression model according to the historical execution time data of each type of task; Predicting the peak time period and off-peak time period of the power grid server according to a preset SARIMA model, wherein the SARIMA model is trained on an initial SARIMA model according to historical load data of the power grid server; The matching module is used to match power grid servers whose off-peak time period is greater than the execution time of the task to be assigned; if there are multiple qualified power grid servers, the server with the smallest load among the power grid servers is selected to execute the task to be assigned; if there are no qualified power grid servers, a server with the least number of task links is selected from the power grid server pool to execute the task to be assigned.

7. The load balancing device of the real-time monitoring system of the power distribution network according to claim 6, characterized in that: The SARIMA model is trained on the initial SARIMA model based on the historical load data of the power grid server, specifically: Obtain historical load data from power grid servers; Use historical load data to fit the initial SARIMA model to obtain SARIMA model parameters; The initial SARIMA model is trained according to the SARIMA model parameters to obtain the SARIMA model.

8. The load balancing device of the real-time monitoring system of the power distribution network according to claim 7, characterized in that: The SARIMA model parameters are obtained by fitting the initial SARIMA model using historical load data, specifically: The process of fitting the initial SARIMA model using historical load data is as follows: y t =φ1y t-1 +φ2y t-2 +…+φ p y t-p +θ1∈ t-1 +θ2∈ t-2 +…+θ q ∈ t-q +Φ1Y t-s +Φ2Y t-2s +…+F P Y t-Ps +Θ1E t-s +Θ2E t-2s +…+Θ Q E t-Qs +∈ t Where: y t represents the grid server load at time t; φ i represents the non-seasonal autoregressive coefficient, φ i Indicates the impact at the previous time point; θ i represents the non-seasonal moving average order, θ i represents the impact of the first i non-seasonal periodic error terms; Φ i represents the seasonal autoregressive coefficient, Φ i represents the impact of the previous i seasonal cycles; Θ i represents the seasonal moving average order, Θ i Represents the error impact of the previous i seasonal cycles; ∈ t represents the random error term; s represents the length of the seasonal cycle; Y t-s represents the actual grid server load at time ts; E t-s represents the random error term at time ts; The SARIMA model parameters include power grid server load, seasonal autoregressive coefficient, non-seasonal autoregressive coefficient, seasonal moving average order, non-seasonal moving average order, seasonal cycle length and random error term; The SARIMA model can reflect the seasonal variation of power grid server load.

9. The load balancing device of the real-time monitoring system of the power distribution network according to claim 6, characterized in that: The peak time period and off-peak time period of the power grid server are predicted according to the preset SARIMA model, specifically: According to the power grid server load predicted by the SARIMA model, the quartiles of the power grid server load are calculated, and the upper quartile is used as the peak threshold, and the lower quartile is used as the low peak threshold; The time period when the load exceeds the peak threshold is identified as the peak time period, and the time period when the load is lower than the low-peak threshold is identified as the low-peak time period.

10. The load balancing device of the real-time monitoring system of the power distribution network according to claim 6, characterized in that: Also includes: The real-time monitoring system of the distribution network includes the infrastructure layer The infrastructure layer includes power grid servers, power grid storage devices and power grid network devices; The power grid server is deployed redundantly, and redundant power grid servers are deployed in multiple geographical locations, and the workload is distributed through a load balancing method; The power grid storage device adopts data replication to copy key monitoring data between multiple storage devices, and implements a data fast recovery mechanism by setting up redundant array independent disks; The power grid network equipment adopts multiple network paths and optimizes network traffic through dynamic routing protocols and software-defined network technology.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the load balancing method of the distribution network real-time monitoring system according to any one of claims 1 to 5.

Citation Information

Cited By

  • Cloud network data packet capture analysis method and related equipment

    CN119052138A