Lightweight container-based power grid analysis and calculation service elastic expansion method and system
By adopting a lightweight container-based scheduling management method in the power grid analysis and computing service, the problems of poor scalability, poor flexibility and low resource utilization in the existing technology are solved, and high concurrency, flexible expansion and efficient resource utilization are achieved. effect.
Patent Information
- Application Number
- CN202311043128.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
The existing power grid analysis and computing services are not scalable, have poor flexibility, and have low computing resource utilization, and are not suitable for deployment in production safety areas.
The scheduling management method based on lightweight containers is adopted, and a single-user analysis and calculation service is used as a scheduling unit, and the container is allocated to the computing user through dynamic scheduling management to achieve elastic expansion.
It has achieved strong elastic expansion flexibility, high concurrency performance, and high resource utilization, and can be deployed in the production safety area.
Smart Images

Figure CN119494479A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power grid dispatching systems, and in particular relates to a method and system for elastically expanding power grid analysis and computing services based on lightweight containers. Background Art
[0002] Power system analysis and computing services (flow calculation, system simulation, state estimation, transient stability analysis, etc.) have the characteristics of exclusive resources and statefulness. The existing method is to allocate fixed applications, fixed shards, or even fixed nodes to computing users, which has problems such as weak scalability, poor flexibility, and waste of computing resources. Containers have the characteristics of elastic expansion. Generally, container scheduling uses clusters as scheduling units and uses heavyweight systems such as Kubernetes as container scheduling management, which is not suitable for use in large safety production areas. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for elastically expanding power grid analysis and computing services based on lightweight containers, using lightweight container scheduling and management, taking the analysis and computing services of a single user as the scheduling unit, and dynamically allocating containers to computing users through container dynamic scheduling and management. The method has the advantages of strong scalability and flexibility, full use of computing resources, strong analysis and computing capabilities, and can be deployed in large safe production areas.
[0004] In order to achieve the above object, the solution of the present invention is:
[0005] A method for elastically extending power grid analysis and computing services based on lightweight containers includes the following steps:
[0006] Step 1: The user submits an analysis and calculation screen request to the service gateway through the human-machine tool module, and the service gateway forwards the request to the human-machine service module;
[0007] Step 2: The human-machine service module initiates a container request to the container management service module according to the user information;
[0008] Step 3: The container management service module creates a container instance and sends the container information to the human-machine service module;
[0009] Step 4: The human-machine service module accesses the container, reads the analysis and calculation screen, and sends it to the service gateway;
[0010] Step 5: The service gateway forwards the analysis and calculation screen to the human-machine tool module.
[0011] In the above step 3, the container management service module reads the container scheduling policy, assigns a container name to the user, and starts the corresponding container.
[0012] The container management service module reads the container scheduling strategy from the history library, and the history library records the association relationship between user operations and containers.
[0013] The above container scheduling strategy includes configuring the application image address, assigning a container name, assigning a running node, and assigning a container port.
[0014] It also includes that when the user environment of the human-machine tool module is switched, the human-machine tool module sends a request to exit the container instance to the container management service module.
[0015] The container management service module reads the historical library user container information table, obtains the allocated container instance information according to the user, and returns the destruction status if the user has not allocated a container instance; if the user has allocated a container instance, the container interface is called to delete the container instance, the destruction status is returned, and the historical library user container information is updated and deleted.
[0016] A lightweight container-based elastic expansion system for power grid analysis and computing services includes a service gateway, a human-machine service module, a container management service module, and several human-machine tool modules located on an analysis and computing workstation. Each human-machine tool module interacts with the human-machine service module through the service gateway.
[0017] The human-machine tool module is used to send an analysis and calculation screen request to the human-machine service module through the service gateway, and receive the analysis and calculation screen sent by the human-machine service module through the service gateway; the human-machine service module is used to initiate a container request to the container management service module based on the request of the human-machine tool module, access the corresponding container and read the analysis and calculation screen according to the container information sent by the container management service module, and forward the read analysis and calculation screen to the human-machine tool module through the service gateway; the container management service module is used to create a container instance, and return the container information to the human-machine service module.
[0018] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, the steps of the elastic expansion method of power grid analysis computing services based on lightweight containers as described above are implemented.
[0019] A computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the steps of the aforementioned method for elastically expanding power grid analysis computing services based on lightweight containers are implemented.
[0020] After adopting the above scheme, the present invention can solve the problems of inflexible expansion of power grid analysis and computing services, low resource utilization, poor user concurrency, and bulky and inflexible use of cloud computing suites.
[0021] The beneficial effects of the present invention are embodied in:
[0022] (1) Flexible expansion and high concurrent performance. Each user corresponds to a container, supporting multi-user concurrent analysis and computing without affecting each other.
[0023] (2) High resource utilization. When a user exits, the container automatically exits, which does not occupy resources or monopolize node resources, thus achieving resource sharing and reuse.
[0024] (3) It is easy and flexible to deploy, does not rely on large cloud computing suites, and can be deployed in large secure production areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a flow chart of container allocation of the present invention;
[0026] Figure 2 It is a schematic diagram of the principle of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0028] The application principle of the present invention is described in detail below in conjunction with the accompanying drawings.
[0029] like Figure 1 As shown, the present invention provides a method for elastically expanding power grid analysis and computing services based on lightweight containers. First, a single-user analysis and computing service is used as a container scheduling unit, and a lightweight container management service dynamically allocates container instances according to users; then, the human-machine service applies for a container from the lightweight container management service, and directly interacts with the container after obtaining the allocated container information; when the user environment of the human-machine tool is switched, a request to exit the container instance is sent to the container management service.
[0030] In the present invention, a single-user analysis and computing service is used as a container scheduling unit, wherein the power grid analysis and computing service is used to simulate and study the behavior of the power system under various fault conditions, which can realize the simulation and calculation of various forms of the power grid, and support the adjustment of the operation mode based on the real-time power grid model, the future power grid model, and the historical power grid model. The present invention encapsulates the analysis and computing function as a service resource, responds to the standard service request method, and abstracts the computing and analysis function into a service form to provide it to the user. The single-user analysis and computing service is packaged as a container image and stored in an image warehouse. The present invention can dynamically allocate computing and storage capabilities to users according to demand, thereby improving the utilization of computing resources.
[0031] In the present invention, the lightweight container management service dynamically allocates container instances according to users, including the following aspects: ① The container management service expands the container scheduling service capabilities based on system management, including container scheduling startup, container configuration reading, container instance allocation to users, and user container allocation history records; ② The container management service obtains the container operation status information through the native container interface and stores it in the main site real-time library. Read the container application scheduling configuration in the history library, and write the user operation and container association relationship into the history library; ③ The container management tool obtains the container operation status, resource monitoring and other information through the container management service interface. The container instance allocation user information is obtained by reading the history library user container relationship table. The container that has been allocated to each node can be manually started and stopped. The container in the stopped state can be started by the tool, and the container in the running state can be stopped by the tool; ④ The container management tool provides the container application scheduling policy configuration function, configures the application image address, allocates the container name, allocates the running node, and allocates the container port. The relevant configuration can be modified and deleted. The configuration information is stored in the history library; ⑤ The process operation status in the container is monitored to realize the notification and alarm function.
[0032] In the present invention, the human-machine service applies for a container from a lightweight container management service, and after obtaining the allocated container information, directly interacts with the container, including the following contents: ① The container management console completes the scheduling strategy configuration of the application container through the configuration function, including the application name, the scheduled node, the container running port, the image address, the container name and writes it into the historical library container scheduling configuration information table; ② The user triggers the analysis and computing service request in the human-machine tool, and the human-machine tool initiates a container request to the container management service according to the application information and user information, and the request is sent to the human-machine service through the human-machine gateway; ③ The human-machine service sends the container request to the container management service; ④ The container management service reads the container scheduling configuration information in the historical library, reads the scheduling configuration strategy according to the application name, assigns the associated container name to the user, and the node port starts the application container at the corresponding node. The application container assigned by the user is updated to the historical library user container information table; ⑤ The container management service calls the container interface to obtain the application container startup status return, and returns the container information, startup status, etc. to the human-machine service. The human-machine service directly accesses the container based on this information; ⑥ After receiving the subsequent data request or operation instruction, the human-machine service directly sends it to the analysis and computing service in the container.
[0033] In the present invention, when the user environment of the human-machine tool is switched, a request to exit the container instance is sent to the container management service, including the following contents: ① The container management console monitors the container running status, obtains the application container running status through the container management service interface, reads the historical library user container application information table, and records the container name, container running node and port, running status, CPU usage, memory usage, associated users, etc.; ② When the human-machine tool switches applications or exits the tool, the human-machine service initiates a container termination request and sends it to the container management service; ③ The container management service reads the historical library user container information table and obtains the allocated container instance information according to the user; ④ The container management service determines whether the user allocates a container, and returns the destroyed status if the container is not allocated; ⑤ The user has allocated a container instance, and the container management service calls the container interface to delete the container instance, returns the destroyed status, and updates and deletes the historical library user container information.
[0034] Cooperate Figure 2 As shown, the present invention specifically comprises the following steps:
[0035] S1: The user triggers an analysis and computing service request in the human-machine tool;
[0036] The parameters of the request sent by the user usually include the following: 1) application information (application name, database name) 2) user information (user name) 3) service type (service name) 4) operation type (operation name) 5) plant station name 6) screen name 7) object information (object name) 8) operation time 9) others (expandable). In this embodiment, the analysis and calculation service request includes the following parameters: 1) analysis and calculation application (application name, database name) 2) current user (user name) 3) analysis and calculation service (service name) 4) start analysis and calculation (operation name) 5) current plant station (plant station name) 6) current screen (screen name) 7) device object of the mouse position (object name) 8) current time 9) others (other parameters);
[0037] S2: The analysis and computing service request is forwarded to the human-machine service through the service gateway;
[0038] S3: The human-machine service initiates a container request to the container management service based on application information and user information;
[0039] S4: The container management service reads the container scheduling policy;
[0040] S5: The container management service also pulls images from the image repository;
[0041] S6: The container management service creates a container instance;
[0042] S7: The container management service sends the created container information to the human-machine service;
[0043] S8: The human-machine service accesses the corresponding container based on the container information sent by the container management service to read the screen and data;
[0044] S9: The human-machine service returns the screen and data to the service gateway;
[0045] S10: The service gateway forwards the image and data to the human-machine tool, and the human-machine tool obtains the analysis and calculation image.
[0046] The present invention also provides an elastic expansion system for power grid analysis and computing services based on lightweight containers, comprising a service gateway, a human-machine service module, a container management service module and several human-machine tool modules arranged on the analysis and computing workstation, wherein each human-machine tool module interacts with the human-machine service module through the service gateway, the human-machine tool module is used to send an analysis and computing screen request to the human-machine service module through the service gateway, and receive the analysis and computing screen sent by the human-machine service module through the service gateway; the human-machine service module is used to initiate a container request to the container management service module based on the request of the human-machine tool module, access the corresponding container and read the analysis and computing screen according to the container information sent by the container management service module, and forward the read analysis and computing screen to the human-machine tool module through the service gateway; the container management service module is used to create a container instance, and return the container information to the human-machine service module.
[0047] An embodiment of the present invention also provides another lightweight container-based elastic expansion device for power grid analysis computing services, comprising: a processor and a memory configured to store a computer program that can run on the processor; wherein, when the processor is configured to run the computer program, it executes the method steps in the aforementioned embodiment.
[0048] Of course, in actual application, the various components in the device are coupled together through a bus system. It can be understood that the bus system is used to realize the connection and communication between these components. In addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.
[0049] In practical applications, the processor includes a field programmable gate array (FPGA), and the processor may be a central processing unit (CPU) or a digital signal processor (DSP). It is understandable that for different devices, the electronic device used to implement the function of the processor may be other, and the embodiment of the present invention does not specifically limit it.
[0050] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.
[0051] In an exemplary embodiment, an embodiment of the present invention further provides a computer-readable storage medium for storing a computer program.
[0052] Optionally, the computer-readable storage medium can be applied to any one of the methods in the embodiments of the present invention, and the computer program enables the computer to execute the corresponding processes implemented by the processor in each method in the embodiments of the present invention, which will not be described in detail here for the sake of brevity.
[0053] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0054] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for elastically expanding power grid analysis and computing services based on lightweight containers, characterized in that The steps include: Step 1: The user submits an analysis and calculation screen request to the service gateway through the human-machine tool module, and the service gateway forwards the request to the human-machine service module; Step 2: The human-machine service module initiates a container request to the container management service module according to the user information; Step 3: The container management service module creates a container instance and sends the container information to the human-machine service module; Step 4: The human-machine service module accesses the container, reads the analysis and calculation screen, and sends it to the service gateway; Step 5: The service gateway forwards the analysis and calculation screen to the human-machine tool module.
2. The method according to claim 1, characterized in that: In step 3, the container management service module reads the container scheduling policy, assigns a container name to the user, and starts the corresponding container.
3. The method according to claim 2, characterized in that: The container management service module reads the container scheduling strategy from the history library, and the history library records the association relationship between user operations and containers.
4. The method according to claim 2, characterized in that: The container scheduling strategy includes configuring the application image address, allocating the container name, allocating the running node, and allocating the container port.
5. The method according to claim 1, characterized in that: It also includes that when the user environment of the human-machine tool module is switched, the human-machine tool module sends a request to exit the container instance to the container management service module.
6. The method according to claim 5, characterized in that: The container management service module reads the historical library user container information table, obtains the allocated container instance information according to the user, and returns the destruction status if the user has not allocated a container instance; if the user has allocated a container instance, calls the container interface to delete the container instance, returns the destruction status, and updates and deletes the historical library user container information.
7. A lightweight container-based elastic expansion system for power grid analysis and computing services, characterized by: It includes a service gateway, a human-machine service module, a container management service module and several human-machine tool modules located on the analysis and computing workstation, and each human-machine tool module interacts with the human-machine service module through the service gateway; The human-machine tool module is used to send an analysis and calculation screen request to the human-machine service module through the service gateway, and receive the analysis and calculation screen sent by the human-machine service module through the service gateway; the human-machine service module is used to initiate a container request to the container management service module based on the request of the human-machine tool module, access the corresponding container and read the analysis and calculation screen according to the container information sent by the container management service module, and forward the read analysis and calculation screen to the human-machine tool module through the service gateway; the container management service module is used to create a container instance, and return the container information to the human-machine service module.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that: When the processor executes the computer program, the steps of the method for elastically expanding power grid analysis and computing services based on lightweight containers as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program; characterized in that: When the computer program is executed by a processor, the steps of the method for elastically expanding power grid analysis computing services based on lightweight containers as described in any one of claims 1 to 6 are implemented.