Module address binding method and power supply system
By determining the set of module addresses in the power system and powering up in turn, selecting the module address according to the target strategy, the problems of complexity and high error rate of module address binding are solved, and orderly binding and simplified management of module addresses are realized.
Patent Information
- Application Number
- CN202510292324.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, the module address binding method is complex, and the administrator requires professional knowledge, which is prone to errors and is inconvenient to manage.
By determining the module address set, free address set and occupied address set on the bus in the power system, and powering on the orderly manner, selecting module address binding from the free address set according to the target strategy, the orderly binding of module addresses is achieved.
Orderly binding of module addresses can be achieved without complex administrator operations, avoiding address conflicts and errors, and simplifying the management process.
Smart Images

Figure CN120277014A_ABST
Abstract
Description
Technical Field
[0001] This application relates to address processing technology, and particularly to a method for binding module addresses and a power supply system. Background Art
[0002] When multiple modules are connected to a bus, it is necessary to distinguish the information of different modules through module addresses for information interaction and system control. Each module needs to have a unique address to facilitate individual access to each module.
[0003] Currently, in some systems, the method of binding module addresses requires relatively complex operations by an administrator, and the administrator needs to have relatively professional knowledge to execute accurately. Otherwise, the addresses will be very chaotic and error-prone, which is inconvenient for management. Summary of the Invention
[0004] Embodiments of this application provide a method for binding module addresses and a power supply system, which can achieve orderly binding of module addresses without complex operations by an administrator, and is not prone to errors and convenient for management.
[0005] The technical solution of the embodiments of this application is implemented as follows:
[0006] Embodiments of this application provide a method for binding module addresses, based on a power supply system. The power supply system includes a bus, a control unit, and multiple modules. The control unit is connected to the bus, the control unit is connected to the multiple modules, and the multiple modules include at least one first module. The method is applied to the control unit, and the method includes:
[0007] Determine a module address set, a free address set, and an occupied address set on the bus. The module address set includes the free address set and the occupied address set, and the module address set includes at least two module addresses;
[0008] Power on at least one first module in sequence to convert the module state of the corresponding first module to the online state;
[0009] For the powered-on first module, determine whether the first module is bound with a module address based on the module address set;
[0010] If the first module is not bound with a module address, or the first module is already bound with a module address and the module address bound by the first module conflicts with the address in the occupied address set, select a free module address from the free address set and bind it to the first module according to the target policy.
[0011] In the above solution, the multiple modules include at least one second module. The process of determining the free address set and the occupied address set includes:
[0012] If there is at least one second module in the online state on the bus, and the second module has been bound with a module address, and the module address is an address in the module address set;
[0013] Determine the module addresses of at least one second module as the occupied address set;
[0014] Based on the module address set and at least one module address, determine the free address set on the bus;
[0015] If there is no second module in the online state on the bus, determine the occupied address set as an empty set and determine the module address set as the free address set.
[0016] In the above solution, the method further includes:
[0017] If the first module has been bound with a module address and the module address bound by the first module does not conflict with the address in the occupied address set, update the free address set and the occupied address set based on the module address bound by the first module;
[0018] After binding the free module address selected from the free address set to the first module, the method further includes:
[0019] Update the free address set and the occupied address set.
[0020] In the above solution, the powering on of at least one first module in sequence includes:
[0021] Determine the physical addresses of the at least one first module;
[0022] Power on the at least one first module in sequence according to the address order of the physical addresses of the at least one first module;
[0023] Wherein, the address order of the module addresses of the at least one second module corresponds to the address order of the physical addresses of the at least one second module.
[0024] In the above solution, the selecting of a free module address from the free address set and binding it to the first module according to the target policy includes:
[0025] Determine the free module address with the smallest address in the free address set;
[0026] Bind the free module address with the smallest address to the first module.
[0027] In the above solution, the order of the sizes of the module addresses of the at least one second module is the same as the order of the sizes of the physical addresses of the at least one second module; before determining the set of module addresses, the set of free addresses, and the set of occupied addresses, the method further includes:
[0028] In response to entering the address recognition state, determine the maximum physical address from the physical addresses of at least one first module;
[0029] Determine at least one second module on the bus whose physical address is less than the maximum physical address;
[0030] Power on the at least one second module to convert the module state of the at least one second module to the online state.
[0031] In the above solution, the first module is a module with a changed physical address or a module without a bound module address.
[0032] An embodiment of the present application provides a method for binding module addresses. Based on a power supply system, the power supply system includes a bus and multiple modules, the multiple modules are communicatively connected to each other, the multiple modules include at least one first module, and the first module includes a control unit. The method includes:
[0033] After the target first module is powered on, determine the set of module addresses, the set of free addresses, and the set of occupied addresses on the bus. The set of module addresses includes the set of free addresses and the set of occupied addresses. The set of module addresses includes at least two module addresses. The target first module is one of the at least one first module;
[0034] Based on the set of module addresses, determine whether the target first module is bound with a module address;
[0035] If the target first module is not bound with a module address, or the target first module is already bound with a module address and the module address bound to the target first module conflicts with the addresses in the set of occupied addresses, select a free module address from the set of free addresses and bind it to the target first module according to a target policy.
[0036] In the above solution, the multiple modules include at least one second module. The process of determining the set of free addresses and the set of occupied addresses includes:
[0037] If there is at least one second module in an online state on the bus, the second module is already bound with a module address, and the module address is an address in the set of module addresses;
[0038] Determine the module addresses of the at least one second module as the set of occupied addresses;
[0039] Determine a set of free addresses on the bus based on the set of module addresses and at least one module address;
[0040] If there is no second module in an online state on the bus, determine the set of occupied addresses as an empty set and determine the set of module addresses as the set of free addresses.
[0041] In the above solution, the method further includes:
[0042] If the target first module is already bound with a module address and the module address bound by the target first module does not conflict with the addresses in the set of occupied addresses, update the set of free addresses and the set of occupied addresses based on the module address bound by the target first module;
[0043] After binding a free module address selected from the set of free addresses to the target first module, the method further includes:
[0044] Update the set of free addresses and the set of occupied addresses based on the free module address.
[0045] In the above solution, the determining the power-on sequence of the target first module includes:
[0046] Determine the physical addresses of the at least one first module;
[0047] According to the address sequence of the physical addresses of the at least one first module, determine the power-on sequences of the at least one first module respectively;
[0048] Wherein, the address sequence of the module addresses of the at least one second module corresponds to the address sequence of the physical addresses of the at least one second module.
[0049] In the above solution, the selecting a free module address from the set of free addresses and binding it to the target first module according to a target policy includes:
[0050] Determine the free module address with the smallest address in the set of free addresses;
[0051] Bind the free module address with the smallest address to the target first module.
[0052] In the above solution, the size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module; before determining the set of module addresses, the set of free addresses, and the set of occupied addresses, the method further includes:
[0053] In response to entering the address recognition state, the target module determines the maximum physical address from the physical addresses of at least one first module, where the target module is one of the multiple modules;
[0054] Determine at least one second module on the bus whose physical address is less than the maximum physical address;
[0055] If the target module is one of the at least one second module, perform a power-on operation on the target module to convert the module state of the target module to the online state.
[0056] In the above solution, the first module is a module with a changed physical address or a module without a bound module address.
[0057] An embodiment of the present application provides a power supply system, including:
[0058] A bus;
[0059] Multiple modules, including at least one first module;
[0060] A control unit for executing the module address binding method provided by the embodiment of the present application.
[0061] An embodiment of the present application provides a power supply system, including:
[0062] A bus;
[0063] Multiple modules that communicate with each other, the multiple modules include at least one first module, and the first module includes a control unit, and the control unit is used to execute the module address binding method provided by the embodiment of the present application.
[0064] An embodiment of the present application provides a control unit, including:
[0065] A memory for storing executable instructions;
[0066] A processor, when executing the executable instructions stored in the memory, implements the module address binding method provided by the embodiment of the present application.
[0067] An embodiment of the present application provides a computer-readable storage medium, storing executable instructions, which are used to cause a processor to implement the module address binding method provided by the embodiment of the present application when executed.
[0068] An embodiment of the present application provides a computer program product, storing a computer program, which is used to implement the module address binding method provided by the embodiment of the present application when executed by a processor.
[0069] In the embodiment of the present application, by determining the set of module addresses, the set of idle addresses, and the set of occupied addresses on the bus, and powering on at least one first module in sequence. For the powered-on first module, based on the set of module addresses, it is determined whether the first module is bound with a module address. If the first module is not bound with a module address, or the first module is already bound with a module address and the module address bound by the first module conflicts with the addresses in the set of occupied addresses, according to the target policy, an idle module address is selected from the set of idle addresses and bound to the first module. By powering on in sequence and then enabling each first module to bind module addresses based on the power-on order, without the need for complex operations by the administrator, each module address follows the same policy to achieve orderly binding, which is not error-prone and convenient for management. Description of the Drawings
[0070] Figure 1 is an optional structural schematic diagram of the power supply system provided by the embodiment of the present application;
[0071] Figure 2 is an optional structural schematic diagram of the control unit provided by the embodiment of the present application;
[0072] Figure 3 is an optional flowchart of the module address binding method provided by the embodiment of the present application;
[0073] Figure 4 is an optional flowchart of the module address binding method provided by the embodiment of the present application;
[0074] Figure 5 is an optional structural schematic diagram of the power supply system provided by the embodiment of the present application;
[0075] Figure 6 is an optional flowchart of the module address binding method provided by the embodiment of the present application;
[0076] Figure 7 is an optional structural schematic diagram of the module address binding device provided by the embodiment of the application. Detailed Embodiments
[0077] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0078] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0079] In the following description, the terms "first", "second", and "third" are only used to distinguish similar objects and do not represent a specific order for the objects. It is understood that "first", "second", and "third" can be interchanged in a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0080] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0081] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0082] 1) A modular uninterruptible power supply (Modular Uninterruptible Power Supply, Modular UPS) or a DC power supply system is a power supply system with high flexibility and scalability, and both are power supply systems composed of multiple modules in parallel. Below, taking the modular UPS as an example, the inventive concept of the present application is further described, but the scope claimed by the present application is not limited to the modular UPS.
[0083] The system structure of the modular UPS power supply is extremely flexible. The design concept of the power module is that it can be removed and installed at will during system operation without affecting the operation and output of the system, enabling the investment plan to achieve "expansion as needed" and allowing users to achieve "dynamic growth" as the business develops. This not only meets the on-demand expansion of later equipment but also reduces the initial purchase cost. It is widely used in various scenarios that require high reliability and flexible expansion, such as data centers, computer rooms, telecommunication base stations, financial trading centers, traffic control centers, medical equipment, etc.
[0084] In a modular UPS, multiple modules need to distinguish the information of different modules through software addresses for information interaction and system control.
[0085] The embodiments of the present application provide a module address binding method and a power supply system, which can achieve the orderly binding of each module address without complex operations by the administrator, are not prone to errors, and are convenient for management.
[0086] First, the uninterruptible power supply system provided by the embodiments of the present application will be described. Refer to Figure 1 , Figure 1 which is an optional structural schematic diagram of the uninterruptible power supply system provided by the embodiments of the present application. The uninterruptible power supply system includes a bus 101, a plurality of modules 102, and a control unit 103. The control unit 103 is connected to the bus 101. The bus 101 can be a Controller Area Network (CAN) bus. The plurality of modules 102 includes at least one first module. The control unit 103 binds the module addresses on the bus to at least one first module by executing the module address binding method provided by the embodiments of the present application. Each module bound with the address on the bus can perform information interaction based on the corresponding module address. In some embodiments, the module 102 can be, but is not limited to, a power module (which can include a rectifier, an inverter, a charger, a control circuit, and a circuit breaker), a battery module (which can include a battery pack and a BMS), a monitoring module (which can include a system controller and a user interface), or a static bypass module (which can include a bypass switch and a filter). The control unit 103 can be, but is not limited to, a single-chip microcomputer or a microcontroller.
[0087] Next, the control unit provided by the embodiments of the present application for implementing the above module address binding method will be described. Refer to Figure 2 , Figure 2 which is an optional structural schematic diagram of the control unit 200 provided by the embodiments of the present application. In practical applications, the control unit 200 can be implemented as Figure 1 the control unit 103 in
[0088] Figure 2 The control unit 200 shown in Figure 2 includes: at least one processor 201 and a memory 202. Each component in the control unit 200 is coupled together through a bus system 203. It can be understood that the bus system 203 is used to realize the connection and communication between these components. The bus system 203 includes, in addition to a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clear description, in Figure 2 all kinds of buses are labeled as the bus system 203.
[0089] The processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a Digital Signal Processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0090] The memory 202 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memories, hard disk drives, optical disk drives, etc. The memory 202 optionally includes one or more storage devices that are physically remote from the processor 201.
[0091] The memory 202 includes volatile memory or non-volatile memory, and may also include both volatile and non-volatile memory. The non-volatile memory can be a read-only memory (ROM), and the volatile memory can be a random access memory (RAM). The memory 202 described in the embodiments of the present application is intended to include any suitable type of memory.
[0092] In some embodiments, the memory 202 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof. In the embodiments of the present application, an operating system 2021 and a module address binding device 2022 based on module addresses are stored in the memory 202; specifically,
[0093] The operating system 2021 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0094] In some embodiments, the module address binding device provided in the embodiments of the present application can be implemented in software. Figure 2 Shown is the module address binding device 2022 stored in the memory 202, which can be software in the form of programs and plugins, etc., and includes the following software modules: a first determination module 20221, a power-on module 20222, a second determination module 20223, and a binding module 20224. These modules are logical, and thus can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0095] In some other embodiments, the module address binding device provided by the embodiments of the present application may be implemented in a hardware manner. As an example, the module address binding device provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the module address binding method provided by the embodiments of the present application. For example, the processor in the form of a hardware decoding processor may employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0096] The following combines the exemplary applications and implementations of the control unit provided by the embodiments of the present application to illustrate the module address binding method provided by the embodiments of the present application.
[0097] Refer to Figure 3 , Figure 3 which is an optional flowchart of the module address binding method provided by the embodiments of the present application, and will be described in combination with the steps shown in Figure 3 as follows.
[0098] Step 301: Determine the set of module addresses, the set of free addresses, and the set of occupied addresses on the bus. The set of module addresses includes the set of free addresses and the set of occupied addresses, and the set of module addresses includes at least two module addresses.
[0099] Step 302: Power on at least one first module in sequence to convert the module state of the corresponding first module to the online state.
[0100] Step 303: For the powered-on first module, determine whether the first module is bound with a module address based on the set of module addresses.
[0101] Step 304: If the first module is not bound with a module address, or the first module is already bound with a module address and the module address bound to the first module conflicts with the address in the set of occupied addresses, select a free module address from the set of free addresses and bind it to the first module according to the target policy.
[0102] In an actual scenario, if there is a first module that needs to bind the module address on the bus, the method of the embodiment of the present application is executed. In some embodiments, the first module is a module with a changed physical address or a module without a bound module address. In the embodiment of the present application, each module can be connected to the UPS body through a corresponding interface, and each interface has a unique physical address. The physical address of the module connected to the interface corresponds to the physical address of the interface. If the first module is a module that is first online on the bus, it has no bound module address on the bus, and at this time, the module address on the bus needs to be bound to it. Or, if the physical address of the first module has changed, for example, after disconnecting from the first interface and connecting to the second interface, the module address on the bus needs to be bound to it at this time.
[0103] In actual implementation, when binding the module address for at least one first module, first determine the module address set, free address set, and occupied address set on the bus. Here, the module address set includes at least one module address and is the set of all module addresses on the bus. The free address set includes at least one module address and is the set of module addresses that can be assigned to the first module. The occupied address set is the set of module addresses that have been bound and occupied. It should be understood that both the free address set and the occupied address set are subsets of the module address set.
[0104] Next, power on at least one first module in sequence, so as to convert the module status of each first module on the bus to the online state. It should be understood that the process of powering on in sequence has a sequence in time, and in the embodiment of the present application, the power-on time of each first module is different. Then, for the first module after power-on, execute steps 303 and 304. Specifically, according to the power-on sequence of each first module, steps 303 and 304 are executed for each first module in sequence.
[0105] In step 303, for the first module after power-on, determine whether it has a bound module address based on the module address set. Specifically, the software address bound by the first module can be obtained. If the bound software address is the same as a module address in the module address set, it is determined that the first module has a bound module address. If the first module has no bound software address, or the bound software address of the first module is different from all module addresses in the module address set, it is determined that the first module has no bound module address.
[0106] In step 304, if the first module is not bound with a module address, according to the target policy, select an idle module address from the set of idle addresses and bind it to the first module. If the first module is bound with a module address, determine whether the module address bound by the first module conflicts with the addresses in the set of occupied addresses. Specifically, if the module address bound by the first module is the same as one of the addresses in the set of occupied addresses, it is determined that there is an address conflict. If there is a conflict, according to the target policy, select an idle module address from the set of idle addresses and bind it to the first module. Here, the target policy is pre-set, and those skilled in the art can set specific policies according to actual needs. For example, it can be the idle module address with the smallest address in the set of idle addresses, or the idle module address with the largest address, or the idle module address that has not been used for the longest time, etc. The embodiments of the present application do not make specific limitations on this.
[0107] In the embodiments of the present application, by determining the set of module addresses, the set of idle addresses, and the set of occupied addresses on the bus, and powering on at least one first module in sequence, for the powered-on first module, based on the set of module addresses, determine whether the first module is bound with a module address. If the first module is not bound with a module address, or the first module is bound with a module address and the module address bound by the first module conflicts with the addresses in the set of occupied addresses, according to the target policy, select an idle module address from the set of idle addresses and bind it to the first module. By powering on in sequence and then enabling each first module to bind module addresses based on the power-on order, there is no need for complex operations by the administrator, so that each module address follows the same policy to achieve orderly binding, which is not easy to make mistakes and is convenient for management.
[0108] In some embodiments, the multiple modules include at least one second module. The process of determining the set of idle addresses and the set of occupied addresses includes: if there is at least one second module in an online state on the bus, and the second module is bound with a module address, and the module address is an address in the set of module addresses; determine the module addresses of at least one second module as the set of occupied addresses; based on the set of module addresses and at least one module address, determine the set of idle addresses on the bus; if there is no second module in an online state on the bus, determine the set of occupied addresses as an empty set, and determine the set of module addresses as the set of idle addresses.
[0109] Here, the second module is a module that is online on the bus and has a module address bound thereto. It should be understood that the second module has been in an online state before at least one first module is powered on. In actual implementation, an occupied address set and a free address set can be determined based on at least one second module that is online on the bus. Specifically, if there is at least one second module that is online on the bus, the set composed of the module addresses of at least one second module is determined as the occupied address set. Then, the set obtained by removing at least one module address from the module address set is determined as the free address set on the bus. If there is no second module that is online on the bus, the occupied address set is determined as an empty set, and the module address set is determined as the free address set.
[0110] In the embodiment of the present application, by determining whether there is at least one second module in an online state on the bus and determining the occupied address set and the free address set based on this, it is possible to ensure that the module address assigned to the first module for binding does not conflict with the module address of the online second module, and avoid abnormal problems caused by address conflicts.
[0111] In some embodiments, referring to Figure 4 , Figure 4 is an optional flowchart of the module address binding method provided by the embodiment of the present application. The method further includes: Step 401, if the first module has a module address bound thereto and the module address bound to the first module does not conflict with the address in the occupied address set, update the free address set and the occupied address set based on the module address bound to the first module; after selecting a free module address from the free address set and binding it to the first module, the method further includes: Step 402, update the free address set and the occupied address set based on the free module address.
[0112] In actual implementation, after step 303, if it is determined that the first module has been bound with a module address and the module address bound by the first module does not conflict with the addresses in the occupied address set, then the first module is not rebound with a module address. That is, the module address already bound by the first module is determined as the module address of the first module on the bus. Then, the free address set and the occupied address set are updated so that the next first module executes step 303 based on the updated free address set and occupied address set. Specifically, the module address of the first module is added to the occupied address set and removed from the free address set to obtain the updated occupied address set and free address set. In addition, after step 304, after selecting a free module address from the free address set and binding it to the first module, the free address set and the occupied address set are also updated. Specifically, the free module address bound to the first module is added to the occupied address set and removed from the free address set to obtain the updated occupied address set and free address set.
[0113] Exemplarily, if at least one first module includes the first module 1, the first module 2, and the first module 3, and the power-on sequence of these three first modules is the first module 1, the first module 2, and the first module 3, then step 303 is first executed for the first module 1 based on the free address set and the occupied address set determined in step 301. If the first module 1 meets the conditions in step 304, then the steps in 304 are executed. That is, if the first module 1 is not bound with a module address, or has been bound with a module address and the bound module address conflicts with the addresses in the occupied address set, then according to the target policy, a free module address is selected from the free address set and bound to the first module 1. Then, the free module address bound to the first module 1 is added to the occupied address set and removed from the free address set to update the occupied address set and the free address set. Then, step 303 is executed for the first module 2 based on the updated free address set and occupied address set, and step 304 or step 401 is further executed.
[0114] If the first module 1 meets the conditions in step 401, then the steps in 401 are executed. If it is determined that the first module 1 has been bound with a module address and the bound module address does not conflict with the addresses in the occupied address set, then the module address already bound by the first module 1 is determined as its module address on the bus. Then, the free address set and the occupied address set are updated. That is, the module address bound by the first module 1 is added to the occupied address set and removed from the free address set. Then, step 303 is executed for the first module 2 based on the updated free address set and occupied address set, and step 304 or step 401 is further executed.
[0115] In the embodiment of the present application, when the first module has been bound with a module address and the address does not conflict with the addresses in the occupied address set, the module address bound by the first module is not unbound again, and the free address set and the occupied address set are updated based on the module address bound by the first module. At the same time, if the first module is not bound with a module address, or the first module has been bound with a module address and the bound module address conflicts with the addresses in the occupied address set, after binding a free module address to the first module, the free address set and the occupied address set are updated based on the free module address, so that the next first module can bind the module address according to the updated free address set and occupied address set, streamlining the address binding process and ensuring the orderly binding of the module address by the first module.
[0116] In some embodiments, step 302 includes: determining the physical addresses of the at least one first module; powering on the at least one first module in sequence according to the address order of the physical addresses of the at least one first module; wherein, the address order of the module addresses of the at least one second module corresponds to the address order of the physical addresses of the at least one second module.
[0117] In actual implementation, the at least one first module can be powered on according to the physical address order of the at least one first module. Here, the physical addresses of the at least one first module can be obtained, and the at least one first module can be powered on in sequence according to the ascending order or the descending order of the physical addresses of the at least one first module. Exemplarily, if the physical addresses of the first module 1, the first module 2, and the first module 3 in ascending order are the first module 1, the first module 3, and the first module 2, then the time sequence of powering on these three first modules is the first module 1, the first module 3, and the first module 2. In actual implementation, the control unit can automatically control the at least one first module to be powered on in sequence according to the physical addresses of the at least one first module. In one embodiment, after obtaining the address order of the physical addresses of the at least one first module, the control unit can also generate corresponding power-on order prompt information according to the address order to prompt the user to power on the at least one first module in sequence according to the power-on order prompt information. By powering on the at least one first module in sequence based on the address order of the physical addresses, the module addresses of the at least one module can be bound more orderly, making the module address order of the first module consistent with the address order of its physical address, facilitating address management of the at least one module, and facilitating the search for anomalies if there are errors or exceptions in the address binding.
[0118] In some embodiments, in step 304, the selecting, according to a target policy, an idle module address from the set of idle addresses and binding it to the first module includes: determining the idle module address with the smallest address in the set of idle addresses; and binding the idle module address with the smallest address to the first module.
[0119] Here, the target policy may be to bind the idle module address with the smallest address in the set of idle addresses to the first module for which the module address to be bound is. Specifically, in actual implementation, the idle module address with the smallest address is determined from the set of idle addresses, and the determined smallest idle module address is bound to the corresponding first module. In the embodiments of the present application, by binding the smallest idle module address to the first module, it is possible to make the module addresses bound by each first module in ascending order according to the size of the module addresses bound in the power-on sequence. In one embodiment, if at least one first module is powered on in ascending order of physical addresses, the size order of the module addresses of each first module is the same as the size order of the physical addresses, thereby improving the address orderliness of the first module and facilitating address management.
[0120] In some embodiments, the size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module; before determining the set of module addresses, the set of idle addresses, and the set of occupied addresses, the method further includes: in response to entering the address recognition state, determining the maximum physical address from the physical addresses of at least one first module; determining at least one second module whose physical address on the bus is less than the maximum physical address; and powering on the at least one second module to convert the module state of the at least one second module to the online state.
[0121] In the embodiments of the present application, the size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module. That is to say, when binding the module addresses of the at least one second module, the same policy as when binding the module addresses of the first module is also followed.
[0122] In actual implementation, the control unit can receive an address recognition start instruction issued by a user and enter the address recognition state based on this instruction. When not in the address recognition state, no module address binding is performed on any module. In response to entering the address recognition state, the control unit determines the maximum physical address from the physical addresses of at least one first module, then determines at least one second module on the bus whose physical address is smaller than the maximum physical address, powers on at least one second module, and converts the module state of at least one second module to the online state. Exemplarily, if the physical address of the first module 1 in at least one first module is address 2, the physical address of the first module 2 is address 5, and the physical address of the first module 3 is address 3, then the maximum physical address is address 5. Then, at least one second module on the bus whose physical address is smaller than address 5 is determined, that is, the second modules corresponding to address 1 and address 4. The second modules corresponding to address 1 and address 4 are powered on, and the module states of these two second modules are converted to the online state. Thus, the occupied address set and the free address set are determined based on at least one second module in the online state to perform module address binding on at least one first module.
[0123] The module address binding method provided in the embodiments of the present application will be further described below. The module address binding method is based on an uninterruptible power supply system. Refer to Figure 5 , Figure 5 which is an optional structural schematic diagram of the uninterruptible power supply system provided in the embodiments of the present application. The uninterruptible power supply system includes a bus 501 and multiple modules 502 that are communicatively connected to each other. The multiple modules 502 are used to execute the module address binding method provided in the embodiments of the present application. The multiple modules 502 can control their own access to the bus 501. The multiple modules 102 include at least one first module, and the first module includes a control unit. Refer to Figure 6 , Figure 6 which is an optional flowchart of the module address binding method provided in the embodiments of the present application, and will be described in combination with Figure 6 the steps shown.
[0124] Step 601, after the target first module is powered on, determine the module address set, free address set, and occupied address set on the bus. The module address set includes the free address set and the occupied address set. The module address set includes at least two module addresses. The target first module is one of the at least one first module;
[0125] Step 602, determine whether the target first module is bound with a module address based on the module address set;
[0126] Step 603, if the target first module is not bound with a module address, or the target first module is already bound with a module address and the module address bound by the target first module conflicts with the addresses in the occupied address set, select an idle module address from the idle address set according to the target policy and bind it to the target first module.
[0127] In the previous embodiment, the relevant steps of binding module addresses are executed by the control unit of the power supply system. In this embodiment, there is a control unit inside the module, and the control unit inside the module completes the steps related to module address binding (in this embodiment, it does not exclude that there is also a control unit outside the module in the power supply system for executing other functional steps. Correspondingly, the previous embodiment also does not exclude that there is a control unit inside the module for executing module-level functional steps).
[0128] In this embodiment, before the target first module is powered on, it should also include:
[0129] Step 600, determine the power-on sequence of the target first module; after the power-on of the first module before the power-on sequence is completed, perform the power-on operation on the target first module. Step 600 is not limited to being executed by the control unit at the module level. It can be completed by other control units of the power supply system, or the operation and maintenance personnel can manually power on multiple first modules in sequence. After the first module is powered on, it becomes the target first module, and its own control unit executes the steps of address binding.
[0130] In actual implementation, Step 601 can refer to Step 301 involved in the above embodiments of this application and will not be elaborated here. In Step 600, the target first module determines its power-on sequence. Here, the power-on sequence is the power-on sequence of the target first module among at least one first module. Exemplarily, if at least one first module includes Module 1, Module 2, and Module 3, and the power-on sequence is Module 3 → Module 1 → Module 2, and the target module is Module 1, then its power-on sequence is the second to be powered on. Then, the target first module determines whether the first module before its power-on sequence is powered on. If it is powered on, the power-on operation is started. Here, after the first module before the power-on sequence of the target first module is powered on, it can send an indication message to the target first module to indicate that the power-on is completed. After receiving this indication message, the target first module determines that the first module before its power-on sequence is powered on.
[0131] In actual implementation, Step 602 and Step 603 can refer to Step 303 and Step 304 provided in the above embodiments of this application and will not be elaborated here.
[0132] In the embodiments of the present application, the first module can achieve automatic power-on and address binding through communication with other modules. By binding module addresses in the power-on sequence, without the need for complex operations by the administrator, the addresses of each module follow the same policy to achieve orderly binding, which is not error-prone and convenient for management.
[0133] In some embodiments, the multiple modules include at least one second module. The process of determining the set of free addresses and the set of occupied addresses includes: If there is at least one second module in an online state on the bus, and the second module has been bound with a module address, and the module address is an address in the set of module addresses; determining the module addresses of at least one second module as the set of occupied addresses; based on the set of module addresses and at least one module address, determining the set of free addresses on the bus; If there is no second module in an online state on the bus, determining the set of occupied addresses as an empty set and determining the set of module addresses as the set of free addresses.
[0134] In some embodiments, the method further includes: If the target first module has been bound with a module address and the module address bound by the target first module does not conflict with the addresses in the set of occupied addresses, updating the set of free addresses and the set of occupied addresses based on the module address bound by the target first module; after binding the free module address selected from the set of free addresses to the target first module, the method further includes: updating the set of free addresses and the set of occupied addresses based on the free module address.
[0135] In some embodiments, determining the power-on sequence of the target first module includes: determining the physical addresses of the at least one first module; respectively determining the power-on sequences of the at least one first module according to the address sequence of the physical addresses of the at least one first module; wherein, the address sequence of the module addresses of the at least one second module corresponds to the address sequence of the physical addresses of the at least one second module.
[0136] In some embodiments, selecting a free module address from the set of free addresses and binding it to the target first module according to the target policy includes: determining the free module address with the smallest address in the set of free addresses; binding the free module address with the smallest address to the target first module.
[0137] In some embodiments, the size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module; before determining the set of module addresses, the set of free addresses, and the set of occupied addresses, the method further includes: in response to entering the address recognition state, a target module determines the maximum physical address from the physical addresses of at least one first module, where the target module is one of the multiple modules; determining at least one second module on the bus whose physical address is less than the maximum physical address; if the target module is one of the at least one second module, performing a power-on operation on the target module to convert the module state of the target module to the online state.
[0138] Here, the target module is one of the multiple modules. When the target module is determined to be one of the at least one second module, a power-on operation is performed. Here, the power-on order of the target module is the same as the order of the physical addresses of the at least one second module.
[0139] In some embodiments, the first module is a module with a changing physical address or a module without a bound module address.
[0140] Next, the implementation of the module address binding device 2022 provided in the embodiments of the present application as a software module will be continued. In some embodiments, as Figure 2 shown, the software modules stored in the module address binding device 2022 in the memory 202 may include:
[0141] A first determination module 20221, configured to determine a set of module addresses, a set of free addresses, and a set of occupied addresses on the bus, where the set of module addresses includes the set of free addresses and the set of occupied addresses, and the set of module addresses includes at least two module addresses;
[0142] A power-on module 20222, configured to sequentially power on at least one first module to convert the module state of the corresponding first module to the online state;
[0143] A second determination module 20223, configured to, for the powered-on first module, determine whether the first module is bound with a module address based on the set of module addresses;
[0144] A binding module 20224, configured to, if the first module is not bound with a module address, or if the first module is already bound with a module address and the module address bound by the first module conflicts with the addresses in the set of occupied addresses, select a free module address from the set of free addresses and bind it to the first module.
[0145] In some embodiments, the first determination module 20221 is further configured to: if there is at least one second module in an online state on the bus, the second module has been bound with a module address, and the module address is an address in the module address set; determine the module addresses of at least one second module as the occupied address set; determine the free address set on the bus based on the module address set and at least one module address; if there is no second module in an online state on the bus, determine the occupied address set as an empty set and determine the module address set as the free address set.
[0146] In some embodiments, the apparatus further includes an update module, configured to: if the first module has been bound with a module address and the module address bound by the first module does not conflict with the addresses in the occupied address set, update the free address set and the occupied address set based on the module address bound by the first module; after selecting a free module address from the free address set and binding it to the first module, update the free address set and the occupied address set based on the free module address.
[0147] In some embodiments, the power-on module 20222 is further configured to determine the physical addresses of the at least one first module; power on the at least one first module in sequence according to the address order of the physical addresses of the at least one first module; wherein, the address order of the module addresses of the at least one second module corresponds to the address order of the physical addresses of the at least one second module.
[0148] In some embodiments, the binding module 20224 is further configured to determine the free module address with the smallest address in the free address set; bind the free module address with the smallest address to the first module.
[0149] In some embodiments, the size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module; the apparatus further includes a response module, configured to: in response to entering the address recognition state, determine the maximum physical address from the physical addresses of the at least one first module; determine at least one second module on the bus whose physical address is less than the maximum physical address; power on the at least one second module to convert the module state of the at least one second module into an online state.
[0150] In some embodiments, the first module is a module with a changed physical address or a module not bound with a module address.
[0151] The following continues to describe the module address binding apparatus provided by the embodiments of the present application. Refer to Figure 7 , Figure 7It is an optional structural schematic diagram of the module address binding device provided by the application embodiment. The device is based on a power supply system, the power supply system includes a bus and multiple modules, the multiple modules are communicatively connected, the multiple modules include at least one first module, and the device includes:
[0152] A first determination module 701, configured to determine a module address set, a free address set, and an occupied address set on the bus after the target first module is powered on. The module address set includes the free address set and the occupied address set, the module address set includes at least two module addresses, and the target first module is one of the at least one first module;
[0153] A second determination module 702, configured to determine whether the target first module is bound with a module address based on the module address set;
[0154] A binding module 703, configured to, if the target first module is not bound with a module address, or if the target first module is already bound with a module address and the module address bound by the target first module conflicts with the address in the occupied address set, select a free module address from the free address set and bind it to the target first module according to a target policy.
[0155] In some embodiments, the first determination module 701 is further configured to, if there is at least one second module in an online state on the bus, and the second module is already bound with a module address, and the module address is an address in the module address set; determine the module addresses of at least one second module as the occupied address set; determine the free address set on the bus based on the module address set and at least one module address; if there is no second module in an online state on the bus, determine the occupied address set as an empty set, and determine the module address set as the free address set.
[0156] In some embodiments, the device further includes: an update module, configured to, if the target first module is already bound with a module address and the module address bound by the target first module does not conflict with the address in the occupied address set, update the free address set and the occupied address set based on the module address bound by the target first module; the update module is further configured to, after selecting a free module address from the free address set and binding it to the target first module, update the free address set and the occupied address set based on the free module address.
[0157] In some embodiments, the second determination module 702 is further configured to determine the physical addresses of the at least one first module; and determine the power-on sequence of the at least one first module respectively according to the address sequence of the physical addresses of the at least one first module; wherein, the address sequence of the module addresses of the at least one second module corresponds to the address sequence of the physical addresses of the at least one second module.
[0158] In some embodiments, the binding module 703 is further configured to determine the free module address with the smallest address in the set of free addresses; and bind the free module address with the smallest address to the target first module.
[0159] In some embodiments, the size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module; before determining the set of module addresses, the set of free addresses and the set of occupied addresses, the apparatus further includes: a state conversion module, configured to, in response to a target module entering an address recognition state, determine the maximum physical address from the physical addresses of the at least one first module, where the target module is one of the multiple modules; determine at least one second module whose physical address on the bus is less than the maximum physical address; and if the target module is one of the at least one second module, perform a power-on operation on the target module to convert the module state of the target module into an online state.
[0160] In some embodiments, the first module is a module whose physical address changes, or a module that is not bound with a module address.
[0161] It should be noted that the description of the apparatus in the embodiments of the present application is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments, so details are not described herein.
[0162] An embodiment of the present application provides a power supply system, which includes: a bus; a plurality of modules, including at least one first module; and a control unit configured to execute the module address binding method provided in the embodiments of the present application.
[0163] An embodiment of the present application provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the module address binding method described above in the embodiments of the present application.
[0164] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, where the executable instructions, when executed by a processor, cause the processor to execute the module address binding method provided in the embodiments of the present application.
[0165] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0166] In some embodiments, the executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a stand-alone program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0167] As an example, the executable instructions may or may not correspond to a file in the file system, and may be stored as part of a file that holds other programs or data. For example, they may be stored in one or more scripts in a Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or stored in multiple cooperating files (such as files that store one or more modules, subroutines, or portions of code).
[0168] As an example, the executable instructions may be deployed to execute on one computing device, or on multiple computing devices located at one location, or alternatively, on multiple computing devices distributed across multiple locations and interconnected by a communication network.
[0169] In summary, through the embodiments of the present application, it is possible to achieve an orderly binding of the addresses of each module without complex operations by the administrator, which is not error-prone and convenient for management.
[0170] The above is only the embodiments of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A module address binding method, characterized in that, Based on a power supply system, the power supply system includes a bus, a control unit, and multiple modules. The control unit is connected to the bus, and the control unit is connected to the multiple modules. The multiple modules include at least one first module. The method is applied to the control unit and includes: Determine a module address set, an idle address set, and an occupied address set on the bus. The module address set includes the idle address set and the occupied address set, and the module address set includes at least two module addresses. Power on at least one first module in sequence to convert the module state of the corresponding first module to the online state. For the powered-on first module, determine whether the first module is bound with a module address based on the module address set. If the first module is not bound with a module address, or the first module is already bound with a module address and the module address bound by the first module conflicts with the address in the occupied address set, select an idle module address from the idle address set and bind it to the first module according to the target policy.
2. The method according to claim 1, wherein The multiple modules include at least one second module. The determination process of the idle address set and the occupied address set includes: If there is at least one second module in the online state on the bus, the second module is already bound with a module address, and the module address is an address in the module address set. Determine the module addresses of at least one second module as the occupied address set. Based on the module address set and at least one module address, determine the idle address set on the bus. If there is no second module in the online state on the bus, determine the occupied address set as an empty set and determine the module address set as the idle address set.
3. The method according to claim 1, wherein The method further includes: If the first module is already bound with a module address and the module address bound by the first module does not conflict with the address in the occupied address set, update the idle address set and the occupied address set based on the module address bound by the first module. After selecting an idle module address from the idle address set and binding it to the first module, the method further includes: Update the idle address set and the occupied address set based on the idle module address.
4. The method according to claim 2, wherein The powering on at least one first module in sequence includes: Determine the physical addresses of the at least one first module. Power on at least one first module in sequence according to the address order of the physical addresses of the at least one first module. Wherein, the address order of the module addresses of the at least one second module corresponds to the address order of the physical addresses of the at least one second module.
5. The method according to claim 2, wherein The selecting an idle module address from the idle address set and binding it to the first module according to the target policy includes: Determine the idle module address with the smallest address in the idle address set. Bind the idle module address with the smallest address to the first module.
6. The method according to claim 5, wherein The size order of the module addresses of the at least one second module is the same as the size order of the physical addresses of the at least one second module; before determining the set of module addresses, the set of free addresses, and the set of occupied addresses, the method further includes: In response to entering the address recognition state, determining the maximum physical address from the physical addresses of at least one first module; Determining at least one second module on the bus whose physical address is less than the maximum physical address; Powering on the at least one second module to convert the module state of the at least one second module to the online state.
7. The method according to claim 1, characterized in that The first module is a module whose physical address changes, or a module that is not bound with a module address.
8. A module address binding method, characterized in that, Based on a power supply system, the power supply system includes a bus and a plurality of modules, the plurality of modules are communicatively connected to each other, the plurality of modules include at least one first module, and the first module includes a control unit. The method includes: After the target first module is powered on, determining the set of module addresses, the set of free addresses, and the set of occupied addresses on the bus. The set of module addresses includes the set of free addresses and the set of occupied addresses. The set of module addresses includes at least two module addresses. The target first module is one of the at least one first module; Determining whether the target first module is bound with a module address based on the set of module addresses; If the target first module is not bound with a module address, or the target first module is already bound with a module address and the module address bound by the target first module conflicts with the address in the set of occupied addresses, selecting a free module address from the set of free addresses and binding it to the target first module according to a target policy.
9. A power supply system, characterized in that, Including: A bus; A plurality of modules, including at least one first module; A control unit for executing the module address binding method according to any one of claims 1-7.
10. A power supply system, characterized in that, Including: A bus; A plurality of modules communicatively connected to each other, the plurality of modules include at least one first module, and the first module includes a control unit. The control unit is used to execute the module address binding method according to claim 8.