Power supply system management method, power supply system and computer readable storage medium

By using status flag variables in the power system to mark the assigned address, the target power module acquires and determines its software address, solving the software address reordering problem caused by changes or additions and deletions of the power module, ensuring the accuracy of data traceability and system stability.

CN118672377BActive Publication Date: 2024-12-13XIAN MEGMEET ELECTRICAL CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411143549.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-12-13
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

In the power supply system, when the software address of the power module is changed or added or deleted, the software address of all modules is rearranged, making it difficult for the monitoring unit to accurately trace and record data.

Method used

By using status flag variables in the power system to mark the assigned address, the target power module obtains the initial address and determines the target address, avoiding duplication of address and ensuring that the assigned address remains unchanged when adding or changing the module.

Benefits of technology

The data traceability and recording accuracy of power modules in the power supply system is realized, software address reordering is avoided, and system stability and maintenance efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672377B_ABST
    Figure CN118672377B_ABST
Patent Text Reader

Abstract

The present application discloses a management method of a power system, a power system and a computer-readable storage medium. The management method of the power system includes: the target power module obtains its initial address and the assigned address of at least one power module in the power system; according to the assigned address, the corresponding bit in the preset state flag variable is marked; based on the initial address and the assigned address, the target address of the target power module is determined from the state flag variable; the target address is used as the software address of the target power module. The target power module obtains its initial address and the assigned address of at least one power module in the power system, and then identifies the assigned address through the state flag variable, and assigns the address to the target power module, so that even if a new power module is added or changed in the power system, the address re-arrangement of the power module with the assigned address can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power system control technology, and in particular to a power system management method, a power system and a computer-readable storage medium. Background Art

[0002] In the power supply system, the power supply module generally uses a dial code or a hardware address board to assign the communication address of the power supply module. The assigned address is called a hardware address. The power supply module communication address can also be automatically assigned through the bus. The assigned address is called a software address. The advantage of the software address solution is that it can save the cost of the hardware address board or dial code in the power supply system. Most software address allocation solutions are based on the serial number of the power supply module or the serial number of the chip inside the power supply, and determine the software address of the power supply module in the power supply system through a certain queue relationship.

[0003] Although this solution can simplify the address allocation process of the power module, it still has limitations in diversified practical applications. For example, after the power module completes the automatic allocation of the software address, it will establish normal communication with the monitoring unit of the power system. At this time, the software addresses of all power modules depend on their serial numbers. In other words, if several power modules in the power system need to be changed or added, the new power modules added to the power system will cause the software addresses of all modules to be reordered, which will make the power module numbers before and after the change or addition and deletion of the module inconsistent, making it difficult for the monitoring unit to effectively trace and accurately record the power module data. Summary of the invention

[0004] The main technical problem solved by the present application is to provide a power system management method, a power system and a computer-readable storage medium, which can solve the technical problem that in the power system, changing or adding or deleting a power module will cause the software addresses of all power modules to be rearranged.

[0005] In order to solve the above technical problems, the present application provides a management method of a power supply system, wherein the power supply system includes a plurality of power supply modules, and the management method includes:

[0006] The target power module obtains its initial address and the already allocated address of at least one power module in the power system;

[0007] According to the allocated address, marking the corresponding bit in the preset state flag variable;

[0008] Based on the initial address and the allocated address, determining the target address of the target power module from the status flag variable;

[0009] The target address is used as the software address of the target power module.

[0010] Optionally, the determining the target address of the target power module from the status flag variable based on the initial address and the already allocated address includes:

[0011] Detect whether the allocated address recorded in the status flag variable is repeated with the initial address;

[0012] If there is a duplication, query at least one free address in the state flag variable, and select an address from the free addresses to set as the target address;

[0013] If there is no duplication, the initial address is set as the target address.

[0014] Optionally, the status flag variable includes a plurality of bits, and the step of querying at least one free address in the status flag variable includes:

[0015] Traversing the bits in the state flag variable in sequence;

[0016] When it is detected that the bit position does not belong to the flag position, the address corresponding to the bit position is determined to be the idle address.

[0017] Optionally, marking a corresponding bit in a preset state flag variable according to the allocated address includes:

[0018] Determining from the status flag variable the bit corresponding to the allocated address;

[0019] The bit corresponding to the allocated address is marked as the flag bit to determine that the allocated address has been recorded.

[0020] Optionally, the target power module obtains its initial address, including:

[0021] Acquire an address pre-stored in the target power module;

[0022] If the pre-stored address is a preset default value, executing a preset address allocation rule to determine the initial address;

[0023] If the pre-stored address is not the default value, the pre-stored address is used as the initial address.

[0024] Optionally, after the step of using the target address as the software address of the target power module, the method further includes:

[0025] The target address is associated with the slot of the target power module, so that the software address of the target power module is associated with the slot of the target power module.

[0026] Optionally, the associating the target address with the slot of the target power module so that the software address of the target power module is associated with the slot of the target power module further includes:

[0027] receiving an address setting instruction detected by the power supply system, and obtaining a positioning address matching the slot;

[0028] The target address is changed into the positioning address, and the positioning address is associated with the slot of the target power module, so that the positioning address is associated with the slot of the target power module.

[0029] Optionally, changing the target address to the positioning address includes:

[0030] In response to the positioning address satisfying a preset valid range, detecting whether the positioning address and the already allocated address in the status flag variable are repeated;

[0031] If there is no duplication, taking the target address as the software address of the target power supply;

[0032] If there is a duplication, the idle address in the state flag variable is queried, and the idle address is used as the software address of the target power supply.

[0033] Optionally, after using the location address as the software address of the target power module so that the location address is associated with the slot of the target power module, the method further includes:

[0034] Receiving a query instruction monitored by the power supply system, and generating a query result corresponding to the query instruction, wherein the query result includes operation information of the target power supply module and / or operation information of the slot;

[0035] The query result is returned to the power supply system.

[0036] In order to solve the above technical problems, another technical solution adopted by the present application is: a power supply system, the power supply system comprising:

[0037] A memory for storing executable program codes;

[0038] A processor is used to call and run the executable program code from the memory, so that the power supply system executes the management method as described in any one of the above.

[0039] To solve the above technical problems, another technical solution adopted in the present application is: a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the management method as described in any one of the above items is implemented.

[0040] Different from the prior art, the embodiment of the present application provides a method for managing a power supply system, the method comprising: the target power supply module obtains its initial address and the already assigned address of at least one power supply module in the power supply system; according to the already assigned address, the corresponding bit in the preset state flag variable is marked; based on the initial address and the already assigned address, the target address of the target power supply module is determined from the state flag variable; the target address is used as the software address of the target power supply module. The target power supply module obtains its initial address and the already assigned address of at least one power supply module in the power supply system, and then identifies the already assigned address through the state flag variable, and assigns the address to the target power supply module, so that even if a new power supply module is added or changed in the power supply system, the address rearrangement of the power supply module with the assigned address can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flowchart of the first embodiment of the power system management method of the present application;

[0042] Figure 2 It is a flowchart of the second embodiment of the power system management method of the present application;

[0043] Figure 3 It is a flowchart of a specific embodiment of determining the initial address of a target power module of the present application;

[0044] Figure 4 It is a schematic diagram of the architecture of a system frame of the first embodiment of the power supply system of the present application;

[0045] Figure 5 It is a flowchart of a first specific embodiment of the power system management method of the present application;

[0046] Figure 6 It is a flowchart of the third embodiment of the power system management method of the present application;

[0047] Fig. 7A It is a schematic diagram before the software address of the power system management method of the present application is set;

[0048] Figure 7B It is a schematic diagram after the software address of the power system management method of the present application is successfully set;

[0049] Figure 8 yes Figure 6 A detailed flow chart of step S670 is shown;

[0050] Fig. 9 This is a flowchart of an embodiment of a software address setting process executed inside a power module of the present application;

[0051] Fig.10 It is a flowchart of an implementation of the present application for querying the operating status of a target power module;

[0052] Fig.11 is an exemplary structural diagram of an embodiment of a power supply system of the present application;

[0053] Fig.12 It is an exemplary structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0054] The present application is described in detail below with reference to the accompanying drawings and implementation methods.

[0055] This embodiment takes into account that after the power module completes the automatic allocation of the software address, normal communication with the power system monitoring unit will be established. At this time, the software addresses of all power modules depend on the serial number (SerialNumber) SN code of the power module. In other words, if several power modules in the power system need to be changed or added or deleted, then the power module newly added to the power system will definitely cause the addresses of all power modules to be rearranged. For example, power modules No. 1, No. 2, No. 3, ..., No. n in the power system may not be the same power module as No. 1, No. 2, No. 3, ..., No. n before the change or addition or deletion, which will cause the monitoring unit to be unable to effectively trace and accurately record the data of the power module.

[0056] Therefore, in order to effectively trace and accurately record the data of the power module, the embodiment of the present application proposes an improved software address allocation method for the problem of software address re-arrangement caused by adding, deleting or changing the power module in the communication power system. When the power system is powered on for the first time, the software address of the power module can be automatically allocated; when the power module in the power system is changed or added, the power module normally existing in the power system keeps its software address unchanged, and the newly added power module actively matches the appropriate software address. This ensures that the monitoring unit can accurately trace and record data.

[0057] See also Figure 1 , Figure 1 1 is a flow chart of the first embodiment of the power system management method of the present application. It should be noted that if there is substantially the same result, the method of the present application is not limited to Figure 1 The process sequence shown is limited. Figure 1As shown, a method for managing a power system, the power system includes a plurality of power modules, and the method for managing the power system includes:

[0058] S110: The target power module obtains its initial address and an already allocated address of at least one power module in the power system.

[0059] Among them, the power supply system can be composed of several power supply modules, which are used to provide stable power supply for the equipment. For example, it can be a communication power supply system, or a computer power supply system, a medical equipment power supply system, a tram power supply system, etc. The target power supply module can be a power supply module that needs to be changed or added in the power supply system. The initial address can be an address pre-stored in the target power supply module. This initial address can be a pre-set software address for communicating with other power supply modules in the power supply system, or it can be a default address. The allocated address can indicate that the corresponding power supply module is using this software address, as well as the current status of the corresponding power supply module; for example, the allocated address can indicate the online status of the corresponding power supply module, and can also indicate offline, dormant, standby and other states.

[0060] In an exemplary embodiment, when the power system is powered on for the first time, at least one power module in the power system can send a corresponding data frame to the bus of the power system. The data frame can include address information and SN code. According to these data frames, the automatic allocation of software addresses can be completed, that is, the allocated address of at least one power module is obtained, so that communication can be established between power modules. Among them, the automatic allocation of software addresses of power modules when the power system is powered on for the first time can be completed by certain rules, such as the size relationship rule of SN code.

[0061] Then, when the target power module is powered on, the target power module can obtain the initial address pre-stored internally. At the same time, each power module in the power system will send its own data frame to the target power module through the power system bus. The target power module receives and parses these data frames. According to the parsing results, the assigned address of at least one power module can be obtained.

[0062] Among them, this embodiment can allocate software addresses for multiple power modules that need to be changed or added. Therefore, the allocated addresses in this embodiment can include addresses allocated according to certain rules when the power system is powered on for the first time, and can further include addresses allocated by this embodiment.

[0063] S120: Mark corresponding bits in a preset state flag variable according to the allocated address.

[0064] Among them, the status flag variable can be used to identify the allocated address and / or the power module corresponding to the allocated address. For example, it can be used to identify the online power module so that when the target power module is assigned an address, the allocated target address will not be repeated with the software address of the online power module.

[0065] In an exemplary embodiment, the target power module can establish a status flag variable including multiple bits in real time. Then, statistics are taken on multiple power modules in the power system. If the power module has been assigned an address, the bit corresponding to the power module is marked; if the power module has not been assigned an address, the bit corresponding to the power module is reset.

[0066] In another exemplary embodiment, the target power module can pre-establish the power module bit variable before powering on. Then, statistics are taken on multiple power modules in the power system, and if the power module has been assigned an address, the bit corresponding to the power module is marked; if the power module has not been assigned an address, the bit corresponding to the power module is reset.

[0067] S130: Determine the target address of the target power module from the status flag variable based on the initial address and the allocated address.

[0068] Specifically, the target address can be used as the communication address of the target power module in the power system, and is used for the target power module to communicate with other power modules in the power system, thereby avoiding address reordering of other power modules in the power system due to the addition or modification of the target power module.

[0069] In an exemplary embodiment, the target power module detects whether there is duplication between the allocated address recorded in the status flag variable and the initial address. If there is duplication, at least one free address in the status flag variable is queried, and an address is selected from the free addresses as the target address; if there is no duplication, the initial address is set as the target address.

[0070] Specifically, the target power module can traverse the addresses in the flag variable in turn, and query whether there is any duplication between the allocated address and the initial address of the target power module. If there is a duplication, it means that the above initial address has been occupied. At this time, the target power module can query the free addresses in the status flag variable, and select a free address from these free addresses as the target address. For example, the above target address can be the first free address traversed, or all free addresses can be traversed, and one is selected randomly or according to a certain rule from all free addresses as the target address. In other embodiments, the traversal process can also be visualized, and a target address can be selected from the free addresses based on the user's choice.

[0071] In another exemplary embodiment, if the allocated address recorded in the detection status flag variable does not overlap with the initial address, it means that the initial address is not occupied in the status flag variable. At this time, the initial address is used as the target address, and the target address can also be recorded in the status flag variable.

[0072] S140: Use the target address as the software address of the target power module.

[0073] Specifically, a target address that is not repeated with an already allocated address is used as a software address of a target power module, so that the target power module can communicate and operate in the power system using this unique software address.

[0074] In an exemplary embodiment, the target power module uses the target address as its software address, so that the power system can read the software address corresponding to the target power module and record this software address in the address mapping table of the power system. Then, the power system can confirm whether the software address of the power module is configured correctly by sending a test instruction or reading, so as to save the configured software address to the non-volatile memory inside the target power module.

[0075] This embodiment obtains the initial address of the target power module and the assigned address of at least one power module in the power system, and then identifies the assigned address through a status flag variable to assign an address to the target power module. This allows the address of the power module that has been assigned an address to be avoided even if a new power module is added or changed in the power system.

[0076] See also Figure 2 , Figure 2 This is a flow chart of the second embodiment of the power system management method of the present application. Specifically, it may include:

[0077] S210: Acquire an address pre-stored in the target power module.

[0078] Specifically, the target power module can obtain a preset storage address from a memory, which can be a memory inside the target power module or a memory outside the target power module. The memory can be an electrically erasable programmable read-only memory (EEPROM), which can effectively realize that the storage address of the target power module can be saved when power is off.

[0079] S221: If the pre-stored address is a preset default value, a preset address allocation rule is executed to determine the initial address.

[0080] The default value may be 0, or other numbers or characters used to represent the default value, which is not limited in this embodiment. The preset address allocation rule may be an address allocation logic between modules. For example, the software address of the target power module in the power system may be determined based on the SN code of the target power module or the SN code of the chip inside the power supply through a certain queue relationship.

[0081] In an exemplary embodiment, when the target power module is powered on, if it is detected that the address pre-stored in the memory is a default value, it means that the target power module has not been assigned a software address and the address allocation rule can be executed; if it is detected that the address pre-stored in the memory is a default value or not a default value, it means that the target power module has been assigned an address and this address can be used as the initial address.

[0082] S222: If the pre-stored address is not the default value, use the pre-stored address as the initial address.

[0083] In an exemplary embodiment, in order to clearly explain the method for confirming the initial address of the target power module, a new target power module is added as an example. In this embodiment, the default address is 0, and the preset address allocation rule is the address allocation logic between modules. The power module is set to any at least one target power module. For details, please refer to Figure 3 , Figure 3 This is a flowchart of a specific embodiment of determining the initial address of a target power module in the present application. It specifically includes the following steps:

[0084] S301: The power module is powered on.

[0085] Specifically, at least one target power supply module to be added is powered on.

[0086] S302: Obtain an initial address stored in the memory.

[0087] Specifically, the initial address is the initial address of the target power module recorded in the memory.

[0088] S303: Whether the obtained initial address is 0.

[0089] If yes, execute S304, if no, execute S305.

[0090] S304: Execute address allocation logic between modules.

[0091] If the initial address of the acquired power module, ie, the target power module, is the default address 0, the initial address of the target power module is allocated through the address allocation logic between modules.

[0092] S305: The acquired address is used as the address of the local machine.

[0093] The acquired address is the address stored in the memory, and the address of the local machine is the initial address of the target power module. If the acquired initial address of the power module, i.e., the target power module, is not the default address 0, the address stored in the memory is confirmed as the initial address of the target power module.

[0094] S306: Normal operation.

[0095] S230: The target power module obtains an already allocated address of at least one power module in the power system.

[0096] In this embodiment, S230 is performed after S220. In other embodiments, S230 may be performed before S220 or simultaneously with S220.

[0097] Specifically, after the target power module obtains the initial address from the memory, the target power module can receive data frames sent by other power modules on the bus of the power system, which contain the address information of each of the other power modules. Then, the online power modules in the power system can be counted based on the address information to obtain the assigned address of at least one power module.

[0098] The address information can be used to determine whether several power modules in the power system are online, and to determine whether the allocated addresses of the online power modules overlap with the initial address of the target power module.

[0099] In an exemplary implementation, after the target power module obtains the initial address of the local power module, it can obtain the data frame sent by other power modules on the bus, and the data frame can include the address information of each of the other power modules.

[0100] S240, determining the bit corresponding to the allocated address from the status flag variable.

[0101] Among them, the bit can record the allocated address, and one bit corresponds to one allocated address.

[0102] In an exemplary embodiment, the target power module establishes a 32-bit status flag variable (u32OnlineFlag) to count the online power modules in the power system according to the address information of other power modules. For example, if the online power modules are No. 1, 2, 4, 8, 15, and 26, the bits corresponding to the online power modules No. 1, 2, 4, 8, 15, and 26 are determined from the status flag variable as: bit0, bit1, bit3, bit7, bit15, and bit25, respectively.

[0103] S250, marking the bit corresponding to the allocated address as the flag bit to determine that the allocated address has been recorded.

[0104] Specifically, if power module No. n is online, the bit (n-1) of the online power module flag variable will be marked, for example, the bit can be set to 1; if it is not online, the corresponding bit will be cleared.

[0105] In an exemplary implementation, assuming that the online power modules are 1, 2, 4, 8, 15, and 26, bit0, bit1, bit3, bit7, bit15, and bit25 of the status flag variable are all set to 1 as flag bits, that is, the status flag variable is 0000 0010 0000 0000 0100 0000 1000 1011. Furthermore, the binary status flag variable can be converted into hexadecimal to obtain u32OnlineFlag=0x0200408B.

[0106] S260, detecting whether the allocated address recorded in the status flag variable is repeated with the initial address.

[0107] Specifically, in order to avoid the situation where changes or additions and deletions of power modules will cause the re-arrangement of the already allocated addresses in the power system, or multiple power modules use the same software address, thereby causing communication errors, it is possible to detect whether the already allocated addresses of the online power modules in the current power system are the same as the initial addresses.

[0108] If yes, execute S270 , if no, execute S280 .

[0109] S270: If there is a duplication, query at least one free address in the status flag variable, and select one address from the free addresses to set as the target address.

[0110] Specifically, the idle address can be a valid address that is not currently in use in the power system, that is, it can be an unmarked bit that can be used to dynamically allocate and release resources. If a duplicate address is detected, the system can traverse the bits in the status flag variable, for example, starting from the first bit (start bit) of the status flag variable to find an unused idle address. When an idle address is detected for the first time, this idle address can be assigned to the target power module, and the idle address is used as the software address of the target power module. This can avoid address re-arrangement while improving the efficiency of software address allocation, avoiding communication duplication and data transmission errors.

[0111] In an exemplary implementation, if the initial address of the target power module overlaps with the allocated address, the status flag variable u32OnlineFlag is traversed bit by bit to query the free address from the status flag variable.

[0112] Furthermore, the state flag variable includes a plurality of bits, and the step of querying at least one free address in the state flag variable may include:

[0113] The bits in the state flag variable are traversed in sequence; when it is detected that the bit does not belong to the flag bit, the address corresponding to the bit is determined to be the free address.

[0114] The number of bits may be 16, 32, 48, etc., which is not limited in this embodiment. The flag bit may indicate that the current bit has been assigned an address.

[0115] In an exemplary embodiment, the query starts from bit0 of u32OnlineFlag to see if it is 0. For example, the query ends when it is found that bit2 is equal to 0. Bit2 equal to 0 indicates that the bit is not assigned an address, which means that bit2 does not belong to the flag bit, and the address 3 corresponding to bit2 is an idle address. The target power module will use address 3 as the target address, thereby establishing normal communication between the target power module and the online power module.

[0116] S280: If there is no duplication, setting the initial address as the target address.

[0117] Specifically, if no address duplication is detected, the initial address is directly set as the target address of the target power module, which can simplify the address setting process and improve efficiency. After the target power module determines the bit position of each online power module, the target power module determines whether the initial address and the software address of the online power module are repeated, and operates normally if there is no duplication.

[0118] In an exemplary embodiment, in combination Figure 4 and Figure 5 This is described as a hardware embodiment. Figure 4 , Figure 4 4 is a schematic diagram of the architecture of the system plug-in frame of the first embodiment of the power system of the present application. The power system 400 includes a monitoring unit 401, a bus 402, a power module 4031, a power module 4032, a power module 4033 to a power module 403N; wherein the bus 402 connects the monitoring unit 401, the power module 4031, the power module 4032, the power module 4033 to the power module 403N, and is used for communication between the monitoring unit 401, the power module 4031, the power module 4032, the power module 4033 to the power module 403N.

[0119] Figure 5 This is a flowchart of a first specific embodiment of the power system management method of the present application, comprising the following steps:

[0120] S501, when the power module is powered on, obtains the address stored in the local machine.

[0121] Specifically, the power system 500 is given an example in which a power module 5031 is newly added. When the power module 5031 is powered on, it first obtains the initial address stored in the local computer.

[0122] S502, obtaining information of other modules on the bus.

[0123] Specifically, after the power module 5031 obtains the initial address of the local machine, it can receive the corresponding data frames actively sent by the power modules 4032, 4033 to 403N through the bus 502. These data frames may contain information on the software addresses of the power modules 4032, 4033 to 403N.

[0124] S503: Check whether the software address of the online power module is the same as the software address of the local device.

[0125] Specifically, when the power module 5031 receives the power modules 4032, 4033 to 403N, a 32-bit status flag variable (u32OnlineFlag) can be established, and according to the information of the software addresses of the power modules 4032, 4033 to 403N, the online power modules in the power system 500 are counted to determine the allocated software addresses. After the power module 5031 determines the software addresses of each online power module, the power module 5031 determines whether the initial address and the software address of the online power module are repeated.

[0126] If yes, execute S504 and S505, if no, execute S506.

[0127] S504, traverse all online modules to query free addresses; S505, use the free addresses as the software addresses of the local machine.

[0128] Specifically, if the initial address of the power module 5031 is repeated with the software address of the online power module, the status flag variable is traversed bit by bit to query the free address. For example, the query can be started from the bit of the status flag variable. For example, the query ends when the bit bit2 is found to be equal to 0, indicating that address 3 is an free address at this time. The power module 5031 will use address 3 as the target address and use this target address as the software address of the power module 5031, thereby establishing normal communication between the power module 5031 and the online power module, and between the power module 5031 and the monitoring unit 501.

[0129] S506, using the address stored in the local machine as the software address.

[0130] Specifically, if there is no duplication, the initial address of the power module 5031 is used as the software address, and then normal communication between the power module 5031 and the online power module, and between the power module 5031 and the monitoring unit 501 is established.

[0131] S507, normal operation.

[0132] In this embodiment, the allocated power module is identified by setting the bit of the status flag variable as a flag bit, so that the target power module can judge whether the bit belongs to the flag bit to determine whether the initial address of the local machine and the allocated address are repeated. If the bit does not belong to the flag bit, it means that the corresponding address is an idle address, so that the target power module can use this idle address as the software address, and then effectively manage the software address of the power module to avoid address duplication and communication errors.

[0133] Furthermore, this embodiment takes into account that the relationship between the software address of the power module in the power system and the slot where it is located is unknown, and the user can only obtain the real-time data of the power module of a certain software address from the monitoring unit, but it is difficult to know the physical position of the power module in the power system and the specific position in the system plug-in frame. If the power module works abnormally, it may be necessary to find the physical position of the power module and the specific position in the system plug-in frame manually or by other more complicated means, which makes the maintenance cost of the power system high.

[0134] Therefore, this embodiment proposes a method for setting the software address of a power module in a power system, and the user can flexibly set the software address of the power module so that the software address can reflect the specific position of the power module in the power system frame and reflect the physical position of the power module.

[0135] See also Figure 6 , Figure 6 This is a flow chart of the third embodiment of the power system management method of the present application. It includes the following steps:

[0136] S610: The target power module obtains its initial address and an already allocated address of at least one power module in the power system.

[0137] The above step S110 may be performed and will not be described in detail here.

[0138] S620: Mark the corresponding bit in the preset state flag variable according to the allocated address.

[0139] The above step S120 may be performed and will not be described in detail here.

[0140] S630: Determine the target address of the target power module from the status flag variable based on the initial address and the allocated address.

[0141] The above step S130 may be performed and will not be described in detail here.

[0142] S640: Use the target address as the software address of the target power module.

[0143] The above step S140 may be performed and will not be described in detail here.

[0144] S650: Associating the target address with the slot of the target power module, so that the software address of the target power module is associated with the slot of the target power module.

[0145] Among them, the slot can be the physical position of the target power module in the physical system; the association relationship can be a mapping or correspondence between the target address and the physical slot, so that the target address can be used to provide real-time data of the target power module, and can also be directly located to its physical position according to the target address, thereby realizing rapid positioning of the physical position of the power module, thereby improving maintenance efficiency and reducing maintenance costs.

[0146] In an exemplary embodiment, since each slot corresponds to a unique hardware code, the hardware code can be automatically read when the power module is inserted into the slot. Therefore, when the target power module sets the target address to the software address, the hardware code can also be bound to the target address, so that the target address is associated with the slot, and the software address of the target power module is associated with the slot of the target power module.

[0147] Furthermore, since the software address allocation does not consider the physical location, the software address of the power module and the slot may not necessarily match or correspond. For example, the slot of the power module is No. 1, and its software address is No. 3. In this case, it will be difficult for users to intuitively understand and operate the device, increasing the probability of misoperation and positioning errors. Therefore, a solution for setting the software address of the power module is proposed to match the software address with the slot. For details, please refer to S660 and S670:

[0148] S660, receiving the address setting instruction monitored by the power supply system, and obtaining a positioning address matching the slot.

[0149] Among them, the target power module can receive an operation instruction from the user to operate the power module, and the operation instruction can be used to manage the status and address information of at least one power module. In this embodiment, the operation instruction can be an address setting instruction, and this address setting instruction can carry the target address (current software address) of the target power module, and the positioning address matching the slot. The positioning address matching the slot can be a user-defined setting, or it can be obtained by the power system according to the slot where the target power module is located. For example, there may be consistency or similarity between the positioning address matching the slot and the position of the slot of the target power module, so that after the positioning address matching the slot is set as the software address of the target power module, the software address of the target power module can match and correspond to its slot. For example, the slot of the power module is No. 1, and its positioning address matching the slot is also No. 1.

[0150] S670: Use the positioning address as the software address of the target power module, so as to associate the positioning address with the slot of the target power module.

[0151] In an exemplary embodiment, a user may initiate an address setting instruction for a target power module through a monitoring unit, and the address instruction carries a target address of the target power module and a positioning address that matches the slot; the monitoring unit may determine the corresponding target power module according to the target address, and send the address setting instruction and the positioning address that matches the slot carried by the instruction to the target power module. When the target power module receives the address setting instruction sent by the monitoring unit, it obtains a positioning address that matches the slot, and may use the positioning address as its software address. At the same time, the original target address is changed to the positioning address, so as to associate the positioning address with the slot of the target power module, and achieve matching and correspondence between the software address of the target power module and its slot.

[0152] In an exemplary embodiment, please refer to Fig. 7A , Fig. 7A This is a schematic diagram of the power system management method of the present application before the software address is set. Assuming that the target power module is the power module 702, the monitoring unit 701 communicates with the power module 702 whose software address is n, and the monitoring unit 701 can set the software address of the power module 702 to m. Please refer to Figure 7B , Figure 7B This is a schematic diagram of the power system management method of the present application after the software address is successfully set. After the power module 702 responds to the monitoring unit 701 that the address is successfully set, the software address of the power module 702 is m, and the power module 702 can use the location address m to establish a new communication relationship with the monitoring unit 701.

[0153] Through the above scheme, this embodiment targets diversified power system application scenarios by setting the target address of the target power module as a software address and associating the target address with the slot of the target power module; further, a positioning address corresponding to the slot can be obtained, and this positioning address can be associated with the slot of the target power module, so that the software address can reflect the specific position of the power module in the power system frame, as well as the physical position of the power module.

[0154] For further information, see Figure 8 , Figure 8 yes Figure 6 The detailed flow chart of step S670 is shown. In this embodiment, step S670 may specifically include:

[0155] S811, in response to the positioning address satisfying a preset valid range.

[0156] S812, detecting whether the positioning address is repeated with the already allocated address in the status flag variable.

[0157] Specifically, the valid range may refer to a range of several bits of the status flag variable, for example, the maximum number of power modules in the power system does not exceed the bit range of the status flag variable.

[0158] In an exemplary embodiment, the bit position of the status flag variable is 32 bits, and the effective range is 32 addresses. The target power module can receive the positioning address sent by the monitoring unit, and if the range of the positioning address is less than or equal to the effective range, it can further detect whether the positioning address is repeated with the allocated address; if it exceeds the effective range, it will reply to the monitoring unit with relevant information that the data exceeds the range.

[0159] If yes, execute S820, if no, execute S830.

[0160] S820: If there is a duplication, query the idle address in the status flag variable, and use the idle address as the software address of the target power supply.

[0161] Specifically, if there is a duplication, the free address can be queried by traversing the allocated addresses in the status flag variable, and the queried free address is then used as the software address of the local machine.

[0162] S830: If there is no duplication, use the target address as the software address of the target power supply.

[0163] Specifically, if there is no duplication, the location address is used as the software address of the local machine. Thus, the fault-tolerant mechanism can ensure that the power supply system can still work normally after an erroneous operation occurs. After the new software address takes effect, the target power module can also store the corresponding address in an external memory. For example, a powered erasable programmable read-only memory can enable the software address of the power module to be saved when the power is off. That is, if the power supply system fails to supply power, after the next power-on, the power module in the power supply system can still work according to the software address previously set by the user.

[0164] In an exemplary embodiment, see Fig. 9 , Fig. 9 This is a flowchart of an embodiment of the software address setting process executed inside the power module of the present application. It includes the following steps:

[0165] S901: Whether an address setting instruction is received.

[0166] If yes, execute S902, if no, end.

[0167] S902: Whether the set address is within the valid range.

[0168] If yes, execute S903 and S904; if no, execute S907.

[0169] S903: The software address of the power module is assigned to a new address, and a reply is given indicating that the setting is successful.

[0170] S904: Check whether the software address of the power module is duplicated with that of other power modules on the bus.

[0171] If yes, execute S905 and S906; if no, execute S906.

[0172] S905, traverse and query the free addresses as the software address of the local machine.

[0173] S906, store the new software address into the memory.

[0174] S907: The reply data exceeds the range.

[0175] In this embodiment, by detecting whether the positioning address is within the valid range, if the positioning address is within the valid range, the status flag variable is used to determine whether the positioning address is repeated with the software address of other power modules; the software address is quickly set when there is no duplication, simplifying the system initialization process; in the case of duplication, the software address is set by determining the free address, which can improve the flexibility and adaptability of the system.

[0176] Furthermore, after the target power module is associated with its slot through the target address, or the target power module is associated with its slot through the positioning address, the user can directly query the operating status of the specified target power module and / or the status of the slot. Fig.10 As shown, Fig.10 It is a flowchart of an implementation of the present application for querying the operating status of a target power module.

[0177] S1010, receiving a query instruction monitored by the power supply system, and generating a query result corresponding to the query instruction, wherein the query result includes operation information of the target power supply module and / or operation information of the slot.

[0178] S1020: Return the query result to the power supply system.

[0179] Specifically, the query instruction can be an instruction sent by the user to the target power module through the monitoring unit or the power system, which is used to query the operating status of a specific power module. The instruction is initiated based on the software address, which can be the positioning address as mentioned above, or the target address, which is used to accurately locate the target power module. The target power module receives the query instruction, executes it and returns the query result to the monitoring unit or the power system, and can obtain the status and data of the target power module in real time. Among them, the operating information of the target power module can be the working status of the target power module to ensure that it operates within the expected parameter range; the operating information of the slot can be the working status of the slot where the power module is located to ensure that there is no problem with the installation location and environment. If the slot operates abnormally (such as too high temperature, poor contact), it may affect the performance of the power module.

[0180] In this embodiment, after the software address of the target power module is associated with the slot, the status of the target power module is queried using the software address, and this software address can be a target address or a positioning address, which can improve the convenience and flexibility of users querying the power module.

[0181] See also Fig.11 , Fig.11 Schematic diagram of an exemplary structure of an embodiment of the power supply system of the present application. Fig.11 As shown, the power supply system 1100 of the present application may include a processor 1101 and a memory 1102, wherein the processor 1101 and the memory 1102 communicate with each other via a bus. The memory 1102 stores program instructions for module management, and when the program instructions are executed by the processor 1101, the method steps described in the foregoing text in conjunction with the accompanying drawings are implemented:

[0182] The target power module obtains its initial address and the already allocated address of at least one power module in the power system;

[0183] According to the allocated address, marking the corresponding bit in the preset state flag variable;

[0184] Based on the initial address and the allocated address, determining the target address of the target power module from the status flag variable;

[0185] The target address is used as the software address of the target power module.

[0186] Optionally, the processor 1101 performs the step of determining the target address of the target power module from the status flag variable based on the initial address and the allocated address, including:

[0187] Detect whether the allocated address recorded in the status flag variable is repeated with the initial address;

[0188] If there is a duplication, query at least one free address in the state flag variable, and select an address from the free addresses to set as the target address;

[0189] If there is no duplication, the initial address is set as the target address.

[0190] Optionally, the processor 1101 executes the state flag variable to include a plurality of bits, and the step of querying at least one free address in the state flag variable includes:

[0191] Traversing the bits in the state flag variable in sequence;

[0192] When it is detected that the bit position does not belong to the flag position, the address corresponding to the bit position is determined to be the idle address.

[0193] Optionally, the processor 1101 executes the step of marking a corresponding bit in a preset state flag variable according to the allocated address, including:

[0194] Determining from the status flag variable the bit corresponding to the allocated address;

[0195] The bit corresponding to the allocated address is marked as the flag bit to determine that the allocated address has been recorded.

[0196] Optionally, the processor 1101 executes the target power module to obtain its initial address, including:

[0197] Acquire an address pre-stored in the target power module;

[0198] If the pre-stored address is a preset default value, executing a preset address allocation rule to determine the initial address;

[0199] If the pre-stored address is not the default value, the pre-stored address is used as the initial address.

[0200] Optionally, after the processor 1101 executes the step of using the target address as the software address of the target power module, the step further includes:

[0201] The target address is associated with the slot of the target power module, so that the software address of the target power module is associated with the slot of the target power module.

[0202] Optionally, the processor 1101 executes the associating the target address with the slot of the target power module so that the software address of the target power module is associated with the slot of the target power module, and then further includes:

[0203] receiving an address setting instruction detected by the power supply system, and obtaining a positioning address matching the slot;

[0204] The target address is changed into the positioning address, and the positioning address is associated with the slot of the target power module, so that the positioning address is associated with the slot of the target power module.

[0205] Optionally, the processor 1101 executes the step of changing the target address to the positioning address, including:

[0206] In response to the positioning address satisfying a preset valid range, detecting whether the positioning address and the already allocated address in the status flag variable are repeated;

[0207] If there is no duplication, taking the target address as the software address of the target power supply;

[0208] If there is a duplication, the idle address in the state flag variable is queried, and the idle address is used as the software address of the target power supply.

[0209] Optionally, after the processor 1101 executes the step of using the location address as the software address of the target power module so as to associate the location address with the slot of the target power module, the step further includes:

[0210] Receiving a query instruction monitored by the power supply system, and generating a query result corresponding to the query instruction, wherein the query result includes operation information of the target power supply module and / or operation information of the slot;

[0211] The query result is returned to the power supply system.

[0212] See also Fig.12 , Fig.12 Schematic diagram of an exemplary structure of an embodiment of a computer-readable storage medium of the present application. Fig.12It is shown that the computer-readable storage medium 1200 stores a computer program 1201. When the computer program 1201 is executed by a processor on a computer, the computer executes the above-mentioned related method steps to implement a power system management method in the above-mentioned embodiment. The target power module obtains its initial address and the allocated address of at least one power module in the power system; according to the allocated address, the corresponding bit in the preset state flag variable is marked; based on the initial address and the allocated address, the target address of the target power module is determined from the state flag variable; the target address is used as the software address of the target power module. The target power module obtains its initial address and the allocated address of at least one power module in the power system, and then identifies the allocated address through the state flag variable, and allocates the address to the target power module, so that even if a new power module is added or changed in the power system, the address re-arrangement of the power module with the allocated address can be avoided.

[0213] In the several embodiments provided in the present application, it should be understood that the disclosed methods, power systems and storage media can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0214] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0215] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0216] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0217] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for managing a power system, characterized in that: The power supply system includes a plurality of power supply modules, and the management method includes: The target power module obtains its initial address and the already allocated address of at least one power module in the power system; According to the allocated address, marking the corresponding bit in the preset state flag variable; Based on the initial address and the allocated address, determining the target address of the target power module from the status flag variable; The target address is used as the software address of the target power module.

2. The management method according to claim 1, characterized in that: The determining the target address of the target power module from the status flag variable based on the initial address and the allocated address includes: Detect whether the allocated address recorded in the status flag variable is repeated with the initial address; If there is a duplication, query at least one free address in the state flag variable, and select an address from the free addresses to set as the target address; If there is no duplication, the initial address is set as the target address.

3. The management method according to claim 2, characterized in that: The state flag variable includes a plurality of bits, and the step of querying at least one free address in the state flag variable includes: Traversing the bits in the state flag variable in sequence; When it is detected that the bit position does not belong to the flag position, the address corresponding to the bit position is determined to be the idle address.

4. The management method according to claim 3, characterized in that: The step of marking a corresponding bit in a preset state flag variable according to the allocated address includes: Determining from the status flag variable the bit corresponding to the allocated address; The bit corresponding to the allocated address is marked as the flag bit to determine that the allocated address has been recorded.

5. The management method according to claim 1, characterized in that: The target power module obtains its initial address, including: Acquire an address pre-stored in the target power module; If the pre-stored address is a preset default value, executing a preset address allocation rule to determine the initial address; If the pre-stored address is not the default value, the pre-stored address is used as the initial address.

6. The management method according to claim 1, characterized in that: After the step of using the target address as the software address of the target power module, the method further includes: The target address is associated with the slot of the target power module, so that the software address of the target power module is associated with the slot of the target power module.

7. The management method according to claim 6, characterized in that: The step of associating the target address with the slot of the target power module so that the software address of the target power module is associated with the slot of the target power module further includes: receiving an address setting instruction detected by the power supply system, and obtaining a positioning address matching the slot; The target address is changed into the positioning address, and the positioning address is associated with the slot of the target power module, so that the positioning address is associated with the slot of the target power module.

8. The management method according to claim 7, characterized in that: The step of changing the target address to the positioning address and associating the positioning address with the slot of the target power module includes: In response to the positioning address satisfying a preset valid range, detecting whether the positioning address and the already allocated address in the status flag variable are repeated; If there is no duplication, taking the target address as the software address of the target power supply; If there is a duplication, the idle address in the state flag variable is queried, and the idle address is used as the software address of the target power supply.

9. The management method according to claim 7, characterized in that: After the positioning address is used as the software address of the target power module so that the positioning address is associated with the slot of the target power module, the method further includes: Receiving a query instruction monitored by the power supply system, and generating a query result corresponding to the query instruction, wherein the query result includes operation information of the target power supply module and / or operation information of the slot; The query result is returned to the power supply system.

10. A power supply system, characterized in that: The power supply system comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the power supply system executes the management method as claimed in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the management method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Automatic mailing address distribution method suitable for large-scale battery management system

    CN108540587A

  • Power management system, power supply system and power supply control method

    CN110221229A

  • Battery management system and address allocation and offline reconnection method

    CN112565483A

  • CAN address configuration method and system for air conditioning unit frequency converter

    CN112887439A

  • Module address allocation method and device and data interaction system

    CN112988639A