A message middleware localization replacement adaptation method and system for power dispatching
By splitting the cloud system into independent services and using lightweight communication protocols and AI technology to optimize load management, the compatibility and stability issues of domestic substitution in the power dispatching system have been resolved, thereby improving the system's flexibility and scalability.
Patent Information
- Application Number
- CN202411967325.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In modern power dispatching systems, traditional communication and data processing methods cannot meet the requirements of high reliability, real-time performance, and scalability. Furthermore, there are issues related to compatibility, performance, reliability, monitoring and management, and security during the localization process.
It adopts lightweight communication protocols and AI technology, splits the cloud system into independent services, uses Consul for service registration and discovery, combines Kubernetes and Docker for automated deployment, utilizes local schedulers and API gateways for load management and resource optimization, and adapts and replaces message middleware with domestic alternatives.
It has improved the flexibility and scalability of the power dispatching system, ensured the stable operation of the system during peak loads and faults, and enhanced the system's compatibility and operational stability.
Smart Images

Figure CN119886881B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power system optimization, in particular to a message middleware localization replacement adaptation method and system for power dispatch. BACKGROUND
[0002] In modern power dispatch systems, with the continuous development of smart grid technology and the increasing complexity of power networks, traditional communication and data processing methods have gradually failed to meet actual needs. These systems require high reliability, real-time performance, and scalability to cope with diverse and dynamic load demands. The core of the power dispatch system lies in efficient message passing and coordination to ensure that different nodes and devices can quickly respond to changes in the grid state to achieve stable power supply services.
[0003] With the country's emphasis on self-controllable technology and the increasing demand for network security, the use of localization technology and software has become an inevitable trend. Localization message middleware not only needs to provide performance and functions comparable to international mainstream technology, but also must have better compatibility and security to ensure stable operation of the system. In addition, the demand for intelligent and automated dispatch drives the evolution of the system architecture from traditional centralized to distributed and micro-service-oriented, while integrating artificial intelligence technology for predictive analysis to further optimize resource scheduling and improve operational efficiency.
[0004] The power dispatch system has extremely high requirements for real-time performance, stability, and security, so in the process of message middleware localization replacement, it is necessary to focus on solving compatibility, performance, reliability, monitoring and management, security, and migration and transformation costs to ensure stable operation of the system and meet the self-controllable demand of localization. SUMMARY
[0005] To solve the above problems, the purpose of the present application is to provide a message middleware localization replacement adaptation method and system for power dispatch, which can not only bring technical autonomy, but also improve the flexibility, scalability, and operational stability of the entire power dispatch system.
[0006] To achieve the above purpose, the present application adopts the following technical solutions:
[0007] A message middleware localization replacement adaptation method for power dispatch, comprising the following steps:
[0008] Split the cloud system into independent services, each service responsible for a specific function, including message passing, load balancing, and fault switching;
[0009] Use a lightweight communication protocol to communicate between services, implement a service registration and discovery mechanism Consul, and ensure that services can be dynamically discovered and called;
[0010] According to the load condition, independently expand each service instance, use the API gateway to coordinate and manage the expansion results of each service instance through load balancing and routing functions;
[0011] Create a Docker image for each service, which contains all the dependencies required for running, and use Docker Compose for local development and testing; use Kubernetes for automatic deployment, expansion, and management of each service instance;
[0012] Provide basic support for inter-service communication in the system through lightweight protocols and message middleware, deploy a local scheduler on the edge node, and the local scheduler directly associates with the deployment logic of other nodes through message middleware, realizing multi-level communication between cloud-edge-node; and use AI technology to predict system load and performance bottlenecks, and optimize the adaptation scheme of message middleware localization replacement;
[0013] According to the evaluation indicators, test the compatibility and stability of the message middleware localization replacement adaptation scheme, and replace the passed domestic middleware in the production environment.
[0014] Further, use Kubernetes for automatic deployment, expansion, and management, as follows:
[0015] Deploy services in the Kubernetes cluster, use Pod, Deployment, and Service resources to manage applications; configure automatic expansion to dynamically adjust the number of Pods according to the load; use ConfigMap and Secret to manage configurations and sensitive information.
[0016] Further, use lightweight communication protocols for communication between services, implement the service registration and discovery mechanism Consul, and ensure that services can be dynamically discovered and called, as follows:
[0017] Deploy a Consul cluster: install Consul Agent in each running environment, run in client mode or server mode, and ensure communication and data synchronization with the entire Consul cluster;
[0018] When each service starts, register with Consul through the Consul HTTP API, inform Consul of the service's name, address, and port information, and provide health check configuration, and Consul periodically checks the service's health status according to the health check configuration;
[0019] Each service queries other services that need to be called through Consul, and obtains the address and state information of the services that need to be called, to realize dynamic calling and load balancing; Consul provides the latest health instance list for the queried services;
[0020] Consul performs HTTP or TCP health checks on the registered services to determine the health status of the services; when the health check fails, Consul automatically removes the abnormal services from the available list;
[0021] Configuration is stored using ConsulKV, allowing services to obtain configuration information at startup or dynamically update configuration at runtime.
[0022] Further, according to the load condition, each service instance is independently expanded to support horizontal expansion, and the API gateway is used to coordinate and manage the expansion results of each service instance through load balancing and routing functions, specifically:
[0023] The routing rules of the services are configured in the API gateway, and the requests are forwarded to the corresponding service instances to support dynamic increase and decrease of services;
[0024] The API gateway supports path rewriting function to adjust the request path or add version control;
[0025] Identity authentication and authorization services are integrated in the API gateway for access token verification;
[0026] Load balancing functions for backend service instances are provided in the API gateway configuration, including round robin and minimum connection number strategies.
[0027] Further, a local scheduler is deployed on each node to realize communication of local tasks based on a message middleware, and AI technology is used to predict system load and performance bottlenecks, and a message middleware localization replacement adaptation scheme is optimized, specifically:
[0028] A local scheduler is deployed on each physical or virtual node, and the local scheduler is responsible for managing task scheduling on the node;
[0029] A local message queue is configured in each local scheduler, and tasks in the local message queue communicate through a producer-consumer model, supporting message publishing, consumption and queue management; a localized message middleware is selected to realize communication of local tasks;
[0030] The message middleware provides reliability of message consumption through message confirmation mechanism and delivery guarantee strategy, and configures subscription, publication and queue listening to ensure timeliness and effectiveness of task communication;
[0031] The local scheduler collects relevant indicator data from system operation, including CPU utilization, memory usage, load balancing traffic, and performs data cleaning and feature extraction; and uses the time series prediction model ARIMA to predict future system load and possible performance bottlenecks; according to the prediction result, real-time adjustment of system resource allocation strategy, and using reinforcement learning to optimize scheduling decision and resource allocation, forming a dynamic optimization mechanism.
[0032] Further, according to the prediction result, real-time adjustment of system resource allocation strategy, and using reinforcement learning to optimize scheduling decision and resource allocation, forming a dynamic optimization mechanism, as follows:
[0033] Use Prometheus to collect real-time data from the monitoring system, including CPU utilization, memory consumption, network traffic key performance indicators of service instances;
[0034] According to the time series prediction model ARIMA, predict the future system load and possible performance bottlenecks, based on the prediction result, real-time adjustment of resource allocation, including automatic expansion or reduction of Pod instance number in Kubernetes;
[0035] The steps to build the reinforcement learning model include:
[0036] Define the state space: including current system resource allocation, load condition, task queue length;
[0037] Action space: including increasing or decreasing service instances, adjusting task priority, changing scheduling strategy;
[0038] Use simulation environment or historical data to train the reinforcement learning model;
[0039] Use Q-Learning policy gradient method to optimize long-term decision-making, deploy reinforcement learning model for real-time decision-making, combine actual feedback information for model updating and strategy adjustment, continuously input new performance and load data to the model, and refine the accuracy of model decision-making.
[0040] Further, stability testing, as follows: obtain the interaction mode of the current system with the existing middleware, including message format, protocol, interface call; identify all affected system modules, third-party libraries and other middleware, so that the test covers all dependencies; Establish a test environment consistent with the production environment, configure the localized middleware to simulate real workloads; so that the test environment contains the same network topology, node configuration, security policy as production.
[0041] Further, compatibility testing is as follows: verify the compatibility of middleware API one by one, including message sending, receiving, queue management interface; simulate the message flow in normal and extreme cases in the production environment, so that the new middleware can operate normally under the given conditions; after replacing the middleware, the related business functions remain unchanged, and the automatic test tool is used to perform key function regression testing;
[0042] Apply continuous load to the middleware, monitor its behavior under long-time high load, apply extreme load, test the stability and collapse point of the system under extreme conditions, and collect performance data for analysis such as response time, throughput, and error rate; simulate network failure and node failure to evaluate the system's tolerance to sudden failure and automatic recovery mechanism, and check whether the middleware can maintain data integrity and system consistency after failure recovery.
[0043] A message middleware localization replacement adaptation system for power dispatching, comprising a cloud system and an edge node;
[0044] The cloud system is divided into independent services, each service is responsible for a specific function, including message passing, load balancing, and fault switching;
[0045] Use lightweight communication protocols for communication between services, implement service registration and discovery mechanism Consul, and ensure that services can be dynamically discovered and called;
[0046] According to the load condition, independently expand each service instance, use API gateway to coordinate and manage the expansion results of each service instance through load balancing and routing functions;
[0047] Create a Docker image for each service, which contains all dependencies required for running, and use Docker Compose for local development and testing; use Kubernetes to automatically deploy, expand and manage each service instance;
[0048] Lightweight protocols and message middleware provide basic support for inter-service communication in the system, deploy a local scheduler on the edge node, and the local scheduler directly associates with the deployment logic of other nodes through message middleware, realizing multi-level communication between cloud, edge and node; and use AI technology to predict system load and performance bottlenecks, optimize the message middleware localization replacement adaptation scheme;
[0049] According to the evaluation indicators, the compatibility and stability of the message middleware localization replacement adaptation scheme are tested, and the domestic middleware that passes the evaluation is replaced in the production environment.
[0050] A computer storage medium stores a plurality of instructions, which are suitable for being loaded and executed by a processor to perform the above method steps.
[0051] The present application has the following beneficial effects:
[0052] The present application combines containerized deployment and dynamic management of Kubernetes through independent service design, so that the system can flexibly meet the complex and changeable demand scenarios in power dispatching, support horizontal expansion and high-availability deployment, and maintain service stability during load peaks and failures. Through local schedulers and AI technology, communication and task scheduling are optimized to achieve more efficient resource utilization and load regulation, effectively ensuring the compatibility and stability of the power dispatching system during the message middleware localization replacement, keeping the system in the best operating state, and improving the flexibility, expansion capability and operation stability of the entire power dispatching system. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 The present application has the following beneficial effects: DETAILED DESCRIPTION
[0054] The present application will be further described in detail below in combination with the drawings and specific embodiments:
[0055] Reference Figure 1 In this embodiment, a message middleware localization replacement adaptation method for power dispatching is provided, including the following steps:
[0056] The cloud system is divided into independent services, each service is responsible for a specific function, including message passing, load balancing, and fault switching;
[0057] A lightweight communication protocol is used for communication between services, a service registration and discovery mechanism Consul is implemented to ensure that services can be dynamically discovered and called;
[0058] According to the load condition, each service instance is independently expanded, and an API gateway is used to coordinate and manage the expansion results of each service instance through load balancing and routing functions;
[0059] A Docker image is created for each service, which contains all the dependencies required for running, and Docker Compose is used for local development and testing; Kubernetes is used for automatic deployment, expansion and management of each service instance;
[0060] A lightweight protocol and message middleware are used to provide basic support for inter-service communication in the system, a local scheduler is deployed on the edge node, the local scheduler directly establishes an association with the deployment logic of other nodes through the message middleware, and multi-level communication between cloud-edge-node is realized; AI technology is used to predict system load and performance bottlenecks, and optimize the message middleware localization replacement adaptation scheme;
[0061] According to the evaluation index, the compatibility and stability of the message middleware localization replacement adaptation scheme are tested, and the domestic middleware that passes the evaluation is replaced in the production environment.
[0062] In this embodiment, Kubernetes is used for automatic deployment, expansion and management, as follows:
[0063] Deploy services in the Kubernetes cluster, use Pod, Deployment, Service resources to manage applications; configure automatic expansion to dynamically adjust the number of Pods according to the load; use ConfigMap and Secret to manage configurations and sensitive information.
[0064] In this embodiment, a lightweight communication protocol is used for communication between services, and a service registration and discovery mechanism Consul is implemented to ensure that services can be dynamically discovered and called, specifically as follows:
[0065] Deploy Consul cluster: install Consul Agent in each running environment, run in client mode or server mode, and ensure communication and data synchronization with the entire Consul cluster;
[0066] When each service starts, register with Consul through Consul's HTTP API, inform Consul of the service's name, address, port information, and provide health check configuration, and Consul periodically checks the service's health status according to the health check configuration;
[0067] Each service queries other services that need to be called through Consul and obtains the address and status information of the services that need to be called, and realizes dynamic calling and load balancing; Consul provides the latest healthy instance list for querying services;
[0068] Consul performs HTTP or TCP health checks on registered services to determine the health status of the services; when the health check fails, Consul automatically removes the abnormal service from the available list;
[0069] Use ConsulKV to store configurations, allowing services to obtain configuration information when starting or dynamically update configurations while running.
[0070] In this embodiment, each service instance is independently expanded according to the load, supporting horizontal expansion, and the API gateway is used to coordinate and manage the expansion results of each service instance through load balancing and routing functions, specifically as follows:
[0071] Configure the routing rules of services in the API gateway to forward requests to the corresponding service instances, supporting dynamic addition and reduction of services;
[0072] The API gateway supports path rewriting functions to adjust the request path or add version control;
[0073] Integrate identity authentication and authorization services in the API gateway for access token verification;
[0074] Provide load balancing functions for backend service instances in the API gateway configuration, including round-robin and minimum connection number strategies.
[0075] In this embodiment, a local scheduler is deployed on each node, and the communication of local tasks is realized based on a message middleware. AI technology is used to predict system load and performance bottlenecks, and a message middleware localization replacement adaptation scheme is optimized, specifically as follows:
[0076] A local scheduler is deployed on each physical or virtual node, and the local scheduler is responsible for managing task scheduling on the node;
[0077] A local message queue is configured in each local scheduler. Tasks in the local message queue communicate through a producer-consumer model, supporting message publishing, consumption, and queue management. A localized message middleware is selected to realize communication of local tasks;
[0078] The message middleware provides reliability for message consumption through a message confirmation mechanism and a delivery guarantee strategy, and configures subscription, publishing, and queue listening to ensure the timeliness and effectiveness of task communication;
[0079] The local scheduler collects relevant index data from system operation, including CPU utilization, memory usage, and load balancing traffic, and performs data cleaning and feature extraction. A time series prediction model ARIMA is used to predict future system load and possible performance bottlenecks. According to the prediction result, the system resource allocation strategy is adjusted in real time, and reinforcement learning is used to optimize scheduling decisions and resource allocation, forming a dynamic optimization mechanism.
[0080] In this embodiment, according to the prediction result, the system resource allocation strategy is adjusted in real time, and reinforcement learning is used to optimize scheduling decisions and resource allocation, forming a dynamic optimization mechanism, specifically as follows:
[0081] Real-time data is collected by the Prometheus monitoring system, including CPU utilization, memory consumption, and network traffic key performance indicators of service instances;
[0082] According to the time series prediction model ARIMA, the future system load and possible performance bottlenecks are predicted. Based on the prediction result, resource allocation is adjusted in real time, including automatically expanding or reducing the number of Pod instances in Kubernetes;
[0083] Steps to build the reinforcement learning model include:
[0084] Define state space: including current system resource allocation, load situation, task queue length;
[0085] Action space: including increasing or decreasing service instances, adjusting task priority, changing scheduling strategy;
[0086] Train the reinforcement learning model using simulation environment or historical data;
[0087] Optimize long-term decision-making using Q-Learning policy gradient method, deploy reinforcement learning model for real-time decision-making, update model and adjust strategy based on actual feedback information, continuously input new performance and load data to the model to refine the accuracy of model decision-making.
[0088] In this embodiment, the stability test is as follows: obtain the interaction mode of the current system with the existing middleware, including message format, protocol, interface call; identify all affected system modules, third-party libraries and other middleware to cover all dependencies; establish a test environment consistent with the production environment, configure the localized middleware to simulate real workloads; so that the test environment contains the same network topology, node configuration, security policy as production.
[0089] In this embodiment, the compatibility test is as follows: verify the compatibility of middleware API one by one, including message sending, receiving, queue management interface; simulate message traffic in normal and extreme conditions in production environment to ensure that the new middleware can operate normally under given conditions; after replacing the middleware, the related business functions remain unchanged, and the automatic test tool is used to perform key function regression test;
[0090] Apply continuous load to the middleware and monitor its behavior under long-time high load, apply extreme load, test the stability and collapse point of the system under extreme conditions, and collect performance data analysis such as response time, throughput, error rate; simulate network failure, node failure, evaluate the system's tolerance to sudden failure and automatic recovery mechanism, check whether the middleware can maintain data integrity and system consistency after failure recovery.
[0091] In this embodiment, a message middleware localization replacement adaptation system for power dispatching is also provided, including a cloud system and an edge node;
[0092] Split the cloud system into independent services, each responsible for a specific function, including message passing, load balancing, and failover;
[0093] Use lightweight communication protocols for communication between services, implement service registration and discovery mechanism Consul to ensure dynamic discovery and invocation of services;
[0094] According to the load condition, each service instance is independently expanded, and the API gateway is used to coordinate and manage the expansion results of each service instance through load balancing and routing functions;
[0095] A Docker image is created for each service, containing all dependencies required for running, and Docker Compose is used for local development and testing; and Kubernetes is used for automatic deployment, expansion and management of each service instance;
[0096] A lightweight protocol and a message middleware are used to provide basic support for communication between system services, a local scheduler is deployed on an edge node, the local scheduler directly establishes an association with the scheduling logic of other nodes through the message middleware, multi-level communication between the cloud, the edge and the node is realized, and an AI technology is used to predict system load and performance bottlenecks, and a message middleware domestic substitution adaptation scheme is optimized;
[0097] According to the evaluation index, the compatibility and stability of the message middleware domestic substitution adaptation scheme are tested, and the domestic middleware that passes the evaluation is replaced in the production environment.
[0098] In the embodiment, a computer storage medium is also provided, which stores a plurality of instructions suitable for being loaded and executed by a processor, and the instructions are used to execute the method steps.
[0099] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can 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.
[0100] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the 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 produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks
[0101] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flow or block Figure 1 one or more blocks or steps of the flow.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that are executed on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flow or block Figure 1 one or more blocks or steps of the flow.
[0103] The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application to other forms. Any person skilled in the art can make modifications or alterations to the above-described technical contents without departing from the technical scope of the present application. Any simple modifications, equivalent changes and alterations made according to the technical essence of the present application to the above-described embodiments still fall within the protection scope of the present application.
Claims
1. A message middleware homegrown replacement adaptation method for power dispatching, characterized in that, The method comprises the following steps: Split the cloud system into independent services, each service responsible for a specific function, including message passing, load balancing, failover; According to the load condition, independently expand each service instance, use API gateway to coordinate and manage the expansion results of each service instance through load balancing and routing functions; Create a Docker image for each service, which contains all the dependencies required for running, and use Docker Compose for local development and testing; Use Kubernetes to automate deployment, expansion, and management of each service instance; Provide basic support for inter-service communication in the system through lightweight protocols and message middleware, deploy a local scheduler on the edge node, and directly associate the local scheduler with other node deployment logic through message middleware to achieve multi-level communication between cloud, edge, and node; And use AI technology to predict system load and performance bottlenecks, optimize the adaptation scheme of message middleware localization replacement; According to the evaluation index, test the compatibility and stability of the message middleware localization replacement adaptation scheme, and replace the passed domestic middleware in the production environment; The local scheduler is deployed on each physical or virtual node, and the local scheduler is responsible for managing task scheduling on the physical or virtual node; In each local scheduler, a local message queue is configured, and tasks in the local message queue communicate through a producer-consumer model, supporting message publishing, consumption, and queue management; domestic message middleware is selected to realize communication between local tasks; The message middleware provides the reliability of message consumption through the message confirmation mechanism and delivery guarantee strategy, and configures subscription, publishing, and queue listening to ensure the timeliness and effectiveness of task communication; The local scheduler collects relevant index data from system operation, including CPU utilization, memory usage, load balancing traffic, and performs data cleaning and feature extraction; and uses the time series prediction model ARIMA to predict future system load and possible performance bottlenecks; according to the prediction result, real-time adjustment of system resource allocation strategy is carried out, and reinforcement learning is used to optimize scheduling decision and resource allocation, forming a dynamic optimization mechanism; The real-time adjustment of system resource allocation strategy according to the prediction result, and the use of reinforcement learning to optimize scheduling decision and resource allocation, form a dynamic optimization mechanism, specifically as follows: Use Prometheus to monitor the system to collect real-time data, including CPU utilization, memory consumption, network traffic key performance indicators of service instances; According to the time series prediction model ARIMA, predict the future system load and possible performance bottlenecks, based on the prediction result, real-time adjustment of resource allocation, including automatic expansion or reduction of Pod instance number in Kubernetes; The steps of building a reinforcement learning model include: Define state space: including current system resource allocation, load situation, task queue length; Action space: including increasing or decreasing service instances, adjusting task priority, changing scheduling strategy; Train reinforcement learning model using simulation environment or historical data; Optimize long-term decision-making using Q-Learning policy gradient method, deploy reinforcement learning model for real-time decision-making, update model and adjust strategy based on actual feedback information, continuously input new performance and load data to model to refine decision-making accuracy.
2. The method of claim 1, wherein the method is characterized by, The use of Kubernetes for automated deployment, expansion and management is as follows: Deploy services in Kubernetes cluster, manage applications using Pod, Deployment, Service resources; configure automatic expansion to dynamically adjust Pod number according to load; use ConfigMap and Secret to manage configurations and sensitive information.
3. The method of claim 1, wherein the method is characterized by, The lightweight protocol provides basic support for inter-service communication in the system, which is as follows: Deploy Consul cluster: install Consul Agent in each running environment, run in client mode or server mode, ensure communication and data synchronization with the entire Consul cluster; When each service starts, register with Consul through Consul's HTTP API, inform Consul of the service's name, address, port information, provide health check configuration, and Consul periodically checks the service's health status according to the health check configuration; Each service queries other services that need to be called through Consul and obtains the address and status information of the services that need to be called, realizes dynamic calling and load balancing; Consul provides the latest healthy instance list for query services; Consul performs HTTP or TCP health checks on registered services to determine the health of the service; when health checks fail, Consul automatically removes the unhealthy service from the list of available services ; Use ConsulKV to store configurations, allow services to obtain configuration information at startup or dynamically update configurations at runtime.
4. The method of claim 1, wherein the method is characterized by, According to the load situation, independently expand each service instance, support horizontal expansion, use API gateway to coordinate and manage the expansion results of each service instance through load balancing and routing functions, which is as follows: Configure service routing rules in API gateway to forward requests to corresponding service instances, support dynamic addition and reduction of services; API gateway supports path rewriting function to adjust request path or add version control; Integrate identity authentication and authorization services in API gateway for access token verification; Provide load balancing function for backend service instances in API gateway configuration, including round robin, minimum connection number strategy.
5. The method of claim 1, wherein the method further comprises: The stability test is as follows: obtain the interaction mode of the current system with existing middleware, including message format, protocol, interface call; identify all affected system modules, third-party libraries and other middleware to cover all dependencies; establish a test environment consistent with the production environment, configure localized middleware to simulate real workloads; so that the test environment contains the same network topology, node configuration, security policy as production.
6. The method of claim 1, wherein the method is characterized by, The compatibility test is as follows: verifying the compatibility of middleware API one by one, including message sending, receiving, queue management interface; simulating the message flow in normal and extreme cases in the production environment, so that the new middleware can operate normally under the given conditions; after replacing the middleware, the related business functions remain unchanged, and the automatic test tool is used to perform key function regression testing; Applying continuous load to the middleware, monitoring its behavior under long-time high load, applying extreme load, testing the stability and collapse point of the system under extreme conditions, and collecting performance data to analyze response time, throughput, and error rate; simulating network failure and node failure to evaluate the system's tolerance to sudden failure and automatic recovery mechanism, and checking whether the middleware can maintain data integrity and system consistency after failure recovery.
7. A system for power dispatch based on the message middleware localization alternative adaptation method according to any one of claims 1-6, characterized in that, It includes a cloud system and edge nodes; The cloud system is divided into independent services, each responsible for a specific function, including message passing, load balancing, and failover; According to the load condition, each service instance is independently expanded, and the API gateway is used to coordinate and manage the expansion results of each service instance through load balancing and routing functions; Create a Docker image for each service, which contains all the dependencies required for running, and use Docker Compose for local development and testing; Use Kubernetes to automatically deploy, expand, and manage each service instance; Lightweight protocols and message middleware are used to provide basic support for inter-service communication in the system, and a local scheduler is deployed on the edge node. The local scheduler directly establishes an association with the deployment logic of other nodes through the message middleware, realizing multi-level communication between the cloud, edge, and node; And use AI technology to predict system load and performance bottlenecks, optimize the message middleware localization replacement adaptation scheme; According to the evaluation indicators, the compatibility and stability of the message middleware localization replacement adaptation scheme are tested, and the domestic middleware that passes the evaluation is replaced into the production environment.
8. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded and executed by the processor, and the method steps of any one of claims 1-6.
Citation Information
Patent Citations
Internet of Things platform construction method based on micro-service architecture
CN110149396A
Server resource adjustment method and device, electronic equipment and medium
CN117081943A