A service configuration method and system in a power grid dispatching automation system
By uniformly maintaining and synchronously updating the service information and configuration information of the power grid scheduling automation system in the service configuration center, the problem of cumbersome and out-of-synchronization of manually modifying configuration files in the existing technology is solved, and efficient configuration management is achieved.
Patent Information
- Application Number
- CN202211238633.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-10-11
AI Technical Summary
In the power grid scheduling automation system, when modifying configuration parameters, you need to manually modify the configuration files on multiple hosts, which is cumbersome and may cause the configuration files to be out of synchronization.
The service information and configuration information are maintained uniformly in the service configuration center, and the configuration is updated synchronously in the shared memory through the service configuration management process and the change process. Each service queryes and subscribes to the configuration change information through the interface, so that all hosts can be updated synchronously in one modification.
It realizes that the configuration files of all hosts can be updated synchronously without restarting the service, avoiding the problem of out-of-synchronization of the configuration files.
Smart Images

Figure CN115481924B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power grid dispatching automation, and in particular relates to a service configuration method and system in a power grid dispatching automation system. Background Art
[0002] Service-Oriented Architecture (SOA) has been widely adopted in power grid dispatch automation systems. By encapsulating functions into services, business requirements are met. In the next-generation power grid technical support system, each service has its own configuration parameters that need to be maintained. These configuration parameters are an important component of the service.
[0003] Currently, each service maintains its own configuration parameters through configuration files. Changes to these parameters require manual modification of the configuration files and restarting the service. Each service may be deployed on multiple machines simultaneously, so modifying a single configuration parameter requires manually modifying the configuration files on multiple machines. This is cumbersome and can cause the configuration files on each machine to become out of sync. Summary of the Invention
[0004] The purpose of the present invention is to provide a service configuration method and system in a power grid dispatching automation system to solve the technical problem in the prior art that when modifying a certain configuration parameter, it is necessary to manually modify the configuration files on multiple hosts. This operation is cumbersome, the modification does not take effect immediately, and may cause the configuration files on each host to be out of sync.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] In a first aspect, a service configuration method in a power grid dispatching automation system is provided, wherein a service configuration management process is deployed in a service configuration center, and a service configuration change process is deployed in each host. The method is executed by the service configuration management process, including: responding to a maintenance request for service information or service configuration information, maintaining the service information or service configuration information in a database, and writing a change record of the service information or service configuration information into a cache.
[0007] Furthermore, the service information includes: at least one of service ID, service name, version number, scene, scene instance, sub-scene, sub-scene instance and manufacturer; the service configuration information includes: at least one of service ID, configuration item and configuration value.
[0008] Furthermore, the maintenance request for the service information or service configuration information comes from a graphical interface or a command line interface.
[0009] Secondly, a service configuration method in a power grid dispatching automation system is provided, wherein a service configuration management process is deployed in a service configuration center, and a service configuration change process is deployed in each host. The method is executed by the service configuration change process, including: reading the full amount of service information and service configuration information from the database at startup, and writing them into the shared memory of the host where the service configuration change process is located; reading the cache in real time, and judging whether there is a change record of the service information or service configuration information in the cache. When the judgment result is "yes", reading the latest service information or service configuration information from the database, and writing them into the shared memory of the host where the service configuration change process is located.
[0010] Furthermore, each service queries service information and service configuration information from the shared memory, including: querying the service information list, querying service information according to the service ID, querying the service configuration list according to the service ID, querying the configuration value according to the service ID and configuration item, and querying the service information list according to the configuration item and configuration value.
[0011] Furthermore, each service determines whether the service configuration has been changed by querying the service configuration information in the shared memory in real time.
[0012] According to a third aspect, a service configuration system is provided in a power grid dispatching automation system, wherein a service configuration management process is deployed in a service configuration center, and a service configuration change process is deployed in each host. The method is executed by a service configuration change process, and includes: a service configuration management process for responding to maintenance requests for service information or service configuration information, performing service information maintenance or service configuration information maintenance in a database, and writing change records of the service information or service configuration information into a cache; a service configuration change process for reading the full amount of service information and service configuration information from the database upon startup, and writing them into the shared memory of the host where the service configuration change process is located; and further for reading the cache in real time, and determining whether there is a change record of the service information or service configuration information in the cache. When the determination result is "yes", the latest service information or service configuration information is read from the database, and written into the shared memory of the host where the service configuration change process is located.
[0013] Furthermore, it also includes a service configuration query interface, which is used for each service to query service information and service configuration information from the shared memory, including: querying the service information list, querying service information based on the service ID, querying the service configuration list based on the service ID, querying the configuration value based on the service ID and configuration item, and querying the service information list based on the configuration item and configuration value.
[0014] Furthermore, it also includes a service configuration change subscription interface, which is used for each service to determine whether the service configuration has changed by querying the service configuration information in the shared memory in real time.
[0015] Compared with the existing technology, the beneficial effects achieved by the present invention are as follows: the present invention uniformly maintains service information and service configuration information in the service configuration center, and each service queries the service configuration and subscribes to configuration change information through the interface. When a certain configuration parameter is modified, only one modification is required to achieve synchronous update of all hosts, without the need to restart the service, and there is no problem of unsynchronized configuration files on each host. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the main framework of a service configuration system in a power grid dispatching automation system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0018] Example 1:
[0019] A service configuration method in a power grid dispatching automation system, wherein a service configuration management process is deployed in a service configuration center, and a service configuration change process is deployed in each host. The method is executed by the service configuration management process and includes:
[0020] In response to a maintenance request for service information or service configuration information, maintaining the service information or service configuration information in a database, and writing a change record of the service information or service configuration information into a cache;
[0021] The method is executed by the service configuration change process and includes:
[0022] At startup, the full amount of service information and service configuration information is read from the database and written to the shared memory of the host where the service configuration change process is located;
[0023] Read the cache in real time and determine whether there is a change record of service information or service configuration information in the cache. When the judgment result is "yes", read the latest service information or service configuration information from the database and write it to the shared memory of the host where the service configuration change process is located.
[0024] This embodiment includes the following main steps.
[0025] 1) Maintain service information in the graphical interface or command line interface, including adding, modifying, deleting, and querying service information. Service information includes: service ID, service name, version number, scenario, scenario instance, sub-scenario, sub-scenario instance, and manufacturer.
[0026] 2) Maintain service configuration information in the graphical interface or command line interface, including adding, modifying, deleting, and querying service configuration information, where the service configuration information includes: service ID, configuration items, and configuration values.
[0027] 3) The service configuration management process receives maintenance requests from the graphical interface or command line interface and handles them separately:
[0028] If a request is made to add a new service, the service ID will be checked from the database table first to see if it already exists. If so, a failure is returned. Otherwise, a piece of service information will be inserted into the database table. If a request is made to modify a service, the service ID will be checked from the database table first to see if it already exists. If so, the service information in the database table will be modified. Otherwise, a failure is returned. If a request is made to delete a service, the service ID will be checked from the database table first to see if it already exists. If so, the service information in the database table will be deleted. Otherwise, a failure is returned.
[0029] If a request is made to add new service configuration information, the service ID and configuration item will be checked from the database table to see if they already exist. If so, a failure is returned. Otherwise, a new service configuration information will be inserted into the database table. If a request is made to modify service configuration information, the service ID and configuration item will be checked from the database table to see if they already exist. If so, the service configuration information in the database table will be modified. Otherwise, a failure is returned. If a request is made to delete service configuration information, the service ID and configuration item will be checked from the database table to see if they already exist. If so, the service configuration information in the database table will be deleted. Otherwise, a failure is returned.
[0030] For requests to add, modify, or delete service information and service configuration information, the service configuration management process not only operates the database but also writes change records of the service information and service configuration information into the cache.
[0031] 4) The service configuration change process is deployed on each host and is used to write service information and service configuration information into the shared memory of the host.
[0032] When the service configuration change process starts, the full amount of service information and service configuration information is read from the database table and written to the machine shared memory; the service configuration change process reads the cache in real time to determine whether the service information or service configuration information has changed. If there is a change, the database table is read and the latest service information or service configuration information is written to the shared memory.
[0033] 5) Each service queries service configuration information through the service configuration query interface.
[0034] The service configuration query interface queries service information and service configuration information from shared memory, and provides multiple interface forms, including: querying the service information list, querying service information based on service ID, querying the service configuration list based on service ID, querying configuration values based on service ID and configuration items, querying the service information list based on configuration items and configuration values, etc.
[0035] 6) Each service subscribes to service configuration change information through the service configuration change subscription interface.
[0036] The service configuration change subscription interface determines whether the service configuration has changed by querying the service configuration information in shared memory in real time. It provides a separate interface for external users. It requires filling in the service ID and configuration item list and providing a callback function.
[0037] 7) When configuration information changes, the system notifies the services that have subscribed to the information.
[0038] For services that use the service configuration change subscription interface, if the configuration information subscribed by the service changes, the callback function specified by the service will be called.
[0039] The present invention uniformly maintains service information and service configuration information in a service configuration center. Each service queries the service configuration through an interface and subscribes to configuration change information. When a configuration parameter is modified, only one modification is required to achieve synchronous update of all hosts without restarting the service, and there is no problem of unsynchronized configuration files on each host.
[0040] Example 2:
[0041] Based on the service configuration method in a power grid dispatching automation system described in Example 1, this embodiment provides a service configuration system in a power grid dispatching automation system, wherein the service configuration management process is deployed in a service configuration center, and the service configuration change process is deployed in each host, including a service configuration management interface, a service configuration management process, a service configuration display process, a service configuration change process, a database, and a cache.
[0042] The service configuration management process is used to respond to maintenance requests for service information or service configuration information (including operations such as adding, modifying, and deleting), maintain service information or service configuration information in the database, and write change records of service information or service configuration information into the cache.
[0043] The service configuration change process is used to read the full amount of service information and service configuration information from the database when it starts, and write it to the shared memory of the host where the service configuration change process is located; it is also used to read the cache in real time and determine whether there is a change record of the service information or service configuration information in the cache. When the judgment result is "yes", the latest service information or service configuration information is read from the database and written to the shared memory of the host where the service configuration change process is located.
[0044] The service configuration query interface is used by each service to query service information and service configuration information from shared memory, including: querying the service information list, querying service information based on service ID, querying the service configuration list based on service ID, querying configuration values based on service ID and configuration items, and querying the service information list based on configuration items and configuration values.
[0045] The service configuration change subscription interface is used by each service to determine whether the service configuration has changed by querying the service configuration information in the shared memory in real time.
[0046] The service configuration management interface is used to maintain service configuration information, including command line interface and graphical interface.
[0047] The service configuration display process is deployed on the graphical gateway machine to provide a background interface for the graphical interface.
[0048] The database is used to store the full amount of service configuration information.
[0049] The cache is used to store service information and service configuration information change information.
[0050] The service configuration query client queries the service configuration information from the shared memory of each host in real time. Each service queries the required configuration information through the service configuration query client.
[0051] The embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application may be implemented in various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0052] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0053] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0054] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0055] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0056] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A service configuration method in a power grid dispatching automation system, characterized in that: The service configuration management process is deployed in the service configuration center, and the service configuration change process is deployed on each host. The method executed by the service configuration management process includes: In response to a maintenance request for service information or service configuration information, maintaining the service information or service configuration information in a database, and writing a change record of the service information or service configuration information into a cache; The method is executed by the service configuration change process and includes: At startup, the full amount of service information and service configuration information is read from the database and written to the shared memory of the host where the service configuration change process is located; Read the cache in real time and determine whether there is a change record of service information or service configuration information in the cache. When the judgment result is "yes", read the latest service information or service configuration information from the database and write it to the shared memory of the host where the service configuration change process is located.
2. The service configuration method in the power grid dispatching automation system according to claim 1, characterized in that: The service information includes: at least one of a service ID, a service name, a version number, a scene, a scene instance, a sub-scene, a sub-scene instance, and a manufacturer; The service configuration information includes at least one of a service ID, a configuration item, and a configuration value.
3. The service configuration method in the power grid dispatching automation system according to claim 1, characterized in that: The maintenance request for the service information or service configuration information comes from a graphical interface or a command line interface.
4. The service configuration method in the power grid dispatching automation system according to claim 1, characterized in that: Each service queries service information and service configuration information from shared memory, including: querying the service information list, querying service information based on service ID, querying the service configuration list based on service ID, querying configuration values based on service ID and configuration items, and querying the service information list based on configuration items and configuration values.
5. The service configuration method in the power grid dispatching automation system according to claim 1, characterized in that: Each service determines whether the service configuration has changed by querying the service configuration information in the shared memory in real time.
6. A service configuration system in a power grid dispatching automation system, characterized in that: The service configuration management process is deployed in the service configuration center, and the service configuration change process is deployed on each host. The method executed by the service configuration change process includes: A service configuration management process, configured to respond to maintenance requests for service information or service configuration information, maintain the service information or service configuration information in a database, and write change records of the service information or service configuration information into a cache; The service configuration change process is used to read the full amount of service information and service configuration information from the database when it starts, and write it to the shared memory of the host where the service configuration change process is located; It is also used to read the cache in real time and determine whether there is a change record of service information or service configuration information in the cache. When the judgment result is "yes", the latest service information or service configuration information is read from the database and written to the shared memory of the host where the service configuration change process is located.
7. The service configuration system in the power grid dispatching automation system according to claim 6, characterized in that: It also includes a service configuration query interface, which is used by each service to query service information and service configuration information from the shared memory, including: querying the service information list, querying service information based on the service ID, querying the service configuration list based on the service ID, querying the configuration value based on the service ID and configuration item, and querying the service information list based on the configuration item and configuration value.
8. The service configuration system in the power grid dispatching automation system according to claim 6, characterized in that: It also includes a service configuration change subscription interface, which is used by each service to determine whether the service configuration has changed by querying the service configuration information in the shared memory in real time.
Citation Information
Patent Citations
Maintaining distributed state among stateless service clients
US20180054491A1
Distributed system and method for replicated storage of structured data records
US8996482B1