Cluster charging control system and method based on OCPP protocol
By using a cluster charging control system based on the OCPP protocol and building a distributed system with Nginx and Dubbo RPC, the problems of single point of failure, poor scalability and difficult maintenance of traditional single-machine systems are solved, and highly available and easily scalable electric vehicle charging facilities are realized.
Patent Information
- Application Number
- CN202511567957.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-01-06
AI Technical Summary
Traditional stand-alone central systems in electric vehicle charging facilities suffer from high single-point failure risk, poor scalability, performance bottlenecks, and maintenance difficulties, making them unable to effectively meet the demands of large-scale, highly available, and distributed charging infrastructure.
A cluster charging control system based on the OCPP protocol is adopted. A distributed system is built using Nginx load balancer and Dubbo remote procedure call (RPC) to achieve multi-node deployment, load balancing and automatic fault transfer, support high-concurrency request processing, and simplify maintenance using automated operation and maintenance tools.
It eliminates the risk of single points of failure, improves system reliability and availability, breaks through the bottleneck of long connections, enhances system performance and scalability, reduces maintenance costs, and realizes efficient electric vehicle charging services.
Smart Images

Figure CN121284035A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric vehicle charging technology, and specifically to a cluster charging control system and method based on the Open ChargePoint Protocol (OCPP). Background Technology
[0002] With the increasing popularity of electric vehicles, the demand for charging infrastructure is growing. Existing charging systems often suffer from uneven distribution of charging resources and inconvenient charging time management. The OCPP (Open Charge Point Protocol), as a communication protocol, enables interconnection between charging stations from different manufacturers. However, its traditional implementation is still largely based on a single-point architecture, which cannot effectively address the practical needs of large-scale, highly available, and distributed deployments.
[0003] Traditional stand-alone central systems, while performing well in certain scenarios, are gradually revealing the following shortcomings as business scales up and requirements for system performance and reliability increase: High risk of single point of failure: The operation of the entire system depends on a single server. Once the server fails, the entire system will be paralyzed, resulting in service interruption and huge economic losses.
[0004] Poor scalability: The hardware resources of a standalone system are limited, making it difficult to meet the needs of rapid business growth. When business volume increases, it is necessary to replace the hardware with more powerful equipment, which is costly and the expansion process is complex.
[0005] Performance bottleneck: When a single-machine system handles high concurrency requests, it is prone to performance bottlenecks, resulting in slow response speed and poor user experience.
[0006] Maintenance difficulties: The maintenance of stand-alone systems is relatively complicated, requires manual intervention, and has weak fault tolerance. Summary of the Invention
[0007] To overcome the shortcomings of single-machine central systems, this invention aims to propose a cluster charging control system and method based on the OCPP protocol. This system improves the efficiency and convenience of electric vehicle charging, and enables cross-cluster node control of Electric Vehicle Supply Equipment (EVSE) (i.e., charging piles). Based on OCPP WebSocket implementation, this invention utilizes a cluster composed of Nginx and a central service system, along with Dubbo Remote Procedure Call (RPC) control. By deploying the system on multiple servers to form a cluster, even if one node fails, other nodes can take over the service, ensuring continuous system availability. Load balancing distributes requests to multiple nodes, improving the system's concurrent processing capabilities and meeting the demands of high-concurrency services. The system can be horizontally scaled by adding nodes to cope with increasing business volume. Cross-cluster node communication is achieved through high-performance Remote Procedure Call (RPC) communication of the central system service cluster, overcoming the limitations of long connections and building a high-performance, highly available distributed system. The cluster system has a high level of automation, allowing for management through automated operation and maintenance tools. Downtime maintenance does not affect normal user operation, reducing maintenance costs and solving the problems of traditional single-machine systems.
[0008] To achieve the above objectives, the present invention provides the following technical solution: To achieve the above objectives, in a first aspect, the present invention provides a cluster charging control system based on the OCPP protocol, comprising: The access layer includes multiple user terminals accessing via HTTP / REST protocol and multiple charging devices accessing via WebSocket protocol; A load balancing layer, connected to the access layer, is used to receive and distribute requests from the user terminal and the charging device. The load balancing layer includes an Nginx load balancer. The central system service cluster, connected to the load balancing layer, includes multiple business nodes. Each business node is configured with an OCPP protocol stack to manage OCPP sessions and integrates the Dubbo framework. The service registration center communicates and connects with each business node in the central system service cluster. The load balancing layer distributes requests to the service nodes in the central system service cluster. Each service node registers and discovers services in the service registry and communicates across nodes via Dubbo RPC to control charging devices not connected to its own node.
[0009] As a further aspect of the present invention, the user terminal is an application used by electric vehicle users, which initiates requests to the system via the HTTP / REST protocol.
[0010] As a further embodiment of the present invention, the charging device includes a plurality of physical charging piles for charging: pile body 1, pile body 2... pile body N. The charging piles establish and maintain a long connection with the system via the WebSocket protocol. The communication content follows the OCPP standard protocol and is used to report the real-time charging status and receive remote control commands to start / stop charging.
[0011] As a further aspect of the present invention, the load balancing layer is configured to simultaneously support request distribution and load balancing of both HTTP and WebSocket protocols.
[0012] As a further aspect of the present invention, the Nginx load balancer in the load balancing layer is used for request distribution and serves as the unified entry point of the system, receiving all requests from the user end and the charging device end; it also supports simultaneously processing HTTP requests and WebSocket connection uplink upgrade requests.
[0013] As a further embodiment of the present invention, the service node is a stateless service node, and the OCPP session state information maintained by the service node is synchronized within the cluster through Dubbo RPC, or stored with the help of an external distributed cache.
[0014] As a further aspect of the present invention, each service node contains an OCPP protocol stack for standard OCPP communication with the charging pile and for maintaining its own OCPP session; each service node integrates a Dubbo framework for service registration. When each service node starts up, it registers its network address and the services it can provide with the Dubbo registry center, and also for service discovery and RPC calls, enabling the service nodes to communicate remotely via Dubbo RPC.
[0015] As a further aspect of the present invention, when the first service node needs to send a control command to the target charging device that maintains a connection with the second service node, the first service node locates the second service node by querying the service registry center, and calls the message push service on the second service node through Dubbo RPC, so that the service sends the command to the target charging device via a local WebSocket connection.
[0016] As a further embodiment of the present invention, the service registry is a Dubbo registry, which is used to perform health checks on the business nodes, maintain a list of all healthy business nodes in real time, and realize dynamic registration and discovery of services; when a business node fails, the service registry removes the failed business node from the list of available services and notifies the load balancing layer to stop distributing requests to the failed node.
[0017] As a further aspect of the present invention, the charging device disconnected from the faulty node will reconnect, and the load balancing layer will redistribute its WebSocket connection to other healthy service nodes in the cluster, thereby achieving automatic fault transfer.
[0018] Secondly, the present invention provides a cluster charging control method based on the OCPP protocol, comprising the following steps: The load balancing layer receives and distributes requests from the user and charging devices. Requests are processed and distributed through business nodes in the central system service cluster, where each business node registers service information with the service registry center. When cross-service node message passing is required, Dubbo RPC is used to call the service of the target service node to complete the control of the charging equipment.
[0019] As a further aspect of the present invention, this cluster charging control method based on the OCPP protocol is applied to a system including an access layer, a load balancing layer, a central system service cluster, and a service registration center, and the steps are as follows: Step S100: Receive HTTP / REST protocol requests from multiple user terminals and WebSocket connection requests from multiple charging devices through the load balancing layer; Step S200: The load balancing layer distributes the HTTP / REST protocol request and WebSocket connection request to multiple business nodes in the central system service cluster according to a preset load balancing strategy; Step S300: Each service node registers its service in the service registration center and establishes and maintains an OCPP session with the charging equipment; Step S400: When the first service node needs to send a control command to the charging device connected to the second service node, it calls the message push service on the second service node through Dubbo RPC, and the second service node sends the control command to the target charging device. Step S500: When a service node failure is detected, the service registry removes it from the list of available services, and the load balancing layer redistributes the connection of the failed node to the healthy node to achieve automatic failover.
[0020] As a further aspect of the present invention, each service node registers its service in the service registration center, establishes and maintains an OCPP session with the charging equipment, including: Each business node registers its network address and service information with the service registry when it starts up; Each business node discovers the service information of other available business nodes through the service registry center; Each service node establishes and maintains a WebSocket long connection with the allocated charging device through the OCPP protocol stack.
[0021] As a further aspect of the present invention, step S400 specifically includes: The first service node receives control commands sent by the user terminal; The first business node queries the service registration center to determine the second business node to which the target charging device is connected; The first business node calls the message push service on the second business node via Dubbo RPC; The second service node sends control commands to the target charging device in OCPP protocol format via a local WebSocket connection.
[0022] As a further aspect of the present invention, the method further includes a state synchronization step: synchronizing OCPP session state information between service nodes via Dubbo RPC, wherein the state information includes one or more of session identifier, user authentication status, charging transaction status, and real-time parameters of charging equipment.
[0023] Compared with existing technologies, the cluster charging control system and method based on the OCPP protocol proposed in this invention, through innovative distributed architecture design, has the following significant advantages over traditional single-machine central control systems: 1. Eliminates the risk of single points of failure, significantly improving system reliability and availability, and achieving seamless failover. This invention, through a multi-node deployment architecture of Nginx and a central system service cluster, completely avoids the system-wide paralysis caused by server failures in traditional single-machine systems. When a business node fails, Nginx can automatically detect and stop distributing requests to the failed node, achieving fault isolation. It also uses the Dubbo RPC mechanism to synchronize connection state information within the cluster. When a node fails, the connection can be quickly migrated to a healthy node and the session can be restored, ensuring high availability of the charging service and greatly reducing service interruption time and economic losses caused by system failures.
[0024] 2. This invention overcomes the technical bottleneck of long-connection clusters, achieving reliable message delivery across nodes. In traditional load balancing architectures, long connections (such as WebSocket) are typically bound to a fixed business node. When client requests are forwarded to other nodes, message unreachability or state loss can occur. This invention introduces a Dubbo RPC cluster mechanism to achieve real-time synchronization of connection status and session information across multiple business nodes, thereby ensuring the continuity and consistency of communication between the client and the central system.
[0025] 3. High-efficiency handling of high-concurrency requests and low-latency cross-node communication significantly enhance system performance and concurrency capabilities. This invention utilizes Nginx's load balancing function to intelligently distribute massive WebSocket connection requests to multiple business nodes, effectively avoiding single-node overload and significantly improving the system's concurrency processing capabilities and response speed. Leveraging the high-performance RPC communication mechanism of the Dubbo framework, efficient message transmission across cluster nodes is achieved, solving the message synchronization problem of WebSocket in a distributed environment and ensuring low latency and high throughput for real-time communication.
[0026] 4. Supports elastic horizontal scaling and optimized resource utilization, greatly improving system scalability and flexibility. This invention utilizes Nginx's cluster management and Dubbo's service discovery mechanism, allowing the system to dynamically add or remove nodes based on business needs, achieving seamless horizontal scaling and easily handling business volume growth. This avoids the high-cost scaling methods of traditional single-machine systems that require hardware replacement. Load balancing strategies intelligently allocate requests, ensuring balanced load across nodes, improving hardware resource utilization, and reducing the cost per request.
[0027] 5. The system maintenance process is simplified, significantly improving operational efficiency and system maintainability. The cluster architecture of this invention supports node downtime maintenance without affecting overall service. Upgrades and maintenance can be performed without downtime through automated operation and maintenance tools, greatly reducing maintenance complexity and the need for manual intervention. Through the service governance functions provided by the Dubbo framework, system traffic can be finely controlled to prevent individual node overload and ensure system stability under high concurrency scenarios. The system of this invention is fully compatible with open charging protocol standards such as OCPP 1.6 and 2.0.1, supporting plug-and-play functionality for charging equipment from different manufacturers, which is beneficial for the interconnection and standardization of charging infrastructure. It also supports multiple service registry centers, allowing flexible selection of service registry centers such as Zookeeper, Nacos, or Apollo to adapt to different enterprise technology stacks and infrastructure environments.
[0028] In summary, this invention innovatively combines the Nginx and Dubbo frameworks with the OCPP protocol to construct a high-performance, highly available, and easily scalable distributed charging control system. It effectively solves the various limitations of traditional single-machine systems, provides reliable technical support for the construction of large-scale electric vehicle charging infrastructure, and has significant technological progress and commercial value.
[0029] These or other aspects of this application will become more apparent from the following description of embodiments. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the application. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the accompanying drawings used in the description of the exemplary embodiments or related technologies will be briefly introduced below. The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a cluster charging control system and method based on the OCPP protocol according to an embodiment of the present invention.
[0031] Figure 2 This is a flowchart of a cluster charging control method based on the OCPP protocol according to an embodiment of the present invention.
[0032] Figure 3 This is a flowchart illustrating an implementation of a cluster charging control method based on the OCPP protocol according to an embodiment of the present invention. Detailed Implementation
[0033] The present application will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0034] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0035] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two different entities or different parameters with the same name. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as other steps or units inherent in a process, method, system, product, or device that includes a series of steps or units.
[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0037] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0038] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0039] See Figure 1 As shown, an embodiment of the present invention provides a cluster charging control system based on the OCPP protocol, comprising: The access layer includes multiple user terminals accessing via HTTP / REST protocol and multiple charging devices accessing via WebSocket protocol; A load balancing layer, connected to the access layer, is used to receive and distribute requests from the user terminal and the charging device. The load balancing layer includes an Nginx load balancer. The central system service cluster, connected to the load balancing layer, includes multiple business nodes. Each business node is configured with an OCPP protocol stack to manage OCPP sessions and integrates the Dubbo framework. The service registration center communicates and connects with each business node in the central system service cluster. The load balancing layer distributes requests to the service nodes in the central system service cluster. Each service node registers and discovers services in the service registry and communicates across nodes via Dubbo RPC to control charging devices not connected to its own node.
[0040] In this embodiment, the user terminal is an application used by electric vehicle users, which initiates requests to the system via the HTTP / REST protocol; the charging equipment includes several physical charging piles for charging: pile 1, pile 2... pile N. The charging piles establish and maintain a long connection with the system via the WebSocket protocol. The communication content follows the OCPP standard protocol and is used to report real-time charging status and receive remote control commands to start / stop charging.
[0041] In this embodiment, the load balancing layer is configured to simultaneously support request distribution and load balancing for both HTTP and WebSocket protocols. Specifically, the Nginx load balancer in the load balancing layer is used for request distribution, serving as the unified entry point of the system and receiving all requests from both the user end and the charging device end; it also supports simultaneously handling uplink upgrade requests for both HTTP requests and WebSocket connections.
[0042] In this embodiment, the service nodes are stateless service nodes. The OCPP session state information maintained by the service nodes is synchronized within the cluster via Dubbo RPC or stored using an external distributed cache. Each service node contains an OCPP protocol stack for standard OCPP communication with the charging piles and maintains its own OCPP session. Each service node integrates the Dubbo framework for service registration. Upon startup, each service node registers its network address and the services it can provide with the Dubbo registry center. This registration is also used for service discovery and RPC calls, enabling remote communication between service nodes via Dubbo RPC.
[0043] When the first service node needs to send a control command to the target charging device that maintains a connection with the second service node, the first service node locates the second service node by querying the service registry, and calls the message push service on the second service node through Dubbo RPC. The service then sends the command to the target charging device via a local WebSocket connection.
[0044] In this embodiment, the service registry is a Dubbo registry, which is used to perform health checks on the service nodes, maintain a list of all healthy service nodes in real time, and realize dynamic registration and discovery of services. When a service node fails, the service registry removes the failed service node from the list of available services and notifies the load balancing layer to stop distributing requests to the failed node.
[0045] In this process, charging devices that have lost connection to a faulty node will reconnect, and the load balancing layer will redistribute their WebSocket connections to other healthy business nodes in the cluster, thereby achieving automatic fault transfer.
[0046] See Figure 1 and Figure 2 As shown, embodiments of the present invention also provide a cluster charging control method based on the OCPP protocol, used in a system including an access layer, a load balancing layer, a central system service cluster, and a service registration center. The method includes the following steps: Step S10: Receive and distribute requests from the user terminal and charging device through the load balancing layer; Step S20: The distributed requests are processed by the business nodes in the central system service cluster, wherein each business node registers service information with the service registry center. Step S30: When cross-service node message transmission is required, the service of the target service node is called through Dubbo RPC to complete the control of the charging equipment.
[0047] In this embodiment, see Figures 1 to 3 As shown, this cluster charging control method based on the OCPP protocol is applied to a system including the access layer, load balancing layer, central system service cluster, and service registration center. The steps are as follows: Step S100: Receive HTTP / REST protocol requests from multiple user terminals and WebSocket connection requests from multiple charging devices through the load balancing layer; Step S200: The load balancing layer distributes the HTTP / REST protocol request and WebSocket connection request to multiple business nodes in the central system service cluster according to a preset load balancing strategy; Step S300: Each service node registers its service in the service registration center and establishes and maintains an OCPP session with the charging equipment; Step S400: When the first service node needs to send a control command to the charging device connected to the second service node, it calls the message push service on the second service node through Dubbo RPC, and the second service node sends the control command to the target charging device. Step S500: When a service node failure is detected, the service registry removes it from the list of available services, and the load balancing layer redistributes the connection of the failed node to the healthy node to achieve automatic failover.
[0048] In this embodiment, each service node in step S300 registers its service with the service registry center and establishes and maintains an OCPP session with the charging device, including: Each business node registers its network address and service information with the service registry when it starts up; Each business node discovers the service information of other available business nodes through the service registry center; Each service node establishes and maintains a WebSocket long connection with the allocated charging device through the OCPP protocol stack.
[0049] In this embodiment, step S400 specifically includes: The first service node receives control commands sent by the user terminal; The first business node queries the service registration center to determine the second business node to which the target charging device is connected; The first business node calls the message push service on the second business node via Dubbo RPC; The second service node sends control commands to the target charging device in OCPP protocol format via a local WebSocket connection.
[0050] The method also includes a state synchronization step: synchronizing OCPP session state information between service nodes via Dubbo RPC, wherein the state information includes one or more of the following: session identifier, user authentication status, charging transaction status, and real-time parameters of charging equipment.
[0051] This invention, through a multi-node deployment architecture of Nginx and a central system service cluster, completely avoids the system-wide paralysis caused by server failures in traditional single-machine systems. When a business node fails, Nginx can automatically detect and stop distributing requests to the failed node, achieving fault isolation. It also uses the Dubbo RPC mechanism to synchronize connection state information within the cluster. When a node fails, the connection can be quickly migrated to a healthy node and the session can be restored, ensuring high availability of the charging service and significantly reducing service interruption time and economic losses caused by system failures.
[0052] In this embodiment, Nginx provides load balancing for WebSocket connections, dynamically distributing them across multiple cluster nodes to avoid overload on a single node. Compared to single-application deployment, Nginx enables cross-node WebSocket connection distribution, ensuring balanced load across nodes and thus improving system reliability and scalability. Nginx's reverse proxy functionality allows WebSocket to maintain stable long-lived connections in cross-cluster environments and enables automatic failover in case of node failure.
[0053] The cluster architecture of this invention supports node downtime maintenance without affecting overall service. It enables non-stop upgrades and maintenance through automated operation and maintenance tools, significantly reducing maintenance complexity and the need for manual intervention. Through the service governance functions provided by the Dubbo framework, system traffic can be finely controlled to prevent individual node overload and ensure system stability under high concurrency scenarios. The system of this invention is fully compatible with open charging protocol standards such as OCPP 1.6 and 2.0.1, supporting plug-and-play functionality for charging equipment from different manufacturers, which is beneficial for the interconnection and standardization of charging infrastructure. It also supports multiple service registry centers, allowing flexible selection of service registries such as Zookeeper, Nacos, or Apollo to adapt to different enterprise technology stacks and infrastructure environments.
[0054] Through the detailed steps described above, the OCPP-based cluster charging control system of the present invention executes the steps of the OCPP-based cluster charging control method in the above embodiments, which will not be repeated here. The OCPP-based cluster charging control system and method of the present invention, by innovatively combining the Nginx and Dubbo frameworks with the OCPP protocol, constructs a high-performance, highly available, and easily scalable distributed charging control system. This effectively solves various limitations of traditional single-machine systems, provides reliable technical support for the construction of large-scale electric vehicle charging infrastructure, and has significant technological advancements and commercial value.
[0055] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0056] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associatedly listed items. The embodiment numbers disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0057] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A cluster charging control system based on OCPP protocol, characterized in that, The system comprises: an access layer comprising a plurality of user terminals accessed through HTTP / REST protocol and a plurality of charging devices accessed through WebSocket protocol; a load balancing layer connected with the access layer, configured to receive and distribute requests from the user terminals and the charging devices, the load balancing layer comprising an Nginx load balancer; a central system service cluster connected with the load balancing layer, comprising a plurality of service nodes, each service node being configured with an OCPP protocol stack to manage OCPP sessions and integrated with a Dubbo framework; a service registry center in communication connection with each service node in the central system service cluster; wherein the load balancing layer distributes requests to the service nodes in the central system service cluster, each service node performs service registration and discovery in the service registry center, and communicates across nodes through Dubbo RPC to control charging devices connected to non-node.
2. The cluster charging control system based on the OCPP protocol according to claim 1, wherein, The user terminal is an application program used by electric vehicle users to initiate requests to the system through HTTP / REST protocol.
3. The cluster charging control system based on the OCPP protocol according to claim 2, wherein, The charging device comprises a plurality of physical charging piles for charging: pile body 1, pile body 2, …, pile body N. The charging piles establish and maintain long connections with the system through WebSocket protocol, and the communication content follows the OCPP standard protocol, which is used to report real-time charging status and receive remote control instructions to start / stop charging.
4. The cluster charging control system based on the OCPP protocol according to claim 1, wherein, The load balancing layer is configured to support request distribution and load balancing of HTTP protocol and WebSocket protocol at the same time.
5. The cluster charging control system based on the OCPP protocol according to claim 4, wherein, The Nginx load balancing of the load balancing layer is used for request distribution, which is the unified entrance of the system, receiving all requests from the user terminals and the charging device terminals; it also supports simultaneous processing of HTTP requests and WebSocket connection upgrade requests.
6. The cluster charging control system based on the OCPP protocol according to claim 5, wherein, The service node is a stateless service node, and the OCPP session state information maintained by the service node is synchronized within the cluster through Dubbo RPC or stored by means of external distributed cache.
7. The cluster charging control system based on the OCPP protocol according to claim 6, wherein, Each service node contains an OCPP protocol stack inside, which is used for standard OCPP communication with the charging piles and maintains its own OCPP session; each service node integrates a Dubbo framework for service registration, and each service node registers the network address of the service node and the services it can provide to the Dubbo registry center when starting, and is also used for service discovery and RPC calling, and the service nodes communicate remotely through Dubbo RPC.
8. The cluster charging control system based on the OCPP protocol of claim 1, wherein, The service registry center is a Dubbo registry center, which is used for health check of the service nodes, real-time maintenance of the list of all healthy service nodes, and realization of dynamic registration and discovery of services; when a service node fails, the service registry center excludes the failed service node from the list of available services and notifies the load balancing layer to stop distributing requests to the failed node. 9.A cluster charging control method based on an OCPP protocol, characterized in that, The method is applied to the OCPP protocol-based cluster charging control system of any one of claims 1-8 comprising Nginx, a central system service cluster, and a service registry center, and comprises the following steps: Receiving requests from user terminals and charging devices through a load balancing layer and distributing the requests; Processing the distributed requests through service nodes in a central system service cluster, wherein each service node registers service information with a service registry center; When cross-service node message transmission is required, invoking the services of target service nodes through Dubbo RPC to complete the control of the charging devices. 10.The cluster charging control method based on the OCPP protocol of claim 9, wherein, The cluster charging control method based on the OCPP protocol is applied to a system including an access layer, a load balancing layer, a central system service cluster, and a service registry center, and the steps are as follows: Receiving HTTP / REST protocol requests from multiple user terminals and WebSocket connection requests from multiple charging devices through the load balancing layer; The load balancing layer distributes the HTTP / REST protocol requests and the WebSocket connection requests to multiple service nodes in the central system service cluster according to a preset load balancing strategy; Each service node registers services in the service registry center, establishes and maintains OCPP sessions with the charging devices; When a first service node needs to send a control instruction to a charging device connected to a second service node, the message push service on the second service node is invoked through Dubbo RPC, and the second service node issues the control instruction to the target charging device; When a service node failure is monitored, the service registry center removes it from the list of available services, and the load balancing layer redistributes the connections of the failed node to healthy nodes, achieving automatic failover.