Address allocation method and device, equipment and medium
The switch status of the high-voltage box circuit breaker is controlled through the main control module, and the coded command is sent to the main control module. The existing circuit breaker and main control module are used to realize the BCMU address allocation of the battery management system, solving the problems of time-consuming, error-prone and cost-effective address allocation in the existing technology, and realizing low-cost and efficient address allocation.
Patent Information
- Application Number
- CN202510766802.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-18
AI Technical Summary
In the battery management system, the BCMU address configuration has problems such as time-consuming, error-prone and increased costs, especially the manual encoding scheme consumes time, automatic encoding scheme increases hardware cost, and the hardware encoding module scheme increases labor cost.
The main control module controls the switch status of the circuit breaker in the high-voltage box, sends coded commands to the main control module, and uses existing circuit breakers and main control modules to achieve address allocation, avoiding increased hardware and manual intervention, and use indicator lights to display the coded status and automatically update the address.
It realizes efficiently completing BCMU address allocation without increasing costs and reducing manual participation, reducing error probability and improving coding efficiency.
Smart Images

Figure CN120343003A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to an address allocation method, device, equipment and medium. Background Art
[0002] The Battery Management System (BMS) is an important part of the energy storage system, mainly used for collecting and monitoring the operating states of all battery clusters and battery cells in the battery stack. Currently, the energy storage battery management system usually adopts a three-level architecture, consisting of a total control module (Battery System Management Unit, BSMU), a main control module (Battery Cluster Management Unit, BCMU), and a slave control module (Battery Management Unit, BMU). Currently, the BCMU of the energy storage system battery management system is usually placed inside the high-voltage box module. Since there are usually 8 to 12 BCMU modules in a single container, considering factors such as project cost and workload, only the BCMU module is supported to automatically code the BMU module.
[0003] In addition, one BSMU usually matches multiple BCMUs. The BSMU and the BCMU communicate through the Controller Area Network (CAN). Different device coding addresses (IDs, Identities) need to be allocated for communication in the CAN network. The current BCMU address configuration usually adopts the following three schemes: Scheme 1: A coding scheme for manually setting the ID of the BCMU (see Figure 1 and Figure 2 shown, which will not be specifically introduced here. Figure 1 is a schematic diagram of the device for Scheme 1, Figure 2 is a schematic diagram of the process for Scheme 1). Scheme 2: A scheme for adding Digital Output (DO), Digital Input Detection (DI), and an inter-cluster coding wire harness to implement an automatic coding scheme (see Figure 3 and Figure 4 shown, which will not be specifically introduced here. Figure 3 is a schematic diagram of the device for Scheme 2, Figure 4 is a schematic diagram of the process for Scheme 2). Scheme 3: Adding a hardware coding module and a multiplexer detection circuit to implement automatic coding (see Figure 5 and Figure 6 shown, which will not be specifically introduced here. Figure 5 is a schematic diagram of the device for Scheme 3, Figure 6 is a schematic diagram of the process for Scheme 3).
[0004] For the manual coding scheme of Solution 1, it is only possible to finally complete all the BCMU codings by repeatedly cutting off the power supply of the device - manually setting the coding address later, which has problems such as long time consumption and easy errors. For the automatic coding scheme of Solution 2, because it is necessary to increase the hardware circuit design, it occupies more resources, increases the project cost and the complexity of the wire harness, etc. For Solution 3, it is necessary to add a coding module and a multi-way switch detection circuit, and it is necessary for personnel to set the status of the multi-way switch, increasing the project cost and labor cost.
[0005] In summary, how to achieve address allocation on the basis of avoiding cost increase and reducing manual participation is an urgent problem to be solved currently. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide an address allocation method, device, equipment and medium, which can achieve address allocation on the basis of avoiding cost increase and reducing manual participation. The specific scheme is as follows:
[0007] In the first aspect, the present application discloses an address allocation method, which is applied to an address allocation system. The address allocation system includes a master control module and several high-voltage boxes. Each high-voltage box includes a circuit breaker switch and a master control module. The method includes:
[0008] When the master control module determines that the circuit breaker switches in all the high-voltage boxes are in the off state, send a coding instruction to the master control module in each high-voltage box to make the high-voltage box in a state to be coded, and determine the current preset coding address;
[0009] Through the master control module in each high-voltage box, determine the target high-voltage box where the circuit breaker switch changes from the off state to the on state;
[0010] Send a coding start message including the current preset coding address to the master control module by the target master control module in the target high-voltage box;
[0011] Update the current coding address of the target master control module in the target high-voltage box to the current preset coding address by the master control module, and after obtaining the coding completion message returned by the target master control module, update the current preset coding address to obtain a new current preset coding address;
[0012] Jump to the step of determining the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the master control module in each high-voltage box until the address allocation of all the master control modules in the high-voltage boxes is completed.
[0013] Optionally, the master control module in each high-voltage box further includes an indicator light;
[0014] After sending the encoding instruction to the main control module in each of the high-voltage boxes to make the high-voltage boxes in the to-be-encoded state, it further includes:
[0015] Controlling the corresponding indicator lights to operate in the first mode through the main control module in each of the high-voltage boxes;
[0016] Correspondingly, after updating the current encoding address of the target main control module in the target high-voltage box to the current preset encoding address through the master control module, it further includes:
[0017] Controlling the corresponding indicator lights to operate in the second mode through the target main control module.
[0018] Optionally, the main control module in each of the high-voltage boxes further includes a data output control unit;
[0019] Correspondingly, the method further includes:
[0020] Controlling the operation mode of the indicator lights through the data output control unit.
[0021] Optionally, after sending the encoding instruction to the main control module in each of the high-voltage boxes to make the high-voltage boxes in the to-be-encoded state, it further includes:
[0022] Initializing the encoding address of the main control module in each of the high-voltage boxes through the main control module to determine the current encoding address of the main control module in each of the high-voltage boxes;
[0023] Correspondingly, updating the current preset encoding address to obtain a new current preset encoding address includes:
[0024] Determining the sum of the current preset encoding address and the target data as the new current preset encoding address.
[0025] Optionally, the main control module in each of the high-voltage boxes further includes a storage unit for storing the encoding address;
[0026] Correspondingly, updating the current encoding address of the target main control module in the target high-voltage box to the current preset encoding address through the master control module includes:
[0027] Updating the current encoding address in the storage unit of the target main control module in the target high-voltage box to the current preset encoding address through the master control module.
[0028] Optionally, the main control module in each of the high-voltage boxes further includes a data input detection unit;
[0029] Correspondingly, the method further includes:
[0030] The state corresponding to the breaker switch is detected in real time by the data input detection unit.
[0031] Optionally, the address allocation system further includes an inter-cluster communication harness for implementing information and instruction transmission between the master control module and the high-voltage box.
[0032] In a second aspect, the present application discloses an address allocation device applied to an address allocation system. The address allocation system includes a master control module and a plurality of high-voltage boxes, and each high-voltage box includes a breaker switch. The device includes:
[0033] An instruction sending module, configured to send an encoded instruction to the master control module in each high-voltage box through the master control module when it is determined that the breaker switches in all the high-voltage boxes are in the off state, so that the high-voltage box is in a state to be encoded, and determine the current preset encoding address;
[0034] A target high-voltage box determination module, configured to determine the target high-voltage box in which the breaker switch changes from the off state to the on state through the master control module in each high-voltage box;
[0035] An information sending module, configured to send encoding start information including the current preset encoding address to the master control module through the target master control module in the target high-voltage box;
[0036] An address update module, configured to update the current encoding address of the target master control module in the target high-voltage box to the current preset encoding address through the master control module, and update the current preset encoding address after obtaining the encoding completion information returned by the target master control module to obtain a new current preset encoding address;
[0037] A jump module, configured to jump to the step of determining the target high-voltage box in which the breaker switch changes from the off state to the on state through the master control module in each high-voltage box until the address allocation for the master control modules in all the high-voltage boxes is completed.
[0038] In a third aspect, the present application discloses an electronic device, including:
[0039] A memory, configured to store a computer program;
[0040] A processor, configured to execute the computer program to implement the address allocation method disclosed above.
[0041] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the address allocation method disclosed above is implemented.
[0042] It can be seen that when it is determined that all the circuit breaker switches in the high-voltage boxes are in the off state, the present application sends an encoding instruction to the main control module in each high-voltage box to make the high-voltage box in a state to be encoded, and determines the current preset encoding address; determines the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the main control module in each high-voltage box; updates the current encoding address of the target main control module in the target high-voltage box to the current preset encoding address through the master control module, and after obtaining the encoding completion information returned by the target main control module, updates the current preset encoding address to obtain a new current preset encoding address; jumps to the step of determining the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the main control module in each high-voltage box until the address allocation of all the main control modules in the high-voltage boxes is completed. Thus, it can be seen that the present application utilizes the original master control module and high-voltage boxes in the address allocation system, and the circuit breaker switches and main control modules in the high-voltage boxes are also original, without adding any new devices, so the cost will not be increased; the present application controls the start of encoding and other operations through the state of the circuit breaker switch, without adding software and circuit-related modules for controlling the start of encoding and other operations, so the cost will not be increased; the present application realizes the determination of the preset encoding address and the allocation of the target main control module address through the master control module, without manually adding addresses, further avoiding the situation of address errors. In summary, the present application can achieve address allocation on the basis of avoiding cost increase and reducing manual participation. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0044] Figure 1 It is a schematic diagram of the device of the first existing solution;
[0045] Figure 2 It is a schematic flowchart of the first existing solution;
[0046] Figure 3 It is a schematic diagram of the device of the second existing solution;
[0047] Figure 4 It is a schematic flowchart of the second existing solution;
[0048] Figure 5 It is a schematic diagram of the device of the third existing solution;
[0049] Figure 6 It is a schematic flowchart of the third existing solution;
[0050] Figure 7 Flow chart of an address allocation method disclosed in this application;
[0051] Figure 8 Schematic diagram of an address allocation system disclosed in this application;
[0052] Figure 9 Schematic diagram of the internal structure of a specific high - voltage box disclosed in this application;
[0053] Figure 10 Schematic diagram of a specific address allocation process disclosed in this application;
[0054] Figure 11 Schematic diagram of the structure of an address allocation device disclosed in this application;
[0055] Figure 12 Schematic diagram of the structure of an electronic device disclosed in this application. Detailed implementation manners
[0056] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0057] One BSMU usually matches multiple BCMUs. The BSMU and BCMU communicate through a Controller Area Network (CAN). Different device coding addresses (IDs) need to be allocated for communication in the CAN network. The current BCMU address configuration usually adopts the following three schemes: Scheme 1: A coding scheme for manually setting the ID of the BCMU. Scheme 2: A scheme for adding digital output control, digital input detection, and an inter - cluster coding wire harness to implement an automatic coding scheme. Scheme 3: Adding a hardware coding module and a multiplexer detection circuit to implement automatic coding.
[0058] For the manual coding scheme of Scheme 1, it is only possible to complete the coding of all BCMUs by repeatedly cutting off the power supply of the device - manually setting the coding address multiple times, which has problems such as long time consumption and easy errors. For the automatic coding scheme of Scheme 2, because it is necessary to add hardware circuit design, it has disadvantages such as occupying more resources, increasing project costs, and the complexity of the wire harness. For Scheme 3, it is necessary to add a coding module and a multiplexer detection circuit, and it is necessary for personnel to set the state of the multiplexer, increasing project costs and labor costs.
[0059] Therefore, the embodiments of this application propose an address allocation scheme that can achieve address allocation on the basis of avoiding cost increase and reducing manual participation.
[0060] An embodiment of the present application discloses an address allocation method, which is applied to an address allocation system. The address allocation system includes a master control module and a plurality of high-voltage boxes. Each high-voltage box includes a circuit breaker switch and a master control module. Refer to Figure 7 As shown, the method includes:
[0061] Step S11: When the master control module determines that the circuit breaker switches in all the high-voltage boxes are in the off state, send an encoding instruction to the master control module in each high-voltage box to make the high-voltage box in a state to be encoded, and determine the current preset encoding address.
[0062] In this embodiment, the master control module will start encoding only after the user sends an encoding instruction to the master control module; the current preset encoding address is set according to the actual situation; the state of the circuit breaker switch is controlled manually, and the judgment of the state of the circuit breaker switch is completed by the master control module. Specifically, the master control module in each high-voltage box further includes a data input detection unit; correspondingly, the method further includes: detecting the state of the corresponding circuit breaker switch in real time through the data input detection unit (DI).
[0063] In this embodiment, different process settings in the encoding process can be made to have different indicator light display modes by increasing the indicator light display, so that the user can directly understand the current encoding state through the indicator light. For example, when the preconditions for encoding are met (the circuit breaker switch is in the off state and all high-voltage boxes are in a state to be encoded), the indicator light can be made to operate in a certain mode to indicate that the current situation meets the preconditions for encoding, and in other cases, it operates in another way. Specifically, the master control module in each high-voltage box further includes an indicator light; wherein, after sending the encoding instruction to the master control module in each high-voltage box to make the high-voltage box in a state to be encoded, it further includes: controlling the corresponding indicator light to operate in a first mode through the master control module in each high-voltage box. The indicator light operation mode includes but is not limited to controlling the indicator light to flash at a target frequency, the indicator light being constantly on, etc. The target frequency can be set according to the actual situation and can be 1HZ.
[0064] In this embodiment, the master control module in each high-voltage box further includes a data output control unit; correspondingly, the method further includes: controlling the operation mode of the indicator light through the data output control unit (DO).
[0065] In this embodiment, the encoding addresses of all master control modules can be initialized before encoding, and can be specifically initialized to 0. After sending an encoding instruction to the master control module in each of the high-voltage boxes to put the high-voltage boxes in a state to be encoded, the method further includes: initializing the encoding addresses of the master control modules in each of the high-voltage boxes through the master control module to determine the current encoding addresses of the master control modules in each of the high-voltage boxes.
[0066] In this embodiment, the address allocation system further includes an inter-cluster communication harness for realizing communication between the master control module and the master control modules, and the communication is specifically completed through CAN.
[0067] Step S12: Determine, through the master control module in each of the high-voltage boxes, the target high-voltage box where the circuit breaker switch changes from the off state to the on state.
[0068] In this embodiment, the state of the corresponding circuit breaker switch is detected in real time through the data input detection unit (DI). The data input detection unit of the master control module in each of the high-voltage boxes can obtain the information input by the circuit breaker switch in real time to detect the state of the circuit breaker switch in real time. If the information input by the circuit breaker switch indicates that the circuit breaker switch changes from the off state to the on state, the master control module in the target high-voltage box where the circuit breaker switch is located can be encoded to obtain an allocated address.
[0069] Step S13: Update the current encoding address of the target master control module in the target high-voltage box to the current preset encoding address through the master control module, and after obtaining the encoding completion information returned by the target master control module, update the current preset encoding address to obtain a new current preset encoding address.
[0070] In this embodiment, after determining the target high-voltage box, the target high-voltage box sends an encoding permission message to the master control module, and the master control module sends an encoding start message to the master control module to store the current preset encoding address in the encoding start message to the corresponding address location to complete address allocation.
[0071] In this embodiment, updating the encoding address is specifically to store the current preset encoding address to a predetermined location. Specifically, the master control module in each of the high-voltage boxes further includes a storage unit for storing the encoding address. Correspondingly, the step of updating the current encoding address of the target master control module in the target high-voltage box to the current preset encoding address through the master control module includes: updating the current encoding address in the storage unit of the target master control module in the target high-voltage box to the current preset encoding address through the master control module.
[0072] In this embodiment, after sending an encoding instruction to the main control module in each of the high-voltage boxes to make the high-voltage boxes in a state to be encoded, the following steps are further included: controlling the corresponding indicator lights to operate in a first mode through the main control module in each of the high-voltage boxes; after updating the current encoding address of the target main control module in the target high-voltage box to the current preset encoding address through the master control module, the following steps are further included: controlling the corresponding indicator lights to operate in a second mode through the target main control module. Here, the first mode and the second mode are different.
[0073] In this embodiment, the update method for updating the current preset encoding address to obtain a new current preset encoding address can be set according to specific circumstances. Correspondingly, the update for the current preset encoding address to obtain a new current preset encoding address includes: determining the sum of the current preset encoding address and the target data as the new current preset encoding address. Set the target data according to the actual situation. Additionally, the target data is generally 1.
[0074] Step S14: Jump to the step of determining the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the main control module in each of the high-voltage boxes until the address assignment for the main control modules in all the high-voltage boxes is completed.
[0075] In this embodiment, the state of the circuit breaker switch is manually controlled, and the target main control module of the target high-voltage box corresponding to the circuit breaker switch only performs address encoding when the circuit breaker switch changes from the off state to the on state. Therefore, the order of the high-voltage boxes to be encoded is manually controlled. The user needs to preset the order of the high-voltage boxes to be encoded in advance and then control the corresponding circuit breaker switches in sequence.
[0076] It should be noted that the feature of this application is to utilize the existing devices in the high-voltage box (including but not limited to indicator lights, circuit breakers, etc.) to cooperate with the operator to achieve low-cost automatic encoding. It can optimize the manual encoding scheme, improve the encoding efficiency, reduce the probability of encoding errors in the project while keeping the project cost unchanged, and realize the automatic encoding function by reusing the existing resources in the high-voltage box.
[0077] It can be seen that when it is determined that all the circuit breaker switches in the high-voltage boxes are in the off state, the present application sends an encoding instruction to the main control module in each high-voltage box to make the high-voltage box in a state to be encoded, and determines the current preset encoding address; determines the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the main control module in each high-voltage box; updates the current encoding address of the target main control module in the target high-voltage box to the current preset encoding address through the master control module, and after obtaining the encoding completion information returned by the target main control module, updates the current preset encoding address to obtain a new current preset encoding address; jumps to the step of determining the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the main control module in each high-voltage box until the address assignment for all the main control modules in the high-voltage boxes is completed. Thus, it can be seen that the present application utilizes the original master control module and high-voltage boxes in the address assignment system, and the circuit breaker switches and main control modules in the high-voltage boxes are also original, without adding any new devices, so the cost will not be increased; the present application controls the start of encoding through the state of the circuit breaker switch and does not require adding software and circuit-related modules for controlling the start of encoding, etc., so the cost will not be increased; the present application realizes the determination of the preset encoding address and the assignment of the target main control module address by the master control module, without manual address addition, further avoiding the situation of address errors. In summary, the present application can achieve address assignment on the basis of avoiding cost increase and reducing manual participation.
[0078] See Figure 8 shown, is a schematic diagram of an address assignment system. See Figure 9 shown, is a schematic diagram of the internal structure of a specific high-voltage box (taking the 1 high-voltage box as an example); the address assignment system mainly consists of a BSMU module (serial number 11), a 1 high-voltage box module (serial number 13), a 2 high-voltage box module (serial number 14), a 3 high-voltage box module (serial number 15), …, an Nth high-voltage box module (serial number 1(N + 2)), and an inter-battery cluster communication harness (serial number 12). Figure 9 Among them, the high-voltage box includes a BCMU (serial number 131), an indicator light, an indicator light (serial number 132, including but not limited to a fault indicator light and an operation indicator light), a circuit breaker switch (serial number 133), etc. electronic devices. The BCMU includes a storage unit, DO, and DI.
[0079] See Figure 10 shown, is a schematic diagram of a specific address assignment process; the specific encoding process is described as follows:
[0080] 1. After the battery management system is powered on, after confirming that all circuit breakers are in the off state, if any circuit breaker is in the on state, the BSMU module will feedback encoding failure, and the encoding precondition is not met.
[0081] 2. The user sends a coding command for the high-voltage box (BCMU module) to the BSMU;
[0082] 3. After receiving the coding command, the BSMU sends the coding command to all BCMUs, determines the current preset coding address (N = 1), and sets the current coding address of all main control modules to 0 (ID = 0) (i.e., the initialization step);
[0083] 4. After receiving the coding command, the BCMU enters the automatic coding mode (pending coding state) and controls the indicator light to flash at a frequency of 1 Hz;
[0084] 5. When all high-voltage boxes enter the pending coding mode, accurate address coding can be performed (the user can determine whether the high-voltage box is in the pending coding state according to the indicator light status). If there is a high-voltage box in the non-coding mode, the BSMU module reports an error that the pre-coding condition is not met;
[0085] 6. The user closes the circuit breaker switch of high-voltage box 1;
[0086] 7. After the BCMU module of high-voltage box 1 detects that the circuit breaker is in the closed state through DI, the main control module updates the address of the BCMU module to N (N = 1) and stores this parameter as the coding address in the storage unit. After the BCMU finishes storing the coding address, it feeds back the coding completion to the BSMU through the CAN message and controls the indicator light to be constantly on;
[0087] 8. After receiving the feedback of coding completion from the BCMU module, the BSMU updates the new main control address to N (N = N + 1);
[0088] 9. Operate to close the circuit breaker of high-voltage box 2;
[0089] 10. After the coding of high-voltage box 2 is completed, the coding of high-voltage boxes 3 to N is completed in sequence by closing the circuit breaker;
[0090] 11. The BSMU module confirms that all high-voltage box modules (or BCMU modules) have unique coding addresses, and the automatic coding is completed. Otherwise, the BSMU feedbacks coding failure and locates the high-voltage box with coding failure according to the indicator light status.
[0091] In summary, the beneficial effects of this application are as follows: Low cost: It can utilize the existing devices (indicator lights, circuit breakers) inside the high-voltage box to achieve information exchange in the coding mode, cooperate to complete the coding work, and ensure the realization of necessary functions at low cost for the project. Easy to operate and strong adaptability: Compared with the traditional manual coding method, it reduces the operation difficulty and effectively avoids errors caused by personnel operation. It reduces the time required for operators during the coding process and improves the project commissioning speed.
[0092] Correspondingly, an embodiment of the present application further discloses an address allocation device, which is applied to an address allocation system. The address allocation system includes a master control module and a plurality of high-voltage boxes. Each high-voltage box includes a circuit breaker switch. Refer to Figure 11 As shown, the device includes:
[0093] An instruction sending module 21, configured to send an encoded instruction to the master control module in each high-voltage box through the master control module when it is determined that the circuit breaker switches in all the high-voltage boxes are in the off state, so that the high-voltage box is in a state to be encoded, and determine the current preset encoding address;
[0094] A target high-voltage box determining module 22, configured to determine the target high-voltage box in which the circuit breaker switch changes from the off state to the on state through the master control module in each high-voltage box;
[0095] An address updating module 23, configured to update the current encoding address of the target master control module in the target high-voltage box to the current preset encoding address through the master control module, and update the current preset encoding address after obtaining the encoding completion information returned by the target master control module to obtain a new current preset encoding address;
[0096] A jump module 24, configured to jump to the step of determining the target high-voltage box in which the circuit breaker switch changes from the off state to the on state through the master control module in each high-voltage box until the address allocation for the master control modules in all the high-voltage boxes is completed.
[0097] Among them, for the more specific working processes of the above-mentioned modules, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.
[0098] It can be seen that when it is determined that the circuit breaker switches in all the high-voltage boxes are in the off state, the present application sends an encoding instruction to the main control module in each high-voltage box to make the high-voltage box in a state to be encoded, and determines the current preset encoding address; determines the target high-voltage box in which the circuit breaker switch changes from the off state to the on state through the main control module in each high-voltage box; updates the current encoding address of the target main control module in the target high-voltage box to the current preset encoding address through the master control module, and after obtaining the encoding completion information returned by the target main control module, updates the current preset encoding address to obtain a new current preset encoding address; jumps to the step of determining the target high-voltage box in which the circuit breaker switch changes from the off state to the on state through the main control module in each high-voltage box, until the address allocation for the main control modules in all the high-voltage boxes is completed. Thus, it can be seen that the present application utilizes the original master control module and high-voltage boxes in the address allocation system, and the circuit breaker switches and main control modules in the high-voltage boxes are also original, without adding any new devices, so the cost will not be increased; the present application controls the start of encoding through the state of the circuit breaker switch and other operations, and does not require adding software and circuit-related modules for controlling the start of encoding and other operations, so the cost will not be increased; the present application realizes the determination of the preset encoding address and the allocation of the target main control module address by the master control module, without manual address addition, further avoiding the situation of address errors. In summary, the present application can achieve address allocation on the basis of avoiding cost increase and reducing manual participation.
[0099] Further, the embodiment of the present application also provides an electronic device. Figure 12 It is a structural diagram of an electronic device 30 shown according to an exemplary embodiment, and the content in the figure should not be regarded as any limitation on the scope of use of the present application.
[0100] Figure 12 It is a schematic structural diagram of an electronic device 30 provided by an embodiment of the present application. The electronic device 30 may specifically include: at least one processor 31, at least one memory 32, a display screen 33, an input / output interface 34, a communication interface 35, a power supply 36, and a communication bus 37. Among them, the memory 32 is used to store a computer program, and the computer program is loaded and executed by the processor 31 to implement the relevant steps in the address allocation method disclosed in any of the foregoing embodiments. In addition, the electronic device 30 in this embodiment may specifically be an electronic computer.
[0101] In this embodiment, the power supply 36 is used to provide operating voltages for the various hardware devices on the electronic device 30; the communication interface 35 can create a data transmission channel between the electronic device 30 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and specific limitations thereof are not provided herein; the input / output interface 34 is used to obtain external input data or output data to the outside, and the specific interface type thereof can be selected according to specific application requirements, and specific limitations thereof are not provided herein.
[0102] In addition, the memory 32, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, an optical disk, etc., and the resources stored thereon can include a computer program 321, and the storage method can be transient storage or permanent storage. Among them, in addition to the computer program capable of implementing the address allocation method executed by the electronic device 30 disclosed in any of the foregoing embodiments, the computer program 321 can further include a computer program capable of performing other specific tasks.
[0103] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the foregoing disclosed address allocation method is implemented.
[0104] Regarding the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated herein.
[0105] The various embodiments in this application are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, reference can be made to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and reference can be made to the description in the method part for related parts.
[0106] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0107] The steps of the methods or algorithms described in connection with the embodiments disclosed in this specification may be implemented directly in hardware, in software modules executed by a processor, or in a combination thereof. The software modules may be located in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium well-known in the art.
[0108] Finally, it should also be noted that in this specification, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0109] The above has introduced in detail an address allocation method, apparatus, device, and storage medium provided by the present application. Specific examples are used in this specification to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. An address allocation method, characterized in that, Applied to an address allocation system, the address allocation system includes a master control module and a number of high-voltage boxes, each high-voltage box includes a circuit breaker switch and a master control module, and the method includes: When the master control module determines that the circuit breaker switches in all the high-voltage boxes are in the off state, send a coding instruction to the master control module in each high-voltage box to make the high-voltage box in a state to be coded, and determine the current preset coding address; Through the master control module in each high-voltage box, determine the target high-voltage box where the circuit breaker switch changes from the off state to the on state; Through the master control module, update the current coding address of the target master control module in the target high-voltage box to the current preset coding address, and after obtaining the coding completion information returned by the target master control module, update the current preset coding address to obtain a new current preset coding address; Jump to the step of determining the target high-voltage box where the circuit breaker switch changes from the off state to the on state through the master control module in each high-voltage box until the address allocation for the master control modules in all the high-voltage boxes is completed.
2. The address allocation method according to claim 1, wherein The master control module in each of the high-voltage boxes further includes an indicator light; Wherein, after sending the coding instruction to the master control module in each high-voltage box to make the high-voltage box in a state to be coded, it further includes: Through the master control module in each high-voltage box, control the corresponding indicator light to operate in a first mode; Correspondingly, after updating the current coding address of the target master control module in the target high-voltage box to the current preset coding address through the master control module, it further includes: Through the target master control module, control the corresponding indicator light to operate in a second mode.
3. The address allocation method according to claim 2, wherein The master control module in each of the high-voltage boxes further includes a data output control unit; Correspondingly, the method further includes: Control the operation mode of the indicator light through the data output control unit.
4. The address allocation method according to claim 1, characterized in that After sending the coding instruction to the master control module in each high-voltage box to make the high-voltage box in a state to be coded, it further includes: Through the master control module, initialize the coding address of the master control module in each high-voltage box to determine the current coding address of the master control module in each high-voltage box; Correspondingly, updating the current preset coding address to obtain a new current preset coding address includes: Determine the sum of the current preset coding address and the target data as the new current preset coding address.
5. The address allocation method according to claim 4, characterized in that The master control module in each of the high-voltage boxes further includes a storage unit for storing the coding address; Correspondingly, updating the current coding address of the target master control module in the target high-voltage box to the current preset coding address through the master control module includes: Through the master control module, update the current coding address in the storage unit of the target master control module in the target high-voltage box to the current preset coding address.
6. The address allocation method according to claim 1, characterized in that, The master control module in each of the high-voltage boxes further includes a data input detection unit; Correspondingly, the method further includes: Through the data input detection unit, detect the state of the corresponding circuit breaker switch in real time.
7. The address allocation method according to claim 1, characterized in that The address allocation system further includes an inter-cluster communication harness for implementing information and instruction transmission between the master control module and the high-voltage box.
8. An address allocation device, characterized in that, Applied to an address allocation system, the address allocation system includes a master control module and a plurality of high-voltage boxes, each of the high-voltage boxes includes a circuit breaker switch, and the device includes: An instruction sending module, configured to send an encoded instruction to the master control module in each of the high-voltage boxes through the master control module when it is determined that the circuit breaker switches in all the high-voltage boxes are in the off state, so that the high-voltage boxes are in a state to be encoded, and determine the current preset encoding address; A target high-voltage box determining module, configured to determine the target high-voltage box in which the circuit breaker switch changes from the off state to the on state through the master control module in each of the high-voltage boxes; An address updating module, configured to update the current encoding address of the target master control module in the target high-voltage box to the current preset encoding address through the master control module, and update the current preset encoding address after obtaining the encoding completion information returned by the target master control module to obtain a new current preset encoding address; A jump module, configured to jump to the step of determining the target high-voltage box in which the circuit breaker switch changes from the off state to the on state through the master control module in each of the high-voltage boxes until the address allocation of the master control modules in all the high-voltage boxes is completed.
9. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the address allocation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by the processor, it implements the address allocation method according to any one of claims 1 to 7.