Energy storage controller self-registration and self-networking method
Through the self-registration and self-networking method of the energy storage controller, the interaction between the local controller and the coordination controller and the cooperation of the cloud server are used to realize automatic registration and networking, which solves the problem of manual participation in registration and networking in the existing technology. Complexity and efficiency issues improve the deployment efficiency and flexibility of energy storage systems.
Patent Information
- Application Number
- CN202410782511.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-18
AI Technical Summary
Existing energy storage controllers require manual participation in registration and networking in cabinet combination scenarios, and cannot achieve self-registration and self-organization of networks. Especially in scenarios where the number of cabinets combined is uncertain and needs to support dynamic additions and deletions, there is complexity and Efficiency issues.
Provides a method for self-registration and self-organization of energy storage controllers. Through the interaction between the local controller and the coordination controller, IP conflict detection and configuration package management are realized. The coordination controller actively interacts with the cloud server and reports device topology information. Complete self-registration and self-organizing network.
It realizes automatic registration and networking of energy storage controllers in cabinet combination scenarios, improves deployment efficiency and complexity, reduces manual intervention, and supports dynamically changing energy storage systems.
Smart Images

Figure CN118353953B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of energy storage system control and scheduling, and in particular to a method for self-registration and self-networking of an energy storage controller. Background Art
[0002] The energy storage cabinet is the basic unit of the energy storage system. When in use, multiple energy storage cabinets often form an energy storage cabinet network. Traditional energy storage systems need to determine the master cabinet and slave cabinets before they can operate normally. The master cabinet coordinates the slave cabinets to complete various tasks. The energy storage cabinets are registered and networked through the energy storage controller in the energy storage cabinet. As the brain and control center of the energy storage cabinet, the existing energy storage controller needs to be manually configured or code-written to achieve multi-cabinet parallel connection in the cabinet combination scenario. Especially in the on-site cabinet combination scenario, when the number of cabinets is uncertain and the dynamic addition and deletion of energy storage cabinets needs to be supported, it is usually necessary to manually configure the master and slave cabinets, manually set the device topology, modify the slave cabinet IP address, modify the energy storage capacity, etc., so that the energy storage system can operate normally.
[0003] Therefore, the existing energy storage controller requires manual participation in registration and networking in the cabinet-connected use scenario, and cannot achieve self-registration and self-networking. Summary of the invention
[0004] Based on this, it is necessary to provide a method for self-registration and self-networking of energy storage controllers to address the problem that existing energy storage controllers require manual participation in registration and networking in cabinet-connected use scenarios and cannot achieve self-registration and self-networking.
[0005] On the one hand, the present application provides a method for self-registration and self-networking of an energy storage controller, which is applied to an energy storage system having a master cabinet and multiple slave cabinets, and the local controller in each master cabinet or slave cabinet executes the following method for self-registration and self-networking of an energy storage controller:
[0006] The local controller is powered on and started;
[0007] The local controller broadcasts the IP address of the energy storage cabinet to which the local controller belongs to the coordination controller of the main cabinet, and sends an IP conflict check request to the coordination controller;
[0008] The coordination controller receives the IP conflict check request, and determines whether there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs;
[0009] If there is no IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the coordination controller parses the IP conflict check request, obtains the registration information of the energy storage cabinet to which the local controller belongs contained in the IP conflict check request, and determines whether the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller;
[0010] If the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller, the coordination controller determines that the energy storage cabinet to which the local controller belongs has been registered, and sends a registration notification message to the local controller;
[0011] The coordination controller reads the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, verifies the configuration package information, and determines whether the configuration package information is normal;
[0012] If the configuration package information is normal, the coordination controller obtains the configuration package corresponding to the energy storage cabinet to which the local controller belongs and sends the configuration package to the local controller;
[0013] The local controller receives the configuration package, and the local controller checks the received configuration package and determines whether the received configuration package is valid;
[0014] If the received configuration package is valid, the local controller validates the configuration package.
[0015] On the other hand, the present application also provides a method for self-registration and self-networking of an energy storage controller, which is applied to an energy storage system having a master cabinet, multiple slave cabinets, and a cloud server. The coordination controller in the master cabinet and the cloud server perform the following method for self-registration and self-networking of the energy storage controller:
[0016] Coordinate the controller to power on and establish a communication connection with the cloud server;
[0017] The coordination controller reads the coordination controller information stored locally in the coordination controller;
[0018] The coordination controller assembles the coordination controller information into a Login message and sends it to the cloud server;
[0019] The cloud server performs login verification based on the Login message sent by the coordination controller;
[0020] The coordination controller determines whether a login success message replied by the cloud server is received;
[0021] If the coordination controller receives a login success message from the cloud server, the coordination controller sends a topology information table to the cloud server;
[0022] The coordination controller sends a heartbeat check request and coordination controller monitoring data to the cloud server every preset time period.
[0023] The present application relates to a method for self-registration and self-networking of energy storage controllers. On the one hand, the local controller actively interacts with the coordination controller through a layer 2 private protocol, reports the basic information of the local controller, the information of the access energy storage device, the topology information of the access device, etc. to complete the registration of the local controller, and the coordination controller receives the active registration information of the local controller, performs IP address configuration management and other configuration management on the local controller according to the network topology, completes the self-registration and self-networking of the local controller, and greatly improves the complexity and deployment efficiency of energy storage cabinet networking. On the other hand, the coordination controller also actively interacts with the cloud server through the MQTT private protocol, reports the basic information of the coordination controller, the information of one or more local controllers under the jurisdiction of the coordination controller, and the complete device topology information, and completes the self-registration and data reporting of the coordination controller and the cloud server. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of the structure of an energy storage system provided in one embodiment of the present application.
[0025] Figure 2 A schematic diagram of the connection relationship between a local controller and a coordination controller in an energy storage system provided in one embodiment of the present application.
[0026] Figure 3 A schematic diagram of the connection relationship between a coordination controller and a cloud server in an energy storage system provided in one embodiment of the present application.
[0027] Figure 4 A method flow chart of a method for self-registration and self-networking of an energy storage controller provided in one embodiment of the present application.
[0028] Figure 5 A method flow chart of a method for self-registration and self-networking of an energy storage controller provided in another embodiment of the present application.
[0029] Reference numerals:
[0030] 10- cloud server; 110- cloud server registration management module; 210- master cabinet; 220- slave cabinet;
[0031] 30-coordination controller; 310-coordination registration management module; 320-coordination communication management module;
[0032] 330-coordination configuration package management module; 40-local controller; 410-local registration management module;
[0033] 420-Local communication management module. DETAILED DESCRIPTION
[0034] 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.
[0035] The present application provides an energy storage system. For the sake of simplicity, all the devices, equipment, components and other structures mentioned in the present application are numbered in the embodiment of the energy storage system, and are not numbered in the subsequent embodiments of the energy storage controller self-registration and self-networking method. It should be noted that the devices, equipment, components and other structures mentioned in the subsequent embodiments of the energy storage controller self-registration and self-networking method and the devices, equipment, components and other structures mentioned in the embodiment of the energy storage system, if the names are the same, belong to the same devices, equipment, components, so as to indicate that the aforementioned energy storage system can apply each embodiment of the subsequent energy storage controller self-registration and self-networking method.
[0036] like Figure 1 As shown, in one embodiment of the present application, an energy storage system is provided.
[0037] The energy storage system includes a master cabinet 210 and a plurality of slave cabinets 220. Each slave cabinet 220 is connected to the master cabinet 210 for communication.
[0038] The master cabinet 210 is an energy storage cabinet, and the slave cabinet 220 is an energy storage cabinet. The models and parameters of the master cabinet 210 and the slave cabinet 220 may be the same or different.
[0039] like Figure 2 As shown, the main cabinet 210 includes a local controller 40 and a coordination controller 30 .
[0040] In this embodiment, the energy storage controller is divided into a local controller 40 and a coordination controller 30 at the software logic level, each of which defines different software functions. The local controller 40 is responsible for the access and control of the energy storage device of the energy storage cabinet. The coordination controller 30, as the superior management device of the local controller 40, manages and configures multiple or one local controller 40 belonging to the coordination controller 30 (supporting energy storage cabinets of different manufacturers and models).
[0041] The master cabinet 210 and each slave cabinet 220 are provided with a local controller 40. The local controller 40 includes a local registration management module 410 and a local communication management module 420. The coordination controller 30 includes a coordination registration management module 310, a coordination communication management module 320 and a coordination configuration package management module 330.
[0042] The local registration management module 410 is also called the local register module. The local communication management module 420 is also called the local LDP module. The coordinated registration management module 310 is also called the coordinated register module. The coordinated communication management module 320 is also called the coordinated LDP module.
[0043] The coordination configuration package management module 330 is also called the coordination config module, which is used for configuration marking and configuration package version verification, as well as the distribution of configuration packages.
[0044] Network protocol is a collection of rules, standards or agreements established for data exchange in computer networks. The general system network protocol consists of five parts: communication environment, transmission service, vocabulary, information encoding format, timing, rules and procedures. Network protocol is a collection of communication rules between all devices on the network (network servers, computers and switches, routers, firewalls, etc.). It specifies the format that information must use during communication and the meaning of these formats.
[0045] The coordination registration management module 310 of the coordination controller 30 and the local registration management module 410 of the local controller 40 communicate and transmit data through the MQTT private protocol. The coordination communication management module 320 of the coordination controller 30 and the local communication management module 420 of the local controller 40 communicate and transmit data through the layer 2 message protocol.
[0046] When the local controller 40 completes self-registration on the coordination controller 30, an IP conflict may occur. This embodiment effectively avoids the IP conflict problem by using the Layer 2 message protocol in the registration process. The MQTT private protocol is used for configuration package transmission and application-level message interaction. The validity of the configuration package is verified locally in the local controller 40.
[0047] like Figure 3 As shown, optionally, the energy storage system further includes a cloud server 10. The cloud server 10 is equipped with a cloud service management platform. The coordination controller 30 actively interacts with the cloud server 10 through the MQTT private protocol, reports basic information of the coordination controller 30, information of each local controller 40 belonging to the coordination controller 30, and complete device topology information, and completes self-registration with the cloud server 10.
[0048] The present application provides a method for self-registration and self-networking of energy storage controllers. The method is a method for self-registration and self-networking between a coordination controller in a master cabinet and a local controller in each master cabinet or slave cabinet.
[0049] like Figure 4As shown, in one embodiment of the present application, the energy storage controller self-registration and self-networking method is applied to an energy storage system having a master cabinet and multiple slave cabinets. The local controller in each master cabinet or slave cabinet and the coordination controller in the master cabinet perform the energy storage controller self-registration and self-networking method described below. The energy storage controller self-registration and self-networking method includes the following S100 to S910:
[0050] S100, the local controller is powered on and started.
[0051] S200, the local controller broadcasts the IP address of the energy storage cabinet to which the local controller belongs to the coordination controller of the master cabinet, and sends an IP conflict check request to the coordination controller.
[0052] S300, the coordination controller receives an IP conflict check request, and the coordination controller determines whether there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs.
[0053] S410, if there is no IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the coordination controller parses the IP conflict check request, obtains the registration information of the energy storage cabinet to which the local controller belongs contained in the IP conflict check request, and determines whether the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller.
[0054] S510: If the registration information of the energy storage cabinet to which the local controller belongs is in the registered list of the coordination controller, the coordination controller determines that the energy storage cabinet to which the local controller belongs is registered, and sends a registration notification message to the local controller.
[0055] S600, the coordination controller reads the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, verifies the configuration package information, and determines whether the configuration package information is normal.
[0056] S700: If the configuration package information is normal, the coordination controller obtains the configuration package corresponding to the energy storage cabinet to which the local controller belongs and sends the configuration package to the local controller.
[0057] S800: The local controller receives the configuration package, and checks the received configuration package and determines whether the received configuration package is valid.
[0058] S910: If the received configuration package is valid, the local controller validates the configuration package.
[0059] Specifically, S300, the coordination controller determines whether there is an IP conflict in the IP of the energy cabinet to which the local controller belongs, specifically including: S310, the coordination controller calls the registered list of the coordination controller, and queries whether the IP of the energy cabinet to which the local controller belongs is repeated with any IP in the registered list. If the IP of the energy cabinet to which the local controller belongs is repeated with any IP in the registered list, the coordination controller determines that there is an IP conflict in the energy cabinet to which the local controller belongs.
[0060] S320, if the IP of the energy storage cabinet to which the local controller belongs does not overlap with any IP in the registered list, it is necessary to further detect the IP of the energy storage cabinet to which the local controller belongs in the current network to determine whether the IP of the energy storage cabinet to which the local controller belongs overlaps with the IP of other devices being used in the current system.
[0061] S331, if it is detected in the current network that the IP of the energy storage cabinet to which the local controller belongs does not overlap with the IP of other devices being used in the current system, the coordination controller determines that there is no conflict in the IP of the energy storage cabinet to which the local controller belongs.
[0062] In S410, the coordination controller determines whether the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller. The specific implementation method is: the local registration management module of the local controller calls the registration query interface of the local communication management module to initiate a registration query to the coordination communication management module of the coordination controller.
[0063] The coordination controller further determines whether the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller.
[0064] If the coordination controller determines that the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller, the coordination controller executes S600 to read the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, and verifies the configuration package information to determine whether the configuration package information is normal.
[0065] Optionally, S600 includes:
[0066] S610, the coordination controller reads the configuration package running flag in the configuration package information, and the coordination controller determines whether the configuration package of the local controller can run normally according to the configuration package running flag.
[0067] S620, if the coordination controller confirms that the configuration package of the local controller can run normally, the coordination controller reads the configuration package version information in the configuration package information, and the coordination controller determines whether the configuration package applied by the local controller is the same as the configuration package version stored locally by the coordination controller based on the configuration package version information.
[0068] S630: If the configuration package applied by the local controller is the same as the configuration package locally stored in the coordination controller, the subsequent steps are terminated. This indicates that the configuration package of the energy storage cabinet to which the local controller belongs can not only operate normally, but also has the latest version and does not need to be updated.
[0069] S640, if the coordination controller confirms that the configuration package of the local controller cannot operate normally, or the configuration package applied by the local controller is different from the configuration package version stored locally in the coordination controller, the subsequent S700 is executed, that is, the coordination controller is executed to obtain the configuration package corresponding to the energy storage cabinet to which the local controller belongs and send the configuration package to the local controller.
[0070] After S800, the energy storage controller self-registration and self-networking method further includes:
[0071] S920, if the received configuration package is invalid, the local controller sends a configuration package exception MQTT response message to the coordination registration management module of the coordination controller through the MQTT private protocol via the local registration management module of the local controller. This may be caused by an error in the configuration package sending, and the coordination controller will subsequently resend the correct configuration package to the local controller.
[0072] Optionally, the local controller verifies the configuration package including integrity verification and validity verification of the configuration package, the integrity verification is to verify the integrity of the data in the configuration package, the validity verification is to verify whether the data in the configuration package comes from the corresponding local controller, that is, to verify whether the data in the configuration package comes from the energy storage cabinet to which the corresponding local controller belongs. Generally speaking, the configuration package will include basic information of the energy storage cabinet to which the built-in local controller belongs and basic information of the local controller. This information includes but is not limited to the manufacturer of the energy storage cabinet, the energy storage cabinet and the controller model. The verification result of the validity verification of the configuration package is obtained by comparing the above information with the corresponding fields in the local controller.
[0073] This embodiment relates to a method for self-registration and self-networking of energy storage controllers. The local controller actively interacts with the coordination controller through a layer 2 private protocol, and reports the basic information of the local controller, the information of the access energy storage device, the topology information of the access device, etc. to complete the registration of the local controller. The coordination controller receives the active registration information of the local controller, performs IP address configuration management and other configuration management on the local controller according to the network topology, completes the self-registration and self-networking of the local controller, and greatly improves the complexity and deployment efficiency of energy storage cabinet networking.
[0074] In one embodiment of the present application, after S300, that is, after the coordination controller receives the IP conflict check request and the coordination controller determines whether there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the method for self-registration and self-networking of the energy storage controller further includes:
[0075] S420, if there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the local controller modifies the IP of the energy storage cabinet to which the local controller belongs, returns the local controller to broadcast the IP of the energy storage cabinet to which the local controller belongs to the coordination controller of the main cabinet, and sends an IP conflict check request to the coordination controller.
[0076] Specifically, when the coordination controller determines whether there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the coordination controller reads the IP information sent by the local controller.
[0077] Optionally, a specific solution for modifying the IP address of the energy storage cabinet to which the local controller belongs may be:
[0078] S421, if there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the coordination controller allocates a new IP from the IP management pool of the coordination controller and returns it to the local controller.
[0079] S422, after receiving the new IP, the local controller returns to the local controller to broadcast the IP of the slave cabinet to the coordination controller of the master cabinet, and sends an IP conflict check request to the coordination controller.
[0080] In one embodiment of the present application, after S410, that is, after the coordination controller determines whether the registration information of the energy storage cabinet to which the local controller belongs is in the registered list of the coordination controller, the method of self-registration and self-networking of the energy storage controller further includes:
[0081] S521, if the registration information of the energy storage cabinet to which the local controller belongs is not in the registered list of the coordination controller, the coordination controller sends an unregistered notification message to the local controller;
[0082] S522: After receiving the unregistered notification message, the local controller sends a registration request to the coordination controller, and sends a registration file package to the coordination controller.
[0083] S523, the local controller sends a query message to the coordination controller to inquire whether the registration is successful or not, and determines whether a registration success message returned by the coordination controller is received.
[0084] S524a, if the local controller receives a registration success message returned by the coordination controller, it determines that the energy storage cabinet to which the local controller belongs has been registered, and executes the subsequent coordination controller to read the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, and verifies the configuration package information to determine whether the configuration package information is normal.
[0085] Specifically, S521 includes: the registration interface of the local communication management module of the local controller obtains the local product information and device information stored locally in the local controller, combines the local product information and device information to form a two-layer registration message, and sends the two-layer registration message to the receiving interface of the coordination communication management module of the coordination controller.
[0086] The receiving interface of the subsequent coordination communication management module receives the layer 2 registration message sent by the local communication management module, parses the layer 2 registration message, takes out the registration information and sends it to the coordination registration management module to determine whether the coordination controller supports the local controller. If the coordination controller supports the local controller, the coordination communication management module of the coordination controller returns a registration success message to the local communication management module of the local controller. S524a is subsequently executed, that is, the coordination controller reads the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, verifies the configuration package information, and determines whether the configuration package information is normal.
[0087] In one embodiment of the present application, after S523, that is, after the local controller sends a query message to the coordination controller to inquire whether the registration is successful or not, and determines whether a registration success message returned by the coordination controller is received, the method for self-registration and self-networking of the energy storage controller further includes:
[0088] S524b: If the local controller does not receive a registration success message returned by the coordination controller, it determines whether a device not supported message returned by the coordination controller is received.
[0089] S524c: If the local controller receives a device not supported message returned by the coordination controller, the subsequent steps are terminated.
[0090] Specifically, if the coordination controller does not support the local controller, the coordination communication management module of the coordination controller returns a device unsupported message to the local communication management module of the local controller.
[0091] The coordination registration management module determines whether the coordination controller supports the local controller by checking whether the manufacturer and model of the energy storage cabinet and the model of the local controller are recorded in the registered list of the coordination controller. If the manufacturer and model of the energy storage cabinet and the model of the local controller are recorded in the registered list of the coordination controller, it is considered that the coordination controller supports the local controller.
[0092] In one embodiment of the present application, after S510, that is, after the coordination controller determines that the energy storage cabinet to which the local controller belongs has been registered and sends a registration notification message to the local controller, the method for self-registration and self-networking of the energy storage controller further includes:
[0093] S531, the local controller starts the heartbeat timer.
[0094] S532: The local controller sends a heartbeat check request to the coordination controller.
[0095] S533, the local controller receives the heartbeat reply returned by the coordination controller and determines whether the heartbeat is normal.
[0096] S534a: If the heartbeat is normal, the coordinating controller updates the active time of the local controller locally in the coordinating controller.
[0097] S534b, returning to the step of sending a heartbeat check request to the coordination controller, and continuing to monitor the heartbeat between the local controller and the coordination controller.
[0098] S534c: If the heartbeat is abnormal, the local controller is returned to send a registration request to the coordination controller, and a registration file package is sent to the coordination controller.
[0099] Specifically, after the coordination controller determines that the energy storage cabinet to which the local controller belongs has been registered, the local registration management module of the local controller calls the local communication management module to periodically send heartbeat messages to the coordination communication management module of the coordination controller to maintain the heartbeat between the coordination controller and the local controller.
[0100] In S534a, the coordination controller updates the active time of the local controller locally at the coordination controller, which means that the local controller sends a heartbeat check request to the coordination controller with a timestamp, and the timestamp records the time node when the local controller sends the heartbeat check request to the coordination controller. If the coordination controller confirms that the heartbeat is normal, the coordination controller will record this time node locally at the coordination controller and overwrite the original timestamp related to the local controller. This is the update of the active time.
[0101] The coordination communication management module of the coordination controller and the local communication management module of the local controller communicate with each other through a layer 2 private protocol. The format of the layer 2 private protocol is shown in Table 1.
[0102] Table 1-Layer 2 private protocol format
[0103]
[0104] The descriptions of the fields in Table 1 are as follows:
[0105] Destination MAC: destination MAC address.
[0106] Source MAC: source MAC address.
[0107] Link type: 0x8120, enterprise private Layer 2 protocol.
[0108] Communication type: Communication type, such as 0x10 for registration query of local controller, 0x11 for registration request of local controller, 0x12 for heartbeat, 0x13 for modifying IP of local controller, 0x14 for searching IP manager of this network segment, 0x15 for reporting device IP, which is extensible.
[0109] Operation code: Operation code under communication type, 0x1 is request, 0x2 is response, and it is extensible.
[0110] Flag: A 2-byte flag field is reserved for communication options. It is not used yet and can be expanded.
[0111] SN length: SN length in m.
[0112] SN: SN of m bytes.
[0113] Segment length: the length of the protocol option.
[0114] Protocol segment: used for optional fields, consisting of segment id, length and content. A single message can carry multiple segments and is expandable.
[0115] CRC16: 16-bit cyclic redundancy check code.
[0116] Padding: Padding bytes.
[0117] The registered list of the coordination controller stores various segment IDs, and the registration information is recorded through these segment IDs.
[0118] Optionally, some segment IDs are shown in Table 2.
[0119] Table 2-segment id meaning comparison table
[0120]
[0121] The structure definition required for the registered device list of the coordination registration management module in the coordination controller can be in the following form:
[0122] typedef enum
[0123] {
[0124] DS_UNREG = 0, / / Device is not registered
[0125] DS_REG_REJECT, / / Device registration rejected status
[0126] DS_REG_ONLINE, / / Device registration successful, current online status
[0127] DS_REG_OFFLINE / / Device registration is successful, currently offline
[0128] }DEV_STATE;
[0129] typedef struct _reg_dev
[0130] {
[0131] char sn[MAX_SN_LEN]; / / SN of local controller
[0132] char ipaddr[MAX_IPADDR_LEN]; / / IP address of the local controller
[0133] char ccipaddr[MAX_CCIPADDR_LEN]; / / IP address of the coordination controller to which the local controller is connected
[0134] DEV_STATE devstate; / / Record the current status of the device
[0135] time_t lastactivetime; / / After successful registration, the device's last active time
[0136] }reg_dev_t;
[0137] reg_dev_t regdevs[MAX_REG_DEV_NUM];
[0138] The present application also provides a method for self-registration and self-networking of an energy storage controller. The method is a method for self-registration and self-networking between a coordination controller in a main cabinet and a cloud server.
[0139] like Figure 5 As shown, in one embodiment of the present application, the energy storage controller self-registration and self-networking method is applied to an energy storage system having a master cabinet, multiple slave cabinets, and a cloud server, and the coordination controller in the master cabinet and the cloud server perform the following energy storage controller self-registration and self-networking method. The energy storage controller self-registration and self-networking method includes the following W100 to W700:
[0140] W100, coordinates the controller to power on and establishes a communication connection with the cloud server.
[0141] W200, the coordination controller reads the coordination controller information stored locally in the coordination controller.
[0142] W300, the coordination controller assembles the coordination controller information into a Login message and sends it to the cloud server.
[0143] W400, the cloud server performs login verification based on the Login message sent by the coordination controller.
[0144] W500, the coordination controller determines whether a login success message replied by the cloud server is received.
[0145] W610: If the coordination controller receives a login success message from the cloud server, the coordination controller sends a topology information table to the cloud server.
[0146] W700, the coordination controller sends a heartbeat check request and coordination controller monitoring data to the cloud server every preset time period.
[0147] This embodiment relates to a method for self-registration and self-networking of an energy storage controller. The coordination controller actively interacts with a cloud server through the MQTT private protocol, reports basic information of the coordination controller, information of one or more local controllers under the jurisdiction of the coordination controller, and complete device topology information, and completes self-registration and data reporting between the coordination controller and the cloud server.
[0148] Specifically, after the coordination controller of the main cabinet in W100 is powered on, the following steps are performed:
[0149] W101a, after the coordination registration management module is powered on, it searches for the IP manager of the local network segment and determines whether a message reply from the IP manager of the local network segment is received within 3 timeout periods.
[0150] W101b, if the coordination registration management module does not receive a message reply from the IP manager of this network segment within 3 timeout periods, the coordination registration management module enables its own IP management function.
[0151] W101c, register the IP of the coordination registration management module, and the IP manager of the coordination registration management module determines whether there is an IP conflict.
[0152] W101d, if there is an IP conflict, modify the IP until there is no IP conflict.
[0153] W101e, if there is no conflict in the IP, the subsequent registration of the coordination controller in the cloud server is performed.
[0154] Specifically, the IP manager of this network segment is used to manage the IPs of other external devices within the network where the energy storage system is running. If the function of the IP manager of this network segment is better, call the IP manager of this network segment to allocate the IP to the coordination controller, that is, the coordination controller uses an IP allocated by the IP manager of this network segment for its own use (that is, execute W101c, W101d and W101d through the IP manager of this network segment). And when managing the IPs of the local controllers under the coordination controller later, the IP management work is also performed through the IP manager of this network segment (that is, execute S421 and S421 through the IP manager of this network segment).
[0155] Otherwise, the coordination controller uses an IP in its own IP pool to give to the local controller (ie, the W101b coordination registration management module enables its own IP management function).
[0156] The subsequent execution coordination controller is registered in the cloud server as follows:
[0157] W102a, the coordination registration management module of the coordination controller determines whether the coordination controller itself has been registered on the cloud server.
[0158] W102b, if the coordination controller itself has been registered on the cloud server, the coordination registration management module establishes a communication connection with the cloud server and executes the subsequent W200.
[0159] W102c, if the coordination controller itself is not registered on the cloud server, the coordination registration management module sends a registration request to the cloud server. When sending the registration request to the cloud server, the registration request carries the coordination controller configuration information (stored locally by the coordination controller), subordinate local controller information and device access topology information (reported by the local controllers under the coordination controller), and the identity information of the coordination controller.
[0160] W102d, after the coordination controller is registered on the cloud server, the coordination registration management module sends a registration verification request to the cloud server, and the cloud server determines whether the coordination controller is successfully registered on the cloud server.
[0161] Specifically, the cloud server determines whether the coordination controller is successfully registered on the cloud server in the following manner: the cloud server verifies the identity information, UID, manufacturer, model, and SN of the coordination controller, and determines whether the identity information, UID, manufacturer, and model of the coordination controller have been stored on the cloud server to determine whether the registration is successful. If the identity information, UID, manufacturer, model, and SN of the coordination controller have been stored on the cloud server, the cloud server confirms that the coordination controller is successfully registered.
[0162] Optionally, the cloud server also verifies whether the configuration package of the coordination controller is normal. If the configuration package is normal, the coordination controller is successfully registered.
[0163] The configuration information of the coordination controller (stored locally by the coordination controller), the basic information of the local controllers under the coordination controller, and the device access topology information of the subordinate local controllers are monitoring data and do not need to be verified. These data are monitoring data that the coordination controller actively reports to the cloud server after the coordination controller successfully registers on the cloud server and require the cloud server to perform subsequent data monitoring and data analysis.
[0164] W103e, if the coordination controller is successfully registered on the cloud server, the coordination controller establishes a communication connection with the cloud server and executes the subsequent W200.
[0165] W103f, if the coordination controller fails to register on the cloud server (it may be because the cloud server does not support this coordination controller or the configuration package of the coordination controller is abnormal, etc.), the coordination registration management module sends an alarm message to the cloud server.
[0166] After the coordination controller completes registration with the cloud server, execute subsequent steps W200 to W700.
[0167] In W610, the coordination registration management module packages the coordination controller information (including device SN) of the coordination controller and the topology information of the local controllers under the coordination controller collected regularly to form a topology information table and sends it to the cloud server through MQTT messages.
[0168] In one embodiment of the present application, after W500, that is, after the coordination controller determines whether a login success message replied by the cloud server is received, the method of self-registration and self-networking of the energy storage controller further includes:
[0169] W621: If the coordination controller does not receive a successful login message from the cloud server, the coordination controller starts a login timer.
[0170] W622, the coordination controller increases the reading of the login timer by 1 based on the original reading. The initial reading of the login timer is 0.
[0171] W623, the coordination controller determines whether the reading of the login timer is greater than or equal to the preset reading.
[0172] W623a, when the reading of the login timer is less than the preset reading, return to the coordination controller to read the coordination controller information stored locally in the coordination controller.
[0173] Specifically, the preset reading in W623 can be set to 3.
[0174] In one embodiment of the present application, after W623, that is, after determining whether the reading of the login timer is greater than or equal to the preset reading, the method of self-registration and self-networking of the energy storage controller further includes:
[0175] S623b, when the reading of the login timer is greater than or equal to the preset reading, the coordination controller outputs an error message and disconnects the communication connection between the coordination controller and the cloud server.
[0176] In one embodiment of the present application, W623a includes, that is, when the reading of the login timer is less than the preset reading, returning to the coordination controller to read the locally stored coordination controller information, including:
[0177] W623a1, when the reading of the login timer is less than the preset reading, the coordination controller enters the standby state.
[0178] W623a2, after the preset standby time period ends, return to the coordination controller to read the locally stored coordination controller information.
[0179] Specifically, the preset standby time period in W623a2 may be 1 minute.
[0180] In one embodiment of the present application, after W610, that is, after the coordination controller sends the topology information table to the cloud server, the method of self-registration and self-networking of the energy storage controller further includes:
[0181] W810, the coordination controller monitors in real time whether the data query instruction and / or control instruction sent by the cloud server is received.
[0182] W820, when the coordination controller receives a data query instruction and / or a control instruction sent by the cloud server, it performs a data query operation or a processing action corresponding to the control instruction according to the data query instruction and / or the control instruction.
[0183] Continuing from the previous embodiment, after the registration of the cloud server is completed, the coordination controller performs subsequent W200 to W700 to coordinate the interaction between the controller and the cloud server. In addition to interacting with the cloud server, the coordination controller also performs the following interaction steps between the coordination controller and the local controller under its jurisdiction:
[0184] W910, the coordination controller loads the registered device table, calls the Layer 2 message receiving interface of the coordination communication management module to monitor the Layer 2 private protocol message, and determines whether a functional message sent by any local controller under its jurisdiction is received.
[0185] W920, if a functional message is received from any local controller under its jurisdiction, the coordinating controller parses the functional message and determines the type of the functional message.
[0186] W930, when the functional message is a registration query message, the coordination controller queries the registration status of the local controller and returns the corresponding registration status to the local controller.
[0187] W941: When the functional message is a registration request message, the coordination controller queries the registered device table for the device type corresponding to the local controller to determine whether the device type in the registration request is supported. If the device type in the registration request is not supported, a registration failure result code is returned.
[0188] W942: If the device type in the registration request is supported, the coordination controller further inquires whether there is an IP conflict.
[0189] W943: If there is an IP conflict, the coordination controller will allocate an idle IP to the local controller and reply with a registration failure result code, which carries the idle IP.
[0190] W944, if there is no IP conflict, the coordination controller replies to the local controller with a successful registration result code and updates the registration information of the local controller into the registered device table.
[0191] W951, when the functional message is a heartbeat request message, the coordination controller determines whether the local controller has been registered on the coordination controller.
[0192] W952: If the local controller has registered with the coordinating controller, the coordinating controller replies to the local controller with a registered message and updates the active time of the local controller.
[0193] W953, if the local controller is not registered with the coordinating controller, the coordinating controller replies with a local controller unregistered notification.
[0194] In one embodiment of the present application, a method for self-registration and self-networking of an energy storage controller is also provided. The method for self-registration and self-networking of the energy storage controller is applied to an energy storage system having a master cabinet, multiple slave cabinets, and a cloud server. The method for self-registration and self-networking of the energy storage controller includes both the self-registration and self-networking method between the coordination controller in the master cabinet and the local controller in each master cabinet or slave cabinet mentioned in the aforementioned embodiment, and the self-registration and self-networking method between the coordination controller in the master cabinet and the cloud server mentioned in the aforementioned embodiment.
[0195] 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 method for self-registration and self-networking of energy storage controllers. It is characterized in that The energy storage controller self-registration and self-networking method is applied to an energy storage system having a master cabinet, multiple slave cabinets, and a cloud server. The local controller in each master cabinet or slave cabinet and the coordination controller in the master cabinet perform the energy storage controller self-registration and self-networking method as described below: The local controller is powered on and started; The local controller broadcasts the IP address of the energy storage cabinet to which the local controller belongs to the coordination controller of the main cabinet, and sends an IP conflict check request to the coordination controller; The coordination controller receives the IP conflict check request, and determines whether there is an IP conflict in the IP of the energy storage cabinet to which the local controller belongs; If there is no IP conflict in the IP of the energy storage cabinet to which the local controller belongs, the coordination controller parses the IP conflict check request, obtains the registration information of the energy storage cabinet to which the local controller belongs contained in the IP conflict check request, and determines whether the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller; If the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller, the coordination controller determines that the energy storage cabinet to which the local controller belongs has been registered, and sends a registration notification message to the local controller; The coordination controller reads the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, verifies the configuration package information, and determines whether the configuration package information is normal; If the configuration package information is normal, the coordination controller obtains the configuration package corresponding to the energy storage cabinet to which the local controller belongs and sends the configuration package to the local controller; The local controller receives the configuration package, and the local controller checks the received configuration package and determines whether the received configuration package is valid; If the received configuration package is valid, the local controller validates the configuration package.
2. The method for self-registration and self-networking of energy storage controller according to claim 1, It is characterized in that After the coordination controller receives the IP conflict check request and determines whether the IP of the energy storage cabinet to which the local controller belongs has an IP conflict, the energy storage controller self-registration and self-networking method further includes: If there is an IP conflict in the energy storage cabinet to which the local controller belongs, the local controller modifies the IP of the energy storage cabinet to which the local controller belongs, broadcasts the IP of the energy storage cabinet to which the local controller belongs to the coordination controller of the main cabinet, and sends an IP conflict check request to the coordination controller.
3. The method for self-registration and self-networking of energy storage controller according to claim 2, It is characterized in that After determining whether the registration information of the energy storage cabinet to which the local controller belongs is already in the registered list of the coordination controller, the energy storage controller self-registration and self-networking method further includes: If the registration information of the energy storage cabinet to which the local controller belongs is not in the registered list of the coordination controller, the coordination controller sends an unregistered notification message to the local controller; After receiving the unregistered notification message, the local controller sends a registration request to the coordination controller, and sends a registration file package to the coordination controller; The local controller sends a query message to the coordination controller to check whether the registration is successful or not, and determines whether a registration success message returned by the coordination controller is received; If the local controller receives a successful registration message returned by the coordination controller, it determines that the energy storage cabinet to which the local controller belongs has been registered, and the coordination controller subsequently reads the configuration package information contained in the registration information of the energy storage cabinet to which the local controller belongs, and verifies the configuration package information to determine whether the configuration package information is normal.
4. The method for self-registration and self-networking of energy storage controller according to claim 3, It is characterized in that After the local controller sends a query message to the coordination controller to inquire whether the registration is successful or not, and determines whether a registration success message returned by the coordination controller is received, the energy storage controller self-registration and self-networking method further includes: If the local controller does not receive a registration success message returned by the coordination controller, the local controller determines whether a device not supported message returned by the coordination controller is received; If the local controller receives a device unsupported message returned by the coordination controller, the subsequent steps are terminated.
5. The method for self-registration and self-networking of energy storage controller according to claim 4, It is characterized in that After the coordination controller determines that the energy storage cabinet to which the local controller belongs has been registered and sends a registration notification message to the local controller, the energy storage controller self-registration and self-networking method further includes: The local controller starts the heartbeat timer; The local controller sends a heartbeat check request to the coordination controller; The local controller receives the heartbeat reply from the coordinating controller and determines whether the heartbeat is normal; If the heartbeat is normal, the coordinating controller updates the active time of the local controller locally on the coordinating controller; Return to sending a heartbeat check request to the coordination controller, and continue to monitor the heartbeat between the local controller and the coordination controller; If the heartbeat is abnormal, the local controller is returned to send a registration request to the coordination controller, and a registration file package is sent to the coordination controller.
6. The method for self-registration and self-networking of energy storage controller according to claim 5, It is characterized in that The coordination controller and cloud server in the main cabinet perform the following steps: Coordinate the controller to power on and establish a communication connection with the cloud server; The coordination controller reads the coordination controller information stored locally in the coordination controller; The coordination controller assembles the coordination controller information into a Login message and sends it to the cloud server; The cloud server performs login verification based on the Login message sent by the coordination controller; The coordination controller determines whether a login success message replied by the cloud server is received; If the coordination controller receives a login success message from the cloud server, the coordination controller sends a topology information table to the cloud server; The coordination controller sends a heartbeat check request and coordination controller monitoring data to the cloud server every preset time period.
7. The method for self-registration and self-networking of energy storage controller according to claim 6, It is characterized in that After the coordination controller determines whether a login success message replied by the cloud server is received, the energy storage controller self-registration and self-networking method further includes: If the coordination controller does not receive a login success message from the cloud server, the login timer is started; The coordination controller increases the reading of the login timer by 1 based on the original reading; the initial reading of the login timer is 0; The coordination controller determines whether the reading of the login timer is greater than or equal to a preset reading; When the reading of the login timer is less than the preset reading, the coordination controller is returned to read the locally stored coordination controller information.
8. The method for self-registration and self-networking of energy storage controller according to claim 7, It is characterized in that After the coordination controller determines whether the reading of the login timer is greater than or equal to the preset reading, the energy storage controller self-registration and self-networking method further includes: When the reading of the login timer is greater than or equal to the preset reading, the coordination controller outputs an error message and disconnects the communication connection between the coordination controller and the cloud server.
9. The method for self-registration and self-networking of energy storage controller according to claim 8, It is characterized in that When the reading of the login timer is less than the preset reading, returning to the coordination controller to read the locally stored coordination controller information includes: When the reading of the login timer is less than the preset reading, the coordination controller enters the standby state; After the preset standby time period ends, the coordination controller is returned to read the locally stored coordination controller information.
10. The method for self-registration and self-networking of energy storage controller according to claim 9, It is characterized in that After the coordination controller sends the topology information table to the cloud server, the energy storage controller self-registration and self-networking method further includes: The coordination controller monitors in real time whether data query instructions and / or control instructions sent by the cloud server are received; When the coordination controller receives the data query instruction and / or control instruction sent by the cloud server, it executes the processing action corresponding to the data query operation or the control instruction according to the data query instruction and / or control instruction.
