A virtual power plant regulation system container elastic management method, a computer program product and a virtual power plant regulation system
By constructing a microservice model and container elastic management method for a cloud-edge collaborative architecture of virtual power plants, resource redundancy is dynamically perceived, and intelligent scaling of resources is achieved. This solves the problem of low resource allocation efficiency in virtual power plant control systems and improves the system's resource utilization and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG HUIHUA HAISHENG ENERGY TECHNOLOGY CO LTD
- Filing Date
- 2025-10-15
- Publication Date
- 2026-06-23
AI Technical Summary
Virtual power plant control systems suffer from low resource allocation efficiency and high management costs under cloud-edge collaborative architecture, making it difficult to achieve adaptive scaling of resources and affecting system performance and resource utilization.
We construct a microservice model adapted to the cloud-edge collaborative architecture of virtual power plants, combine peak and valley load criteria and resource redundancy hierarchical management criteria to dynamically perceive cloud-edge resource redundancy, and achieve intelligent scaling of resources through container elastic management methods.
It effectively reduces resource idle rate, improves overall system resource utilization, and ensures stable operation and low-latency response of the system in high-concurrency scenarios.
Smart Images

Figure CN121233236B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power control system technology, and in particular to a container flexible management method, computer program product, and virtual power plant control system for a virtual power plant control system. Background Technology
[0002] With massive distributed power generation, grid, load, and storage resources integrated into the power system, they have become crucial resources for flexible regulation. Applying virtual power plant (VPS) technology to aggregate these distributed resources and participate in power system dispatching and electricity market transactions has become a new direction for power system automation. To support flexible functional definition and efficient collaboration, VPS control systems based on cloud-edge collaborative architecture and containerized application management are gradually becoming mainstream.
[0003] However, virtual power plant control systems in a cloud-edge collaborative architecture suffer from heterogeneous resource distribution and complex layered microservice deployment, leading to low resource allocation efficiency, high management costs, and difficulty in effectively utilizing resource redundancy. Existing container management methods lack a dynamic perception mechanism for cloud-edge resource redundancy, making it difficult to achieve adaptive scaling of resources when business load fluctuates, thus affecting overall system performance and resource utilization. Summary of the Invention
[0004] The technical problem to be solved by this invention is how to enable the virtual power plant control system to dynamically sense the redundancy of cloud-edge resources and support the elastic scaling of containers.
[0005] To address the aforementioned technical problems, this invention provides a method for elastic management of containers in a virtual power plant control system based on cloud-edge resource redundancy awareness, comprising the following steps:
[0006] S1. Construct a microservice model adapted to the cloud-edge collaborative architecture of virtual power plants, decompose the virtual power plant business into data collection microservices, analysis microservices and control microservices, and construct the business processing logic based on a directed acyclic graph;
[0007] S2. Construct a container model that considers elastic autoscaling, define the container lifecycle states, including initialization, running and stopping transient states, and set up the container cluster, including real-time container creation, service-time container initialization and autoscaling.
[0008] S3. Based on the microservice model and the container model, and combined with the peak and valley load criteria and the resource redundancy hierarchical management criteria, perform elastic management of cloud containers and edge containers, including adjusting the countdown timer for cloud container scaling down and the number of edge containers that can be scaled up or down at one time.
[0009] Further, step S3 includes the following steps:
[0010] S31. Initialize the virtual power plant business scenario, including initializing the business occurrence time, application configuration, edge computing resources, cloud elastic settings, and process termination time;
[0011] S32. Initialize the container based on the container lifecycle corresponding to the service time;
[0012] S33. Traverse all cloud edge nodes;
[0013] S34. Determine if the e-th cloud edge node satisfies e=0: If it does, the cloud edge node is a cloud computing center. Based on the number of microservices to be processed received by the cloud and the number of idle containers in the cloud, combined with the cloud business load peak and valley judgment criteria and the cloud redundant resource hierarchical management judgment criteria, the cloud scaling down countdown is adjusted to perform elastic container management and reduce the number of idle containers in the cloud; if it does not satisfy, the cloud edge node is an edge node. Based on the idle devices and remaining resources on the edge side, combined with the edge side business load peak and valley judgment criteria and the edge side redundant resource hierarchical management judgment criteria, the number of automatically scaling containers on the edge side is adjusted to perform elastic container management, and then redundant resources are called to reserve containers to reduce the negative impact caused by container initialization delay;
[0014] S35. Traverse all pending microservices and retrieve pending microservice requests for the unrestricted device of the e-th node;
[0015] S36. Based on the microservice model adapted to the cloud-edge collaborative architecture of the virtual power plant, determine whether the microservice to be processed is an analysis-type microservice: if not, at the e-th node, combine the container idle indicator and the application number to retrieve the required idle container; if so, in the cloud, combine the container idle indicator and the application number to retrieve the required idle container.
[0016] S37. Determine whether the retrieval of the required idle container was successful: If successful, call the retrieved container for microservice processing, and automatically scale the container based on the container lifecycle corresponding to the auto-scaling container to supplement microservice instances; if unsuccessful, deploy the container in real time by creating the container lifecycle corresponding to the container in real time. After the initialization delay, the container initialization is completed, and then the container is called for microservice processing.
[0017] S38. Increment the process step by one. Based on the container model that considers elastic automatic scaling, check the container lifecycle and stop or terminate the container to advance the process step and check the container lifecycle.
[0018] S39. Determine if the process step size exceeds the process termination time. If it does, end the algorithm. If it does not exceed, repeat steps S33~S38 to continue updating the container state and performing microservice processing.
[0019] Furthermore, in step S32, the formula for calculating the container lifecycle corresponding to the service time initialization container is as follows:
[0020] ;
[0021] In the formula: and These refer to the start and end times of the service time window of the e-th cloud edge node, respectively.
[0022] Furthermore, in step S37, the lifecycle of the automatically retractable container satisfies the following condition:
[0023] ;
[0024] In the formula: The application number is the same at real time t. The number of idle containers; when this value is less than the idle container threshold. When the first condition for container expansion is met, the second condition is that the real-time time t is equal to the time of the last expansion. At least the countdown to capacity expansion Among them, the microservice number Taken from A container cluster, denoted as .
[0025] Furthermore, in step S37, the formula for calculating the container lifecycle corresponding to the real-time container creation is as follows:
[0026] ;
[0027] In the formula: This refers to the first microservice ID in the container's queue of microservices awaiting processing. This is the starting point of microservice processing. It is the end point of microservice processing. In terms of the container lifecycle, the container ends at the time of initialization, i.e. Microservices are processed in real time, and processing ends at the point when the microservice is finished. It enters a stopping transient state at that time.
[0028] Furthermore, in step S38, the modeling formula for the container model considering elastic automatic scaling is as follows:
[0029] ;
[0030] ;
[0031] In the formula: To describe the container The lifecycle changes as a function of resource allocation requirements. Container initialization Container running and container stop transient composition, This refers to the first microservice in the queue of microservices waiting to be processed within the container, and its resource configuration requirements. of Refers to the first microservice ID in the microservice queue inside the container. Refers to the step function, Refers to the initial moment when the container was created. Refers to the start and end time of the container. Refers to the container initialization delay. Refers to the transient delay when the container stops.
[0032] Furthermore, the cloud service load peak-valley determination formula in step S34 is as follows:
[0033] ;
[0034] In the formula: This is a branch function, and the application number is the same. Number of microservices to be processed When outputting peaks and valleys, the number of microservices to be processed... Less than the preset threshold If it is a business valley, then the output will be... By With preset threshold Preset threshold The resulting interval comparison outputs... and These refer to the valley period and the peak period, respectively.
[0035] In step S34, the cloud scaling-down countdown is adjusted by combining the peak and valley load criteria for terminal services and the hierarchical management criteria for cloud redundant resources, as follows:
[0036] ;
[0037] In the formula: This is a branch function used to output the adjusted container shrink countdown timer. According to the peak and valley time criteria and number of idle containers Countdown to flexible container shrinkage adjustment. , ,… ,and The elastic coefficient satisfies the hierarchical constraints. .
[0038] Furthermore, the criteria for determining peak and valley service loads at the edge nodes in step S34 are as follows:
[0039] ;
[0040] In the formula: This is a branch function, based on the type of the e-th cloud edge node. Number of idle devices When outputting peak and valley times, the number of idle devices Less than the preset threshold If it is a business valley, then the output will be... By With preset threshold Preset threshold The resulting interval comparison outputs... and These refer to the valley period and the peak period, respectively.
[0041] In step S34, the number of automatically scaling containers on the edge side is adjusted by combining the peak and valley load criteria for edge-side service load and the hierarchical management criteria for edge-side redundant resources, as follows:
[0042] ;
[0043] In the formula: This is a branch function used to output the adjusted container size after a single expansion or contraction. According to the peak and valley time criteria and edge-side remaining resources The container can be flexibly expanded or contracted in a single operation. , , ..., and The elastic coefficient satisfies the hierarchical constraints. .
[0044] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0045] The present invention also provides a virtual power plant control system, comprising:
[0046] The virtual power plant cloud computing center includes a cloud redundancy awareness module, a business status awareness module, a cloud container elastic manager, and a container engine. The cloud container elastic manager is connected to the business status awareness module, the cloud redundancy awareness module, and the container engine, respectively. The cloud redundancy awareness module is connected to the container engine, and the business status awareness module is connected to the virtual power plant edge nodes. The business status awareness module is used to collect the number of microservices to be processed, the cloud redundancy awareness module is used to collect the number of idle containers in the cloud, and the cloud container elastic manager realizes the elastic adjustment of cloud container scaling based on the above data.
[0047] The virtual power plant edge node includes a resource pool, an edge node redundancy awareness module, an equipment status awareness module, an edge node container elastic manager, and a container engine. The edge node container elastic manager is connected to the equipment status awareness module, the edge node redundancy awareness module, and the container engine, respectively. The resource pool is connected to the edge node redundancy awareness module. The equipment status awareness module is connected to the end devices outside the system framework and receives business requests uploaded by the end devices. The equipment status awareness module is used to collect the number of idle devices, the edge node redundancy awareness module is used to collect the remaining resources on the edge side, and the edge node container elastic manager realizes the elastic adjustment of the number of containers in a single scaling based on the above data.
[0048] The application management module integrates the elements of application management, including application library, application packaging and application registration. The application management module is used to receive application configurations uploaded from outside the system framework and distribute the application configurations to the container engines of the virtual power plant cloud computing center and the virtual power plant edge nodes.
[0049] It also includes interconnected memory and processor, in which computer program products as described above are stored.
[0050] This invention has the following beneficial effects: By constructing a microservice model adapted to the cloud-edge collaborative architecture of a virtual power plant, it achieves dynamic perception of cloud-edge resource redundancy. Combined with the peak and valley characteristics of business load, it realizes intelligent scaling of containers and dynamic allocation of resources, effectively reducing resource idle rate and improving the overall resource utilization of the system. Furthermore, it constructs a container model that considers elastic automatic scaling, and combines peak and valley criteria for business load and hierarchical management criteria for resource redundancy to perform elastic management of cloud containers and edge containers. This supports rapid expansion during business peaks and timely scaling down during business valleys, ensuring stable operation and low-latency response of the system in high-concurrency scenarios. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the system framework of a virtual power plant control system.
[0052] Figure 2This is a flowchart illustrating the container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness.
[0053] Figure 3 This is a schematic diagram of the virtual power plant business architecture.
[0054] Figure 4 This is a schematic diagram of a container cluster for a virtual power plant control system.
[0055] Figure 5 This is a schematic diagram of the container elastic management process in a virtual power plant control system. Detailed Implementation
[0056] The present invention will be further described in detail below with reference to specific embodiments.
[0057] This embodiment provides a virtual power plant control system, such as Figure 1 As shown, the system framework includes a virtual power plant cloud computing center, virtual power plant edge nodes, and an application management module. To implement the container elastic management method, the system framework also includes targeted configurations for end devices and applications outside the system framework.
[0058] The virtual power plant cloud computing center comprises a cloud redundancy awareness module, a service status awareness module, a cloud container elastic manager, and a container engine. The cloud container elastic manager connects to the service status awareness module, the cloud redundancy awareness module, and the container engine, respectively. The cloud redundancy awareness module connects to the container engine, and the service status awareness module connects to the virtual power plant edge nodes. The service status awareness module collects data on the number of microservices to be processed, the cloud redundancy awareness module collects data on the number of idle containers in the cloud, and the cloud container elastic manager uses this data to elastically adjust the scaling down of cloud containers.
[0059] The virtual power plant edge node comprises a resource pool, an edge node redundancy awareness module, an equipment status awareness module, an edge node container elastic manager, and a container engine. The edge node container elastic manager connects to the equipment status awareness module, the edge node redundancy awareness module, and the container engine, respectively. The resource pool connects to the edge node redundancy awareness module, and the equipment status awareness module connects to end devices outside the system framework, receiving service requests uploaded by these end devices. The equipment status awareness module collects data on the number of idle devices, the edge node redundancy awareness module collects data on the remaining resources on the edge side, and the edge node container elastic manager uses this data to elastically adjust the number of containers in a single scaling operation. The end device data source consists of a measurement and control module and its related sensors, and is uploaded to the equipment status awareness module of the virtual power plant edge node via a data transmission pipeline.
[0060] The application management module integrates all elements of application management, including application repositories, application packaging, and application registration. It receives application configurations uploaded from outside the system framework. The core elements of these configurations include device type, application ID, microservice processing time, resource configuration requirements, expansion countdown, scaling-down countdown, and metadata related to the number of containers that can be automatically scaled at one time. This metadata, along with the application code, is uploaded to the application management module, which then distributes the application configuration to the container engines of the virtual power plant cloud computing center and the virtual power plant edge nodes. The container engine integrates all elements of the container lifecycle, including container cluster management, container autoscaling management, container creation management, and container termination management. Its core function is to receive instructions from the container elastic manager to adjust the number of containers that can be scaled up or down in the cloud.
[0061] The virtual power plant control system also includes interconnected memory and processor. The memory stores computer program products, which include computer programs that, when executed by the processor, implement... Figure 2 The method shown is a container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness. The method includes the following steps S1, S2, and S3.
[0062] S1. Construct a microservice model adapted to the cloud-edge collaborative architecture of virtual power plants, decompose the virtual power plant business into data collection microservices, analysis microservices and control microservices, and construct the business processing logic based on a directed acyclic graph.
[0063] To fully leverage the advantages of the layered and partitioned architecture of cloud-based high-performance computing and edge-side real-time monitoring and control, the entire virtual power plant business architecture is decomposed into three categories of microservices: "Measurement," "Calculation," and "Control." Specifically, "Measurement" corresponds to data acquisition microservices, "Calculation" to analysis microservices, and "Control" to control microservices. The virtual power plant business architecture is detailed below. Figure 3 As shown, data acquisition and control microservices are containerized by the virtual power plant edge nodes, while analytics microservices are containerized by the virtual power plant cloud computing center. The virtual power plant's business processing follows a business logic based on a directed acyclic graph (DAG), which begins with the data acquisition microservice corresponding to the source node, passes through the analytics microservice, and ends with the control microservice corresponding to the sink node.
[0064] Taking all the above factors into account, for the m-th business, the set Modeling is performed. The i-th microservice is obtained through a set. Modeling, including the microservice processing start time Microservice processing termination time and related application configurations .in, For equipment types, For application number, For microservice processing time, For resource allocation needs, Countdown to capacity expansion begins. Countdown to capacity reduction This represents the number of times the system automatically expands or contracts at a time.
[0065] Each service request is issued by a specific terminal device. Once a terminal device sends a service request, it transitions from an idle state to a non-idle state. For example... Figure 3 As shown, the service processing for the end device starts with the data collection microservice corresponding to the source node and ends with the control microservice corresponding to the sink node. Assume the sink node for the m-th service is... The entire business processing delay It can be calculated using the following formula:
[0066] ;
[0067] ;
[0068] In the formula: The processing delay of the i-th microservice under the m-th business is determined by the microservice queuing time. and microservice processing time It consists of two parts. For the m-th business node The set of predecessor nodes.
[0069] S2. Construct a container model that considers elastic autoscaling, define container lifecycle states including initialization, running and stopping transient states, and set up a container cluster, including real-time container creation, service-time container initialization, and autoscaling containers.
[0070] Containers are lightweight service instances that can be instantiated based on application configuration within a pooled, scalable, and dynamically changing virtual resource environment. They provide service instances for microservice processing and enter a stop transient or scaling-down countdown after microservice processing is complete, eventually terminating automatically. After a container terminates, the resources it occupied are automatically released to provide resources for other services. The containers on the e-th cloud edge node are aggregated... Modeling is performed. The k-th container is obtained through a set. Modeling, including the queue of microservices to be processed. Container cluster tag Container idle indicator Container lifecycle in continuous time The modeling formula for the container model that considers elastic automatic scaling is shown below:
[0071] ;
[0072] ;
[0073] In the formula: To describe the container The lifecycle changes as a function of resource allocation requirements. Container initialization Container running and container stop transient composition. Refers to the first microservice in the queue of microservices awaiting processing within the container. Resource configuration requirements. of Refers to the first microservice number in the microservice queue inside the container. Refers to the step function, Refers to the initial moment when the container was created. Refers to the start and end time of the container. Refers to the container initialization delay. Refers to the transient delay when the container stops.
[0074] According to container cluster Due to differences in container lifecycles, the virtual power plant control system's containers are categorized into three types based on their autoscaling characteristics: Figure 4 As shown, these are examples of containers created in real time. Cloud edge node service time initialization container and automatic telescopic containers In this context, marker 1 indicates the container initialization time, marker 2 indicates the container running time, marker 3 indicates the container stopping time, marker 4 indicates the container termination time, marker 5 indicates the end of the container expansion countdown, marker 6 indicates the end of the shrinkage countdown, marker v indicates the container, and marker P indicates the microservice processing time.
[0075] Create containers in real time The corresponding formula for calculating the container lifecycle is as follows:
[0076] ;
[0077] In the formula: This refers to the first microservice ID in the container's queue of microservices awaiting processing. This is the starting point of microservice processing. This is the termination point for microservice processing. In terms of the container lifecycle, the container ends at the time of initialization, i.e. Microservices are processed in real time, and processing ends at the point when the microservice is finished. It enters a stopping transient state at that time.
[0078] Service time initialization container The corresponding formula for calculating the container lifecycle is as follows:
[0079] ;
[0080] In the formula: and These refer to the start and end times of the service time window of the e-th cloud edge node, respectively.
[0081] Automatic telescopic container Once the corresponding container automatically expands, it can be used for microservice processing. The lifecycle of the corresponding container must meet the following conditions:
[0082] ;
[0083] In the formula: The application number is the same at real time t. The number of idle containers. When this value is less than the idle container threshold. When the container expands, the first condition is met. The second condition is the difference between the current time t and the time of the last expansion. At least the countdown to capacity expansion Among them, the microservice number Taken from A container cluster, denoted as .
[0084] The corresponding container's lifecycle ends after it automatically shrinks. The conditions for automatic shrinking are: This refers to the latency of newly expanded containers after microservice processing. And the countdown to capacity reduction It will then automatically shrink in size.
[0085] S3. Based on the microservice model and container model, and combined with the criteria for peak and off-peak business load and the criteria for hierarchical management of resource redundancy, elastic management is performed on cloud containers and edge containers, including adjusting the countdown timer for cloud container scaling down and the number of edge containers that can be scaled up or down at one time.
[0086] Taking into account the microservice architecture of the virtual power plant and the container lifecycle, and aiming to reduce the number of idle containers and fully utilize redundant resources as the elastic management goals, elastic management is implemented for the containers of the virtual power plant control system. Specifically, as follows... Figure 5 As shown, the steps include S31, S32, S33, S34, S35, S36, S37, S38, and S39.
[0087] S31. Initialize the virtual power plant business scenario, including initializing the business occurrence time, application configuration, edge computing resources, cloud elastic settings, and process termination time.
[0088] S32. Initialize the container based on the container lifecycle formula corresponding to the above service time initialization container.
[0089] S33. Traverse all cloud edge nodes.
[0090] S34. Determine if the e-th cloud edge node satisfies e=0: If it does, the cloud edge node is a cloud computing center. Based on the number of microservices to be processed received by the cloud and the number of idle containers in the cloud, combined with the cloud business load peak and valley judgment criteria and the cloud redundant resource hierarchical management judgment criteria, the cloud scaling down countdown is adjusted to perform elastic container management and reduce the number of idle containers in the cloud; if it does not satisfy, the cloud edge node is an edge node. Based on the idle devices and remaining resources on the edge side, combined with the edge side business load peak and valley judgment criteria and the edge side redundant resource hierarchical management judgment criteria, the number of automatically scaling containers on the edge side is adjusted to perform elastic container management, and then redundant resources are called to reserve containers to reduce the negative impact caused by container initialization delay.
[0091] S35. Traverse all pending microservices and retrieve pending microservice requests for the unrestricted device of the e-th node.
[0092] S36. Based on the microservice model adapted to the cloud-edge collaborative architecture of the virtual power plant described above, determine whether the microservice to be processed is an analysis-type microservice: if not, then at the e-th node, combine the container idle indicator... and application number Retrieve the required idle containers; if so, in the cloud, combine them with the container idle indicator. and application number Retrieve the required idle containers.
[0093] S37. Determine if the retrieval of the required idle container is successful: If successful, call the retrieved container for microservice processing, and automatically expand the container based on the container lifecycle formula corresponding to the above auto-scaling container to supplement microservice instances; if unsuccessful, deploy the container in real time according to the container lifecycle formula corresponding to the above real-time container creation. After the initialization delay, the container initialization is completed, and then the container is called for microservice processing.
[0094] S38. Increment the process step size by one. Based on the container model that considers elastic automatic scaling, check the container lifecycle and stop or terminate the container to advance the process step size and check the container lifecycle.
[0095] S39. Determine if the process step size exceeds the process termination time. If it does, end the algorithm. If it does not exceed, repeat steps S33~S38 to continue updating the container state and performing microservice processing.
[0096] In step S34 above, container elastic management is achieved through peak and off-peak load criteria and redundant resource hierarchical management criteria.
[0097] The formula for determining peak and off-peak loads for cloud services is as follows:
[0098] ;
[0099] In the formula: This is a branch function, and the application number is the same. Number of microservices to be processed Output peaks and troughs. This is based on the number of microservices pending processing. Less than the preset threshold If it is a business valley, then the output will be... Similarly, by... With preset threshold Preset threshold The resulting interval comparison outputs... and , respectively referring to the valley time and the peak time.
[0100] The cloud scaling-down countdown is adjusted by combining the peak and off-peak load criteria for terminal services and the hierarchical management criteria for cloud redundant resources, as follows:
[0101] ;
[0102] In the formula: This is a branch function used to output the adjusted container shrink countdown timer. According to peak and valley time criteria and number of idle containers Countdown to flexible container shrinkage adjustment. , ,… ,and The elastic coefficient satisfies the hierarchical constraints. .
[0103] The criteria for determining peak and off-peak service loads at edge nodes are as follows:
[0104] ;
[0105] In the formula: This is a branch function, based on the type of the e-th cloud edge node. Number of idle devices Output peaks and troughs. When the number of idle devices... Less than the preset threshold If it is a business valley, then the output will be... Similarly, by... With preset threshold Preset threshold The resulting interval comparison outputs... and , respectively referring to the valley time and the peak time.
[0106] The number of automatically scaling containers on the edge side is adjusted by combining the peak and valley load criteria for edge-side business load and the hierarchical management criteria for edge-side redundant resources, as follows:
[0107] ;
[0108] In the formula: This is a branch function used to output the adjusted container size after a single expansion or contraction. According to peak and valley time criteria and edge-side remaining resources The container can be flexibly expanded or contracted in a single operation. , , ..., and The elastic coefficient satisfies the hierarchical constraints. .
[0109] This embodiment constructs a microservice model adapted to the cloud-edge collaborative architecture of a virtual power plant, enabling dynamic perception of cloud-edge resource redundancy. Combined with peak and valley load characteristics, it achieves intelligent scaling of containers and dynamic resource allocation, effectively reducing resource idle rates and improving overall system resource utilization. Furthermore, it constructs a container model that considers elastic automatic scaling, combining peak and valley load criteria and resource redundancy hierarchical management criteria to elastically manage cloud and edge containers. This supports rapid expansion during peak periods and timely scaling down during off-peak periods, ensuring stable system operation and low-latency response in high-concurrency scenarios.
[0110] The above description is merely an embodiment of the present invention and does not limit the scope of patent protection. Any non-substantial changes or substitutions made by those skilled in the art based on the present invention will still fall within the scope of patent protection.
Claims
1. A container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness, characterized in that, Includes the following steps: S1. Construct a microservice model adapted to the cloud-edge collaborative architecture of virtual power plants, decompose the virtual power plant business into data collection microservices, analysis microservices and control microservices, and construct the business processing logic based on a directed acyclic graph; S2. Construct a container model that considers elastic autoscaling, define the container lifecycle states, including initialization, running and stopping transient states, and set up the container cluster, including real-time container creation, service-time container initialization and autoscaling. S3. Based on the microservice model and the container model, and combined with the peak and valley load criteria and the resource redundancy hierarchical management criteria, elastic management is performed on cloud containers and edge containers, including adjusting the countdown timer for cloud container scaling down and the number of edge containers that can be scaled up or down at one time. Step S3 includes the following steps: S31. Initialize the virtual power plant business scenario, including initializing the business occurrence time, application configuration, edge computing resources, cloud elastic settings, and process termination time; S32. Initialize the container based on the container lifecycle corresponding to the service time; S33. Traverse all cloud edge nodes; S34. Determine if the e-th cloud edge node satisfies e=0: If it does, the cloud edge node is a cloud computing center. Based on the number of microservices to be processed received by the cloud and the number of idle containers in the cloud, combined with the cloud business load peak and valley judgment criteria and the cloud redundant resource hierarchical management judgment criteria, the cloud scaling down countdown is adjusted to perform elastic container management and reduce the number of idle containers in the cloud; if it does not satisfy, the cloud edge node is an edge node. Based on the idle devices and remaining resources on the edge side, combined with the edge side business load peak and valley judgment criteria and the edge side redundant resource hierarchical management judgment criteria, the number of automatically scaling containers on the edge side is adjusted to perform elastic container management, and then redundant resources are called to reserve containers to reduce the negative impact caused by container initialization delay; S35. Traverse all pending microservices and retrieve pending microservice requests for the unrestricted device of the e-th node; S36. Based on the microservice model adapted to the cloud-edge collaborative architecture of the virtual power plant, determine whether the microservice to be processed is an analysis-type microservice: if not, at the e-th node, combine the container idle indicator and the application number to retrieve the required idle container; if so, in the cloud, combine the container idle indicator and the application number to retrieve the required idle container. S37. Determine whether the retrieval of the required idle container was successful: If successful, call the retrieved container for microservice processing, and automatically scale the container based on the container lifecycle corresponding to the auto-scaling container to supplement microservice instances; if unsuccessful, deploy the container in real time by creating the container lifecycle corresponding to the container in real time. After the initialization delay, the container initialization is completed, and then the container is called for microservice processing. S38. Increment the process step by one. Based on the container model that considers elastic automatic scaling, check the container lifecycle and stop or terminate the container to advance the process step and check the container lifecycle. S39. Determine if the process step size exceeds the process termination time. If it does, end the algorithm. If it does not exceed, repeat steps S33~S38 to continue updating the container state and performing microservice processing.
2. The container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness according to claim 1, characterized in that, In step S32, the formula for calculating the container lifecycle corresponding to the service time initialization container is as follows: ; In the formula: and These refer to the start and end times of the service time window of the e-th cloud edge node, respectively. Mark the container cluster.
3. The container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness as described in claim 1, characterized in that, In step S37, the lifecycle of the automatically retractable container satisfies the following condition: ; In the formula: The application number is the same at real time t. The number of idle containers; when this value is less than the idle container threshold. When the first condition for container expansion is met, the second condition is that the real-time time t is equal to the time of the last expansion. At least the countdown to capacity expansion Among them, the microservice number Taken from A container cluster, denoted as ; Mark the container cluster.
4. The container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness according to claim 1, characterized in that, In step S37, the formula for calculating the container lifecycle corresponding to the real-time container creation is as follows: ; In the formula: This refers to the first microservice ID in the container's queue of microservices awaiting processing. This is the starting point of microservice processing. It is the end point of microservice processing. In terms of the container lifecycle, the container ends at the time of initialization, i.e. Microservices are processed in real time, and processing ends at the point when the microservice is finished. It enters a stopping transient state at a certain time; Mark the container cluster.
5. The container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness according to claim 1, characterized in that, In step S38, the modeling formula for the container model considering elastic automatic expansion and contraction is as follows: ; ; In the formula: To describe the container The lifecycle changes as a function of resource allocation requirements. Container initialization Container running and container stop transient composition, This refers to the first microservice in the queue of microservices waiting to be processed within the container, and its resource configuration requirements. of Refers to the first microservice ID in the microservice queue inside the container. Refers to the step function, Refers to the initial moment when the container was created. Refers to the start and end time of the container. Refers to the container initialization delay. This refers to the transient delay when the container stops, where t is the real-time time.
6. The container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness according to claim 1, characterized in that, The formula for determining peak and off-peak cloud service load in step S34 is as follows: ; In the formula: This is a branch function, and the application number is the same. Number of microservices to be processed When outputting peaks and valleys, the number of microservices to be processed... Less than the preset threshold If it is a business valley, then the output will be... By With preset threshold Preset threshold The resulting interval comparison outputs... and These refer to the valley period and the peak period, respectively. In step S34, the cloud scaling-down countdown is adjusted by combining the peak and valley load criteria for terminal services and the hierarchical management criteria for cloud redundant resources, as follows: ; In the formula: This is a branch function used to output the adjusted container shrink countdown timer. According to the peak and valley time criteria and number of idle containers Countdown to flexible container shrinkage adjustment. , , , It is used to form branch functions Different preset thresholds for the domain interval; , , ..., and The elastic coefficient satisfies the hierarchical constraints. .
7. The container elastic management method for a virtual power plant control system based on cloud-edge resource redundancy awareness according to claim 1, characterized in that, The criteria for determining peak and valley service loads at the edge nodes in step S34 are as follows: ; In the formula: This is a branch function, based on the type of the e-th cloud edge node. Number of idle devices When outputting peak and valley times, the number of idle devices Less than the preset threshold If it is a business valley, then the output will be... By With preset threshold Preset threshold The resulting interval comparison outputs... and These refer to the valley period and the peak period, respectively. In step S34, the number of automatically scaling containers on the edge side is adjusted by combining the peak and valley load criteria for edge-side service load and the hierarchical management criteria for edge-side redundant resources, as follows: ; In the formula: This is a branch function used to output the adjusted container size after a single expansion or contraction. According to the peak and valley time criteria and edge-side remaining resources The container can be flexibly expanded or contracted in a single operation. , , , It is used to form branch functions Different preset thresholds for the domain interval; , , ..., and The elastic coefficient satisfies the hierarchical constraints. .
8. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
9. A virtual power plant control system, comprising: The virtual power plant cloud computing center includes a cloud redundancy awareness module, a business status awareness module, a cloud container elastic manager, and a container engine. The cloud container elastic manager is connected to the business status awareness module, the cloud redundancy awareness module, and the container engine, respectively. The cloud redundancy awareness module is connected to the container engine, and the business status awareness module is connected to the virtual power plant edge nodes. The business status awareness module is used to collect the number of microservices to be processed, the cloud redundancy awareness module is used to collect the number of idle containers in the cloud, and the cloud container elastic manager realizes the elastic adjustment of cloud container scaling based on the above data. The virtual power plant edge node includes a resource pool, an edge node redundancy awareness module, an equipment status awareness module, an edge node container elastic manager, and a container engine. The edge node container elastic manager is connected to the equipment status awareness module, the edge node redundancy awareness module, and the container engine, respectively. The resource pool is connected to the edge node redundancy awareness module. The equipment status awareness module is connected to the end devices outside the system framework and receives business requests uploaded by the end devices. The equipment status awareness module is used to collect the number of idle devices, the edge node redundancy awareness module is used to collect the remaining resources on the edge side, and the edge node container elastic manager realizes the elastic adjustment of the number of containers in a single scaling based on the above data. The application management module integrates the elements of application management, including application library, application packaging and application registration. The application management module is used to receive application configurations uploaded from outside the system framework and distribute the application configurations to the container engines of the virtual power plant cloud computing center and the virtual power plant edge nodes. It also includes interconnected memory and processor, the memory storing the computer program product as described in claim 8.