Method and system for shortening starting time of power distribution terminal
By adopting a hierarchical parameter data structure in the distribution terminal, directly reading the configuration parameters in the memory, the problem of too long starting time of the distribution terminal is solved, and fast response and intelligent distributed protection are achieved.
Patent Information
- Application Number
- CN202411566933.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-10
AI Technical Summary
After power-on or reset, the distribution terminal has a large number of parameters and different formats, which leads to a long analysis time and is difficult to respond quickly, especially in complex grid structures, which cannot meet the user's startup time requirements.
The parameter data structure adopts a hierarchical structure, and the parameters are obtained and analyzed by the upper computer according to the distribution line topology diagram, and the parameter data structure is generated, and sent to the distribution terminal for storage in the reserved memory. The distribution terminal is powered on or Directly read and configure during reset to avoid parameter parsing.
It significantly shortens the startup time of the power distribution terminal, from a few seconds to a few tens of milliseconds, quickly entering the intelligent distributed protection state.
Smart Images

Figure CN119298391A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power distribution circuit devices, and in particular relates to a method for shortening the startup time of a power distribution terminal and a system for implementing the method. Background Art
[0002] As power distribution terminals become more and more intelligent, their configuration parameters are becoming more and more complex, such as connection relationships, protection parameters, measurement parameters, communication parameters, control parameters, alarm parameters, log parameters, etc. The current parameter configuration depends on subscription information, which has a variety of formats and is not a single, fixed-length format. It needs to be encoded and packaged according to certain rules.
[0003] After the power distribution terminal is powered on or reset, it first performs an internal self-test to check the integrity of the hardware and software, such as the CPU, memory, storage, communication interface, etc. If a fault is found, it will alarm or enter the fault mode. After the self-test passes, the terminal will initialize the internal parameters and status, such as loading configuration parameters, clock synchronization, and establishing connections with other devices.
[0004] The power distribution terminal needs to process for a period of time, read the current configuration parameters from the memory, unpack and parse the variables required by the program according to the coding rules, and perform secondary assignment to the used structure before entering the normal protection working state. Due to the large number of parameters, different formats and lengths of various parameters, and long parsing time, it is difficult to respond to the situation of immediately triggering a fault in the first time.
[0005] As the main protection terminal on the distribution line, the distribution terminal has a relatively short requirement for power-on startup and reset startup time. Especially in the application scenario of using intelligent distributed feeder automation function in a relatively complex grid structure, the current parameter analysis time may exceed user needs. Summary of the invention
[0006] The present invention has been proposed to solve the above-mentioned problems.
[0007] In order to achieve the purpose of the invention, the present invention adopts the following technical solutions: On the one hand, the present invention provides a method for shortening the startup time of a power distribution terminal, comprising: The host computer obtains and parses the parameters for each distribution terminal according to the distribution line topology diagram, generates a set parameter data structure, and sends the parameters to the distribution terminal in the format of the parameter data structure.
[0008] The power distribution terminal reserves a memory according to the set parameter data structure, and stores the parameters sent by the host computer in the reserved memory after receiving the parameters.
[0009] When the power distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and the parameters therein are used for configuration.
[0010] Furthermore, the parameter data structure adopts a hierarchical structure, including structure 1, structure 2 and structure 3.
[0011] The content stored in the structure 1 includes the ID, address and attributes of the distribution terminal.
[0012] The structure 2 stores the structure 1, the structure 2 address of the distribution terminal connected in parallel with the distribution terminal, and the structure 2 address of the distribution terminal connected in perpendicular direction with the distribution terminal.
[0013] The structure 3 stores the structure 1, the address of the structure 2 of the distribution terminal connected to both sides of the distribution terminal, the check code address, the structure 2 and the check code of the related distribution terminal.
[0014] The host computer sends structure 3 to the power distribution terminal.
[0015] Furthermore, for each power distribution terminal, the process of acquiring and parsing parameters and generating a set parameter data structure includes the following steps: Step 1: Set the targeted distribution terminal as the central distribution terminal; Step 2, obtain the ID, address and attributes of the central power distribution terminal, write them into the structure 1 of the central power distribution terminal, and write the structure 1 into the structure 3 of the central power distribution terminal; Step 3: According to the topology diagram, obtain the distribution terminals A and B connected to both sides of the central distribution terminal. If one side is connected to two or more distribution terminals, select one of them; Step 4, generate structure 2 of distribution terminal A, write the address of structure 2 of A and structure 2 into structure 3 of central distribution terminal; Step 5: For the distribution terminal directly connected to A, generate structure 2 and write structure 3 of the central distribution terminal; repeat this step; Step 6: Generate structure 2 of distribution terminal B, and write the address of structure 2 of B and structure 2 into structure 3 of the central distribution terminal; Step 7: For the distribution terminal directly connected to B, generate structure 2 and write structure 3 of the central distribution terminal; repeat this step; Step 8: Calculate the check code of the structure 3 of the central power distribution terminal, and write the check code address and the check code into the structure 3 of the central power distribution terminal.
[0016] On the other hand, the present invention also proposes a system for shortening the startup time of a distribution terminal, comprising a host computer and a distribution terminal of a distribution line, wherein the host computer and the distribution terminal of the distribution line are connected via a network, and the host computer and the distribution terminal cooperate to implement the above method.
[0017] The host computer obtains and analyzes parameters for each distribution terminal according to the distribution line topology diagram, generates a set parameter data structure, and sends the parameters to the distribution terminal in the format of the parameter data structure.
[0018] The distribution terminal reserves a memory according to the set parameter data structure, and stores the parameters sent by the host computer in the reserved memory after receiving them; when the distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and the parameters therein are used for configuration.
[0019] Beneficial effect: By adopting the technical solution proposed in the present invention, the configuration parameters of the distribution terminal are parsed in the upper computer and transmitted to the memory of the distribution terminal. When the distribution terminal is started, the parameter data is read from the memory, and the application is directly pushed to use according to the agreed parameter data structure without parsing the parameters. The startup time of the distribution terminal is shortened from several seconds to tens of milliseconds, and the equipment quickly enters the intelligent distributed protection state after power-on. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is the topological diagram of the distribution line.
[0021] In the figure, K05 is a contact switch and the others are distribution terminals. DETAILED DESCRIPTION
[0022] Figure 1 The present invention is only further described in detail with reference to the embodiments. It is to be understood that the figure does not completely show the entire power distribution line topology, for example, the upper computer is not shown in the figure.
[0023] This embodiment provides a method for shortening the startup time of a power distribution terminal, including: The host computer obtains and parses the parameters for each distribution terminal according to the distribution line topology diagram, generates a set parameter data structure, and sends the parameters to the distribution terminal in the format of the parameter data structure.
[0024] The power distribution terminal reserves a memory according to the set parameter data structure, and stores the parameters sent by the host computer in the reserved memory after receiving the parameters.
[0025] When the power distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and the parameters therein are used for configuration.
[0026] An embedded system is usually configured in a power distribution terminal. The compilation rules of an embedded compiler are similar to those of a standard C / C++ compiler, but due to the resource limitations of embedded systems (memory, storage space, processing power), the use of some rules and options is more stringent and important, with more emphasis on resource management and code efficiency.
[0027] Little Endian is a way of storing multi-byte data in computer systems. In little endian mode, the least significant byte (LSB) of a multi-byte value is stored at the lowest memory address, and the most significant byte (MSB) is stored at the highest memory address. In other words, the low-order bytes of the data are arranged at the low address end of the memory, and the high-order bytes are arranged at the high address end of the memory. For example, a 32-bit hexadecimal number 0x12345678 is stored in little endian mode as follows: 0x78 is stored at address 0x0000, 0x56 is stored at address 0x0001, 0x34 is stored at address 0x0002, and 0x12 is stored at address 0x0003. When reading data starting from the low address, the low-order part of the data is read first.
[0028] In this embodiment, the parameters are parsed according to the embedded compiler compilation rules. The host computer compiles data according to the reserved memory start address based on the embedded compiler memory allocation method, sorts the data in the form of parameter data structure, and stores it in little endian format.
[0029] The parameter data structure adopts a hierarchical structure, including structure 1, structure 2 and structure 3.
[0030] The contents stored in structure 1 include the ID, address, and attributes of the electrical terminal.
[0031] The content of structure 1 is as follows: Structure 2 stores structure 1, the structure 2 address of the distribution terminal connected in parallel with the distribution terminal, and the structure 2 address of the distribution terminal connected in perpendicular direction with the distribution terminal.
[0032] The content of structure 2 is as follows: The lengths of structure 1 and structure 2 are fixed values. In this embodiment, the terminal ID is 4 bytes, the terminal address is 4 bytes, and the attribute is 8 bytes, that is, the length of structure 1 is 16 (0x10) bytes, and the address of structure 2 is 4 bytes, that is, the length of structure 2 is 24 (0x18) bytes.
[0033] The structure 3 stores the structure 1, the structure 2 address and the check code address of the distribution terminal connected to both sides of the distribution terminal, and the structure 2 and the check code of the related distribution terminal.
[0034] The content of structure 3 is as follows: The check code address is used to quickly lock the size of the entire parameter data structure. There is no information such as length in the entire structure. The length is determined by the check code address to quickly check whether the parameters are complete.
[0035] The upper computer sends structure 3 to the power distribution terminal, and the power distribution terminal stores structure 3.
[0036] The parameter data structure can be a unified topology diagram connection relationship analysis, in which the distribution terminal can find its own position and configure according to the connection relationship. However, there are two problems with this approach: 1. The distribution terminal also needs to find its own position in the parameter data structure, and 2. If the line scale is large, the parameter data structure will take up a lot of storage space.
[0037] In this embodiment, a dedicated parameter data structure is established with each power distribution terminal as the center, and can be used directly.
[0038] The specific implementation is as follows: The host computer obtains and parses parameters for each distribution terminal according to the distribution line topology diagram, and generates a set parameter data structure, which includes the following steps: Step 1: Set the targeted distribution terminal as the central distribution terminal.
[0039] Step 2: Obtain the ID, address and attributes of the central power distribution terminal, write them into the structure 1 of the central power distribution terminal, and write the structure 1 into the structure 3 of the central power distribution terminal.
[0040] Step 3: According to the topology diagram, obtain the distribution terminals A and B on both sides of the central distribution terminal. If one side is connected to two or more distribution terminals, select one of them.
[0041] Step 4: Generate structure 2 of distribution terminal A, and write the address of structure 2 of A and structure 2 into structure 3 of the central distribution terminal.
[0042] Step 5: For the distribution terminal directly connected to A, generate structure 2 and write structure 3 of the central distribution terminal; repeat this step to traverse the distribution terminals on the A side of the central distribution terminal.
[0043] Step 6: Generate structure 2 of distribution terminal B, and write the address of structure 2 of B and structure 2 into structure 3 of the central distribution terminal.
[0044] Step 7: For the distribution terminal directly connected to B, generate structure 2 and write structure 3 of the central distribution terminal; repeat this step to traverse the distribution terminals on the B side of the central distribution terminal.
[0045] Step 8: Calculate the check code of the structure 3 of the central power distribution terminal, and write the check code address and the check code into the structure 3 of the central power distribution terminal.
[0046] See also Figure 1 In this embodiment, the above steps are described in detail with the power distribution terminal K02 as the center.
[0047] In step 1, the power distribution terminal K02 is set as the central power distribution terminal.
[0048] In step 2, the central power distribution terminal is K02, and parameters such as terminal ID, address, and attributes are not specified, and are represented by "K02", "K02 address", and "K02 attributes".
[0049] The structure 1 of the generated K02 is: Write the above structure 1 into the structure 3 of K02. Assuming the starting address is 0xA000000, the current structure 3 is as follows: For clarity of presentation, Structure 3 is shown in a vertically arranged table.
[0050] In structure 1 and structure 3, the terminal address is the address of the distribution terminal in the distribution line. In structure 2 and structure 3, the address of structure 2 is the starting storage address of structure 2 in structure 3.
[0051] In step 3, for the convenience of description, the two sides of K02 in the figure are called side A and side B.
[0052] According to the topology diagram, the power distribution terminals on both sides of K02 are K01, K06 and K03 respectively. There are two power distribution terminals on the A side, and one of them can be selected. In this embodiment, K01 is selected as the power distribution terminal A. There is only one power distribution terminal on the B side, and K03 is the power distribution terminal B.
[0053] In step 4, K01 is the power distribution terminal A, and the process of generating structure 2 of K01 is as follows: Step 11: Generate structure 1 of power distribution terminal K01: Step 12: According to the topology diagram, find the distribution terminals that are connected in parallel and vertically to K01. The direction radiating outward from the central distribution terminal is defined as the vertical direction, and the others are defined as the parallel direction.
[0054] In this embodiment, the power distribution terminal connected in parallel with K1 is K06, and there is no power distribution terminal connection in the vertical direction.
[0055] In step 13, the address of K06 structure 2 is pre-allocated. There is no power distribution terminal connected in the vertical direction, and its address is represented by 0.
[0056] Since structure 2 is fixed length, the address can be pre-allocated.
[0057] Step 14: Write the structure 1 and pre-allocated address of K01 into the structure 2 of K01: The structure 2 of the power distribution terminal K01 is generated as described above.
[0058] The address of the structure 2 and the structure 2 generated above are written into the structure 3 of K02.
[0059] The current structure 3 is as follows: In step 5, K02 and K06 are directly connected to the power distribution terminal A, namely K01. K02 has already appeared in structure 3 and will not be processed.
[0060] For the power distribution terminal K06, steps 11-14 are executed to generate structure 2, which is written into structure 3 of the central power distribution terminal.
[0061] The current structure 3 is as follows: 06, which is directly connected to the power distribution terminal K07, has already appeared in structure 3 and will not be processed.
[0062] So far, all the distribution terminals on the A side of the central distribution terminal K02 have been traversed.
[0063] In step 6, K03 is the distribution terminal B, and the same method as step 4 is used to generate the structure 2 of the distribution terminal K03, and the address of the structure 2 of K03 and the structure 2 are written into the structure 3 of the central distribution terminal.
[0064] The current structure 3 is as follows: Step 7 is similar to step 5, traversing all distribution terminals on the B side of the central distribution terminal K02, and writing their structure 2 into the structure 3 of the central distribution terminal K02.
[0065] The above steps generate a parameter data structure for the power distribution terminal K02, which does not include a check code.
[0066] Step 8: Calculate the check code of the generated structure 3, and write the check code address and the check code into the structure 3 of the central power distribution terminal.
[0067] The complete structure 3 is as follows: The above generates a complete parameter data structure.
[0068] When the distribution line is complex, the number of distribution terminals is huge, and the parameter data structure will occupy a lot of storage space. For this reason, in this embodiment, the relevant distribution terminals are the distribution terminals directly connected to terminals A and B, that is, structure 3 only includes the distribution terminals connected to the central distribution terminal at two levels. Figure 1 The power distribution terminal K09 is not included.
[0069] Figure 1 The topology shown is relatively simple. In a complex power distribution line, the method can be used to greatly reduce the storage space required for the structure 3.
[0070] In order to match the embedded system, the parameters are parsed according to the embedded compiler compilation rules; the host computer compiles the data according to the reserved memory start address based on the embedded compiler memory allocation method, sorts the data in the form of parameter data structure, and stores it in little-endian format. The parameter data structure generation method uses the memory allocation method of increasing bytes, which maximizes the small memory occupancy rate.
[0071] When the distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read to obtain the information and connection relationship of all distribution terminals related to the distribution terminal. There is no need to parse the parameters. After the CRC check is passed, it is used by address hanging, which greatly shortens the startup time.
[0072] When a new distribution terminal is added to the distribution line or a distribution terminal is removed, or the connection relationship of the distribution terminals changes, causing the topology structure to change, the upper computer detects the change and regenerates the set parameter data structure according to the new topology structure, and sends the parameters to the distribution terminal in the format of the parameter data structure to keep the parameters in the distribution terminal synchronized with the system.
[0073] On this basis, the present invention also proposes a system for shortening the startup time of a distribution terminal, including a host computer and a distribution terminal of a distribution line. The host computer and the distribution terminal of the distribution line are connected through a network. The host computer and the distribution terminal cooperate to implement the above-mentioned method of shortening the startup time of the distribution terminal.
[0074] The host computer obtains and parses the parameters for each distribution terminal according to the distribution line topology diagram, generates a set parameter data structure, and sends the parameters to the distribution terminal in the format of the parameter data structure.
[0075] The distribution terminal reserves a memory according to the set parameter data structure, and stores the parameters sent by the host computer in the reserved memory after receiving them; when the distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and the parameters therein are used for configuration.
Claims
1. A method for shortening the startup time of a power distribution terminal, characterized in that: include: The host computer obtains and analyzes the parameters for each distribution terminal according to the distribution line topology diagram, generates a set parameter data structure, and sends the parameters to the distribution terminal in the format of the parameter data structure; The power distribution terminal reserves a memory according to the set parameter data structure, and after receiving the parameters sent by the host computer, stores them in the reserved memory; When the power distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and the parameters therein are used for configuration.
2. The method according to claim 1, characterized in that: The parameter data structure adopts a hierarchical structure, including structure 1, structure 2 and structure 3. The content stored in the structure 1 includes the ID, address, and attributes of the electrical terminal. The structure 2 stores the structure 1, the structure 2 address of the distribution terminal connected in parallel with the distribution terminal, and the structure 2 address of the distribution terminal connected in a vertical direction with the distribution terminal. The structure 3 stores the structure 1, the address of the structure 2 of the distribution terminal connected to both sides of the distribution terminal, the check code address, the structure 2 of the relevant distribution terminal and the check code; The host computer sends structure 3 to the power distribution terminal for storage.
3. The method according to claim 2, characterized in that The host computer acquires and analyzes parameters for each distribution terminal according to the distribution line topology diagram, and generates a set parameter data structure, which includes the following steps: Step 1: Set the targeted distribution terminal as the central distribution terminal; Step 2, obtain the ID, address and attributes of the central power distribution terminal, write them into the structure 1 of the central power distribution terminal, and write the structure 1 into the structure 3 of the central power distribution terminal; Step 3: According to the topology diagram, obtain the distribution terminals A and B on both sides of the central distribution terminals A and B. If one side is connected to two or more distribution terminals, select one of them; Step 4, generate structure 2 of distribution terminal A, write the address of structure 2 of A and structure 2 into structure 3 of central distribution terminal; Step 5: For the distribution terminal directly connected to A, generate structure 2 and write structure 3 of the central distribution terminal; repeat this step to traverse the distribution terminals on the A side of the central distribution terminal; Step 6: Generate structure 2 of distribution terminal B, and write the address of structure 2 of B and structure 2 into structure 3 of the central distribution terminal; Step 7: For the distribution terminal directly connected to B, generate structure 2 and write structure 3 of the central distribution terminal; repeat this step to traverse the distribution terminals on the B side of the central distribution terminal; Step 8, calculating the check code of the structure 3 of the central power distribution terminal, and writing the check code address and the check code into the structure 3 of the central power distribution terminal; The generation structure 2 comprises the following steps: Step 11, generating a structure 1 of a power distribution terminal; Step 12: According to the topology diagram, find the distribution terminals that are connected in parallel and vertically to the distribution terminal. The direction radiating outward from the central distribution terminal is defined as the vertical direction, and the others are defined as parallel directions; Step 13: pre-allocate the address of the distribution terminal structure 2 connected in parallel and vertically with the distribution terminal; Step 14: Write structure 1 and the pre-allocated address into structure 2.
4. The method according to claim 3, characterized in that The relevant power distribution terminal is a power distribution terminal directly connected to terminals A and B.
5. The method according to claim 3, characterized in that: When the power distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and used through address hanging.
6. The method according to claim 5, characterized in that The parameters are parsed according to the compilation rules of the embedded compiler.
7. The method according to claim 6, characterized in that The host computer refers to the memory allocation method of the embedded compiler, starts compiling data according to the reserved memory start address, sorts the data in the form of parameter data structure, and stores it in little-endian format.
8. The method according to claim 1, characterized in that When the topology changes, the host computer regenerates the set parameter data structure and sends the parameters to the distribution terminal in the format of the parameter data structure.
9. A system for shortening the startup time of a power distribution terminal, comprising a host computer and a power distribution terminal of a power distribution line, wherein the host computer and the power distribution terminal of the power distribution line are connected via a network, and characterized in that: The host computer and the power distribution terminal cooperate to implement any method described in claims 1-8; The host computer obtains and analyzes parameters for each distribution terminal according to the distribution line topology diagram, generates a set parameter data structure, and sends the parameters to the distribution terminal in the format of the parameter data structure; The power distribution terminal reserves a memory according to the set parameter data structure, and after receiving the parameters sent by the host computer, stores them in the reserved memory; When the power distribution terminal is powered on or reset, the parameter data structure in the reserved memory is read and the parameters therein are used for configuration.