Networking method of multiple energy management units and related device

The energy management unit sends call requests to the server and configures the network, which solves the problem of energy storage equipment being dispersed and the energy management unit lacks public IP, realizes independent access and management of the energy management unit by the server, and improves the stability of the system and data security.

CN119420644AActive Publication Date: 2025-02-11XIAMEN HITHIUM DIGITAL POWER TECHNOLOGY CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411533333.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-11
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In the prior art, energy storage devices are scattered in regions and the energy management units in each area lack independent public network IP, resulting in the server being unable to directly access and manage each energy management unit.

Method used

The target energy management unit sends a call request to the server. Based on the request, the server determines whether the energy management unit is the first access device, and performs network configuration, returning network configuration information to realize independent access to the energy management unit by the server.

Benefits of technology

It realizes independent access and management of multiple energy management units by the server, improving system stability and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420644A_ABST
    Figure CN119420644A_ABST
Patent Text Reader

Abstract

The invention provides a networking method of multiple energy management units and a related device, and the method comprises the steps: responding to a call request received from a target energy management unit, and determining whether the target energy management unit is a first access device based on the call request; if it is determined that the target energy management unit is the equipment accessed for the first time, performing network configuration according to second network configuration information corresponding to the server, and sending first network configuration information corresponding to the target energy management unit to the target energy management unit, and the target energy management unit performs network configuration based on the first network configuration information. In this way, network configuration between the server and the target energy management unit can be realized, so that the server can independently access the target energy management unit based on the network configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet communication technology, and in particular to a networking method for multiple energy management units and related devices. Background Art

[0002] At present, the energy storage devices in the same energy storage system may be geographically dispersed, and each region's energy storage devices have an energy management unit (EMU) to manage them. At the same time, based on the consideration of the data security of the energy management unit, the energy management units corresponding to the energy storage devices in different regions do not have independent public network IPs, making it impossible for the server to directly locate each energy management unit based on the Internet, resulting in the inability to directly achieve independent access to each energy management unit. Summary of the invention

[0003] The present application provides a networking method and related devices for multiple energy management units. The target energy management unit sends a call request to the server, so that the server returns network configuration information to the target energy management unit, thereby realizing the network configuration between the server and the target energy management unit, so that the server can independently access the target energy management unit based on the network configuration.

[0004] In a first aspect, the present application provides a networking method for multiple energy management units, the method is applied to a server, the server is configured with at least one network management container, the method comprising:

[0005] In response to the target network management container receiving a call request from the target energy management unit, determining whether the target energy management unit is a first-time access device based on the call request, the call request includes a device identifier corresponding to the target energy management unit, the target energy management unit is any one of the multiple energy management units, and the target network management container is any one of the at least one network management container;

[0006] If the target network management container determines that the target energy management unit is a device that is connected for the first time, network configuration is performed based on the second network configuration information corresponding to the server, and the first network configuration information corresponding to the target energy management unit is sent to the target energy management unit, so that the target energy management unit performs network configuration based on the first network configuration information;

[0007] Among them, the first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit.

[0008] In a second aspect, the present application provides another networking method for multiple energy management units, the method is applied to a target energy management unit, the target energy management unit is any one of the multiple energy management units, the method includes:

[0009] Sending a call request to the server, wherein the call request includes a device identifier corresponding to the target energy management unit;

[0010] In response to receiving the first network configuration information from the server, performing network configuration according to the first network configuration information;

[0011] The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server.

[0012] It can be seen that in the present application, the target energy management unit performs network configuration based on the network configuration information returned by the server by sending a call request to the server, and the network configuration information includes the corresponding LAN IP address and other information for locating the target energy management unit, so that the server can subsequently achieve independent access to the target energy management unit, and if other devices subsequently want to achieve access to the target energy management unit, they can also join the LAN based on the server, thereby indirectly achieving access to the target energy management unit through the server. At the same time, since the network configuration is based on at least one network management container configured in the server, when there are multiple at least one network management containers, even when a single network management container fails, network configuration and network management after network configuration can be performed based on other network management containers, thereby improving the stability of networking between the server and multiple energy management units.

[0013] In a third aspect, the present application provides a networking device for multiple energy management units, the device is applied to a server, the server is configured with at least one network management container, the device includes:

[0014] In response to the target network management container receiving a call request from the target energy management unit through the first receiving unit, the first processing unit is used to determine whether the target energy management unit is a first-time access device based on the call request, the call request includes a device identifier corresponding to the target energy management unit, the target energy management unit is any one of the multiple energy management units, and the target network management container is any one of the at least one network management container;

[0015] The first processing unit is further configured to perform network configuration based on second network configuration information corresponding to the server if it is determined that the target energy management unit is a device accessed for the first time;

[0016] A first sending unit, configured to send first network configuration information corresponding to a target energy management unit to the target energy management unit, so that the target energy management unit performs network configuration based on the first network configuration information;

[0017] Among them, the first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit.

[0018] In a fourth aspect, the present application provides another networking device for multiple energy management units, the device is applied to a target energy management unit, the target energy management unit is any one of the multiple energy management units, and the device includes:

[0019] A second sending unit, configured to send a call request to the server, wherein the call request includes a device identifier corresponding to the target energy management unit;

[0020] In response to the second receiving unit receiving the first network configuration information from the server, the second processing unit is used to perform network configuration according to the first network configuration information;

[0021] The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server.

[0022] In a fifth aspect, the present application provides an electronic device, which includes a processor, a memory, and a communication interface. The processor, the memory, and the communication interface are interconnected and perform communication with each other. The memory stores executable program code, the communication interface is used for wireless communication, and the processor is used to call the executable program code stored in the memory to execute part or all of the steps described in any method of the first aspect and / or the second aspect.

[0023] In a sixth aspect, the present application provides a computer-readable storage medium, in which electronic data is stored. When the electronic data is executed by a processor, it is used to execute the electronic data to implement some or all of the steps described in the first aspect and / or second aspect of the present application.

[0024] In a seventh aspect, the present application provides a computer program product, including a computer program, which is operable to cause a computer to execute some or all of the steps described in the first aspect and / or the second aspect of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be 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.

[0026] Figure 1 A schematic diagram of the structure of an energy storage system provided in an embodiment of the present application;

[0027] Figure 2 A schematic diagram of a flow chart of a method for networking multiple energy management units provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of the structure of a local area network provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of the structure of a network management container provided in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of a flow chart of a network management container expansion operation provided in an embodiment of the present application;

[0031] Figure 6 A block diagram of the functional units of a first networking device of multiple energy management units provided in an embodiment of the present application;

[0032] Figure 7 A block diagram of the functional units of a second networking device of multiple energy management units provided in an embodiment of the present application;

[0033] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps is not limited to the listed steps, but optionally includes steps that are not listed, or optionally includes other steps inherent to these processes, methods, products or devices.

[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0037] Since multiple energy management units are geographically dispersed, they cannot be accessed independently through wired means. At the same time, based on the consideration of data security of energy management units, each energy management unit does not have an independent public IP, which makes it impossible to directly access each energy management unit based on the Internet, resulting in the inability to directly achieve independent access to each energy management unit. At present, for this situation, multiple devices are networked, but the conventional networking method is based on the server and other edge devices that need to be networked having independent public IPs, so that the server can directly add and configure the network configuration information of other edge devices, thereby directly realizing the networking between the server and other edge devices.

[0038] However, since each energy management unit does not have an independent public IP, it is impossible to directly add the network configuration information of each energy management unit on the server side. In this application, each energy management unit sends a call request carrying a device identifier to the server, so that after receiving the call request, the server will create the corresponding network configuration information for the two, and return the network configuration information corresponding to the energy management unit, so that both can perform network configuration, thereby realizing networking between multiple energy management units and the server. Since the network configuration information includes information such as the IP address that can be used for access positioning, the server can realize independent access to each energy management unit after networking.

[0039] See also Figure 1 , Figure 1 A schematic diagram of the structure of an energy storage system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the energy storage system 100 includes a server 101 and a plurality of energy management units 102 .

[0040] The server 101 has a public IP (Internet Protocol) address. At least one network management container is configured on the server 101. Optionally, the at least one network management container can be configured based on a K8s (Kubernetes) cluster, and each network management container can include a wireguard service container. Optionally, the server 101 can refer to a single server, a server cluster, a cloud server, a cloud computing service center, or other forms of devices with computing capabilities.

[0041] Multiple energy management units 102 may be dispersed in different areas, and generally, each energy management unit 102 does not have an independent public IP address, but shares a public IP address with other devices. Therefore, each energy management unit 102 can access the Internet through the public IP address shared with other devices, but the server 101 cannot directly locate the corresponding energy management unit 102 through the public IP address shared by the aforementioned energy management unit 102 and other devices after connecting to the Internet.

[0042] In addition, each energy management unit 102 can access the server, for example, configure a target interface service in the server, such as an application programming interface (API) service, and configure the target interface information in each energy management unit, so that after each energy management unit 102 is connected to the Internet, it can access the target interface based on the target interface information, thereby achieving initial communication with the server 101.

[0043] In the present application, a target energy management unit among multiple energy management units sends a call request to a server, and the call request includes a device identifier corresponding to the target energy management unit. After receiving the call request, the server will determine whether the target energy management unit is a target energy management unit that is accessed for the first time based on the device identifier in the call request. If it is determined that the target energy management unit is a target energy management unit that is accessed for the first time, the server will perform network configuration on itself based on the second network configuration information corresponding to the server itself, and send the first network configuration information corresponding to the target energy management unit to the target energy management unit. After receiving the first network configuration information, the target energy management unit will also perform network configuration based on the first network configuration information.

[0044] The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit.

[0045] Until multiple energy management units realize network configuration with the server based on the above method, multiple energy management units realize networking with the server, so that the server can realize independent access to each energy management unit based on information such as the IP address in the network configuration information corresponding to each energy management unit.

[0046] Based on this, an embodiment of the present application provides a networking method for multiple energy management units, and the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0047] See also Figure 2 , Figure 2 A schematic diagram of a process flow of a networking method of multiple energy management units provided in an embodiment of the present application, the method is applied to the above energy storage system, such as Figure 2 As shown, the method comprises the following steps:

[0048] Step S201: The target energy management unit sends a call request to the server. Correspondingly, the target network management container in the server receives the call request from the target energy management unit.

[0049] Among them, the call request includes a device identifier corresponding to the target energy management unit, and the target energy management unit is any one of the multiple energy management units. Exemplarily, the target energy management unit may send a call request to the server based on an API interface service, and the API interface service is used to realize the transmission of the call request between the target energy management unit and the server before networking. Compared with the traditional polling or manual configuration method, the API interface service can respond to the call request of the energy management unit in real time, and quickly return the required data or execution results, thereby improving the networking efficiency. Specifically, the server is pre-configured with an API interface service, and the network address (such as an IP address) of the API interface is pre-configured in the target energy management unit. After the target energy management unit is connected to the Internet, it can realize preliminary communication with the server based on the address of the API interface.

[0050] Step S202: The target network management container determines whether the target energy management unit is a first-time access device based on the call request.

[0051] Among them, the target interface service in the server determines whether the target energy management unit has been previously accessed based on the device identification in the call request. Specifically, the target interface service may call the database in the server and determine based on the device identification information of the previously accessed device stored in the database. If the device identification information of the previously accessed device stored in the database does not include the device identification corresponding to the target energy management unit, the target energy management unit is determined to be a first-time access device. Furthermore, it is also possible to determine whether there is a prior network configuration between the server and the target energy management unit. If there is no prior network configuration, it is determined to be a first-time access device; if there is a prior network configuration, it is determined not to be a first-time access device.

[0052] Step S203: If the target network management container determines that the target energy management unit is a device that is connected for the first time, the target network management container performs network configuration based on the second network configuration information corresponding to the server.

[0053] If the server determines that the target energy management unit is a device that is connected for the first time, it will add the target energy management unit to the database and create second network configuration information and first network configuration information corresponding to the server and the target energy management unit respectively.

[0054] The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit. The public key and private key are passwords or keys used for identity authentication when establishing a virtual private network (VPN). The static tunnel IP address refers to a fixed IP address manually assigned to each end (or device on each end) in the VPN tunnel. The subnet mask is a value used to determine which part of the IP address is the network address (i.e., the part used to identify the network or subnet) and which part is the host address (i.e., the part used to identify a specific device in the network).

[0055] In addition, since the network configuration according to the second network configuration information is completed in the target network management container in the at least one network management container, the target network management container may be the currently idlest network management container in the at least one network management container. The at least one network management container may include a main network management container, and the target network management container may be the currently idlest network management container selected by the main network management container from all network management containers. The idle measurement indicator may be the network idle bandwidth, memory idle amount, or the number of energy management units managed by the network management container.

[0056] In addition, if there is no main network management container, and the network configuration is performed based on any one of the at least one network management containers, the network configuration management container can also determine whether the energy management units managed by itself have reached the number of energy management units that it can manage (upper limit). If the number of energy management units that it can manage has been reached, it can be randomly transferred to other network management containers in at least one network management container for processing; if the number of energy management units that it can manage has not been reached, subsequent network configuration processing can continue. Corresponding priorities for network management of newly connected energy management units can also be set between at least one network management container. The priority can be determined based on the number of energy management units currently managed by each network management container. The lower the number of energy management units currently managed, the higher the priority.

[0057] Step S204: the target network management container sends the first network configuration information corresponding to the target energy management unit to the target energy management unit. Correspondingly, the target energy management unit receives the first network configuration information from the server.

[0058] It is understandable that the server may send the first network configuration information based on an API interface service.

[0059] Step S205: The target energy management unit performs network configuration according to the first network configuration information.

[0060] Among them, after the target energy management unit and the server perform network configuration respectively, it is equivalent to realizing the establishment of a virtual private network (Virtual Private Network, VPN) between the target energy management unit and the server.

[0061] Exemplarily, the network configuration between the aforementioned target energy management unit and the server can be based on WireGuard. First, both the server and the target energy management unit need to pre-install the WireGuard software. The server will create a WireGuard configuration file in each network management container to fill in the corresponding configuration information, such as filling in the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit created by the server in the configuration file, and adding iptables configuration based on the configuration information. It can be understood that if the target energy management unit is the first energy management unit among multiple energy management units to communicate with the server, and a WireGuard configuration file already exists in the server, it is necessary to refresh and overwrite the current iptables configuration based on the aforementioned configuration information.

[0062] Similarly, a similar WireGuard configuration file will be created on the target energy management unit, or the WireGuard configuration file can also be carried by the server when returning the first configuration information. Fill in the configuration file with the server's corresponding private key, static tunnel IP address and subnet mask returned by the API interface service, as well as the server's corresponding public key, static tunnel IP address and subnet mask, and other configuration information, and refresh and overwrite the current iptables configuration based on this configuration information. Finally, start the WireGuard service on the server and the target energy management unit to make the aforementioned configuration effective. In addition, you can use the network test tool to check whether the server can successfully access other energy management units through VPN to ensure that data can be transmitted safely and quickly.

[0063] Among them, by configuring iptables rules, you can play a role in network address translation, control traffic forwarding, and manage firewall rules in the configuration of WireGuard. For example, by defining iptables rules to determine which data packets can pass through the network interface and which data packets should be blocked, you can control traffic forwarding.

[0064] It is understandable that, since the security of the data corresponding to the energy storage device is relatively high, in order to avoid the adverse effects of unlimited data forwarding between energy management units on data leakage, a main energy management unit can be set among multiple energy management units, and the configuration information of the main energy management unit can save information such as the IP addresses corresponding to other energy management units, but the configuration information of other energy management units only saves their own configuration information and information such as the IP address of the main energy management unit. In this way, users can use the main energy management unit to forward data with other energy management units, but other energy management units cannot forward data, thereby avoiding the adverse effects of unlimited data forwarding between energy management units on data leakage, and improving the security of the data of the energy storage device. At the same time, the server side can also turn off the data forwarding function between other energy management units.

[0065] In addition, in a feasible embodiment, the server includes a status table, which records the current network status of the energy management unit that completes the network configuration with the server. The method also includes: if the target network management container determines that the target energy management unit is not a device that is connected for the first time, then when the current network status of the target energy management unit recorded in the status table is offline, the current network status of the target energy management unit is modified to online.

[0066] Among them, when it is determined that the target energy management unit is not a device that is connected for the first time, it means that the corresponding network configuration information is stored in the target energy management unit and the server, and no cumbersome network configuration is required at this time. Since it may be a call request of the target energy management unit received through the aforementioned target interface at this time, in order to ensure that the server can monitor the network status of the target energy management unit, it is necessary to update the network status of the target energy management unit in the status table of the server. That is, when the network status information of the target energy management unit in the status table of the server is offline, it is modified to an online state. At the same time, the record of the call request sent by the current target energy management unit can also be saved in the corresponding database. It can be understood that if it is determined that the target energy management unit is not a device that is connected for the first time, the target network management container can transfer it to a pre-configured network management container for managing the target energy management unit for subsequent processing.

[0067] In the present application, since the target energy management unit needs to be connected to the Internet to access the target interface, when it is determined that the target energy management unit is not a device accessed for the first time, the current network status of the target energy management unit in the server's status table can be modified from offline to online, thereby ensuring that the server can grasp the network status of the target energy management unit.

[0068] After the above network configuration is completed between multiple energy management units and the server, a local area network (LAN) is formed between the multiple energy management units and the server, and the user can access the LAN through the server, thereby directly accessing the target energy management unit according to the network configuration between the server and the target energy management unit. For example, the user can perform the above network configuration between other devices and the server to join the LAN, or the user can also access the target energy management unit through other energy management units. In this way, the user can achieve remote access to the target energy management unit.

[0069] Furthermore, after accessing the local area network through the server, the user can not only remotely access and control the target energy management unit, but also remotely access and control the energy storage device corresponding to the target energy management unit because the target energy management unit manages the corresponding energy storage device. This allows the operation and maintenance personnel corresponding to the energy storage system to remotely operate and maintain the energy storage devices in different regions included in the energy storage system.

[0070] In addition, in a feasible embodiment, the server is also configured with an energy management system, which is used to manage multiple energy management units. The target network management container receives a call request from the target energy management unit, including: the target network management container receives the call request forwarded by the energy management system.

[0071] Among them, the energy management system (EMS) is mainly used to manage multiple energy management units in this application. The energy management system and the network management container can be two components that exist in parallel on the server. Therefore, the server receives the call request of multiple energy management units mainly based on the energy management system. After receiving the call request, the energy management system will forward it to the network management container, so as to perform network configuration of both parties based on the network management container. The user's subsequent remote management of a specific single or multiple energy management units is also mainly based on the energy management system.

[0072] In the present application, the management of multiple energy management units is implemented through an energy management system, which can improve the management efficiency of the multiple energy management units.

[0073] Furthermore, the present application also proposes a solution for adjusting the number of network management containers.

[0074] In a feasible embodiment, the server is further configured with a container adjuster, and the container adjuster is used to adjust the number of at least one network management container configured by the server. The method also includes: the container adjuster determines a first number of energy management units, the first number being the sum of the number of energy management units that have completed the network configuration of the server and the number of energy management units that are currently accessed for the first time; the container adjuster determines a second number of network management containers based on the first number of energy management units and the number of energy management units that can be managed by a single network management container, so that the number of energy management units that can be managed by the second number of network management containers is not less than the first number of energy management units; the container adjuster adjusts the number of at least one network management container configured by the server based on the second number of network management containers.

[0075] Among them, the network management container can be created based on the K8s cluster, and the smallest unit that can be created and managed in the K8s cluster is the Pod. The Pod in this application is represented by the network management container. The K8s cluster also includes a scheduler, which will decide which node to schedule the Pod to run on based on factors such as the Pod's requirements, the node's resource status, and the scheduling strategy. In this application, the network management container is used to perform network management on multiple energy management units connected to the server. For example, when the energy management unit needs to be accessed or data needs to be sent, the network management container needs to be called to achieve access or data sending based on the corresponding network configuration.

[0076] In order to improve the data forwarding efficiency between multiple energy management units and the server, the container adjuster in the server will adjust the number of at least one network management container configured in the server according to the sum of the number of energy management units that have completed network configuration with the server and the number of energy management units that are currently connected for the first time, and the number of energy management units that can be managed by a single network management container. The number of energy management units that can be managed by a single network management container can be determined based on empirical values. The second number of network management containers currently required can be determined based on the ratio between the first number of energy management units that have completed network configuration with the server and the number of energy management units that can be managed by a single network management container, and finally the number of at least one network management container currently configured on the server is adjusted according to the second number of network management containers.

[0077] It can be understood that after adjusting the number of at least one network management container currently configured on the server, the scheduler will also schedule each network management container to the corresponding node according to the new number of network management containers, thereby performing network management on all energy management units in the local area network according to the scheduled network management container.

[0078] Exemplarily, the current embodiment is executed by a container adjuster, which can be a K8SHPA (Horizontal Pod Autoscaler) component. HPA can automatically expand the number of network management containers based on CPU utilization, memory utilization or custom metrics. First, HPA collects metrics of network management containers (i.e., the number of energy management units shown in this application) based on the monitoring system (such as Metrics Server) in the K8S cluster, and the HPA controller periodically checks the metrics and compares them with the preset target value. If the current metric exceeds or falls below the target value, HPA evaluates whether the number of network management containers needs to be expanded or reduced. Based on the metrics and preset rules, HPA calculates the required number of network management containers. At the same time, it can also ensure that the preset time has passed since the last adjustment to avoid frequent expansion and reduction.

[0079] It can be understood that the method shown in this embodiment can be performed according to a preset period, or it can be performed when an energy management unit is connected for the first time. It can be specifically set according to the networking stage. For example, if all the energy management units have just started to network with the server, the number of energy management units connected for the first time will be large. If the method shown in this embodiment is performed when an energy management unit is connected for the first time, it will cause the method to be executed more times. At this time, the method shown in this embodiment can be performed according to a preset period, thereby reducing the number of executions of the method shown in this embodiment. After all the energy management units have completed the initial networking with the server, there may be energy management units connected for the first time only when there are newly added energy management units. At this time, the method shown in this embodiment can be set to be performed when there are energy management units connected for the first time.

[0080] At the same time, if the method shown in this embodiment is performed according to a preset period, then the number of energy management units currently connected for the first time may refer to the number of energy management units that are connected for the first time within a preset period and have not yet completed the network configuration. A preset period can be understood as the period from the last execution of the current step to the current execution of the current step. The completion of the network configuration by the energy management unit can be understood as the network management container has performed the network configuration based on the second network configuration information, and sent the first network configuration information to the energy management unit, and the energy management unit has also completed the network configuration.

[0081] If the method shown in this embodiment is performed when there is an energy management unit that is connected for the first time, then the number of energy management units that are connected for the first time is determined based on the number of energy management units that are connected at the moment when there is an energy management unit that is connected for the first time. If there is only one energy management unit connected at the same time, then the number of energy management units that are currently connected for the first time is one. If there are multiple energy management units that are connected at the same time (for example, when all energy management units have just started to configure the network with the server), then the number of energy management units that are connected for the first time is multiple.

[0082] For example, if the number of energy management units that have completed network configuration with the server is 1000 and the number of energy management units currently accessed for the first time is 100, then the first number of energy management units is 1000+100=1100. If the number of energy management units that can be managed by a single network management container is 500, then the second number of network management containers required is 3.

[0083] In the present application, the number of network management containers in the server is adjusted according to the number of energy management units that currently complete the network configuration with the server and the number of energy management units that can be managed by a single network management container, so that the adjusted number of network management containers can better meet the number requirements of network management containers for network management of the current energy management units.

[0084] In addition, in a feasible embodiment, before the container adjuster determines the second number of network management containers based on the first number of energy management units and the number of energy management units that can be managed by a single network management container, the method also includes: the container adjuster determines whether the absolute value of a first difference between the first number of energy management units and the third number of energy management units is greater than a preset difference, the third number of energy management units being the sum of the number of energy management units that completed the network configuration of the server when the number of at least one network management container configured for the server was adjusted last time, and the number of energy management units that were first connected; if the container adjuster determines that the absolute value of the first difference is greater than the preset difference, then executing the step of determining the second number of network management containers based on the first number of energy management units and the number of energy management units that can be managed by a single network management container.

[0085] Among them, each time a new energy management unit performs network configuration with a server, in other words, when a new energy management unit accesses the local area network corresponding to the server and the energy management unit, the number adjustment operation of at least one network management container configured on the server as shown in the above embodiment will be triggered. However, after each adjustment of the number of network management containers, the scheduler will reschedule the network management container, thereby affecting the stability of the system, and further affecting the overall efficiency of data forwarding between multiple energy management units and the server. Therefore, before the number adjustment operation of the network management container is performed, or each time a new energy management unit performs network configuration with a server, it is necessary to determine whether the absolute value of the first difference between the first number of energy management units and the third number of energy management units is greater than the preset difference. If it is determined that the absolute value of the first difference is greater than the preset difference, the step of adjusting the number of at least one network management container configured on the server will be continued. The third number of energy management units is the sum of the number of energy management units that completed the network configuration on the server and the number of energy management units that were connected for the first time when the number of at least one network management container configured on the server was adjusted last time.

[0086] In addition, in addition to judging based on the absolute value of the first difference, judging can also be performed alone or in combination with time, that is, judging whether the first time between the current moment and the moment when the number of network management containers was adjusted last time is greater than the preset time, and on the basis that the first time is greater than the preset time, the subsequent step of adjusting the number of network management containers of the server can be performed. That is, before performing the subsequent step of adjusting the number of at least one network management container configured on the server, at least one of the above two conditions needs to be met.

[0087] Exemplarily, if the number of energy management units that completed the network configuration with the server when the number of network management containers was adjusted last time was 900, and the number of energy management units that were first connected at that time was 50, then the third number of energy management units is 900+50=950. If the current first number of energy management units is 1100, and the preset difference is 100. It can be determined that the difference between the first number of energy management units and the third number of energy management units is 150, which is greater than the preset difference of 100. At this time, the steps of determining the second number of network management containers according to the first number of energy management units and the number of energy management units that can be managed by a single network management container as shown in the aforementioned embodiment can be executed.

[0088] In the present application, before adjusting the quantity of at least one network management container configured for the server, it is also necessary to meet the condition that the absolute value of the difference between the current reference number of energy management units and the reference number of energy management units when the number of network management containers was adjusted last time is greater than the preset difference, thereby avoiding frequent adjustment of the number of network management containers and thus affecting data forwarding between the energy management unit and the server, and further improving the efficiency of data forwarding between multiple energy management units and the server.

[0089] Specifically, in a feasible embodiment, the container adjuster adjusts the quantity of at least one network management container configured on the server according to the second quantity of network management containers, including: if the container adjuster determines that the second quantity of network management containers is greater than the quantity of at least one network management container currently configured on the server, then adding a network management container of a second difference value to at least one network management container currently configured on the server, where the second difference value is the absolute value of the difference between the second quantity of network management containers and the quantity of network management containers currently configured on the server; if the container adjuster determines that the second quantity of network management containers is less than the quantity of at least one network management container currently configured on the server, then deleting the network management container of the second difference value from at least one network management container currently configured on the server.

[0090] After determining the number of network management containers required by the current server, it is necessary to adjust the number of network management containers currently configured on the server to the number of network management containers required by the current server. Specifically, when it is determined that the number of network management containers required by the current server is greater than the number of network management containers configured on the current server, it is necessary to add a corresponding number of network management containers in the server; when it is determined that the number of network management containers required by the current server is less than the number of network management containers configured on the current server, it is necessary to reduce a corresponding number of network management containers in the server. It is understandable that the multiple network management containers may be one network management container plus multiple copies of the network management container.

[0091] For example, if it is determined that capacity expansion is needed, HPA adjusts the number of Pod (network management container) copies in Deployment or StatefulSet through the Kubernetes API. The Kubernetes scheduler starts or stops the corresponding Pod according to the new number of copies, and then waits for the system to stabilize to ensure that the new WireGuard network management container runs normally and processes requests.

[0092] Continuing with the above example, if the second number of network management containers required at this time is 6, and the number of at least one network management container currently configured on the server is only 4, it can be determined that the second difference between the second number of network management containers and the number of network management containers currently configured on the server is 6-4=2, and 2 network management containers need to be added at this time. If the second number of network management containers required at this time is 6, and the number of at least one network management container currently configured on the server is 9, it can be determined that the second difference between the number of network management containers currently configured on the server and the second number of network management containers is 9-6=3, and 3 network management containers can be deleted at this time.

[0093] For example, the following Figure 3 For a detailed description of the local area network formed between the energy management unit and the server, see Figure 3 , Figure 3 A schematic diagram of the structure of a local area network provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, it includes a local area network formed between multiple energy management units and a server, and the server has a public network IP, so as to realize data forwarding between multiple energy management units. The server also includes an energy management system, a network management container and a container adjuster. The energy management system is mainly used to control and manage multiple energy management units, while the network management container is mainly used to perform network management on multiple energy management units, and the container adjuster is mainly used to adjust the number of network management containers.

[0094] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a network management container provided in an embodiment of the present application, such as Figure 4 As shown, the network management container can be created in the K8s cluster. The server and multiple energy management units can be networked based on WireGuard. The WireGuard service in the server is deployed in the network management container (K8sContainer), and the interface service (API service) is deployed in the same network management container to receive requests from the energy management unit (Front), such as adding or modifying the networking configuration, and save the WireGuard configuration information in the database MySQL and the configuration file (wg0.conf) in the networking program (WireGuard program). K8s is an open source network management container orchestration system for automated deployment, expansion, and management of network management containerized applications.

[0095] See also Figure 5 , Figure 5 A schematic diagram of a flow chart of a network management container expansion operation provided in an embodiment of the present application, such as Figure 5 As shown, the container adjuster (HPA) configured in the server is connected to at least one network management container and monitors the network management container according to the corresponding monitoring indicators. At the same time, the container adjuster is also connected to a controller for coordinated expansion operations, which is also configured in the server. When the container adjuster determines that expansion is required, it sends an expansion operation instruction to the controller (Deployment). The controller controls the creation of the original network management container (K8s Container) to obtain the corresponding newly added network management container. The newly added network management container is a copy of the original network management container, and also includes interface services (API services) and networking programs (WireGuard programs).

[0096] In the present application, when the network management containers configured for the current server are expanded by a corresponding number according to the number of network management containers required by the current server, the heavy operating pressure of each network management container caused by the insufficient number of network management containers can be avoided; and when the network management containers configured for the server are reduced by a corresponding number according to the number of network management containers required by the current server, the waste of resources caused by the excessive number of network management containers can be avoided.

[0097] In addition, in another feasible embodiment, the server is further configured with a container adjuster, and the container adjuster is used to adjust the number of at least one network management container configured with the server. The method also includes: the container adjuster determines the number of energy storage devices corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time; the container adjuster determines a fourth number of network management containers based on the number of energy storage devices corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time, and the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container, so that after the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time are allocated to the fourth number of network management containers, the number of energy storage devices corresponding to the energy management units allocated to each network management container is not greater than the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container; the container adjuster adjusts the number of at least one network management container configured with the server according to the fourth number of network management containers.

[0098] Among them, since each energy management unit manages the energy storage device corresponding to each energy management unit, but the number of energy storage devices managed by each energy management unit may be different, the amount of data generated by each energy management unit may also be different. Based on this, in addition to adjusting the number of network management containers configured by the server according to the first number of energy management units that currently complete the network configuration with the server, this embodiment can also be adjusted according to the number of energy storage devices managed by all energy management units.

[0099] Specifically, determine the number of energy storage devices corresponding to each energy management unit in the energy management unit that has currently completed the network configuration with the server and the energy management unit that is connected for the first time, as well as the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container. It can be understood that the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container can be determined based on empirical values. Since the number of energy storage devices managed by each energy management unit is fixed, when determining the fourth number of network management containers, it should also be considered that it is difficult to allocate energy management units corresponding to the same number of energy storage devices to each network management container when subsequently allocating energy management units.

[0100] Therefore, when determining the fourth number of network management containers, all energy management units can be randomly combined according to the number of energy storage devices corresponding to each energy management unit, and on the basis that the total number of energy storage devices corresponding to each group of energy management units is not greater than the number of energy storage devices corresponding to energy management units that can be managed by a single network management container, multiple combination methods can be obtained, and the target combination method with the least number of groups is selected from the multiple combination methods, and the least number of groups is determined as the fourth number of network management containers. Subsequently, according to the method shown in the aforementioned embodiment, the number of network management containers included in the current server is adjusted according to the number of energy management units currently required. When the energy management units that need to be managed by each network management container are subsequently scheduled, it can also be done according to the aforementioned target grouping method.

[0101] For example, if there are three energy management units A, B, and C, energy management unit A includes three energy storage devices, energy management unit B includes four energy storage devices, and energy management unit C includes two energy storage devices. At this time, if the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container is 5, then there are only two possible combinations. The first combination can obtain two groups, group 1 includes energy management unit A and energy management unit C, and group 2 includes energy management unit B; the second combination can obtain three groups, group 1 includes energy management unit A, group 2 includes energy management unit B, and group 3 includes energy management unit C. At this time, the combination with the smallest number of groups is determined to be the first combination, and the fourth number of network management containers can be determined to be 2.

[0102] In an embodiment of the present application, the number of network management containers configured on the server is adjusted according to the number of energy storage devices managed by each energy management unit and the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container. The adjusted number of network management containers can better meet the number requirement of network management containers for managing the current energy management unit, thereby improving the data forwarding efficiency between multiple energy management units and the server.

[0103] It is understandable that before executing the step of adjusting the number of network management containers shown in the aforementioned embodiment, a pre-execution condition may also be added, and the execution condition may also include: the difference between the number of energy management units that have completed network configuration with the server and the number of energy management units that have been accessed for the first time and the number of energy management units that have completed network configuration with the server and the number of energy management units that have been accessed for the first time when the number of network management containers was adjusted last time is greater than a preset difference, and / or the duration between the current moment and the moment when the number of network management containers was adjusted last time is greater than a preset duration. It may also include: the difference between the total number of energy storage devices corresponding to the energy management units that have completed network configuration with the server and the energy management units that have been accessed for the first time and the total number of energy storage devices corresponding to the energy management units that have completed network configuration with the server and the energy management units that have been accessed for the first time when the number of network management containers was adjusted last time is greater than a second difference.

[0104] Furthermore, due to the difference in the number of battery packs in each energy storage device, the capacity corresponding to each energy storage device may also be different. If the capacity of the energy storage device corresponding to a certain energy management unit is higher, then the importance of the energy management unit may also be higher. Therefore, in addition to adjusting the number of network management containers according to the number of energy storage devices corresponding to the energy management unit, it can also be adjusted according to the capacity of the energy storage device corresponding to the energy management unit.

[0105] Specifically, in a feasible embodiment, the container adjuster determines the capacity of the energy storage device corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time, as well as the capacity of the energy storage device corresponding to the energy management units that can be managed by a single network management container; the container adjuster determines the fifth number of network management containers based on the capacity of the energy storage device corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time, as well as the capacity of the energy storage device corresponding to the energy management units that can be managed by a single network management container, so that after the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time are allocated to the fifth number of network management containers, the capacity of the energy storage device corresponding to the energy management unit allocated to each network management container is not greater than the capacity of the energy storage device corresponding to the energy management unit that can be managed by a single network management container; the container adjuster adjusts the number of network management containers configured on the server based on the fifth number of network management containers.

[0106] Among them, the capacity of the energy storage device corresponding to each of the aforementioned energy management units refers to the total capacity of all the energy storage devices corresponding to each energy management unit, and when determining the fifth number of network management containers according to the capacity of the energy storage device corresponding to each energy management unit in the energy management unit that currently completes the network configuration with the server, and the capacity of the energy storage device corresponding to the energy management unit that can be managed by a single network management container, it can also be carried out according to the method shown in the aforementioned embodiment. That is, all energy management units can be randomly combined according to the capacity of the energy storage device corresponding to each energy management unit, and on the basis of satisfying that the total capacity of the energy storage device corresponding to each group of energy management units is not greater than the capacity of the energy storage device corresponding to the energy management unit that can be managed by a single network management container, multiple combination methods can be obtained, and the combination method with the least number of groups is selected from the multiple combination methods, and its least number of groups is determined as the fourth number of network management containers.

[0107] It can be understood that before adjusting the number of network management containers according to the above-mentioned two methods, execution conditions can be added according to the method shown in the above-mentioned embodiments, and the execution conditions can also include, in addition to the execution conditions shown in the above-mentioned embodiments: the total capacity of the energy storage devices corresponding to the energy management unit that currently completes the network configuration with the server and the energy management unit that is first connected, and the difference between the total capacity of the energy storage devices corresponding to the energy management unit that completes the network configuration with the server and the energy management unit that is first connected when the number of network management containers was adjusted last time is greater than the third difference.

[0108] Similarly, after adjusting the number of network management containers according to the aforementioned embodiment, it is also necessary to adjust the energy management units that each network management container needs to manage according to corresponding indicators.

[0109] In addition, in a feasible embodiment, there are multiple servers, each of the multiple servers is configured with at least one network management container, and the multiple network management containers configured in the multiple servers are respectively used to manage energy management units that complete network configuration with the multiple servers. When a target server among the multiple servers fails, the energy management unit managed by at least one network management container configured in the target server is managed based on the network management containers configured in other servers. The other servers are servers other than the target server among the multiple servers.

[0110] Among them, when there are multiple servers, the multiple servers can evenly distribute the management of multiple energy management units. That is, the number of energy management units managed by the network management containers configured on each server is similar. At the same time, there can be a unified database between multiple servers. In this way, when a single target server fails, the network management containers configured in other servers can directly manage the energy management units managed by at least one network management container configured in the target server. In addition, when a single network management container in each server fails, the work of the single network management container can also be taken over by other network management containers.

[0111] In the present application, when a target server among multiple servers fails, other servers among the multiple servers can take over the work of the target server, thereby avoiding the unavailability of the local area network caused by the failure of a single server.

[0112] It can be seen that in the embodiment of the present application, since the target energy management unit is pre-configured with the information of the target interface, the target energy management unit can access the target interface based on the information of the target interface to achieve preliminary communication with the server. Subsequently, a call request is sent to the target interface so that when the server determines that the target energy management unit is the first access device based on the call request, the network configuration information corresponding to the two is directly created, and the network configuration information corresponding to the target energy management unit is returned to the target energy management unit based on the target interface, so that the two can perform network configuration respectively. In this way, the networking between the server and the target energy management unit can be completed when the target energy management unit does not have an independent public network IP, thereby realizing independent access of the server to the target energy management unit. At the same time, the target interface is configured on each network management container in at least one network management container of the server, so that even when a single network management container fails, network configuration and access after network configuration can be performed based on other network management containers, which improves the stability of the server and multiple energy management units in networking.

[0113] In accordance with the above-mentioned embodiments, please refer to Figure 6 , Figure 6 A functional unit composition block diagram of a first networking device of multiple energy management units provided in an embodiment of the present application, wherein the first networking device of multiple energy management units is the above-mentioned server or a part of the server, such as Figure 6 As shown, the first networking device 60 of the plurality of energy management units includes:

[0114] In response to the target network management container receiving a call request from the target energy management unit through the first receiving unit 601, the first processing unit 602 is used to determine whether the target energy management unit is a first-time access device based on the call request, the call request includes a device identifier corresponding to the target energy management unit, the target energy management unit is any one of the multiple energy management units, and the target network management container is any one of the at least one network management container;

[0115] The first processing unit 602 is further configured to perform network configuration based on the second network configuration information corresponding to the server if the target network management container determines that the target energy management unit is a device that is connected for the first time;

[0116] A first sending unit 603 is used to send the first network configuration information corresponding to the target energy management unit to the target energy management unit, so that the target energy management unit performs network configuration based on the first network configuration information;

[0117] Among them, the first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit.

[0118] In a feasible embodiment, the server includes a status table, which records the current network status of the energy management unit that completes the network configuration with the server. The first processing unit 602 is also used for: if it is determined that the target energy management unit is not a device that is connected for the first time, then when the current network status of the target energy management unit recorded in the status table is offline, the current network status of the target energy management unit is modified to online.

[0119] In a feasible embodiment, the server is further configured with an energy management system, wherein the energy management system is used to manage multiple energy management units, and the call request from the target management unit is forwarded to the network management container via the energy management system.

[0120] In a feasible embodiment, the server is also configured with a container adjuster, which is used to adjust the number of at least one network management container configured by the server. The first processing unit 602 is also used to: determine a first number of energy management units, the first number being the sum of the number of energy management units that have completed the network configuration with the server and the number of energy management units that are currently connected for the first time; determine a second number of network management containers based on the first number of energy management units and the number of energy management units that can be managed by a single network management container, so that the number of energy management units that can be managed by the second number of network management containers is not less than the first number of energy management units; and adjust the number of at least one network management container configured by the server based on the second number of network management containers.

[0121] In a feasible embodiment, the first processing unit 602, before determining the second number of network management containers based on the first number of energy management units and the number of energy management units that can be managed by a single network management container, is also used to: determine whether the absolute value of a first difference between the first number of energy management units and the third number of energy management units is greater than a preset difference, the third number of energy management units being the sum of the number of energy management units that completed the network configuration of the server when the number of at least one network management container configured for the server was adjusted last time, and the number of energy management units that were connected for the first time; if it is determined that the absolute value of the first difference is greater than the preset difference, then execute the step of determining the second number of network management containers based on the first number of energy management units and the number of energy management units that can be managed by a single network management container.

[0122] In a feasible embodiment, in terms of adjusting the quantity of at least one network management container configured on the server according to the second quantity of network management containers, the first processing unit 602 is specifically used to: if it is determined that the second quantity of network management containers is greater than the quantity of at least one network management container currently configured on the server, add a network management container of a second difference value to the at least one network management container currently configured on the server, where the second difference value is the difference between the second quantity of network management containers and the quantity of network management containers currently configured on the server; if it is determined that the second quantity of network management containers is less than the quantity of at least one network management container currently configured on the server, delete the network management container of the second difference value from the at least one network management container currently configured on the server.

[0123] In a feasible embodiment, the server is also configured with a container adjuster, which is used to adjust the number of at least one network management container configured with the server. The first processing unit 602 is also used to: determine the number of energy storage devices corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time; determine a fourth number of network management containers based on the number of energy storage devices corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time, and the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container, so that after the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time are allocated to the fourth number of network management containers, the number of energy storage devices corresponding to the energy management units allocated to each network management container is not greater than the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container; and adjust the number of at least one network management container configured with the server based on the fourth number of network management containers.

[0124] In a feasible embodiment, there are multiple servers, each of the multiple servers is configured with at least one network management container, and the multiple network management containers configured in the multiple servers are respectively used to manage energy management units that complete network configuration with the multiple servers. When a target server among the multiple servers fails, the energy management unit managed by at least one network management container configured in the target server is managed based on the network management containers configured in other servers. The other servers are servers other than the target server among the multiple servers.

[0125] In accordance with the above-mentioned embodiments, please refer to Figure 7 , Figure 7 A functional unit composition block diagram of a second networking device of multiple energy management units provided in an embodiment of the present application, wherein the second networking device of multiple energy management units is the above-mentioned energy management unit or a part of the energy management unit, such as Figure 7 As shown, the second networking device 70 of the plurality of energy management units includes:

[0126] The second sending unit 701 is used to send a call request to the server, where the call request includes a device identifier corresponding to the target energy management unit;

[0127] In response to the second receiving unit 702 receiving the first network configuration information from the server, the second processing unit 703 is configured to perform network configuration according to the first network configuration information;

[0128] The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server.

[0129] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0130] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. The first networking device 60 of the above multiple energy management units and the second networking device 70 of the above multiple energy management units jointly execute the above Figure 2 The networking method of multiple energy management units is shown.

[0131] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center containing one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0132] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 800 may include one or more of the following components: a processor 801, a memory 802 and a communication interface 803. The processor 801, the memory 802 and the communication interface 803 are interconnected and perform communication work with each other, wherein the memory 802 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 801.

[0133] The processor 801 may include one or more processing cores. The processor 801 uses various interfaces and lines to connect the various parts of the entire electronic device 800, and executes various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 802, and calling data stored in the memory 802. Optionally, the processor 801 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 801 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. It is understandable that the above-mentioned modem may not be integrated into the processor 801, and may be implemented separately through a communication chip.

[0134] The memory 802 may include a random access memory (RAM) or a read-only memory (ROM). The memory 802 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 800 during use, etc.

[0135] It is understandable that the electronic device 800 may include more or fewer structural elements than those in the above structural block diagram, for example, including a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., which are not limited here.

[0136] The electronic device 800 may include the aforementioned server or energy management unit.

[0137] An embodiment of the present application provides a computer-readable storage medium, wherein program data is stored in the computer-readable storage medium, and when the program data is executed by a processor, the program data is used to execute part or all of the steps of any one of the networking methods of multiple energy management units recorded in the above method embodiments.

[0138] The present application also provides a computer program product, which includes a computer program, which is operable to cause a computer to execute some or all of the steps of any one of the methods for networking multiple energy management units as described in the above method embodiments. The computer program product can be a software installation package.

[0139] It should be noted that, for the sake of simplicity, for any of the aforementioned method embodiments of the networking method of multiple energy management units, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

[0140] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude multiple situations. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0141] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of any of the above-mentioned method embodiments of the method for networking multiple energy management units can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.

[0142] The above is a detailed introduction to the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of a networking method for multiple energy management units and related devices of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the idea of ​​a networking method for multiple energy management units and related devices of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0143] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0146] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in the method embodiment of a method for networking multiple energy management units in the present application, such as the terminal and computer program product in the above flowchart, falls within the scope of related products described in the present application.

[0147] Obviously, those skilled in the art can make various changes and modifications to the networking method of multiple energy management units and related devices provided by this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include these modifications and variations.

Claims

1. A method for networking multiple energy management units, characterized in that: The method is applied to a server, the server is configured with at least one network management container, and the method comprises: In response to the target network management container receiving a call request from the target energy management unit, determining whether the target energy management unit is a first-time access device based on the call request, the call request including a device identifier corresponding to the target energy management unit, the target energy management unit is any one of the multiple energy management units, and the target network management container is any one of the at least one network management container; If the target network management container determines that the target energy management unit is a device that is connected for the first time, network configuration is performed based on the second network configuration information corresponding to the server, and the first network configuration information corresponding to the target energy management unit is sent to the target energy management unit, so that the target energy management unit performs network configuration based on the first network configuration information; Among them, the first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit.

2. The method according to claim 1, characterized in that The server includes a state table, in which the current network state of the energy management unit that completes the network configuration with the server is recorded, and the method further includes: If the target network management container determines that the target energy management unit is not a device connected for the first time, then when the current network state of the target energy management unit recorded in the state table is offline, the current network state of the target energy management unit is modified to online.

3. The method according to claim 1 or 2, characterized in that: The server is further configured with an energy management system, and the energy management system is used to manage the multiple energy management units. The target network management container receives a call request from the target energy management unit, including: The target network management container receives the calling request forwarded by the energy management system.

4. The method according to claim 1 or 2, characterized in that: The server is further configured with a container adjuster, and the container adjuster is used to adjust the number of at least one network management container configured on the server. The method further includes: The container adjuster determines a first number of the energy management units, where the first number is the sum of the number of energy management units that have completed network configuration with the server and the number of energy management units that are currently connected for the first time; The container adjuster determines the second number of the network management containers according to the first number of the energy management units and the number of energy management units that can be managed by a single network management container, so that the number of energy management units that can be managed by the second number of network management containers is not less than the first number of the energy management units; The container adjuster adjusts the quantity of at least one network management container configured on the server according to the second quantity of the network management containers.

5. The method according to claim 4, characterized in that Before the container adjuster determines the second number of the network management containers according to the first number of the energy management units and the number of energy management units that can be managed by the single network management container, the method further includes: The container adjuster determines whether an absolute value of a first difference between the first number of the energy management units and a third number of the energy management units is greater than a preset difference, the third number of the energy management units being the sum of the number of energy management units that completed network configuration of the server when the number of at least one network management container configured on the server was adjusted last time, and the number of energy management units that were connected for the first time; If the container adjuster determines that the absolute value of the first difference is greater than the preset difference, a step of determining a second number of the network management containers based on the first number of the energy management units and the number of energy management units that can be managed by the single network management container is executed.

6. The method according to claim 4 or 5, characterized in that: The container adjuster adjusts the quantity of at least one network management container configured by the server according to the second quantity of the network management container, including: If the container adjuster determines that the second number of network management containers is greater than the number of at least one network management container currently configured by the server, then add a network management container of a second difference value to the at least one network management container currently configured by the server, where the second difference value is an absolute value of the difference between the second number of network management containers and the number of network management containers currently included in the server; If the container adjuster determines that the second number of the network management containers is less than the number of the at least one network management container currently configured on the server, the network management container of the second difference is deleted from the at least one network management container currently configured on the server.

7. The method according to claim 1, characterized in that The server is further configured with a container adjuster, and the container adjuster is used to adjust the number of at least one network management container configured on the server. The method further includes: The container adjuster determines the number of energy storage devices corresponding to each of the energy management units that currently complete network configuration with the server and the energy management units that are first connected; The container adjuster determines a fourth number of the network management containers according to the number of energy storage devices corresponding to each of the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time, and the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container, so that after the energy management units that currently complete the network configuration with the server and the energy management units that are accessed for the first time are allocated to the fourth number of network management containers, the number of energy storage devices corresponding to the energy management units allocated to each network management container is not greater than the number of energy storage devices corresponding to the energy management units that can be managed by a single network management container; The container adjuster adjusts the quantity of at least one network management container configured on the server according to the fourth quantity of the network management containers.

8. The method according to any one of claims 1 to 7, characterized in that: There are multiple servers, each of which is configured with at least one network management container, and the multiple network management containers configured in the multiple servers are respectively used to manage energy management units that complete network configuration with the multiple servers, wherein: When a target server among the multiple servers fails, network management is performed on an energy management unit managed by at least one network management container configured in the target server based on the network management containers configured in other servers, and the other servers are servers among the multiple servers except the target server.

9. A method for networking multiple energy management units, characterized in that: The method is applied to a target energy management unit, where the target energy management unit is any one of a plurality of energy management units, and the method includes: Sending a call request to a server, wherein the call request includes a device identifier corresponding to the target energy management unit; In response to receiving first network configuration information from the server, performing network configuration according to the first network configuration information; The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server.

10. A networking device for multiple energy management units, characterized in that: The device is applied to a server, the server is configured with at least one network management container, and the device includes: In response to the target network management container receiving a call request from the target energy management unit through the first receiving unit, the first processing unit is used to determine whether the target energy management unit is a first-time access device based on the call request, the call request includes a device identifier corresponding to the target energy management unit, the target energy management unit is any one of the multiple energy management units, and the target network management container is any one of the at least one network management container; The first processing unit is further configured to perform network configuration based on the second network configuration information corresponding to the server if the target network management container determines that the target energy management unit is a device that is connected for the first time; A first sending unit, configured to send first network configuration information corresponding to the target energy management unit to the target energy management unit, so that the target energy management unit performs network configuration based on the first network configuration information; Among them, the first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server, and the second network configuration information includes the public key, static tunnel IP address and subnet mask corresponding to the target energy management unit.

11. A networking device for multiple energy management units, characterized in that: The device is applied to a target energy management unit, the target energy management unit is any one of the multiple energy management units, and the device includes: A second sending unit, configured to send a call request to a server, wherein the call request includes a device identifier corresponding to the target energy management unit; In response to the second receiving unit receiving the first network configuration information from the server, the second processing unit is used to perform network configuration according to the first network configuration information; The first network configuration information includes the private key, static tunnel IP address and subnet mask corresponding to the target energy management unit, and the public key, static tunnel IP address and subnet mask corresponding to the server.

12. An electronic device, comprising a processor, a memory, and a computer program stored in the memory, characterized in that: The processor is used to call the computer program stored in the memory to execute the method according to any one of claims 1 to 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Network configuration method and device of terminal device and server

    CN110401557A

  • Network configuration method and system

    CN111786836A

  • Multi-network single-inlet VPN system based on WireGuard and OpenVPN

    CN114285697A

  • Virtual private network environment construction and management method based on Wireguard

    CN116232929A

  • Remote access management platform and management method

    CN116389105A