Control device and method of energy storage converter, storage medium and program product
By using N-layer nested relationship instruction tree and module components in the energy storage converter, the problem of confusion in the instruction execution process of the energy storage converter is solved, the accuracy and efficiency of operation are improved, and the stability of the energy storage system is ensured. Sex and safety.
Patent Information
- Application Number
- CN202411005814.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-15
AI Technical Summary
In the existing energy storage converter control methods, the instruction execution process is prone to chaos, resulting in reduced operational accuracy and efficiency. In particular, the instructions sent by the upper computer may be ignored or interrupted by the energy storage converter, or the response is incorrect.
Using instruction trees and module components with N-layer nested relationships, manage instruction instances through the instruction manager to ensure that instructions are executed in the order of module components, manage instruction instances in layers of embedded methods, and ensure grouping and modules of instruction trees. Component relationship.
Improve the management efficiency and execution accuracy of energy storage converter instructions, ensuring the operation efficiency and safety of the energy storage system.
Smart Images

Figure CN118963181A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of energy storage, and in particular to a control device, method, storage medium, and program product for an energy storage converter. Background Art
[0002] The energy storage industry is booming. Energy storage converters control the charging and discharging of batteries and are the core components of energy storage systems. The orderly and stable execution of various instructions within these converters ensures the orderly operation of the energy storage system, which is crucial for improving its efficiency and safety.
[0003] Currently, the most common control method for energy storage converters is to send multiple instructions sequentially from a host computer. For example, the host computer sequentially sends instructions a and b to the energy storage converter. However, when the host computer sends instruction b to the energy storage converter, instruction a may be in the process of being executed by the converter. This may cause instruction b to be ignored by the converter, or cause the converter to malfunction, interrupt the normal operation of instruction a, or the converter's response to instruction b may be interpreted by the host computer as a response to instruction a, etc. This leads to confusion in the converter's instruction execution process, reducing the accuracy and efficiency of the converter's operation. Summary of the Invention
[0004] The embodiments of the present disclosure provide a control device, method, storage medium and program product for an energy storage converter, which at least helps to solve the problem of confusion in the execution instruction process of the energy storage converter, thereby reducing the accuracy and efficiency of the operation of the energy storage converter.
[0005] According to some embodiments of the present disclosure, on the one hand, an embodiment of the present disclosure provides a control device for an energy storage inverter, comprising: an instruction manager, wherein the instruction manager is configured to manage an instruction tree having N layers of nested relationship; N is an integer greater than 0; the control device of the energy storage inverter also includes a module component having N layers of nested relationship; the Mth layer of the instruction tree includes at least one instruction group; M is an integer greater than 0, and M is less than or equal to N; the instruction group of the Mth layer of the instruction tree is embedded in an instruction group of the M-1th layer; in the case where there is no embedded instruction group in the instruction group, the instruction group is embedded with at least one instruction instance; the Mth layer of the module component includes at least one module; the module of the Mth layer of the module component is embedded in the module of the M-1th layer; the module of the Mth layer of the module component has a one-to-one correspondence with the instruction group of the Mth layer of the instruction tree.
[0006] According to some embodiments of the present disclosure, on the other hand, the embodiments of the present disclosure further provide a control method for an energy storage inverter, which is applied to the control device of the above-mentioned energy storage inverter; the method includes: sending a target instruction instance to a lower computer, so that the lower computer runs according to the target instruction instance and returns a response result; the target instruction instance is an instruction instance in the instruction tree; receiving the response result returned by the lower computer, and when the response result is that the instruction instance is executed successfully, determining that the unexecuted instruction instance in the instruction tree is the target instruction instance, and continuing to execute the step of sending the target instruction instance to the lower computer.
[0007] According to some embodiments of the present disclosure, on the other hand, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned control method of the energy storage converter.
[0008] According to some embodiments of the present disclosure, on the other hand, embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the above-mentioned control method of the energy storage converter is implemented.
[0009] According to some embodiments of the present disclosure, another aspect of the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned control method of the energy storage converter when executed by a processor.
[0010] The technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0011] This embodiment sets an instruction manager for managing an instruction tree with N layers of nested relationships and a module component with N layers of nested relationships in the control device of the energy storage inverter. The instruction group of the first layer embeds the instruction group of the second layer, the instruction group of the second layer continues to embed the instruction group of the third layer, and so on, thereby obtaining an instruction tree with N layers of nested relationships, so that the instruction instance can be effectively managed by the instruction manager, thereby improving the efficiency of instruction instance management. At the same time, the modules of the Mth layer of the module component correspond one-to-one with the instruction groups of the Mth layer of the instruction tree, and are also set in a layer-by-layer embedding manner, so that the instructions of the energy storage inverter are set according to the division of the module component, so that the energy storage inverter can execute specific instruction instances stably and effectively, thereby improving the accuracy and efficiency of the operation of the energy storage inverter, thereby improving the efficiency and safety of the energy storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplified descriptions do not constitute a limitation on the embodiments. Unless otherwise stated, the pictures in the drawings do not constitute a scale limitation. In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the traditional technology, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A schematic diagram of the structure between the instruction manager and the instruction tree in the control device of the energy storage converter provided by an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of the structure of the instruction manager, instruction tree, and module components in the control device of the energy storage converter provided by an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of the structure between the instruction manager and the instruction tree in the control device of the energy storage converter provided by an embodiment of the present disclosure;
[0016] Figure 4 A schematic diagram of the structure of the instruction manager, instruction tree, and module components in the control device of the energy storage converter provided by an embodiment of the present disclosure;
[0017] Figure 5 A schematic diagram of the structure between the instruction manager and the firmware download instruction group in the control device of the energy storage converter provided by an embodiment of the present disclosure;
[0018] Figure 6 A schematic diagram of the interaction between the control device of the energy storage converter and the energy storage converter provided in an embodiment of the present disclosure;
[0019] Figure 7 A schematic flow chart of a control method for an energy storage converter provided in an embodiment of the present disclosure;
[0020] Figure 8 A flow chart of a control method for an energy storage converter provided in an embodiment of the present disclosure;
[0021] Figure 9 A flow chart of a control method for an energy storage converter provided in an embodiment of the present disclosure;
[0022] Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] As can be seen from the background technology, the current common control method of the energy storage converter is mainly carried out by the host computer sending multiple instructions in sequence. For example, the host computer sends instructions a and b to the energy storage converter in sequence. However, when the host computer sends instruction b to the energy storage converter, instruction a may be being executed by the energy storage converter, which may cause instruction b to be ignored by the energy storage converter, or cause the function of the energy storage converter to be abnormal, or interrupt the normal operation of instruction a, or the response of the energy storage converter to instruction b is regarded by the host computer as a response to instruction a, etc., resulting in confusion in the execution process of the energy storage converter and reducing the accuracy and efficiency of the operation of the energy storage converter.
[0024] The present disclosure provides a control device for an energy storage inverter, including: an instruction manager, which is configured to manage an instruction tree with N layers of nesting relationship; N is an integer greater than 0; the control device of the energy storage inverter also includes a module component with N layers of nesting relationship; the Mth layer of the instruction tree includes at least one instruction group; M is an integer greater than 0, and M is less than or equal to N; the instruction group of the Mth layer of the instruction tree is embedded in an instruction group of the M-1th layer; in the case where there is no embedded instruction group in the instruction group, the instruction group is embedded with at least one instruction instance; the Mth layer of the module component includes at least one module; the module of the Mth layer of the module component is embedded in the module of the M-1th layer; the module of the Mth layer of the module component has a one-to-one correspondence with the instruction group of the Mth layer of the instruction tree. By setting an instruction manager for managing an instruction tree with N layers of nested relationships and a module component with N layers of nested relationships in the control device of the energy storage inverter, the instruction group of the first layer embeds the instruction group of the second layer, the instruction group of the second layer continues to embed the instruction group of the third layer, and so on, layer by layer. When there is no embedded instruction group in the instruction group, the instruction group only embeds a specific instruction instance, thereby obtaining an instruction tree with N layers of nested relationships, so that the instruction instance can be effectively managed by the instruction manager, thereby improving the efficiency of instruction instance management. At the same time, the modules of the Mth layer of the module component correspond one-to-one with the instruction groups of the Mth layer of the instruction tree, and are also set in a layer-by-layer embedding manner, so that the instructions of the energy storage inverter are set according to the division of the module components, so that the energy storage inverter can execute specific instruction instances stably and effectively in module order, thereby improving the accuracy and efficiency of the operation of the energy storage inverter, thereby improving the efficiency and safety of the energy storage system.
[0025] In the description of the embodiments of the present application, the technical terms "first" and "second" are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined. Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0026] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will appreciate that many technical details are provided in the embodiments of the present disclosure to help readers better understand the present disclosure. However, even without these technical details and the various variations and modifications based on the following embodiments, the technical solutions claimed in the present disclosure can be implemented.
[0029] like Figure 1 The figure shows a schematic diagram of the structure between the instruction manager and the instruction tree in the control device of the energy storage converter provided by the embodiment of the present disclosure. The control device of the energy storage converter includes: an instruction manager 10, which is configured to manage an instruction tree with N nested layers; N is an integer greater than 0. The Mth layer of the instruction tree includes at least one instruction group; M is an integer greater than 0, and M is less than or equal to N; the instruction group of the Mth layer of the instruction tree is embedded in an instruction group of the M-1th layer; in the case where there is no embedded instruction group in the instruction group, the instruction group has at least one instruction instance embedded in it.
[0030] like Figure 2 Figure 2 shows a schematic diagram of the structure of the instruction manager, instruction tree, and module components in the control device of the energy storage converter provided by an embodiment of the present disclosure. The control device of the energy storage converter also includes a module component 20 with N nested layers. The Mth layer of the module component 20 includes at least one module. The modules in the Mth layer of the module component 20 are embedded in the modules in the M-1th layer. The modules in the Mth layer of the module component 20 correspond one-to-one to the instruction groups in the Mth layer of the instruction tree.
[0031] Specifically, Figure 1 、 Figure 2Taking N as 3 as an example, from top to bottom they are the first, second and third layers of the instruction tree, the instruction manager 10 embeds the instruction group of the first layer, the instruction group of the first layer continues to embed the instruction group of the second layer, the instruction group of the second layer can continue to embed the instruction group of the third layer, or can only embed instruction instances, and the instruction group of the third layer embeds instruction instances; of course, the instruction group of the third layer can also continue to embed the instruction group of the fourth layer, thereby realizing a layer-by-layer embedded instruction tree structure. The figure is only for the convenience of showing the connection relationship of the instruction groups, and does not limit the protection scope of this embodiment.
[0032] Specifically, the module component 20 is a collection of all modules within an application. The modules of the application are arranged according to their functions, wherein the first-layer module 21 embeds the second-layer module 22, the second-layer module 22 further embeds the third-layer module 23, and the third-layer module 23 can further embed modules, and so on to achieve layer-by-layer embedding of modules within the application. That is, the function of the first-layer module 21 can be divided into multiple functions, each module 22 of the second layer is used to implement one of the functions, the function corresponding to the second-layer module 22 can further be divided into multiple functions, each module 23 of the third layer is used to implement one of the functions, and so on, dividing the various functions within the application into module components 20 with N layers of nested relationships.
[0033] Specifically, the modules of the Mth layer of the module assembly 20 correspond one to one with the instruction groups of the Mth layer of the instruction tree. Figure 2 As shown, from top to bottom are the first layer, the second layer, and the third layer respectively. The instruction manager 10 is connected to the instruction group of the first layer. The instruction group of the first layer corresponds to the module 21 of the first layer of the application. The instruction group of the first layer is a collection of instruction instances generated in the module 21 of the first layer; the module 21 of the first layer is embedded with the module 22 of the second layer, and the instruction group of the first layer is embedded with the instruction group of the second layer. The instruction group of the second layer corresponds to the module 22 of the second layer, and the instruction group of the second layer is a collection of instruction instances generated in the module of the second layer, and so on. Therefore, the grouping of the instruction tree corresponds to the division of each module in the application. The execution of an instruction group indicates that all instruction instances generated by the corresponding module in the application are executed, so that the instruction instances generated by the application are managed according to the module division method, which improves the management efficiency of the instruction instances and further improves the accuracy and efficiency of the operation of the energy storage converter.
[0034] This embodiment sets an instruction manager for managing an instruction tree with N layers of nested relationships and a module component with N layers of nested relationships in the control device of the energy storage inverter. The instruction group of the first layer embeds the instruction group of the second layer, and the instruction group of the second layer continues to embed the instruction group of the third layer, and so on. When there is no embedded instruction group in the instruction group, only at least one instruction instance is embedded, thereby obtaining an instruction tree with N layers of nested relationships, so that the instruction instances can be effectively managed by the instruction manager, thereby improving the efficiency of instruction instance management. At the same time, the modules of the Mth layer of the module component correspond one-to-one with the instruction groups of the Mth layer of the instruction tree, and are also set in a layer-by-layer embedding manner, so that the instructions of the energy storage inverter are set according to the division of the module components, so that the energy storage inverter can execute specific instruction instances stably and effectively in module order, thereby improving the accuracy and efficiency of the operation of the energy storage inverter, thereby improving the efficiency and safety of the energy storage system.
[0035] Specifically, the instruction manager connects to the communication port of the application layer. The instruction manager is established when the software starts and is globally unique. It is destroyed when the software exits. At the same time, instruction groups in the instruction tree are created when needed. After all instruction instances in the instruction group are executed, they are removed from the instruction manager and then destroyed. Among them, each instruction instance or instruction group will return the execution result to the application layer for processing so that the application layer can execute subsequent business logic. The instruction manager is a special instruction group that is at the top level of the instruction tree.
[0036] Specifically, the instruction manager manages the instruction tree in the following way: record the creation time of each instruction group, sort the instruction groups according to the time sequence of the instruction group creation, and give priority to executing the instruction groups with earlier creation time. When the instruction manager determines that an instruction group needs to be executed, the instruction group is executed as a whole, wherein the instruction manager sends the specific instruction instances in the instruction group to the lower computer, i.e., the energy storage inverter, in sequence according to the time sequence of creation. The energy storage inverter executes according to the received instruction instances and returns a response result; wherein, the successful execution of the instruction instance currently executed by the energy storage inverter is a prerequisite for the subsequent instruction instances to be sent to the energy storage inverter for execution. If the execution result of an instruction instance in the instruction group is returned as failure, the execution of the remaining instruction instances in the instruction group is stopped, and the instruction group is considered to have failed to execute as a whole. The instruction group returns the failure result to the instruction group at the upper level, and uploads it step by step until it reaches the instruction manager. The instruction manager removes the instruction group of the first level that failed to execute from the queue.
[0037] In one embodiment, when there are embedded instruction groups in the instruction group, at least one instruction group embeds at least one instruction instance, that is, the instruction group in this part includes the instruction group and the instruction instance.
[0038] like Figure 3 As shown, it is a structural diagram between the instruction manager and the instruction tree in the control device of the energy storage converter provided by the embodiment of the present disclosure, such as Figure 4 FIG. 1 is a schematic diagram showing the structure of the instruction manager, instruction tree, and module components in the control device of the energy storage converter provided by the embodiment of the present disclosure. Figure 3 、 Figure 4 In the description, each instruction group in the instruction tree includes an instruction instance. In actual situations, it can be adjusted according to the creation of actual instruction instances. One of the instruction groups in the instruction tree may include the instruction instance, or multiple instruction groups in the instruction tree may include the instruction instance.
[0039] Specifically, the instruction manager 10 connects the instruction group of the first layer and the instruction instance of the first layer, the instruction group of the first layer continues to embed the instruction group of the second layer and the instruction instance of the second layer, the instruction group of the second layer can continue to embed the instruction group of the third layer and the instruction instance of the third layer, the instruction group of the second layer can also only embed the instruction instance of the third layer, and the instruction group of the third layer continues to embed the instruction instance. Figure 3 The third layer of the instruction tree can further embed instruction groups. The figure only shows a three-layer structure and does not limit the scope of protection of this embodiment. In other words, when the Mth layer of the instruction tree includes an instruction instance, the instruction instance of the Mth layer of the instruction tree is embedded in an instruction group at the M-1th layer.
[0040] Specifically, if Figure 4 As shown, a part of the instruction group is not only an embedded instruction group, but also an embedded instruction instance. The instruction instance is a separate instruction instance in a module of the application. The function of the instruction instance is different from that of other modules embedded in the module, and the function corresponding to the instruction instance does not need to be further divided. Among them, the instruction instance of the first layer of the instruction tree is a separate instruction instance in the application except for the instruction group of the first layer. The function of the instruction instance is different from that of the module 21 of the first layer, and the function corresponding to the instruction instance does not need to be further divided. Therefore, the instruction instance exists independently and is set under the instruction manager; the instruction instance of the second layer is a separate instruction instance in the instruction group of the first layer except for the module 22 of the second layer. The function of the instruction instance is different from that of the module 22 of the second layer, and the function corresponding to the instruction instance can be realized without further division; and so on.
[0041] In one embodiment, the instruction manager and the instruction group both include pointers, the pointer of the instruction manager points to the instruction group of the first layer of the instruction tree, and the pointer of the instruction group of the M-1 layer of the instruction tree points to an embedded instruction group or an instruction instance of the M layer; when an instruction group of the M layer is pointed to by the pointer of the instruction group of the M-1 layer, the pointer of the instruction group of the M layer continues to point to an embedded instruction group or an instruction instance until the pointer points to an instruction instance; wherein, the instruction instance pointed to by the pointer is the instruction being executed.
[0042] Specifically, when the instruction manager sends a specific instruction instance in the instruction tree to the lower computer, i.e., the energy storage converter, for execution, the pointer of the instruction manager points to the instruction group of the first layer, the pointer of the instruction group of the first layer points to the instruction group of the second layer, and so on, until the instruction instance is pointed to by the pointer of the instruction group of the upper layer. Figure 3 For illustration purposes, the structural diagram between the instruction manager and the instruction tree is shown. When the second-level instruction instance is sent to the lower computer, i.e., the energy storage converter, for execution, the instruction manager points to the instruction group of the first level, and the pointer of the instruction group of the first level directly points to the instruction instance. When the third-level instruction instance is sent to the lower computer for execution, the instruction manager points to the instruction group of the first level, and the pointer of the instruction group of the first level points to the instruction group of the second level, and the pointer of the instruction group of the second level directly points to the instruction instance. The indication method for other instruction instances is the same. In other words, this embodiment can enable the instruction manager to point to specific instruction instances step by step through the pointer method, thereby facilitating the management of the instruction manager and improving the management efficiency of the instruction manager, so that each instruction instance can be stably executed in sequence, improving the accuracy and efficiency of the operation of the energy storage converter, and thus improving the efficiency and safety of the energy storage system.
[0043] Specifically, the instruction manager and instruction group use queues and pointers to determine the instruction instance being executed. The queue is the form of the instruction instance embedded in the instruction group, ensuring the controllable state and synchronous execution of each instruction instance. Each instruction group contains a queue and a pointer to the instruction instance being executed. The instruction group and instruction instance both implement the interface functions defined in the Icmd interface and design an instruction interface. The instruction interface contains two pure virtual interface functions: read and write. The read function is used to process the response data received from the lower computer and feedback the status of the current instruction, including idle, busy, and completed. The write function is used to send the instruction instance to the lower computer. When a new instruction instance or instruction group is created, the status is initialized to idle. After the instruction group sends the instruction instance, the status is busy while waiting for a reply. After the instruction instance receives the expected data, the status changes to completed, and the instruction manager can then execute the next instruction.
[0044] Specifically, when the instruction manager receives a response from the lower computer, i.e., the energy storage converter, it assigns the current instruction instance within it to process the response data. If the current instruction instance is an instruction group, the instruction group assigns it to the current instruction instance within the instruction group for processing, and so on, step by step, until the corresponding specific instruction instance is found. This embodiment uses the singleton pattern to design the instruction manager, which includes a pointer to the current instruction instance. When a new instruction instance is queued in the instruction queue, it checks whether there is an instruction instance currently being executed. If not, it takes the top instruction from the instruction queue and runs it.
[0045] When a command instance is sent to a slave computer, the command manager pointer points to the current command instance, waiting for a response from the slave computer. When the command manager receives a command response from the slave computer, it assigns the current command instance to process the reply message. The current command instance returns the processing results to the command manager layer by layer. The command manager determines whether the execution of the current command instance is complete. If so, it extracts the next command instance from the command queue and executes it, gradually adjusting the current command pointer to the next command instance. When a command instance completes, the next command instance is extracted from the command queue and executed. If there are no command instances in the command queue that can be executed, the command manager status is changed to idle.
[0046] In one embodiment, Figure 5 As shown, a structural diagram between the instruction manager and the firmware download instruction group in the control device of the energy storage converter provided by an embodiment of the present disclosure is shown; wherein, the number of layers N of the instruction tree is 2, the instruction group of the first layer includes the firmware download instruction group, and the instruction group of the second layer includes the programming instruction group; the firmware download instruction group is embedded in the instruction manager, and the firmware download instruction group is embedded with the programming instruction group, programming preparation instruction, Flash erase instruction, and verification instruction; the programming instruction group is embedded with multiple firmware data instructions.
[0047] Specifically, this embodiment defines the firmware burning process of the lower computer chip, i.e., the energy storage converter chip, including: the instruction manager of the control device of the energy storage converter sends programming preparation instructions, flash erase instructions, firmware download instructions 1, firmware download instructions 2, firmware download instructions 3, and verification instructions in sequence, and the lower computer executes and returns the results according to the programming preparation instructions, flash erase instructions, firmware download instructions 1, firmware download instructions 2, firmware download instructions 3, and verification instructions in sequence; wherein, during the firmware download process of the lower computer, part of the bin file of the original firmware download instruction is divided into a plurality of firmware download instructions arranged in sequence and executed in sequence. For ease of management, the control device of the energy storage converter compiles these firmware download instructions into a group of programming instruction groups, which are embedded in the firmware download instruction group and sent for execution as a whole. Other programming preparation instructions, flash erase instructions, and verification instructions are sent for execution as separate instruction instances embedded in the firmware download instruction group. Figure 6 As shown, a schematic diagram of the interaction between the control device of the energy storage converter and the energy storage converter provided by the embodiment of the present disclosure includes the following steps:
[0048] Step 101: The firmware download instruction group sends an edit preparation instruction to the energy storage converter, and the energy storage converter returns a successful response result.
[0049] Step 102: The firmware download instruction group sends a flash erase instruction to the energy storage converter, and the energy storage converter returns a successful response result.
[0050] In step 103, the programming instruction group sends firmware data instruction 1 to the energy storage inverter, and the energy storage inverter returns a successful response. The programming instruction group sends firmware data instruction 2 to the energy storage inverter, and the energy storage inverter returns a successful response. The programming instruction group sends firmware data instruction 3 to the energy storage inverter, and the energy storage inverter returns a successful response. This continues in this manner until all firmware data instructions in the editing instruction group are sent. Specifically, the figure uses three firmware data instructions as an example, which does not limit the scope of protection of this solution. In actual applications, the number of firmware data instructions can be set according to actual needs and can be one or more.
[0051] Step 104: The firmware download instruction group sends a verification instruction to the energy storage converter, and the energy storage converter returns a successful response result.
[0052] Specifically, if an instruction fails during execution, the firmware download instruction group will report the instruction failure result to the instruction manager. The instruction manager will no longer execute other instructions in the firmware download instruction group, and will return the failure result of the firmware download instruction to the application layer and deliver it to the user for processing.
[0053] This embodiment implements the execution process of firmware data instructions between the control device of the energy storage inverter and the energy storage inverter, thereby enabling the energy storage inverter to write firmware data in sequence, so that the energy storage inverter can stably and effectively carry out the process of writing firmware data, improve the accuracy of the energy storage inverter writing firmware data, further improve the accuracy of the subsequent operation of the energy storage inverter, and thus improve the efficiency and safety of the energy storage system.
[0054] Another embodiment of the present disclosure discloses a control method for an energy storage converter, which is applied to the control device of the energy storage converter of the above embodiment; the method includes: sending a target instruction instance to a lower computer, so that the lower computer can run according to the target instruction instance and return a response result; the target instruction instance is an instruction instance in an instruction tree; receiving the response result returned by the lower computer, and when the response result is that the instruction instance is successfully executed, determining that the unexecuted instruction instance in the instruction tree is the target instruction instance, and continuing to execute the step of sending the target instruction instance to the lower computer. This embodiment uses the above-mentioned instruction manager to manage the instruction instances in the instruction tree, so that the energy storage converter can execute the instruction instances in sequence when executing them, ensuring that the energy storage converter can stably and effectively execute each instruction instance, improving the accuracy and efficiency of the operation of the energy storage converter, and thus improving the efficiency and safety of the energy storage system.
[0055] like Figure 7 FIG. 1 is a flow chart of a control method for an energy storage converter according to an embodiment of the present disclosure. The control method for an energy storage converter includes the following steps:
[0056] Step 201: Send the target instruction instance to the lower computer.
[0057] Specifically, in this embodiment, the execution subject is the control device of the energy storage inverter, that is, the upper computer. The instruction manager of the control device of the energy storage inverter determines in the instruction tree that the instruction instance to be executed is the target instruction instance, that is, an instruction instance in the target instruction instance instruction tree, and sends the target instruction instance to the lower computer, that is, the energy storage inverter, so that the energy storage inverter can run according to the target instruction instance and return a response result.
[0058] Step 202: Receive the response result returned by the lower computer.
[0059] Among them, the lower computer executes according to the received target instruction instance, and returns a response result to the instruction manager of the control device of the energy storage converter when the instruction execution is successful or failed. The response result includes two situations: successful execution of the instruction and failed execution of the instruction.
[0060] Step 203 , determining whether the response result is a successful instruction execution or a failed instruction execution; if the instruction instance is successfully executed, proceed to step 204 .
[0061] Step 204: Determine that an unexecuted instruction instance in the instruction tree is a target instruction instance. After step 204, return to step 201 to continue execution.
[0062] Specifically, the execution order of the instruction instances in the instruction tree is arranged in the order of creation time. When an instruction instance is executed successfully, the next instruction instance is determined in the time sequence, and the next instruction instance is sent to the lower computer as the target instruction instance for the lower computer to execute the next instruction instance.
[0063] In one embodiment, the host computer is an energy storage converter, and the instructions that the energy storage converter needs to execute are managed through the instruction manager, thereby improving the accuracy and efficiency of the energy storage converter in executing instructions, thereby improving the efficiency and safety of the energy storage system.
[0064] This embodiment sends the target instruction instance to the lower computer for execution and returns a response result. When the response result is that the instruction is executed successfully, an unexecuted instruction instance in the instruction tree is determined to be the target instruction instance and continues to be sent to the lower computer for execution. After one instruction instance is executed, the next instruction instance is executed, so that the instruction trees in the instruction tree can be executed in sequence, thereby improving the accuracy and efficiency of the execution of the lower computer.
[0065] In one embodiment, after receiving the response result returned by the lower computer, it also includes: delivering the response result to the target instruction instance, so that the target instruction instance reports the response result to the instruction group where the target instruction instance is located; when the response result is that the instruction instance is executed successfully, determining that the unexecuted instruction instance in the instruction tree is the target instruction instance, and continuing to execute the step of sending the target instruction instance to the lower computer, including: when the response result is that the instruction instance is executed successfully, judging whether there is an unexecuted instruction instance in the instruction group where the target instruction instance is located, if so, the instruction group where the target instruction instance is located determines an unexecuted instruction instance as the target instruction instance, and continues to execute the step of sending the target instruction instance to the lower computer; if not, the instruction group where the target instruction instance is located continues to report the message that the instruction group is executed to the instruction group of the upper layer, so that the instruction group of the upper layer determines the instruction instance in another embedded instruction group as the target instruction instance or the instruction group of the upper layer determines another embedded instruction instance as the target instruction instance, and continues to execute the step of sending the target instruction instance to the lower computer.
[0066] like Figure 8 FIG. 1 is a flow chart of a control method for an energy storage converter according to an embodiment of the present disclosure. The control method for an energy storage converter includes the following steps:
[0067] Step 301: Send the target instruction instance to the lower computer.
[0068] Step 302: Receive the response result returned by the lower computer.
[0069] Step 303: Deliver the response result to the target instruction instance, so that the target instruction instance reports the response result to the instruction group where the target instruction instance is located.
[0070] Specifically, after receiving the response result returned by the lower computer, the instruction manager of the control device of the energy storage converter directly delivers the response result to the target instruction instance, that is, the instruction instance corresponding to the response result.
[0071] Step 304: Determine whether the response result is that the instruction is executed successfully or the instruction instance fails to execute.
[0072] Specifically, the instruction group where the target instruction instance in the control device of the energy storage converter is located determines whether the response result is successful instruction execution or failed instruction execution, and proceeds to step 305 if the instruction instance is successfully executed.
[0073] Step 305 : Determine whether there is an unexecuted instruction instance in the instruction group where the target instruction instance is located.
[0074] Specifically, the target instruction instance reports the response result to the instruction group where the target instruction instance is located. The instruction group determines whether the instruction execution is successful or failed based on the response result. If the instruction execution is successful, the instruction group determines whether there are any unexecuted instruction instances in the group. If so, it enters step 306, and the instruction group where the target instruction instance is located determines an unexecuted instruction instance as the target instruction instance. The order within the instruction group is determined according to the time sequence of the instruction instance creation; if not, it enters step 307, and the instruction group where the target instruction instance is located continues to report the message of the completion of the execution of the instruction group to the instruction group of the upper layer.
[0075] In step 306 , the instruction group where the target instruction instance is located determines an unexecuted instruction instance as the target instruction instance. After step 306 , the process proceeds to step 301 .
[0076] Specifically, when the instruction group where the target instruction instance is located determines that an unexecuted instruction instance is the target instruction instance, the instruction group only needs to point the pointer to the unexecuted instruction instance, and the pointer pointing relationship between the instruction manager and the instruction group remains unchanged.
[0077] In step 307, the instruction group containing the target instruction instance reports the completion of the instruction group execution to the instruction group at the next higher level, allowing the instruction group at the next higher level to determine the instruction instance in another embedded instruction group as the target instruction instance, or for the instruction group at the next higher level to determine the embedded instruction instance as the target instruction instance. After step 307, the process proceeds to step 301.
[0078] Specifically, when the instruction group where the target instruction instance is located does not have an unexecuted instruction instance, the instruction group where the target instruction instance is located continues to report the message that the instruction group has been executed to the instruction group of the upper layer, so that the instruction group of the upper layer determines an instruction instance as the target instruction instance within its group according to the time sequence of creation, or the instruction group of the upper layer determines an instruction instance within an instruction group as the target instruction instance within its group according to the time sequence of creation, and continues to execute step 301.
[0079] Specifically, when the instruction group of the upper layer determines an instruction instance as the target instruction instance within its group according to the time sequence of creation, the pointer pointing relationship between the instruction manager and the instruction group of the upper layer remains unchanged, and the pointer of the instruction group of the upper layer points to the new target instruction instance; when the instruction group of the upper layer determines an instruction instance within its group as the target instruction instance according to the time sequence of creation, the pointer pointing relationship between the instruction manager and the instruction group of the upper layer remains unchanged, the pointer of the instruction group of the upper layer points to the new instruction group, and the pointer of the new instruction group points to the new target instruction instance.
[0080] This embodiment determines whether there are any unexecuted remaining instructions in the instruction group corresponding to the target instruction instance when the target instruction instance is successfully executed. If there are any unexecuted remaining instructions, an instruction is selected from the remaining instructions for execution. If there are no unexecuted remaining instructions, the instruction group is reported to the upper layer to re-determine a new instruction group or a new instruction instance for execution, thereby realizing the sequential execution of instructions in the instruction tree and improving the accuracy and efficiency of the execution of the lower computer.
[0081] In one embodiment, the control method of the energy storage inverter also includes: when the response result is that the execution of the instruction instance fails, the instruction group where the target instruction instance is located reports the message of the instruction group execution failure to the instruction manager layer by layer, and the instruction manager discards the instruction group corresponding to the target instruction instance in the first-level instruction group of the instruction tree, and takes the next unexecuted instruction instance in the instruction tree as the target instruction instance, and continues to execute the step of sending the target instruction instance to the lower computer.
[0082] like Figure 9 FIG. 1 is a flow chart of a control method for an energy storage converter according to an embodiment of the present disclosure. The control method for an energy storage converter includes the following steps:
[0083] Step 401: Send the target instruction instance to the lower computer.
[0084] Step 402: Receive the response result returned by the lower computer.
[0085] Step 403 , determining whether the response result is the successful execution of the instruction or the successful or failed execution of the instruction instance; if the instruction instance is successfully executed, proceed to step 404 ; if the instruction instance fails to execute, proceed to step 405 .
[0086] Step 404: Determine that an unexecuted instruction instance in the instruction tree is a target instruction instance. After step 404, return to step 401 to continue execution.
[0087] In step 405, the instruction group containing the target instruction instance reports the instruction group execution failure to the instruction manager layer by layer. The instruction manager discards the instruction group corresponding to the target instruction instance in the first-level instruction group of the instruction tree and selects the next unexecuted instruction instance in the instruction tree as the target instruction instance. After step 405, the process returns to step 401 to continue execution.
[0088] Specifically, when the response result is that the instruction execution failed, the instruction group where the target instruction instance is located reports the message of the instruction group execution failure to the instruction manager layer by layer, and the instruction manager discards the instruction group corresponding to the target instruction instance in the first-level instruction group of the instruction tree. That is, through reporting layer by layer, the instruction manager can know which specific instruction group in the first-level instruction group has the failure. Therefore, the instruction manager stops all the first-level instruction groups corresponding to the target instruction instance, and takes the next unexecuted instruction instance in the instruction tree as the target instruction instance, which can be an instruction instance embedded in the instruction manager, or the pointer of the instruction manager points to another instruction group in the first layer, and the other instruction group continues to point to the embedded second-level instruction group or instruction instance until it points to a specific instruction instance.
[0089] This embodiment improves fault handling efficiency and the accuracy and efficiency of execution on the lower computer by causing the instruction manager to discard the instruction group corresponding to the target instruction instance in the first-level instruction group of the instruction tree when the target instruction instance fails to execute, and re-determine a new instruction instance in the instruction tree as the target instruction instance to continue execution.
[0090] In one embodiment, the present application relates to an electronic device, such as Figure 10 As shown, it includes: at least one processor 501; and a memory 502 that is communicatively connected to the at least one processor 501; wherein the memory stores instructions that can be executed by the at least one processor 501, and the instructions are executed by the at least one processor 501 so that the at least one processor 501 can execute the above-mentioned control method of the energy storage converter.
[0091] The memory 502 and processor 501 are connected using a bus. The bus can include any number of interconnected buses and bridges, connecting various circuits of one or more processors 501 and memory 502. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor 501 is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor 501.
[0092] The processor 501 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 502 can be used to store data used by the processor when performing operations.
[0093] An embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0094] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps in the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0095] An embodiment of the present application relates to a computer program product, including computer instructions, which implement the above-mentioned control method for the energy storage converter when executed by a processor.
[0096] Those skilled in the art will appreciate that the above-described embodiments are specific examples for implementing the present disclosure, and that in actual applications, various changes in form and detail may be made thereto without departing from the spirit and scope of the present disclosure. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope defined in the claims.
Claims
1. A control device for an energy storage converter, characterized in that: include: An instruction manager, wherein the instruction manager is configured to manage an instruction tree having an N-layer nested relationship; The N is an integer greater than 0; the control device of the energy storage converter also includes a module component having an N-layer nested relationship; The Mth layer of the instruction tree includes at least one instruction group; M is an integer greater than 0, and M is less than or equal to N; The instruction group of the Mth layer of the instruction tree is embedded in an instruction group of the M-1th layer; when there is no embedded instruction group in the instruction group, the instruction group has at least one instruction instance embedded therein; The Mth layer of the module component includes at least one module; the modules of the Mth layer of the module component are embedded in the modules of the M-1th layer; the modules of the Mth layer of the module component correspond one-to-one to the instruction groups of the Mth layer of the instruction tree.
2. The control device of the energy storage converter according to claim 1, characterized in that: In the case that there are embedded instruction groups in the instruction groups, at least one of the instruction groups embeds at least one instruction instance.
3. The control device of the energy storage converter according to claim 1 or 2, characterized in that: The instruction manager and the instruction group both include a pointer, the pointer of the instruction manager points to the instruction group of the first layer of the instruction tree, and the pointer of the instruction group of the M-1th layer of the instruction tree points to an embedded instruction group or an instruction instance of the Mth layer; When an instruction group at the Mth layer is pointed to by a pointer to an instruction group at the M-1th layer, the pointer to the instruction group at the Mth layer continues to point to an embedded instruction group or an instruction instance until the pointer points to an instruction instance; wherein, the instruction instance pointed to by the pointer is the instruction being executed.
4. The control device of the energy storage converter according to claim 2, characterized in that: The N is 2; the instruction group of the first layer includes a firmware download instruction group, and the instruction group of the second layer includes a programming instruction group; the firmware download instruction group is embedded in the instruction manager, and the firmware download instruction group is embedded with the programming instruction group, programming preparation instructions, erase Flash instructions, and verification instructions; the programming instruction group is embedded with multiple firmware data instructions.
5. A control method for an energy storage converter, characterized in that: A control device for an energy storage converter according to any one of claims 1 to 4; the method comprising: Sending a target instruction instance to a lower computer, so that the lower computer runs according to the target instruction instance and returns a response result; the target instruction instance is an instruction instance in the instruction tree; Receive the response result returned by the lower computer, and when the response result is that the instruction instance is executed successfully, determine that the unexecuted instruction instance in the instruction tree is the target instruction instance, and continue to execute the step of sending the target instruction instance to the lower computer.
6. The control method of the energy storage converter according to claim 5, characterized in that: After receiving the response result returned by the lower computer, the method further includes: Delivering the response result to the target instruction instance, so that the target instruction instance reports the response result to the instruction group where the target instruction instance is located; When the response result is that the instruction instance is executed successfully, determining that the unexecuted instruction instance in the instruction tree is a target instruction instance, and continuing to execute the step of sending the target instruction instance to the lower computer, includes: In the case where the response result is that the instruction instance is executed successfully, it is determined whether there is an unexecuted instruction instance in the instruction group where the target instruction instance is located. If so, the instruction group where the target instruction instance is located determines an unexecuted instruction instance as the target instruction instance, and continues to execute the step of sending the target instruction instance to the lower computer; If it does not exist, the instruction group where the target instruction instance is located will continue to report the message of completion of the execution of the instruction group to the instruction group of the upper layer, so that the instruction group of the upper layer can determine the instruction instance in another embedded instruction group as the target instruction instance or the instruction group of the upper layer can determine the other embedded instruction instance as the target instruction instance and continue to execute the step of sending the target instruction instance to the lower computer.
7. The control method of the energy storage converter according to claim 5 or 6, characterized in that: The method comprises: In the case where the response result is that the execution of the instruction instance fails, the instruction group where the target instruction instance is located reports the message of the instruction group execution failure to the instruction manager layer by layer, and the instruction manager discards the instruction group corresponding to the target instruction instance in the first-level instruction group of the instruction tree, and takes the next unexecuted instruction instance in the instruction tree as the target instruction instance, and continues to execute the step of sending the target instruction instance to the lower computer.
8. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the control method of the energy storage converter as described in any one of claims 5 to 7.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the control method of the energy storage converter described in any one of claims 5 to 7 is implemented.
10. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the control method of the energy storage converter according to any one of claims 5 to 7.
