Circuit breaker address automatic distribution method and system
By sending broadcast commands on the communication bus and determining station type and address identification using trigger signals, the circuit breaker address is automatically allocated, which solves the problems of low efficiency and poor convenience of circuit breaker address allocation, and realizes efficient and device-free automatic address allocation .
Patent Information
- Application Number
- CN202411397995.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art circuit breaker address allocation efficiency is low and has poor convenience, and cannot be set in the order of communication buses, and there are problems of discontinuity and repetition of automatic address allocation.
By sending broadcast commands on the communication bus, the circuit breaker enters the address automatic allocation state, and uses the trigger signal to determine the station type and address identification, realizing automatic allocation of the circuit breaker address, reducing manual operations and equipment dependence.
Improves the efficiency and convenience of circuit breaker address allocation, reduces address duplication and discontinuity errors, and realizes automatic address allocation without gateways or computers.
Smart Images

Figure CN119254749A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a method and system for automatically allocating circuit breaker addresses. Background Art
[0002] With the intelligentization of circuit breakers, circuit breakers can perform address allocation. In the related art, when circuit breakers perform address allocation, addresses need to be set one by one, and there is a problem of discontinuity in the automatic address allocation. Or, when the circuit breaker performs address allocation, it cannot be set according to the communication bus sequence, the device address cannot be understood, and the address allocation takes a long time.
[0003] Therefore, the circuit breaker address allocation method in the related art has the problems of low efficiency and poor convenience. Summary of the invention
[0004] The purpose of the present disclosure is to provide a method and system for automatically allocating addresses of circuit breakers, which can realize automatic address allocation of each circuit breaker on a communication bus and improve the efficiency and convenience of circuit breaker address allocation.
[0005] In order to achieve the above-mentioned purpose, in a first aspect, the present disclosure provides a method for automatic address allocation of a circuit breaker, wherein a first device receives a first trigger signal, the first device is a circuit breaker gateway or the first circuit breaker to perform address allocation; the first device configures itself as a master station; the first device determines a first address, the first address includes a first station type identifier and a first station address identifier, the first station type identifier is used to characterize the first device as a master station, and the first station address identifier is used to characterize the communication address of the first device; the first device generates a first broadcast command according to the first address, the first broadcast command is used to instruct the circuit breaker on the communication bus to enter an automatic address allocation state, and indicates that the circuit breaker can allocate an address; the first device sends the first broadcast command on the communication bus to enable the circuit breaker on the communication bus to enter an automatic address allocation state according to the first broadcast command.
[0006] Optionally, the circuit breaker address automatic allocation method further includes: a second device receives the first broadcast command, the second device being a circuit breaker on the communication bus; the second device configures its own address allocation state to an automatic address allocation state, and configures itself as a slave station.
[0007] Optionally, after the second device configures its own address allocation state to the automatic address allocation state and configures itself as a slave station, the circuit breaker address automatic allocation method also includes: the second device receives a second trigger signal; the second device configures itself from a slave station to a master station; the second device determines a second address, the second address includes a second station type identifier and a second station address identifier, the second station type identifier is used to characterize the second device as a master station, and the second station address identifier is used to characterize the communication address of the second device.
[0008] Optionally, after the second device determines the second address, the method for automatically allocating addresses of circuit breaker further includes: generating a second broadcast command according to the second address, the second broadcast command being used to indicate that the circuit breaker can allocate addresses; and sending the second broadcast command on the communication bus so that the circuit breakers on the communication bus automatically allocate addresses according to at least the first broadcast command and the second broadcast command.
[0009] Optionally, the second device determines the second address, including: if each broadcast command on the communication bus indicates the circuit breaker allocatable address through an allocatable address list, the second device detects a target broadcast command sent on the communication bus, and determines the second address according to the circuit breaker allocatable address list in the target broadcast command, and the target broadcast command is a broadcast command closest to the current time; if each broadcast command on the communication bus indicates the circuit breaker allocatable address through the circuit breaker address of the sending broadcast command, the second device obtains each broadcast command sent on the communication bus, and the second device determines the second address according to the circuit breaker address in each broadcast command.
[0010] Optionally, the method for automatically allocating circuit breaker addresses also includes: the second device obtains a first configuration time for configuring itself as a slave station; the second device obtains a second configuration time for configuring itself from a slave station to a master station; the second device determines the second address according to the circuit breaker addresses in each broadcast command, including: the second device determines the second station type identifier according to the first configuration time and the second configuration time; the second device determines the initial station address identifier according to the second configuration time; the second device compares the initial station address identifier with the circuit breaker addresses in each broadcast command, if the circuit breaker addresses in each broadcast command are different from the initial station address identifier, determine the second station address identifier according to the initial station address identifier; if there is a target station address that is the same as the initial station address identifier in the circuit breaker addresses in each broadcast command, generate the second station address identifier according to the target station address and the initial station address identifier; determine the second address according to the second station type identifier and the second station address identifier.
[0011] Optionally, the second station type identifier includes a first sub-identifier and a second sub-identifier, the first sub-identifier is used to characterize the master station, and the second sub-identifier is used to characterize the slave change time, and the second device determines the second station type identifier based on the first configuration time and the second configuration time, including: determining the first sub-identifier based on a preset master station identifier; determining the second sub-identifier based on the time difference between the first configuration time and the second configuration time; determining the second station type identifier based on the first sub-identifier and the second sub-identifier.
[0012] Optionally, the first device determines the first address, including: determining a preset master station identifier as the first station type identifier; if the first device is a circuit breaker gateway, determining a preset station address identifier as the first station address identifier; if the first device is the first circuit breaker to perform address allocation, obtaining a historical address allocation record locally stored in the first device, the historical address allocation including multiple historical allocation addresses; determining a first historical allocation address and a second historical allocation address from the multiple historical allocation addresses, the station type identifier in the first historical allocation address is the preset master station identifier, and the station type identifier in the second historical allocation address includes a first sub-identifier and a second sub-identifier, the first sub-identifier is used to characterize the master station, and the second sub-identifier is used to characterize the change time from the master; determining the first station address identifier according to the number of the first historical allocation addresses and the number of the second historical allocation addresses; determining the first address according to the first station type identifier and the first station address identifier.
[0013] Optionally, the circuit breaker address allocation method also includes: when the first device is a circuit breaker gateway, the first device receives a third trigger signal; the first device generates a third broadcast command, the third broadcast command is used to instruct the circuit breaker on the communication bus to exit the automatic address allocation state and delete the station identity; the third broadcast command is sent on the communication bus, so that the circuit breaker on the communication bus exits the automatic address allocation state and deletes its own station identity according to the third broadcast command; when the first device is the first circuit breaker to perform address allocation, when the third device detects that its own slave station identity lasts for a preset time, it exits its own automatic address allocation state and deletes its own station identity, and generates a fourth broadcast command, the third device is any circuit breaker on the communication bus, and the fourth broadcast command is used to instruct the circuit breaker on the communication bus to exit the automatic address allocation state and delete the slave station identity; the fourth broadcast command is sent on the communication bus, so that the circuit breaker on the communication bus exits the automatic address allocation state and deletes its own station identity according to the fourth broadcast command.
[0014] In a second aspect, the present disclosure provides a circuit breaker address automatic allocation system, comprising: a plurality of circuit breakers and a circuit breaker gateway respectively connected via a communication bus; wherein the plurality of circuit breakers implement automatic circuit breaker address allocation through the circuit breaker address automatic allocation method as described in the first aspect.
[0015] Through the above technical solution, the first device receives a trigger signal. Based on the trigger signal, the first device can first configure itself as a master station and determine its own address. Then the first device can directly send a first broadcast command on the communication bus, so that the circuit breaker on the communication bus can automatically assign addresses according to the first broadcast command. After the circuit breaker enters the automatic address assignment state, if the corresponding trigger signal is received, the address can be automatically assigned based on the assignable address, thereby realizing the automatic address assignment of each circuit breaker on the communication bus and improving the efficiency and convenience of circuit breaker address assignment.
[0016] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0018] Figure 1 The figure is an exemplary diagram showing a system for automatically allocating addresses of circuit breaker according to an exemplary embodiment.
[0019] Figure 2 The present invention is a flowchart of a method for automatically allocating circuit breaker addresses according to an exemplary embodiment.
[0020] Figure 3 The diagram is a schematic diagram of an interactive process of automatically allocating a first type of circuit breaker address according to an exemplary embodiment.
[0021] Figure 4 The diagram is a schematic diagram of an interactive process of automatically allocating a second type of circuit breaker address according to an exemplary embodiment.
[0022] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0023] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0024] The technical solution of the embodiment of the present disclosure can be applied to various scenarios involving automatic allocation of circuit breaker addresses. In these scenarios, multiple circuit breakers are involved and addresses of the multiple circuit breakers need to be automatically allocated.
[0025] Figure 1 is an example diagram of a circuit breaker address automatic allocation system according to an exemplary embodiment, and the circuit breaker address automatic allocation system can be used as an application scenario of the technical solution of the embodiment of the present disclosure. Figure 1 As shown, the system involves multiple circuit breakers, which are respectively connected via a communication bus, and also involves a circuit breaker gateway, which can also be connected to the multiple circuit breakers via the communication bus. Therefore, the circuit breaker gateway and the multiple circuit breakers communicate with each other via the communication bus.
[0026] In some embodiments, the communication bus may be an RS485 bus, or may be other bus types.
[0027] In some embodiments, the circuit breaker gateway may serve as a management device for multiple circuit breakers, and may or may not participate in the automatic allocation of circuit breaker addresses, which is not limited here.
[0028] In some embodiments, if multiple circuit breakers are part of a distribution box, the circuit breaker gateway may be the distribution box management device.
[0029] In the related art, when the circuit breaker is performing address allocation, the addresses need to be set one by one, and there is a problem of discontinuity in the automatic address allocation. Or, when the circuit breaker is performing address allocation, it cannot be set according to the communication bus sequence, the device address cannot be understood, and the address allocation takes a long time. Therefore, the related art has problems such as low efficiency of circuit breaker address allocation and poor convenience.
[0030] Furthermore, the address allocation in the related art usually needs to rely on a gateway or a computer, but in the embodiment of the present disclosure, the address allocation of the circuit breaker does not need to rely on a gateway or a computer.
[0031] Based on this, the embodiment of the present disclosure provides a technical solution, in which, based on the corresponding trigger signal, the circuit breaker on the communication bus can enter the automatic address allocation mode. In the automatic address allocation mode, each circuit breaker can realize automatic address allocation based on the corresponding trigger signal. Therefore, by automatically allocating addresses, additional equipment such as gateways and computers is not required, and tedious manual operations are reduced, construction efficiency is improved, and errors such as address duplication are reduced.
[0032] Figure 2is a flow chart of a method for automatically allocating circuit breaker addresses according to an exemplary embodiment. Figure 2 As shown, the automatic address allocation method includes:
[0033] Step S21: A first device receives a first trigger signal, where the first device is a circuit breaker gateway or a first circuit breaker that performs address allocation.
[0034] Step S22: The first device configures itself as a master station.
[0035] Step S23, the first device determines a first address, the first address includes a first station type identifier and a first station address identifier, the first station type identifier is used to indicate that the first device is a master station, and the first station address identifier is used to indicate a communication address of the first device.
[0036] Step S24: the first device generates a first broadcast command according to the first address, where the first broadcast command is used to instruct the circuit breaker on the communication bus to enter an automatic address allocation state and to instruct the circuit breaker to allocate an address.
[0037] Step S25: The first device sends a first broadcast command on the communication bus, so that the circuit breakers on the communication bus enter an automatic address allocation state according to the first broadcast command.
[0038] In the embodiments of the present disclosure, the method for automatic allocation of circuit breaker addresses can be applied to a system composed of multiple circuit breakers, such as a distribution box system. Therefore, when introducing the address allocation method, the system is taken as the execution subject, which may involve execution steps of different devices in the system.
[0039] In step S21, the first device may serve as an address allocation trigger device of the system, any circuit breaker may serve as the address allocation trigger device, or a circuit breaker gateway may serve as the address allocation trigger device.
[0040] Therefore, when multiple circuit breakers have not entered the state of automatic address allocation, the first circuit breaker that receives the first trigger signal can be regarded as the first device. Alternatively, when multiple circuit breakers have not entered the state of automatic address allocation, if the circuit breaker gateway receives the first trigger signal, the circuit breaker gateway can also be regarded as the first device.
[0041] In some embodiments, the first trigger signal may be an electrical trigger signal or a mechanical trigger signal. For example, a button or a switch is configured on the circuit breaker, and the first trigger signal may be initiated by triggering the button or the switch. For example, long pressing the button for 5 seconds is considered to initiate the first trigger signal. For example, the first trigger signal may be sent to the circuit breaker gateway via Bluetooth, wireless communication, or the like. Different implementation methods may be used in different application scenarios, which are not limited here.
[0042] Further, in step S22, the first device configures itself as a master station. In some embodiments, when multiple circuit breakers do not enter the state of automatic address allocation, multiple circuit breakers may not have the concept of master stations and slave stations, but when multiple circuit breakers enter the state of automatic address allocation, it is necessary to divide the master station and the slave station to distinguish whether to perform address allocation. Therefore, whether it is for the circuit breaker gateway or the first circuit breaker to perform address allocation, it can first configure itself as a master station.
[0043] In step S23, the first device determines a first address, where the first address may include an identifier for characterizing a station type and an identifier for characterizing a communication address, and these two identifiers together constitute the first address.
[0044] That is, in the embodiment of the present disclosure, when performing address allocation, the station identifier and the communication address identifier are used as the final result of the address allocation.
[0045] As an optional implementation, step S23 includes: determining a preset master station identifier as a first station type identifier; if the first device is a circuit breaker gateway, determining a preset station address identifier as a first station address identifier; if the first device is the first circuit breaker to perform address allocation, obtaining a historical address allocation record stored locally on the first device, the historical address allocation including multiple historical allocation addresses; determining a first historical allocation address and a second historical allocation address from multiple historical allocation addresses, the station type identifier in the first historical allocation address is a preset master station identifier, and the station type identifier in the second historical allocation address includes a first sub-identifier and a second sub-identifier, the first sub-identifier is used to characterize the master station, and the second sub-identifier is used to characterize the change time from the master; determining the first station address identifier based on the number of the first historical allocation addresses and the number of the second historical allocation addresses; determining the first address based on the first station type identifier and the first station address identifier.
[0046] In this implementation, regarding the first station type identifier, the first device has been configured as a master station, so the first station type identifier can directly represent the master station. In addition, since the first device is the first device to be configured with an address, its first station type identifier can be distinguished from other circuit breakers, so the preset master station identifier can be directly determined as the first station type identifier.
[0047] The preset master station identifier may be a pre-set universal identifier for characterizing the master station. For example, the preset master station identifier is Z, and the preset slave station identifier is C.
[0048] The implementation method of the station address identifier depends on the implementation method of the first device. If the first device is a circuit breaker gateway, the first station address identifier can be directly configured as a preset station address identifier, that is, the circuit breaker gateway is a special management device, and its communication address can be pre-configured, for example: the preset station address identifier is 1.
[0049] If the first device is the first circuit breaker to be assigned an address, a more complex station address determination method may be used.
[0050] Specifically, the first device locally stores a historical address allocation record, which records the allocation addresses previously used by the first device. Based on the historical allocation addresses, the historical allocation addresses are first classified.
[0051] In some embodiments, the station type identifier in the first historical allocation address is a preset master station identifier, indicating that the first device was once the first circuit breaker to be assigned an address. The station type identifier in the second historical allocation address includes a first sub-identifier and a second sub-identifier, the first sub-identifier is used to identify the master station, and the second sub-identifier is used to identify the change time from the master.
[0052] In the embodiment of the present disclosure, except for the first circuit breaker to perform address allocation, other circuit breakers will involve slave-master changes (detailed introduction in subsequent embodiments). Therefore, if it is the second historical allocated address, it represents that the first device has been a circuit breaker other than the first one to perform address allocation.
[0053] Therefore, the first station address identifier can be further determined based on the number of the first historical allocation addresses and the number of the second historical allocation addresses. For example, the number of the first historical allocation addresses and the number of the second historical allocation addresses are respectively converted into binary characters, and the respectively obtained binary characters are integrated into the first station address identifier; or, the number of the first historical allocation addresses and the number of the second historical allocation addresses are directly combined into the first station address identifier.
[0054] In this way, the station address identifier of the first circuit breaker to be assigned an address can be greatly distinguished from the station address identifiers of subsequent circuit breakers to be assigned an address, and address duplication can be avoided as much as possible.
[0055] Further, the first address can be determined according to the first station type identifier and the first station address identifier. It can be understood that the first address can be generated by configuring the first station type identifier and the first station address identifier in an address format according to the corresponding communication rule. For example, the first station type identifier and the first station address identifier are arranged in sequence to obtain the first address.
[0056] In step S24, the first device generates a first broadcast command according to the first address, and the first broadcast command can instruct the circuit breaker on the communication bus to enter the automatic address allocation state and indicate that the circuit breaker can allocate an address. It can be understood that indicating that the circuit breaker can allocate an address can avoid the circuit breaker that performs address allocation later being allocated a duplicate address.
[0057] Further, in step S25, a first broadcast command is sent on the communication bus, and the circuit breakers on the communication bus can enter the automatic address allocation state according to the first broadcast command.
[0058] After the circuit breakers on the communication bus can enter the automatic address allocation state according to the first broadcast command, they also need to be triggered according to the corresponding trigger signal to perform address allocation.
[0059] Therefore, as an optional implementation, the circuit breaker address automatic allocation method also includes: the second device receives the first broadcast command, the second device is a circuit breaker on the communication bus; the second device configures its own address allocation state to the automatic address allocation state, and configures itself as a slave station.
[0060] It can be understood that if the first device is a circuit breaker gateway, the second device can be any circuit breaker on the communication bus; if the first device is the first circuit breaker to be assigned an address, the second device can be any circuit breaker on the communication bus except the first circuit breaker to be assigned an address.
[0061] In this implementation, the second device automatically enters the address automatic allocation state upon receiving the first broadcast command, and needs to configure itself as a slave first, which means that although it has entered the address automatic allocation state, address allocation has not yet been performed. If address allocation is to be performed, a trigger signal is required.
[0062] Therefore, further, the method may also include: the second device receives a second trigger signal; the second device configures itself from a slave station to a master station; the second device determines a second address, the second address includes a second station type identifier and a second station address identifier, the second station type identifier is used to characterize that the second device is a master station, and the second station address identifier is used to characterize the communication address of the second device.
[0063] In some embodiments, the second trigger signal may be a mechanical trigger signal. Therefore, a button or a switch may be configured on the second device, and the second trigger signal may be initiated through the trigger signal of the button or the switch.
[0064] In some embodiments, since the second device will perform address configuration based on the second trigger signal, the second device can configure itself from a slave station to a master station, indicating that address allocation has been performed.
[0065] In some embodiments, the second address contains the same identification content as the first address, involving a second station address identification and a second station type identification.
[0066] In some embodiments, after the second device determines the second address, the method may further include: generating a second broadcast command based on the second address, the second broadcast command being used to indicate that the circuit breaker can assign an address; sending the second broadcast command on the communication bus so that the circuit breaker on the communication bus automatically assigns an address based on at least the first broadcast command and the second broadcast command.
[0067] In this embodiment, the second broadcast command can indicate the allocable address of the circuit breaker so that other circuit breakers that have not yet allocated addresses can know the approximate address allocation status. Therefore, when they subsequently allocate addresses, they can refer to the allocable addresses to avoid duplicate address allocation.
[0068] That is, in the embodiment of the present disclosure, for each circuit breaker that enters the address allocation state, after performing its own address allocation, it is also necessary to synchronize the assignable address to the communication bus through a broadcast command for reference by other circuit breakers for address allocation.
[0069] As an optional implementation, the second device determines the second address, including: if each broadcast command on the communication bus indicates the circuit breaker assignable address through an assignable address list, the second device detects the target broadcast command sent on the communication bus, and determines the second address according to the circuit breaker assignable address list in the target broadcast command, the target broadcast command being the broadcast command closest to the current time; if each broadcast command on the communication bus indicates the circuit breaker assignable address through the circuit breaker address of sending the broadcast command, the second device obtains each broadcast command sent on the communication bus, and the second device determines the second address according to the circuit breaker address in each broadcast command.
[0070] In this implementation, two methods of indicating the assignable addresses are involved. One is to directly indicate the assignable addresses of the circuit breaker through the assignable address list, and the other is to indicate the assignable addresses of the circuit breaker through its own circuit breaker address. Under the two different indication methods, the method of determining the second address may also be different.
[0071] In the case where the allocatable addresses of the circuit breaker are indicated by the allocatable address list, each circuit breaker may select an address based on the allocatable address list in a broadcast command closest to the current time when allocating addresses to determine the second address.
[0072] In the case where the circuit breaker address of the broadcast command is used to indicate the allocatable address of the circuit breaker, it is necessary to obtain each broadcast command sent on the communication bus, and perform address analysis based on the circuit breaker address in each broadcast command to determine the second address. It can be understood that the circuit breaker address in each broadcast command corresponds to the station address identifier and does not include the station type identifier.
[0073] As an optional implementation, the method further includes: the second device obtains a first configuration time for configuring itself as a slave station; the second device obtains a second configuration time for configuring itself from a slave station to a master station. The first configuration time may be a time when the first broadcast command is received, and the second configuration time may be a time when the second trigger signal is received.
[0074] Correspondingly, the second device determines the second address according to the circuit breaker address in each broadcast command, including: the second device determines the initial station address identifier according to the second configuration time; the second device compares the initial station address identifier with the circuit breaker address in each broadcast command, if the circuit breaker addresses in each broadcast command are different from the initial station address identifier, determine the second station address identifier according to the initial station address identifier; if there is a target station address that is the same as the initial station address identifier in the circuit breaker address in each broadcast command, generate a second station address identifier according to the target station address and the initial station address identifier; determine the second address according to the second station type identifier and the second station address identifier.
[0075] It is understandable that the first configuration time is the same for each circuit breaker, so the initial station address identifier can be determined based on the second configuration time that may be different. For example, a hash calculation is performed based on the second configuration time, and the obtained hash value is used as the initial station address identifier.
[0076] Furthermore, the initial station address identifier is compared with the circuit breaker address (station address identifier) in each broadcast command. If the circuit breaker addresses in each broadcast command are different from the initial station address identifier, it means that there is no duplication with other existing circuit breaker addresses, and the initial station address identifier can be directly determined as the second station address identifier; or, the initial station address identifier is transformed, and the transformed station address identifier is determined as the second station address identifier, wherein the transformation method can be a preset transformation method, such as: encryption, base transformation, character transformation, etc., and reference can be made to mature address transformation technologies in the field.
[0077] If the circuit breaker addresses in each broadcast command contain a target station address that is the same as the initial station address, it indicates that the target station address is repeated with other circuit breaker addresses. In this case, the target station address with repetition can be obtained, and a second station address identifier can be generated based on the target station address and the initial station address identifier. For example, a new identifier can be added or a identifier can be reduced based on the initial station address identifier. The added identifier or the reduced identifier is determined based on the identifier of the target station address, for example, by transforming the identifier of the target station address, thereby ensuring that it is different from the target station address identifier.
[0078] According to the introduction of the aforementioned embodiment, the station type identifier may include a first sub-identifier and a second sub-identifier, the first sub-identifier is used to identify the master station, and the second sub-identifier is used to identify the slave-master change time.
[0079] Therefore, as an optional implementation, the second device determines the second station type identifier based on the first configuration time and the second configuration time, including: determining the first sub-identifier based on the preset main station identifier; determining the second sub-identifier based on the time difference between the first configuration time and the second configuration time; determining the second station type identifier based on the first sub-identifier and the second sub-identifier.
[0080] In this implementation, the first sub-identifier is a unified preset master station identifier, and the second sub-identifier can represent the time difference between the first configuration time and the second configuration time, that is, the slave change time. Therefore, the time difference between the first configuration time and the second configuration time can be determined, and a hash calculation is performed based on the time difference, and the obtained hash value is determined as the second sub-identifier. Furthermore, the first sub-identifier and the second sub-identifier are integrated into the second station type identifier.
[0081] Furthermore, the address allocation sequence of the circuit breaker can be distinguished through the station type identifier, that is, the second configuration time is different, the address allocation sequence is different, and finally reflected as a different second sub-identifier. When checking the circuit breaker problem later, the circuit breaker can be located based on the station type identifier.
[0082] Furthermore, after the second device sends the second broadcast command, the address allocation of the second device is completed, and other subsequent circuit breakers can automatically allocate addresses in the same implementation as the second device.
[0083] In some embodiments, if the automatic address allocation is completed, the automatic address allocation state can be exited. Accordingly, in the case where the implementation method of the first device is different, the implementation method of exiting the automatic address allocation state can also be different.
[0084] Therefore, as an optional implementation manner, the circuit breaker address allocation method further includes:
[0085] In the case where the first device is a circuit breaker gateway, the first device receives a third trigger signal; the first device generates a third broadcast command, the third broadcast command is used to instruct the circuit breakers on the communication bus to exit the automatic address allocation state and delete the station identity; the third broadcast command is sent on the communication bus, so that the circuit breakers on the communication bus exit the automatic address allocation state and delete their own station identities according to the third broadcast command; in the case where the first device is the first circuit breaker to perform address allocation, when the third device detects that the duration of its own slave station identity reaches a preset duration, it exits its own automatic address allocation state and deletes its own station identity, and generates a fourth broadcast command, the third device is any circuit breaker on the communication bus, the fourth broadcast command is used to instruct the circuit breakers on the communication bus to exit the automatic address allocation state and delete the station identity; the fourth broadcast command is sent on the communication bus, so that the circuit breakers on the communication bus exit the automatic address allocation state and delete their own station identities according to the fourth broadcast command.
[0086] In this embodiment, if the first device is a circuit breaker gateway, the first device continues to receive a third trigger signal, which may be an electrical trigger signal, to instruct the circuit breaker gateway to end the automatic address allocation state. Thus, the first device may generate a third broadcast command to instruct the circuit breaker on the communication bus to exit the automatic address allocation state and delete the station identity.
[0087] Then, the circuit breaker on the communication bus exits the automatic address allocation state and deletes its own station identity. It can be understood that if the identity of a circuit breaker itself is a slave station, it is considered that no address allocation has been performed, and the slave station identity can be deleted; if the identity of a circuit breaker itself is a master station, it is considered that an address has been allocated, and the master station identity can be deleted. Therefore, the station identity can be reconfigured when the address is automatically allocated next time.
[0088] If the first device is the first circuit breaker to perform address allocation, the automatic address allocation state can be ended by a third device, which can be any circuit breaker on the communication bus. Thus, for any circuit breaker, it can detect the duration of its own slave identity. If the duration of the slave identity reaches a preset duration, it is considered that the automatic address allocation state can be ended. The preset duration can be a preset maximum duration of automatic address allocation, which is set according to different application scenarios.
[0089] Therefore, if a circuit breaker does not perform address allocation after the maximum duration of automatic address allocation is reached, it is considered that the automatic address allocation can be terminated. Then, the third device sends a broadcast command to make the circuit breaker on the communication bus exit the automatic address allocation state and delete its own station identity according to the fourth broadcast command. In addition, the third device also needs to delete its own station identity.
[0090] Figure 3 is a schematic diagram of an interactive process of automatically allocating a first type of circuit breaker address according to an exemplary embodiment. Figure 3 In the example, the circuit breaker gateway is used as a trigger device for automatic address allocation, and the circuit breakers involve circuit breaker 1, circuit breaker 2, and circuit breaker 3 (only as an example, the actual number can be more or less). The interaction process may include the following steps:
[0091] Regarding the circuit breaker gateway, it first receives a trigger signal to start automatic address allocation, then configures itself as a master station based on the trigger signal, and further allocates its own address. Then, it sends a broadcast command on the bus to instruct circuit breaker 1, circuit breaker 2, and circuit breaker 3 to enter the automatic address allocation state, and indicates that the address can be allocated.
[0092] Regarding circuit breaker 1, circuit breaker 2 and circuit breaker 3, the synchronous execution process includes: based on the broadcast command issued by the circuit breaker gateway on the bus, configuring itself to the automatic address allocation state, and configuring itself as a slave station, waiting for the trigger signal.
[0093] Further, it is assumed that circuit breaker 1 receives the trigger signal first, circuit breaker 2 receives the trigger signal second, and circuit breaker 3 receives the trigger signal third.
[0094] Then, regarding circuit breaker 1, the automatic address allocation process it performs includes: receiving a trigger signal, configuring itself from a slave station to a master station, allocating an address to itself based on the allocable address in the broadcast command sent by the circuit breaker gateway, and issuing a broadcast command on the bus to indicate the allocable address.
[0095] Regarding circuit breaker 2, the automatic address allocation process it performs includes: receiving a trigger signal, configuring itself from a slave station to a master station, allocating an address to itself based on the allocable address in the broadcast command sent by circuit breaker 1, and issuing a broadcast command on the bus to indicate the allocable address.
[0096] Regarding circuit breaker 3, the automatic address allocation process it performs includes: receiving a trigger signal, configuring itself from a slave station to a master station, allocating an address to itself based on the allocable address in the broadcast command sent by circuit breaker 2, and issuing a broadcast command on the bus to indicate the allocable address.
[0097] Regarding the circuit breaker gateway, after receiving the trigger signal indicating the end of automatic address allocation, the station identity is deleted and a new broadcast command is issued.
[0098] Furthermore, regarding circuit breaker 1, circuit breaker 2, and circuit breaker 3, each exits the automatic address allocation state and deletes its own station identity.
[0099] Figure 4is a schematic diagram of an interactive process of automatically allocating a second type of circuit breaker address according to an exemplary embodiment. Figure 4 In this case, the circuit breaker gateway is not involved, only circuit breaker 1, circuit breaker 2, circuit breaker 3 and circuit breaker 4 are involved.
[0100] As for circuit breaker 1, it first receives a trigger signal for starting automatic address allocation, then configures itself as a master station based on the trigger signal, and further allocates its own address. Then, it sends a broadcast command on the bus to instruct circuit breakers 2, 3, and 4 to enter the automatic address allocation state and indicate that the address can be allocated.
[0101] Regarding circuit breakers 2, 3 and 4, the synchronous execution process includes: based on the broadcast command issued by circuit breaker 1 on the bus, configuring itself to the automatic address allocation state, configuring itself as a slave station, and waiting for the trigger signal.
[0102] Then, regarding circuit breaker 2, the automatic address allocation process it performs includes: receiving a trigger signal, configuring itself from a slave station to a master station, allocating an address to itself based on the allocable address in the broadcast command sent by circuit breaker 1, and issuing a broadcast command on the bus to indicate the allocable address.
[0103] Regarding circuit breaker 3, the automatic address allocation process it performs includes: receiving a trigger signal, configuring itself from a slave station to a master station, allocating an address to itself based on the allocable address in the broadcast command sent by circuit breaker 2, and issuing a broadcast command on the bus to indicate the allocable address.
[0104] Regarding circuit breaker 4, if no trigger signal is received within the corresponding time limit, the trigger address automatic allocation ends the process, the station identity is deleted, and a new broadcast command is issued.
[0105] Furthermore, regarding circuit breaker 1, circuit breaker 2, and circuit breaker 3, each exits the automatic address allocation state and deletes its own station identity.
[0106] It can be seen from the introduction of the embodiments of the present disclosure that the first device receives a trigger signal. Based on the trigger signal, the first device can first configure itself as a master station and determine its own address. Then the first device can directly send a first broadcast command on the communication bus, so that the circuit breaker on the communication bus can automatically assign addresses according to the first broadcast command. After the circuit breaker enters the automatic address assignment state, if the corresponding trigger signal is received, the address can be automatically assigned based on the assignable address, thereby realizing the automatic address assignment of each circuit breaker on the communication bus and improving the efficiency and convenience of the circuit breaker address assignment. In addition, the technical solution can also avoid the duplication of address assignment as much as possible.
[0107] Figure 5is a block diagram of an electronic device 500 according to an exemplary embodiment. The electronic device 500 can be used as the device in the aforementioned embodiment, for example, the first device, the second device, and the third device. Figure 5 As shown, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input / output (I / O) interface 504, and a communication component 505.
[0108] The processor 501 is used to control the overall operation of the electronic device 500 to complete all or part of the steps in the above-mentioned circuit breaker address automatic allocation method. The memory 502 is used to store various types of data to support the operation of the electronic device 500, and these data may include, for example, instructions for any application or method used to operate on the electronic device 500, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 502 or sent through the communication component 505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 504 provides an interface between the processor 501 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 505 may include: Wi-Fi module, Bluetooth module, NFC module.
[0109] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned XXXX method.
[0110] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned method for automatically allocating circuit breaker addresses are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 502 including program instructions, and the above-mentioned program instructions can be executed by the processor 501 of the electronic device 500 to complete the above-mentioned method for automatically allocating circuit breaker addresses.
[0111] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a processor. When the computer program is executed by the processor, the steps of the above-mentioned method for automatically allocating circuit breaker addresses are implemented.
[0112] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0113] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0114] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A method for automatically allocating circuit breaker addresses, characterized in that: include: A first device receives a first trigger signal, where the first device is a circuit breaker gateway or a first circuit breaker that performs address allocation; The first device configures itself as a master station; The first device determines a first address, the first address including a first station type identifier and a first station address identifier, the first station type identifier is used to indicate that the first device is a primary station, and the first station address identifier is used to indicate a communication address of the first device; The first device generates a first broadcast command according to the first address, wherein the first broadcast command is used to instruct the circuit breaker on the communication bus to enter an automatic address allocation state and to instruct the circuit breaker to allocate an address; The first device sends the first broadcast command on the communication bus, so that the circuit breakers on the communication bus enter an automatic address allocation state according to the first broadcast command.
2. The method for automatically allocating circuit breaker addresses according to claim 1, characterized in that: The circuit breaker address automatic allocation method also includes: A second device receives the first broadcast command, the second device being a circuit breaker on the communication bus; The second device configures its own address allocation state to an automatic address allocation state, and configures itself as a slave station.
3. The method for automatically allocating circuit breaker addresses according to claim 2, characterized in that: After the second device configures its own address allocation state to the automatic address allocation state and configures itself as a slave station, the circuit breaker address automatic allocation method further includes: The second device receives a second trigger signal; The second device configures itself from a slave station to a master station; The second device determines a second address, the second address includes a second station type identifier and a second station address identifier, the second station type identifier is used to characterize that the second device is a master station, and the second station address identifier is used to characterize the communication address of the second device.
4. The method for automatically allocating circuit breaker addresses according to claim 3, characterized in that: After the second device determines the second address, the method for automatically allocating a circuit breaker address further includes: generating a second broadcast command according to the second address, wherein the second broadcast command is used to indicate that the circuit breaker can allocate an address; The second broadcast command is sent on the communication bus, so that the circuit breakers on the communication bus automatically allocate addresses according to at least the first broadcast command and the second broadcast command.
5. The method for automatically allocating circuit breaker addresses according to claim 3, characterized in that: The second device determines the second address, including: If each broadcast command on the communication bus indicates the circuit breaker allocatable address through the allocatable address list, the second device detects the target broadcast command sent on the communication bus, and determines the second address according to the circuit breaker allocatable address list in the target broadcast command, the target broadcast command being a broadcast command closest to the current time; If each broadcast command on the communication bus indicates that the circuit breaker can be assigned an address by sending the circuit breaker address of the broadcast command, the second device obtains each broadcast command sent on the communication bus, and the second device determines the second address according to the circuit breaker address in each broadcast command.
6. The method for automatic allocation of circuit breaker addresses according to claim 5, characterized in that: The circuit breaker address automatic allocation method also includes: The second device obtains a first configuration time for configuring itself as a slave station; The second device obtains a second configuration time for configuring itself from a slave station to a master station; The second device determines the second address according to the circuit breaker address in each broadcast command, including: The second device determines the second station type identifier according to the first configuration time and the second configuration time; The second device determines an initial station address identifier according to the second configuration time; The second device compares the initial station address identifier with the circuit breaker address in each broadcast command, and if the circuit breaker addresses in each broadcast command are different from the initial station address identifier, determines the second station address identifier according to the initial station address identifier; if there is a target station address that is the same as the initial station address identifier in the circuit breaker address in each broadcast command, generates the second station address identifier according to the target station address and the initial station address identifier; The second address is determined according to the second station type identifier and the second station address identifier.
7. The method for automatically allocating circuit breaker addresses according to claim 6, characterized in that: The second station type identifier includes a first sub-identifier and a second sub-identifier, the first sub-identifier is used to identify the master station, and the second sub-identifier is used to identify the slave change time, and the second device determines the second station type identifier according to the first configuration time and the second configuration time, including: Determine the first sub-identifier according to the preset master station identifier; Determine the second sub-identifier according to a time difference between the first configuration time and the second configuration time; The second station type identifier is determined according to the first sub-identifier and the second sub-identifier.
8. The method for automatically allocating circuit breaker addresses according to any one of claims 1 to 7, characterized in that: The first device determines a first address, including: Determine a preset master station identifier as the first station type identifier; If the first device is a circuit breaker gateway, determining a preset station address identifier as the first station address identifier; If the first device is the first circuit breaker to perform address allocation, obtain a historical address allocation record locally stored in the first device, wherein the historical address allocation includes a plurality of historical allocation addresses; determine a first historical allocation address and a second historical allocation address from the plurality of historical allocation addresses, wherein the station type identifier in the first historical allocation address is the preset master station identifier, and the station type identifier in the second historical allocation address includes a first sub-identifier and a second sub-identifier, wherein the first sub-identifier is used to characterize the master station, and the second sub-identifier is used to characterize the slave change time; determine the first station address identifier according to the number of the first historical allocation addresses and the number of the second historical allocation addresses; The first address is determined according to the first station type identifier and the first station address identifier.
9. The method for automatically allocating circuit breaker addresses according to any one of claims 1 to 7, characterized in that: The circuit breaker address allocation method further includes: In the case where the first device is a circuit breaker gateway, the first device receives a third trigger signal; the first device generates a third broadcast command, the third broadcast command being used to instruct the circuit breaker on the communication bus to exit the automatic address allocation state and delete the station identity; the third broadcast command is sent on the communication bus, so that the circuit breaker on the communication bus exits the automatic address allocation state and deletes its own station identity according to the third broadcast command; In the case where the first device is the first circuit breaker to perform address allocation, when the third device detects that its own slave station identity has lasted for a preset time, it exits its own automatic address allocation state and deletes its own station identity, and generates a fourth broadcast command. The third device is any circuit breaker on the communication bus, and the fourth broadcast command is used to instruct the circuit breaker on the communication bus to exit the automatic address allocation state and delete the slave station identity; the fourth broadcast command is sent on the communication bus to cause the circuit breaker on the communication bus to exit the automatic address allocation state and delete its own station identity according to the fourth broadcast command.
10. A circuit breaker address automatic allocation system, characterized in that: include: A plurality of circuit breakers and circuit breaker gateways respectively connected via a communication bus; Wherein, the multiple circuit breakers realize automatic circuit breaker address allocation through the circuit breaker address automatic allocation method according to any one of claims 1 to 9.
