Switching method of energy management system and backup system of energy management system
By introducing a switching method and backup system of the energy management system into the intelligent micronet system, and using heartbeat message interaction to achieve system failover, the problem of low stability of the energy management system in the existing technology is solved, and the reliability and security of the system are significantly improved.
Patent Information
- Application Number
- CN202411679211.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-25
AI Technical Summary
The energy management system of the existing intelligent micronet system lacks redundant design, resulting in low system stability, which easily leads to paralysis of the entire system due to failure, and even threatens the security of the system.
It provides a switching method and a backup system for an energy management system. Through the heartbeat message interaction between the first controller and the second controller, it ensures that the system can quickly switch to the backup system in the event of a failure and avoids the system being deactivated.
It effectively improves the stability and reliability of the energy management system, ensures the continuous operation and safety of the intelligent micronet system, and avoids the risk of discontinuation caused by system failure.
Smart Images

Figure CN119519010A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of redundant backup technology, and in particular to a switching method of an energy management system and a backup system of the energy management system. Background Art
[0002] With the rapid development of new energy technologies, smart microgrid systems have become a hot topic in the field of energy research and application. As the core dispatching and processing component in smart microgrids, EMS (Energy Management System) edge controllers play a vital role in the stable and safe operation of the entire system.
[0003] However, most of the EMS edge controllers of smart microgrid systems on the market currently lack redundant design. Once a failure occurs, it will paralyze the entire smart microgrid system and even threaten the security of the system. Therefore, the current energy management system has the problem of low system stability. Summary of the invention
[0004] Based on this, it is necessary to provide an energy management system switching method, an energy management system backup system, an energy management system switching device, a computer device, a computer-readable storage medium, and a computer program product that can improve the stability of the energy management system in response to the above-mentioned technical problems.
[0005] In a first aspect, an embodiment of the present application provides a switching method for an energy management system. Applied to a first controller, where the first controller is an edge controller corresponding to a first energy management system, the method comprises:
[0006] When it is determined that a connection is successfully established with a second controller, a heartbeat message is generated according to a preset time period; the second controller is an edge controller corresponding to the second energy management system, and the second energy management system is a backup system of the first energy management system;
[0007] The heartbeat message is sent to the second controller; the second controller is used to take over the control function of the power equipment in the smart microgrid from the first energy management system if the heartbeat message is not monitored within a preset time interval, and to generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0008] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0009] In one embodiment, after the step of sending the heartbeat message to the second controller, the method further includes:
[0010] Monitoring a heartbeat response message; the heartbeat response message is generated by the second controller and sent to the first controller when the second controller monitors the heartbeat message within the preset time interval;
[0011] If the heartbeat response message is not monitored within the preset time interval, generating and reporting fault alarm information to the cloud server of the smart microgrid, and generating and sending a second restart instruction to the second controllable power supply corresponding to the second energy management system;
[0012] The second restart instruction is used to instruct the second controllable power supply to restart the second energy management system, and the cloud server is used to perform fault analysis on the fault alarm information.
[0013] In one of the embodiments, before the step of generating a heartbeat message according to a preset time period, the method further includes:
[0014] When the first controller and the second controller successfully perform the power-on initialization operation, generating and sending a handshake message to the second controller;
[0015] monitoring a handshake response message returned by the second controller; the handshake response message is generated and sent by the second controller when the handshake message is monitored;
[0016] When the handshake response message is monitored, it is determined that a connection with the second controller is successfully established.
[0017] In one embodiment, generating and sending a handshake message to the second controller includes:
[0018] Generate the handshake message, encrypt the handshake message to obtain the encrypted handshake message, and send the encrypted handshake message to the second controller; the second controller is used to return an encrypted handshake response message according to the encrypted handshake message;
[0019] The monitoring of the handshake response message includes:
[0020] The encrypted handshake response message is received, the encrypted handshake response message is decrypted to obtain the handshake response message, and it is determined that the handshake response message is monitored.
[0021] In one embodiment, sending the heartbeat message to the second controller includes:
[0022] Encrypt the heartbeat message to obtain an encrypted heartbeat message, and send the encrypted heartbeat message to the second controller; the second controller is used to return an encrypted heartbeat response message according to the encrypted heartbeat message;
[0023] The monitoring heartbeat response message includes:
[0024] The encrypted heartbeat response message is received, and the encrypted heartbeat response message is decrypted to obtain the heartbeat response message.
[0025] In one embodiment, the method further comprises:
[0026] Obtaining the current running time, and if the current running time meets a preset self-checking time period, obtaining the self-checking result;
[0027] When the self-test result is abnormal, a substitute work instruction is generated and sent to the second controller; the second controller is used to take over the control function of the power equipment in the smart microgrid in place of the first energy management system when receiving the substitute work instruction, and generate and send a substitute work response instruction;
[0028] When the alternative work response instruction is received, the first restart instruction is generated and sent to the first controllable power supply.
[0029] In one embodiment, generating a heartbeat message includes:
[0030] Acquire real-time operation data; the real-time operation data is used to characterize the real-time operation status of each power device in the smart microgrid;
[0031] Obtaining load and power generation prediction data of each power device in the smart microgrid; the prediction data is obtained by predicting the real-time operation data according to a pre-trained prediction model;
[0032] The real-time operation data and the predicted data are used as the data content of the message to generate the heartbeat message, so that the second energy management system can generate energy scheduling strategy indication information; the energy scheduling strategy indication information is used to instruct the second energy management system to update the energy scheduling strategy.
[0033] In a second aspect, an embodiment of the present application provides a switching method for an energy management system. Applied to a second controller, where the second controller is an edge controller corresponding to a second energy management system, the method includes:
[0034] When it is determined that a connection is successfully established with the first controller, a heartbeat message is monitored; the heartbeat message is generated and sent by the first controller according to a preset time period, the first controller is an edge controller corresponding to the first energy management system, and the second energy management system is a backup system of the first energy management system;
[0035] When the heartbeat message is not monitored within a preset time interval, taking over the first energy management system to implement the control function of the power equipment in the smart microgrid, generating and sending a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0036] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0037] In one embodiment, the method further comprises:
[0038] When the heartbeat message is monitored within the preset time interval, a heartbeat response message is generated;
[0039] Send the heartbeat response message to the first controller; the first controller is used to generate and report fault alarm information to the cloud server of the smart microgrid when the heartbeat response message is not monitored within the preset time interval, and generate and send a second restart instruction to the second controllable power supply corresponding to the second energy management system;
[0040] The second restart instruction is used to instruct the second controllable power supply to restart the second energy management system, and the cloud server is used to perform fault analysis on the fault alarm information.
[0041] In one embodiment, before the step of monitoring the heartbeat message, the method further includes:
[0042] When the first controller and the second controller successfully perform the power-on initialization operation, monitoring a handshake message; the handshake message is generated and sent by the first controller;
[0043] In the case of monitoring the handshake message, generating and sending a handshake response message to the first controller to determine that a connection with the first controller is successfully established.
[0044] In one embodiment, when the handshake message is monitored, generating and sending a handshake response message to the first controller includes:
[0045] Receive the encrypted handshake message sent by the first controller, decrypt the encrypted handshake message to obtain the handshake message, and confirm that the handshake message is monitored;
[0046] When confirming that the handshake message is intercepted, a handshake response message is generated, the handshake response message is encrypted to obtain an encrypted handshake response message, and the encrypted handshake response message is sent to the first controller.
[0047] In one embodiment, monitoring the heartbeat message includes:
[0048] Receive the encrypted heartbeat message sent by the first controller, decrypt the encrypted heartbeat message to obtain the heartbeat message;
[0049] The sending the heartbeat response message to the first controller includes:
[0050] The heartbeat response message is encrypted to obtain an encrypted heartbeat response message, and the encrypted heartbeat response message is sent to the first controller.
[0051] In one embodiment, the method further comprises:
[0052] Upon receiving the alternative work instruction sent by the first controller, taking over the control function of the power equipment in the smart microgrid in place of the first energy management system, generating and sending an alternative work response instruction to the first controller;
[0053] Among them, the alternative work instruction is generated and sent by the first controller when the self-test result is a self-test abnormality, and the first controller is used to generate and send the first restart instruction to the first controllable power supply when receiving the alternative work response instruction.
[0054] In a third aspect, the present application also provides a backup system for an energy management system. The system includes: a first controller, a second controller, a first energy management system, and a second energy management system, wherein the first controller is an edge controller corresponding to the first energy management system, and the second controller is an edge controller corresponding to the second energy management system;
[0055] The first controller is used to: when determining that a connection with the second controller is successfully established, generate a heartbeat message according to a preset time period, and send the heartbeat message to the second controller;
[0056] The second controller is used to: monitor the heartbeat message when it is determined that the connection with the first controller is successfully established; if the heartbeat message is not monitored within a preset time interval, control the second energy management system to take over the control function of the power equipment in the smart microgrid from the first energy management system, and generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0057] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0058] In one of the embodiments, at least two different types of communication lines are provided between the first energy management system and the second energy management system;
[0059] Wherein, the communication line includes an Ethernet line, a controller area network bus or an RS-485 serial communication interface line.
[0060] In a fourth aspect, the present application further provides a switching device for an energy management system. Applied to a first controller, the first controller being an edge controller corresponding to the first energy management system, the device comprising:
[0061] A heartbeat message generation module, configured to generate a heartbeat message according to a preset time period when it is determined that a connection is successfully established with a second controller; the second controller is an edge controller corresponding to a second energy management system, and the second energy management system is a backup system of the first energy management system;
[0062] A heartbeat message sending module, used to send the heartbeat message to the second controller; the second controller is used to take over the control function of the power equipment in the smart microgrid in place of the first energy management system when the heartbeat message is not monitored within a preset time interval, and to generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0063] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0064] In a fifth aspect, the present application further provides a switching device for an energy management system. Applied to a second controller, the second controller being an edge controller corresponding to a second energy management system, the device comprising:
[0065] A heartbeat message monitoring module, used to monitor a heartbeat message when it is determined that a connection is successfully established with a first controller; the heartbeat message is generated and sent by the first controller according to a preset time period, the first controller is an edge controller corresponding to the first energy management system, and the second energy management system is a backup system of the first energy management system;
[0066] A functional ladder module, used for taking over the control function of the power equipment in the smart microgrid in place of the first energy management system when the heartbeat message is not monitored within a preset time interval, and generating and sending a first restart instruction to a first controllable power supply corresponding to the first energy management system;
[0067] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0068] In a sixth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements: the steps of the method described in any one of the first aspects above; or the steps of the method described in any one of the second aspects above.
[0069] In a seventh aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects above or the steps of the method described in any one of the second aspects above are implemented.
[0070] In an eighth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements: the steps of the method described in any one of the first aspects above; or the steps of the method described in any one of the second aspects above.
[0071] The switching method of the energy management system, the backup system of the energy management system, the switching device of the energy management system, the computer equipment, the computer-readable storage medium and the computer program product generate and send heartbeat messages at a preset time period to ensure the effective connection between the first energy management system and the second energy management system. After the connection is successfully established, the heartbeat message is sent to the second controller at a set period for real-time monitoring of the system status. When the second energy management system does not receive the heartbeat message within the preset time interval, it will take over the control function of the first energy management system and send a first restart instruction to the first controllable power supply to restart the first energy management system. This scheme effectively ensures the high availability of the system. By timely detecting the fault of the first energy management system, the switching process is rapid so that the control of the power equipment is not affected, which significantly improves the reliability and safety of the energy management system and the entire smart microgrid, and avoids the risk of shutdown due to system failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0073] Figure 1 is a flow chart of a switching method for an energy management system of a first controller in one embodiment;
[0074] Figure 2 is a flow chart of a switching method for an energy management system of a first controller in another embodiment;
[0075] Figure 3 is a flow chart of a switching method for an energy management system of a second controller in one embodiment;
[0076] Figure 4 is a flow chart of a switching method for an energy management system of a second controller in another embodiment;
[0077] Figure 5 is a system architecture diagram in one embodiment;
[0078] Figure 6 is a schematic diagram of a power supply redundancy solution in an embodiment;
[0079] Figure 7 A flowchart of a self-check abnormality processing of a main energy management system in one embodiment;
[0080] Figure 8A flowchart of a heartbeat monitoring solution in one embodiment;
[0081] Fig. 9 is a structural block diagram of a switching device of an energy management system in one embodiment;
[0082] Fig.10 is a structural block diagram of a switching device of an energy management system in another embodiment;
[0083] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0085] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0086] In one embodiment, Figure 1 As shown, a switching method of an energy management system is provided, which is applied to a first controller. In this embodiment, the method includes the following steps:
[0087] S101, when it is determined that a connection with a second controller is successfully established, generating a heartbeat message according to a preset time period.
[0088] Among them, the Energy Management System (EMS) is a system used to monitor, control and optimize energy production and consumption. Through data collection, analysis and decision support, EMS helps managers achieve efficient use of energy, reduce costs and increase the proportion of renewable energy.
[0089] Among them, the first controller is the edge controller corresponding to the first energy management system, the second controller is the edge controller corresponding to the second energy management system, and the second energy management system is the backup system of the first energy management system; exemplarily, the first energy management system can also be called the main EMS, and the second energy management system can also be called the backup EMS.
[0090] Among them, edge controller refers to the equipment that processes and controls data at the edge of the smart microgrid system (i.e., close to the data source and equipment). Unlike traditional centralized control systems, edge controllers can respond quickly locally, reduce latency, and improve the real-time performance and reliability of the system.
[0091] Among them, the preset time period refers to the time period for generating and sending heartbeat messages. For example, the preset time period is 10 milliseconds, which means that a heartbeat message is sent every 10 milliseconds. A heartbeat message refers to a small data packet sent periodically in network communications to confirm the validity and status of the connection, to help monitor the health of the system, to ensure real-time communication and fault detection between the primary and backup systems, thereby improving the reliability and stability of the system.
[0092] S102: Send the heartbeat message to the second controller.
[0093] Among them, the second controller is used to take over the control function of the power equipment in the smart microgrid from the first energy management system when no heartbeat message is monitored within a preset time interval, and to generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system.
[0094] The preset time interval refers to the time interval for determining whether to perform system takeover. For example, the preset time interval is 30 milliseconds, which means that if the standby EMS does not receive the heartbeat message from the main EMS within a time period of 30 milliseconds, the process of replacing the main EMS is started.
[0095] Among them, a smart microgrid is a local power network that can be independent or connected to the main power grid, integrating multiple energy resources (such as solar energy, wind energy, energy storage equipment, etc.) and loads. The smart microgrid system has the ability to self-regulate and self-manage, and can optimize energy use under different operating modes.
[0096] Generally, the preset time interval in step S102 is greater than the preset time period in step S101. For example, if the preset time period in step S101 is N milliseconds, the preset time interval in step S102 may be 3N milliseconds.
[0097] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the first controllable power supply refers to the power supply corresponding to the controllable main EMS.
[0098] In the switching method of the above-mentioned energy management system, a heartbeat message is generated and sent at a preset time period to ensure an effective connection between the first energy management system and the second energy management system. After the connection is successfully established, a heartbeat message is sent to the second controller at a set period to monitor the system status in real time. When the second energy management system does not receive the heartbeat message within the preset time interval, it will take over the control function of the first energy management system and send a first restart instruction to the first controllable power supply to restart the first energy management system. This scheme effectively ensures the high availability of the system. By timely detecting the fault of the first energy management system, the switching process is rapid so that the control of the power equipment is not affected, which significantly improves the reliability and safety of the energy management system and the entire smart microgrid, and avoids the risk of shutdown due to system failure.
[0099] In one embodiment, after the step of sending the heartbeat message to the second controller, the method further includes: monitoring the heartbeat response message; if no heartbeat response message is monitored within a preset time interval, generating and reporting fault alarm information to a cloud server of the smart microgrid, and generating and sending a second restart instruction to a second controllable power supply corresponding to the second energy management system;
[0100] The heartbeat response message is generated by the second controller when the second controller monitors the heartbeat message within a preset time interval and sent to the first controller.
[0101] The second restart instruction is used to instruct the second controllable power supply to restart the second energy management system, and the second controllable power supply refers to the power supply corresponding to the controllable standby EMS.
[0102] Among them, the cloud server is used to analyze the fault alarm information. Reporting the alarm of the cloud server backup EMS fault plays an important role, including: timely notification of maintenance personnel to ensure that the problem is quickly identified and handled to avoid affecting the overall operation of the system; by monitoring the status of the backup EMS, resource allocation can be optimized to improve the reliability and security of the system; the alarm helps data recording and supports the formulation of subsequent fault analysis and preventive measures, thereby improving the stability and performance of the system.
[0103] For example, if the main EMS does not receive a heartbeat response message from the backup EMS within a time period of 3*N milliseconds, it reports an alarm of a backup EMS failure on the cloud server and sends a command to the controllable power supply of the backup EMS to complete the restart of the backup EMS.
[0104] In this embodiment, after sending the heartbeat message, the first controller continuously monitors the heartbeat response message of the second controller; if no response is received within the preset time interval, the system will generate and report the fault alarm information to the cloud server, and at the same time send a second restart instruction to the second controllable power supply to restart the backup system. This solution ensures efficient collaboration between the primary and backup systems, responds to potential faults in a timely manner, and ensures the continuous and safe operation of the smart microgrid; in addition, the cloud server analyzes the fault alarm and notifies maintenance personnel in a timely manner to quickly identify and handle problems, minimizing the impact on the overall operation of the system, and the ability to record and analyze alarm information can optimize resource allocation and improve system reliability and safety; restarting the power supply can also help troubleshoot system faults.
[0105] In one embodiment, before the step of generating a heartbeat message according to a preset time period, the method also includes: when the first controller and the second controller successfully perform a power-on initialization operation, generating and sending a handshake message to the second controller; monitoring a handshake response message returned by the second controller; and when a handshake response message is monitored, determining that a connection with the second controller is successfully established.
[0106] The handshake response message is generated and sent by the second controller when the handshake message is monitored.
[0107] Among them, the handshake message is a data packet used to request the establishment of a communication connection, which contains the connection request information; and the handshake response message is the receiver's confirmation reply to the handshake message, indicating the validity of the connection request and the receiving status. This two-way confirmation mechanism ensures the consistency of the status of the two communicating parties before data transmission.
[0108] Exemplarily, the main EMS and the standby EMS perform a power-on initialization operation, the main EMS sends a handshake message to the standby EMS, after the standby EMS receives the handshake message sent by the main EMS, if the handshake message is normal, the standby EMS sends a handshake response message to the main EMS, and the main EMS determines that the connection is successfully established after receiving the complete handshake response message.
[0109] In this embodiment, after successful power-on initialization, the main system sends a handshake message to the backup system to request to establish a connection. After receiving the handshake message, if the backup system confirms its validity, it generates and sends a handshake response message back to the main system. After listening to the complete handshake response message, the main system confirms that the connection is successfully established; the handshake mechanism ensures the effective connection between the main EMS and the backup EMS, and ensures that the communication link between the main and backup systems has been reliably established before the heartbeat message is generated, which improves the stability and security of the system and reduces the risk of failure caused by connection problems.
[0110] In one embodiment, generating and sending a handshake message to a second controller includes: generating a handshake message, encrypting the handshake message, obtaining the encrypted handshake message, and sending the encrypted handshake message to the second controller; monitoring a handshake response message includes: receiving the encrypted handshake response message, decrypting the encrypted handshake response message, obtaining the handshake response message, and determining that the handshake response message is monitored.
[0111] The second controller is used to return an encrypted handshake response message according to the encrypted handshake message. The encryption and decryption process of this embodiment can adopt a symmetric key encryption algorithm such as AES-256.
[0112] Exemplarily, the primary EMS sends a handshake message encrypted by AES-256 to the backup EMS; after receiving the handshake message sent by the primary EMS, the backup EMS decrypts and determines whether the handshake message is complete. If the handshake message is normal, the backup EMS sends a handshake response message encrypted by AES-256 to the primary EMS; after receiving the complete handshake response message, the EMS determines that the connection is successfully established.
[0113] In this embodiment, secure communication between the main energy management system and the backup energy management system is ensured through an encrypted handshake mechanism. First, the main energy management system generates a handshake message, and encrypts it using a symmetric key encryption algorithm to form an encrypted handshake message, and then sends it to the backup energy management system; after receiving the encrypted message, the backup energy management system performs a decryption operation to check the integrity and validity of the handshake message; if confirmed to be correct, the backup energy management system generates and sends an encrypted handshake response message back to the main energy management system; after successfully receiving the complete handshake response message, the main energy management system confirms that the two parties have established a secure connection; this process enhances the confidentiality of data transmission in the handshake message interaction process, prevents potential data tampering and eavesdropping risks, and at the same time lays a solid foundation for subsequent secure data interaction, improving the reliability and security of the system.
[0114] In one embodiment, sending a heartbeat message to a second controller includes: encrypting the heartbeat message to obtain an encrypted heartbeat message, and sending the encrypted heartbeat message to the second controller; monitoring a heartbeat response message includes: receiving an encrypted heartbeat response message, decrypting the encrypted heartbeat response message, and obtaining a heartbeat response message.
[0115] The second controller is used to return an encrypted heartbeat response message according to the encrypted heartbeat message. The encryption and decryption process of this embodiment can adopt a symmetric key encryption algorithm such as AES-256.
[0116] Exemplarily, after receiving the complete handshake response message, the primary EMS sends an encrypted heartbeat message to the backup EMS at a period of N milliseconds; after receiving the encrypted heartbeat message sent by the primary EMS, the backup EMS sends an encrypted heartbeat response message to the primary EMS.
[0117] In this embodiment, the status monitoring and communication reliability between the main energy management system and the backup energy management system are ensured by an encrypted heartbeat mechanism. First, after receiving the handshake response, the main energy management system generates a heartbeat message according to the set periodicity, and encrypts it using a symmetric key encryption algorithm to form an encrypted heartbeat message, which is then sent to the backup energy management system; after receiving the encrypted heartbeat message, the backup energy management system decrypts it to obtain the original heartbeat information, and generates an encrypted heartbeat response message based on it, and returns it to the main energy management system; the main energy management system confirms the online status of the backup energy management system by judging the integrity and validity of the heartbeat response; this process effectively improves the real-time and reliability between systems, ensures the security and integrity of data transmission during the interaction of heartbeat messages, reduces the risk of system failures, and provides a guarantee for rapid response in emergency situations.
[0118] In one embodiment, the method also includes: obtaining the current operating time, and obtaining the self-test result when the current operating time meets the preset self-test time period; generating and sending an alternative working instruction to the second controller when the self-test result is a self-test abnormality; the second controller is used to take over the control function of the power equipment in the smart microgrid from the first energy management system when receiving the alternative working instruction, and generate and send an alternative working response instruction; and generating and sending a first restart instruction to the first controllable power supply when receiving the alternative working response instruction.
[0119] The current running time refers to the current running time of the system, such as 30 hours, and the self-check time period refers to the check period set by the system, such as 24 hours.
[0120] For example, the main EMS performs self-inspection regularly; if the main EMS performs self-inspection abnormally, it sends an instruction for alternative work to the backup EMS; after receiving the alternative work instruction sent by the main EMS, the backup EMS starts the alternative process and sends an alternative work response instruction to the main EMS at the same time; the main EMS sends a restart instruction to the controllable power supply.
[0121] In this embodiment, the coordination between the main energy management system and the backup energy management system is optimized through a periodic self-check mechanism to ensure the stability and reliability of the system. First, the system obtains the current operating time and determines whether it meets the preset self-check time period; if the self-check result shows an abnormality, the main energy management system generates an alternative work instruction and sends it to the backup energy management system; after receiving the instruction, the backup energy management system immediately starts the alternative work process to take over the control function of the power equipment, and feeds back the generated alternative work response instruction to the main energy management system; after confirming that the main energy management system has received the alternative work response instruction, it further generates and sends a restart instruction to the first controllable power supply; by setting a self-check mechanism, this scheme effectively realizes rapid switching in the event of a fault, ensures the smooth operation of the power equipment, significantly reduces the risk of power outages caused by abnormalities in the main energy management system, and improves the operational safety and reliability of the entire smart microgrid.
[0122] In one embodiment, generating a heartbeat message includes: obtaining real-time operation data; obtaining predicted data on the load and power generation of each power device in the smart microgrid; using the real-time operation data and the predicted data as the data content of the message to generate a heartbeat message for the second energy management system to generate energy scheduling strategy indication information.
[0123] Among them, the real-time operation data is used to characterize the real-time operation status of each power equipment in the smart microgrid, and the prediction data is obtained by predicting the real-time operation data according to the pre-trained prediction model, that is, the heartbeat message contains the real-time operation data of the site equipment, key information of algorithm regulation, etc. The energy scheduling strategy indication information is used to instruct the second energy management system to update the energy scheduling strategy.
[0124] Specifically, in the smart microgrid EMS system, the real-time operating data of the station equipment is equivalent to the vital signs of the equipment. By real-time monitoring of voltage, current, equipment status, etc., the system is ensured to be within the normal operating range. These data enable the EMS to identify potential faults in a timely manner and take countermeasures quickly. For example, when the voltage is abnormal, the system can immediately adjust the load to protect the safety of the equipment. The key information of algorithm regulation refers to the decision-making logic and control strategy of the system, including dynamic scheduling strategies and load and power generation forecast data, so that the system can optimize energy management in complex environments. When high demand is predicted, the system can dispatch energy storage equipment in advance to ensure adequate power supply.
[0125] The integration of these two types of information into the heartbeat message enables real-time monitoring and intelligent decision support, so that the system can quickly switch to the backup EMS when the main EMS fails to ensure stability. At the same time, the heartbeat message can also be used to understand the real-time operating status of the equipment, set the algorithm control strategy, and realize the combination of switching detection and control. This combination enriches the role of the heartbeat message, enhances the fault tolerance of the system, improves the overall reliability and resilience of the smart microgrid, and significantly reduces downtime.
[0126] In this embodiment, real-time monitoring and decision support of operating data and prediction information in the smart microgrid are achieved by generating heartbeat messages. First, the system obtains the real-time operating data of the station equipment to reflect the current status of the power equipment, including voltage, current current, and equipment operating status; at the same time, the system obtains the load and power generation prediction data of each power equipment based on the pre-trained prediction model, and provides trend analysis for future operation; through the combination of real-time monitoring of heartbeat messages and intelligent decision-making, this solution enhances the fault tolerance of the system, improves the overall reliability and resilience of the smart microgrid, realizes data transmission while ensuring system switching, and improves the utilization efficiency of communication resources.
[0127] In one embodiment, Figure 2 As shown, a switching method of an energy management system is provided, which is applied to a second controller. In this embodiment, the method includes the following steps:
[0128] S201: When it is determined that a connection with the first controller is successfully established, monitor a heartbeat message.
[0129] Among them, the heartbeat message is generated and sent by the first controller according to a preset time period, the first controller is the edge controller corresponding to the first energy management system, the second controller is the edge controller corresponding to the second energy management system, and the second energy management system is the backup system of the first energy management system.
[0130] S202, when no heartbeat message is monitored within a preset time interval, taking over the first energy management system to implement the control function of the power equipment in the smart microgrid, generating and sending a first restart instruction to the first controllable power supply corresponding to the first energy management system.
[0131] The preset time interval refers to the time interval for determining whether to perform system takeover. For example, the preset time interval is 30 milliseconds, which means that if the backup EMS does not receive the heartbeat message of the main EMS within a time period of 30 milliseconds, the process of replacing the main EMS is started. The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system. The first controllable power supply refers to the power supply corresponding to the controllable main EMS.
[0132] In the switching method of the above energy management system, the fault detection and backup control of the main energy management system are realized by setting up a heartbeat message monitoring mechanism. First, after successfully establishing a connection with the first controller, the backup energy management system monitors the heartbeat message to ensure effective communication with the main energy management system; if the heartbeat message is not heard within the preset time interval, the backup energy management system will immediately start the replacement process, take over the control function of the power equipment, and generate a first restart instruction, which is sent to the first controllable power supply to instruct it to restart the main energy management system. This technical solution enhances the real-time response capability and reliability of the system by realizing heartbeat monitoring and automatic switching mechanisms, ensuring that power supply services can be restored in time when a failure occurs in the main energy management system, thereby reducing the downtime risk of the smart microgrid and improving the stability and security of the energy management system and the entire smart microgrid.
[0133] In one embodiment, the method further includes: generating a heartbeat response message when a heartbeat message is monitored within a preset time interval; and sending the heartbeat response message to the first controller.
[0134] Among them, the second restart instruction is used to instruct the second controllable power supply to restart the second energy management system, and the cloud server is used to perform fault analysis on the fault alarm information.
[0135] The first controller is used to generate and report fault alarm information to the cloud server of the smart microgrid when no heartbeat response message is monitored within a preset time interval, and to generate and send a second restart instruction to the second controllable power supply corresponding to the second energy management system. The second controllable power supply refers to the power supply corresponding to the controllable standby EMS.
[0136] For example, if the main EMS does not receive a heartbeat response message from the backup EMS within a time period of 3*N milliseconds, it reports an alarm of a backup EMS failure on the cloud server and sends a command to the controllable power supply of the backup EMS to complete the restart of the backup EMS.
[0137] In this embodiment, the reliability monitoring and fault handling of the backup energy management system are realized through the heartbeat response mechanism. After successfully monitoring the heartbeat message from the backup energy management system within the preset time interval, the main energy management system generates and sends a heartbeat response message to confirm its normal operating status; this solution ensures the stability and high availability of the backup energy management system through the combination of automatic monitoring and fault response, reduces system downtime, and improves the operational safety and efficiency of the smart microgrid; in addition, the cloud server analyzes the fault alarm and notifies the maintenance personnel in time to quickly identify and handle the problem, minimize the impact on the overall operation of the system, and the recording and analysis capabilities of the alarm information can optimize resource allocation and improve the reliability and safety of the system; restarting the power supply can also help to eliminate system faults.
[0138] In one embodiment, before the step of monitoring the heartbeat message, the method also includes: when the first controller and the second controller successfully perform the power-on initialization operation, monitoring the handshake message; when the handshake message is monitored, generating and sending a handshake response message to the first controller to determine that the connection with the first controller is successfully established.
[0139] The handshake message is generated and sent by the first controller.
[0140] Exemplarily, the main EMS and the standby EMS perform a power-on initialization operation, the main EMS sends a handshake message to the standby EMS, after the standby EMS receives the handshake message sent by the main EMS, if the handshake message is normal, the standby EMS sends a handshake response message to the main EMS, and the main EMS determines that the connection is successfully established after receiving the complete handshake response message.
[0141] This embodiment implements the connection confirmation of the main and backup energy management systems through the handshake message mechanism. After the first controller and the second controller successfully complete the power-on initialization operation, the backup energy management system starts to listen to the handshake message from the main energy management system; the main energy management system generates and sends a handshake message to request to establish a connection with the backup system; when the backup energy management system listens to the handshake message, if its content is normal and complies with the protocol, it will generate a handshake response message and send it back to the main energy management system; after receiving the complete handshake response message, the main energy management system confirms that the connection with the backup energy management system is successfully established, and the system is in a communicative state; this solution ensures the reliable connection between the main and backup systems through layer-by-layer verification, provides a basis for subsequent heartbeat message monitoring and fault handling, ensures the stability and security of the entire smart microgrid, thereby improving the overall intelligence level and response speed of the system, and reducing the potential risk of communication failures.
[0142] In one embodiment, when a handshake message is overheard, a handshake response message is generated and sent to the first controller, including: receiving an encrypted handshake message sent by the first controller, decrypting the encrypted handshake message to obtain a handshake message, and confirming that the handshake message is overheard; when confirming that the handshake message is overheard, a handshake response message is generated, the handshake response message is encrypting the handshake response message to obtain an encrypted handshake response message, and sending the encrypted handshake response message to the first controller.
[0143] The encryption and decryption process of this embodiment may adopt a symmetric key encryption algorithm such as AES-256.
[0144] Exemplarily, the primary EMS sends a handshake message encrypted by AES-256 to the backup EMS; after receiving the handshake message sent by the primary EMS, the backup EMS decrypts and determines whether the handshake message is complete. If the handshake message is normal, the backup EMS sends a handshake response message encrypted by AES-256 to the primary EMS; after receiving the complete handshake response message, the EMS determines that the connection is successfully established.
[0145] This embodiment implements secure connection confirmation of the main and backup energy management systems through encrypted handshake messages. After listening to the encrypted handshake message sent by the main energy management system, the backup system uses a symmetric key encryption algorithm to decrypt it and confirm the integrity of the content; if the handshake message is normal, the backup system generates an encrypted handshake response message and sends it back to the main system; through this encryption and decryption mechanism, the security and confidentiality of the communication process are ensured, effectively preventing data from being stolen or tampered with, and enhancing the confidentiality of data transmission during the handshake message interaction process, thereby improving the security and reliability of the system connection.
[0146] In one embodiment, monitoring a heartbeat message includes: receiving an encrypted heartbeat message sent by a first controller, decrypting the encrypted heartbeat message to obtain a heartbeat message; and sending a heartbeat response message to the first controller, including:
[0147] The heartbeat response message is encrypted to obtain an encrypted heartbeat response message, and the encrypted heartbeat response message is sent to the first controller.
[0148] The encryption and decryption process of this embodiment may adopt a symmetric key encryption algorithm such as AES-256.
[0149] Exemplarily, after receiving the complete handshake response message, the primary EMS sends an encrypted heartbeat message to the backup EMS at a period of N milliseconds; after receiving the encrypted heartbeat message sent by the primary EMS, the backup EMS sends an encrypted heartbeat response message to the primary EMS.
[0150] In this embodiment, secure communication between the main and standby energy management systems is achieved through encrypted heartbeat messages. After receiving the complete handshake response message, the main energy management system will periodically send encrypted heartbeat messages according to the set period; after receiving the encrypted heartbeat message, the standby energy management system will decrypt and confirm its content through the symmetric key algorithm, and then generate an encrypted heartbeat response message and return it to the main system; this encryption mechanism ensures the security of information transmission and data integrity during the interaction of the heartbeat message, improves the security and anti-attack capability of the system, and effectively protects the stable operation of the smart microgrid.
[0151] In one embodiment, the method further includes: upon receiving an alternative work instruction sent by the first controller, taking over the first energy management system to implement the control function of the power equipment in the smart microgrid, and generating and sending an alternative work response instruction to the first controller.
[0152] Among them, the alternative work instruction is generated and sent by the first controller when the self-test result is a self-test abnormality, and the first controller is used to generate and send a first restart instruction to the first controllable power supply when receiving the alternative work response instruction.
[0153] For example, the main EMS performs self-inspection regularly; if the main EMS performs self-inspection abnormally, it sends an instruction for alternative work to the backup EMS; after receiving the alternative work instruction sent by the main EMS, the backup EMS starts the alternative process and sends an alternative work response instruction to the main EMS at the same time; the main EMS sends a restart instruction to the controllable power supply.
[0154] This embodiment realizes the takeover function of the backup energy management system through alternative work instructions when the main energy management system self-checks abnormally. The main energy management system performs self-checks regularly. If an abnormality is found, it will generate and send alternative work instructions to the backup system; after receiving the instructions, the backup system immediately starts the replacement process and generates alternative work response instructions to feed back to the main system; after confirming that the response instruction has been received, the main system sends a restart instruction to the controllable power supply; by setting up a self-check mechanism, the continuity and stability of the smart microgrid when the main system fails are guaranteed, and the reliability and self-recovery ability of the system are improved.
[0155] The present application also provides a backup system for an energy management system. The system includes: a first controller, a second controller, a first energy management system and a second energy management system, the first controller is an edge controller corresponding to the first energy management system, and the second controller is an edge controller corresponding to the second energy management system.
[0156] Wherein, the first controller is used to: when it is determined that a connection is successfully established with the second controller, generate a heartbeat message according to a preset time period, and send the heartbeat message to the second controller; the second controller is used to: when it is determined that a connection is successfully established with the first controller, monitor the heartbeat message; when no heartbeat message is monitored within the preset time interval, control the second energy management system to take over the first energy management system to implement the control function of the power equipment in the smart microgrid, and generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0157] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0158] Among them, at least two different types of communication lines are arranged between the first energy management system and the second energy management system; wherein the communication line includes an Ethernet line, a controller area network bus or an RS-485 serial communication interface line.
[0159] In this embodiment, efficient monitoring and fault switching of power equipment are achieved through the coordinated work of the first controller and the second controller. By setting up at least two different types of communication lines, the reliability and anti-interference capability of the system are enhanced, ensuring that when the main system fails, the backup system can quickly take over control, thereby minimizing the downtime of power equipment and improving the overall safety and stability of the smart microgrid.
[0160] In another embodiment, Figure 3 As shown, a switching method of an energy management system is provided, comprising the following steps:
[0161] S301 : When the first controller and the second controller successfully perform a power-on initialization operation, generate and send a handshake message to the second controller.
[0162] S302: monitor a handshake response message returned by the second controller.
[0163] S303: When a handshake response message is monitored, determine that a connection with the second controller is successfully established.
[0164] S304: When it is determined that the connection with the second controller is successfully established, generate a heartbeat message according to a preset time period.
[0165] S305: Send the heartbeat message to the second controller.
[0166] S306, monitoring the heartbeat response message.
[0167] S307, when no heartbeat response message is monitored within the preset time interval, generate and report fault alarm information to the cloud server of the smart microgrid, and generate and send a second restart instruction to the second controllable power supply corresponding to the second energy management system.
[0168] In another embodiment, Figure 4 As shown, a switching method of an energy management system is provided, comprising the following steps:
[0169] S401 : When the first controller and the second controller successfully perform a power-on initialization operation, monitor a handshake message.
[0170] S402: When a handshake message is monitored, generate and send a handshake response message to the first controller to determine that a connection with the first controller is successfully established.
[0171] S403: When it is determined that the connection with the first controller is successfully established, monitor the heartbeat message.
[0172] S404, when no heartbeat message is monitored within a preset time interval, taking over the first energy management system to implement the control function of the power equipment in the smart microgrid, generating and sending a first restart instruction to the first controllable power supply corresponding to the first energy management system.
[0173] S405: When a heartbeat message is monitored within a preset time interval, a heartbeat response message is generated.
[0174] S406: Send a heartbeat response message to the first controller.
[0175] It should be noted that the specific limitations of the above steps can be found in the above specific limitations of a switching method for an energy management system, which will not be repeated here.
[0176] In current technologies, most edge controllers of energy management systems in smart microgrid systems lack redundant design and generally have the following problems: (1) low security redundancy; (2) high risk of power dispatching out of control; (3) data between the master and backup machines is not transmitted encrypted, resulting in transmission vulnerabilities; (4) the backup machine can only intervene when the master machine loses control; and (5) hot backup mainly relies on software solutions.
[0177] Based on this, the embodiment of the present application provides a switching method of an energy management system and a backup system of an energy management system. Figures 4 to 8 , a switching method of an energy management system and a backup system of an energy management system are described in detail with a specific embodiment. It is worth noting that the following description is only an exemplary description and not a specific limitation of the application.
[0178] The switching method of the energy management system provided in the present application is also called the EMS system control method based on redundant control. By building a redundant EMS system, it is ensured that when the main EMS system fails, the backup EMS system can quickly take over to ensure the continuous and stable operation of the smart microgrid system.
[0179] The system architecture diagram of the backup system of the energy management system provided in this application is as follows Figure 5As shown, specifically including: (1) The main EMS and the backup EMS are the core parts of the system, responsible for managing the operation of the entire system. They communicate with other devices, including photovoltaic inverters, energy storage systems, charging piles, etc., through network cables / CAN bus / 485 lines. At the same time, the main EMS and the backup EMS also communicate through network cables, CAN bus, and 485 bus; (2) Photovoltaic inverter is a device used to convert solar energy into direct current or alternating current. It is connected to the main EMS or backup EMS through a network cable or a twisted pair shielded cable; (3) The energy storage system is a device for storing energy, usually used to smooth the fluctuations of the power grid, provide emergency power supply, etc. It is also connected to the main EMS or backup EMS through a network cable or a twisted pair shielded cable; (4) The charging pile is a device for providing charging services for electric vehicles. It may also be connected to the main EMS or backup EMS through a network cable or a twisted pair shielded cable; (5) The communication protocol used here involves MODBUS TCP, MODBUS RTU, custom TCP protocol, and 104, etc. These protocols define the communication methods and data formats between the main EMS and each device; (6) The cloud server is used by the main EMS to communicate with the cloud server through TCP communication, probably for remote monitoring and management of the entire system.
[0180] The power supply redundancy scheme schematic diagram of the backup system of the energy management system provided in this application is as follows Figure 6 As shown, both the main EMS and the backup EMS are powered by independent controllable power supplies, which can accept communication instructions to realize the power supply shutdown function. At the same time, the controllable power supply also has a feedback signal port for detecting whether the power supply is normal. The communication port and feedback signal port of the controllable power supply A and the controllable power supply B are connected to the main EMS and the backup EMS at the same time, that is, the main EMS and the backup EMS can control the shutdown of the controllable power supply A and the controllable power supply B through instructions.
[0181] In summary, the main EMS and the backup EMS are powered by controllable power supplies that can receive communication instructions and realize the power supply shutdown function. The feedback signal ports of controllable power supply A and controllable power supply B are used to detect whether the power supply is normal, which helps ensure that the power supply system can operate normally and avoid potential failures. If there is a problem with the power supply, the feedback signal port will send a signal to the main EMS or the backup EMS so that they can take appropriate measures to solve the problem. The collaborative work between them helps ensure the stability and reliability of the system.
[0182] The self-check abnormality processing flow chart of the main energy management system of the energy management system switching method provided by the present application is as follows Figure 7As shown in the figure, the main EMS self-test exception handling process includes: (1) the main EMS performs regular self-test; (2) if the main EMS self-tests abnormally, it sends an alternative work instruction to the standby EMS through the network cable / CAN / 485 bus; (3) after receiving the alternative work instruction sent by the main EMS, the standby EMS starts the alternative process and sends an alternative work response instruction to the main EMS at the same time; (4) the main EMS sends a restart instruction to the controllable power supply.
[0183] The heartbeat monitoring solution flow chart of the switching method of the energy management system provided in this application is as follows: Figure 8 As shown, it specifically includes: (1) The main EMS and the standby EMS perform power-on initialization operations. (2) The main EMS sends a handshake message encrypted by AES-256 to the standby EMS. (3) After receiving the handshake message sent by the main EMS, the standby EMS decrypts and determines whether the handshake message is complete. If the handshake message is normal, the standby EMS sends a handshake response message encrypted by AES-256 to the main EMS. (4) After the main EMS receives the complete handshake response message, it sends an encrypted heartbeat message to the standby EMS at a period of N milliseconds. The heartbeat message contains the real-time operation data of the station equipment, key information of algorithm control, etc. (5) After the standby EMS receives the encrypted heartbeat message sent by the main EMS, the standby EMS sends an encrypted heartbeat response message to the main EMS. (6) If the standby EMS does not receive the heartbeat message from the main EMS within a time period of 3*N milliseconds, it starts the process of replacing the main EMS and takes over the main EMS to complete the monitoring and control of the entire smart microgrid system. At the same time, a command is sent to the controllable power supply of the main EMS to complete the restart of the main EMS. (7) If the main EMS does not receive the heartbeat response message from the backup EMS within a time period of 3*N milliseconds, an alarm of the backup EMS failure of the cloud server is reported, and a command is sent to the controllable power supply of the backup EMS to complete the restart of the backup EMS.
[0184] pass Figure 6 , Figure 7 and Figure 8 The fusion solution realizes the redundant backup solution of the smart microgrid EMS, which can improve the reliability and stability of the system, reduce the downtime of system failures, and increase the fault tolerance mechanism of the system.
[0185] The switching method of the energy management system and the backup system of the energy management system provided by the present application have the following advantages: (1) Through the redundant application of software, hardware, and power supply, once a component fails, the system can immediately switch to another normally working component, thereby ensuring the continuous operation of the system and improving the reliability and stability of the system; (2) When the main EMS self-checks abnormalities, it can actively authorize the backup EMS to replace the work. When the main system is abnormal, the system can automatically switch to the backup system, which reduces the time of system switching and greatly reduces the time loss caused by system failure; (3) Multiple communication schemes between the main and backup EMSs increase the reliability of communication. By using multiple communication methods, even if one communication method fails, other communication methods can continue to work, reducing system errors caused by communication problems, reducing the probability of system misjudgment, and improving the fault tolerance mechanism of the system; (4) The communication between the main and backup EMSs adopts an encryption scheme to increase the communication security of the system. The use of encrypted communication can prevent data from being stolen or tampered with during the communication process, further protecting the security of the system. In general, the stability, reliability and security of the system are effectively improved. When facing various possible problems, the system can run more smoothly and safely.
[0186] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0187] Based on the same inventive concept, the embodiment of the present application also provides a switching device of an energy management system for implementing the switching method of the energy management system involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the switching device embodiments of one or more energy management systems provided below can refer to the limitations of the switching method of the energy management system above, and will not be repeated here.
[0188] In one embodiment, Fig. 9 As shown, a switching device for an energy management system of a first controller is provided, comprising: a heartbeat message generating module 901 and a heartbeat message sending module 902, wherein:
[0189] A heartbeat message generation module 901 is used to generate a heartbeat message according to a preset time period when it is determined that a connection is successfully established with a second controller; the second controller is an edge controller corresponding to the second energy management system, and the second energy management system is a backup system of the first energy management system;
[0190] A heartbeat message sending module 902 is used to send a heartbeat message to a second controller; if the second controller does not monitor the heartbeat message within a preset time interval, it takes over the control function of the power equipment in the smart microgrid from the first energy management system, and generates and sends a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0191] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0192] In one embodiment, Fig.10 As shown, a switching device for an energy management system of a second controller is provided, comprising: a heartbeat message monitoring module 1001, a function ladder module 1002, wherein:
[0193] A heartbeat message monitoring module 1001 is used to monitor a heartbeat message when it is determined that a connection is successfully established with the first controller; the heartbeat message is generated and sent by the first controller according to a preset time period, the first controller is an edge controller corresponding to the first energy management system, and the second energy management system is a backup system of the first energy management system;
[0194] The function ladder module 1002 is used to take over the control function of the power equipment in the smart microgrid in place of the first energy management system when no heartbeat message is monitored within a preset time interval, and to generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system;
[0195] The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
[0196] Each module in the switching device of the energy management system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0197] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a switching method of an energy management system is implemented.
[0198] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0199] In one embodiment, a computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0200] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0201] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0202] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0204] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A switching method for an energy management system, characterized in that: Applied to a first controller, where the first controller is an edge controller corresponding to a first energy management system, the method includes: When it is determined that a connection is successfully established with a second controller, a heartbeat message is generated according to a preset time period; the second controller is an edge controller corresponding to the second energy management system, and the second energy management system is a backup system of the first energy management system; The heartbeat message is sent to the second controller; the second controller is used to take over the control function of the power equipment in the smart microgrid from the first energy management system if the heartbeat message is not monitored within a preset time interval, and to generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system; The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
2. The method according to claim 1, characterized in that After the step of sending the heartbeat message to the second controller, the method further includes: Monitoring a heartbeat response message; the heartbeat response message is generated by the second controller and sent to the first controller when the second controller monitors the heartbeat message within the preset time interval; If the heartbeat response message is not monitored within the preset time interval, generating and reporting fault alarm information to the cloud server of the smart microgrid, and generating and sending a second restart instruction to the second controllable power supply corresponding to the second energy management system; The second restart instruction is used to instruct the second controllable power supply to restart the second energy management system, and the cloud server is used to perform fault analysis on the fault alarm information.
3. The method according to claim 1, characterized in that Before the step of generating a heartbeat message according to a preset time period, the method further includes: When the first controller and the second controller successfully perform the power-on initialization operation, generating and sending a handshake message to the second controller; monitoring a handshake response message returned by the second controller; the handshake response message is generated and sent by the second controller when the handshake message is monitored; When the handshake response message is monitored, it is determined that a connection with the second controller is successfully established.
4. The method according to claim 3, characterized in that The generating and sending a handshake message to the second controller includes: Generate the handshake message, encrypt the handshake message to obtain the encrypted handshake message, and send the encrypted handshake message to the second controller; the second controller is used to return an encrypted handshake response message according to the encrypted handshake message; The monitoring of the handshake response message includes: The encrypted handshake response message is received, the encrypted handshake response message is decrypted to obtain the handshake response message, and it is determined that the handshake response message is monitored.
5. The method according to claim 2, characterized in that: The sending the heartbeat message to the second controller includes: Encrypt the heartbeat message to obtain an encrypted heartbeat message, and send the encrypted heartbeat message to the second controller; the second controller is used to return an encrypted heartbeat response message according to the encrypted heartbeat message; The monitoring heartbeat response message includes: The encrypted heartbeat response message is received, and the encrypted heartbeat response message is decrypted to obtain the heartbeat response message.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining the current running time, and if the current running time meets a preset self-checking time period, obtaining the self-checking result; When the self-test result is abnormal, a substitute work instruction is generated and sent to the second controller; the second controller is used to take over the control function of the power equipment in the smart microgrid in place of the first energy management system when receiving the substitute work instruction, and generate and send a substitute work response instruction; When the alternative work response instruction is received, the first restart instruction is generated and sent to the first controllable power supply.
7. The method according to claim 1, characterized in that The generating of the heartbeat message comprises: Acquire real-time operation data; the real-time operation data is used to characterize the real-time operation status of each power device in the smart microgrid; Obtaining load and power generation prediction data of each power device in the smart microgrid; the prediction data is obtained by predicting the real-time operation data according to a pre-trained prediction model; The real-time operation data and the predicted data are used as the data content of the message to generate the heartbeat message, so that the second energy management system can generate energy scheduling strategy indication information; the energy scheduling strategy indication information is used to instruct the second energy management system to update the energy scheduling strategy.
8. A switching method for an energy management system, characterized in that: Applied to a second controller, where the second controller is an edge controller corresponding to a second energy management system, the method includes: When it is determined that a connection is successfully established with the first controller, a heartbeat message is monitored; the heartbeat message is generated and sent by the first controller according to a preset time period, the first controller is an edge controller corresponding to the first energy management system, and the second energy management system is a backup system of the first energy management system; When the heartbeat message is not monitored within a preset time interval, taking over the first energy management system to implement the control function of the power equipment in the smart microgrid, generating and sending a first restart instruction to the first controllable power supply corresponding to the first energy management system; The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
9. The method according to claim 8, characterized in that The method further comprises: When the heartbeat message is monitored within the preset time interval, a heartbeat response message is generated; Send the heartbeat response message to the first controller; the first controller is used to generate and report fault alarm information to the cloud server of the smart microgrid when the heartbeat response message is not monitored within the preset time interval, and generate and send a second restart instruction to the second controllable power supply corresponding to the second energy management system; The second restart instruction is used to instruct the second controllable power supply to restart the second energy management system, and the cloud server is used to perform fault analysis on the fault alarm information.
10. The method according to claim 8, characterized in that Before the step of monitoring the heartbeat message, the method further includes: When the first controller and the second controller successfully perform the power-on initialization operation, monitoring a handshake message; the handshake message is generated and sent by the first controller; In the case of monitoring the handshake message, generating and sending a handshake response message to the first controller to determine that a connection with the first controller is successfully established.
11. The method according to claim 10, characterized in that The step of generating and sending a handshake response message to the first controller when the handshake message is monitored includes: Receive the encrypted handshake message sent by the first controller, decrypt the encrypted handshake message to obtain the handshake message, and confirm that the handshake message is monitored; When confirming that the handshake message is intercepted, a handshake response message is generated, the handshake response message is encrypted to obtain an encrypted handshake response message, and the encrypted handshake response message is sent to the first controller.
12. The method according to claim 9, characterized in that The monitoring heartbeat message includes: Receive the encrypted heartbeat message sent by the first controller, decrypt the encrypted heartbeat message to obtain the heartbeat message; The sending the heartbeat response message to the first controller includes: The heartbeat response message is encrypted to obtain an encrypted heartbeat response message, and the encrypted heartbeat response message is sent to the first controller.
13. The method according to claim 8, characterized in that The method further comprises: Upon receiving the alternative work instruction sent by the first controller, taking over the control function of the power equipment in the smart microgrid in place of the first energy management system, generating and sending an alternative work response instruction to the first controller; Among them, the alternative work instruction is generated and sent by the first controller when the self-test result is a self-test abnormality, and the first controller is used to generate and send the first restart instruction to the first controllable power supply when receiving the alternative work response instruction.
14. A backup system for an energy management system, characterized in that: The system comprises: a first controller, a second controller, a first energy management system and a second energy management system, wherein the first controller is an edge controller corresponding to the first energy management system, and the second controller is an edge controller corresponding to the second energy management system; The first controller is used to: when determining that a connection with the second controller is successfully established, generate a heartbeat message according to a preset time period, and send the heartbeat message to the second controller; The second controller is used to: monitor the heartbeat message when it is determined that the connection with the first controller is successfully established; if the heartbeat message is not monitored within a preset time interval, control the second energy management system to take over the control function of the power equipment in the smart microgrid from the first energy management system, and generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system; The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
15. The backup system of the energy management system according to claim 14, characterized in that: At least two different types of communication lines are provided between the first energy management system and the second energy management system; Wherein, the communication line includes an Ethernet line, a controller area network bus or an RS-485 serial communication interface line.
16. A switching device for an energy management system, characterized in that: Applied to a first controller, where the first controller is an edge controller corresponding to a first energy management system, the device includes: A heartbeat message generation module, configured to generate a heartbeat message according to a preset time period when it is determined that a connection is successfully established with a second controller; the second controller is an edge controller corresponding to a second energy management system, and the second energy management system is a backup system of the first energy management system; A heartbeat message sending module, used to send the heartbeat message to the second controller; the second controller is used to take over the control function of the power equipment in the smart microgrid in place of the first energy management system when the heartbeat message is not monitored within a preset time interval, and to generate and send a first restart instruction to the first controllable power supply corresponding to the first energy management system; The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
17. A switching device for an energy management system, characterized in that: Applied to a second controller, where the second controller is an edge controller corresponding to a second energy management system, the device includes: A heartbeat message monitoring module, used to monitor a heartbeat message when it is determined that a connection is successfully established with a first controller; the heartbeat message is generated and sent by the first controller according to a preset time period, the first controller is an edge controller corresponding to the first energy management system, and the second energy management system is a backup system of the first energy management system; A functional ladder module, used for taking over the control function of the power equipment in the smart microgrid in place of the first energy management system when the heartbeat message is not monitored within a preset time interval, and generating and sending a first restart instruction to a first controllable power supply corresponding to the first energy management system; The first restart instruction is used to instruct the first controllable power supply to restart the first energy management system, and the preset time interval is greater than the preset time period.
18. A controller comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.