Topology identification methods, devices, computer equipment, and storage media for lighting networks

CN122579404APending Publication Date: 2026-08-14深圳石木科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0006]基于此,有必要针对上述技术问题,提供一种照明网络的拓扑识别方法、装置、计算机设备及存储介质,以解决传统照明网络的拓扑识别方法的照明网络管理准确性较低的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122579404A_ABST
    Figure CN122579404A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, computer device, and storage medium for topology identification of lighting networks. The method uses the main control device as the starting point for topology search, and designates the main control device or a known existing node as the current superior node. It then progressively determines the address of the next-level target node to be detected. Node detection commands are then used to cause the matched target node to control the downstream lighting loads, generating a load response. This allows the main control device to determine the existence of the target node based on changes in load current, and further determine the topological position of the target node in the lighting network. Therefore, it can automatically identify the node connections in multi-level cascaded lighting networks without relying on manual configuration, improving the accuracy and management efficiency of lighting network topology identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent lighting control, and more particularly to a method, apparatus, computer equipment, and storage medium for topology identification of lighting networks. Background Technology

[0002] With the development of intelligent lighting, landscape lighting, and distributed lighting control systems, more and more lighting equipment is adopting networked control methods. For example, in some LED lighting systems, the main control device can connect to branch circuit breakers, power supply nodes, or other node devices through multiple output branches. Each node device can then connect to the next level of node devices or lighting loads, thus forming a multi-level cascaded lighting network. This type of cascaded structure allows for an expansion of the number of connected lighting loads and facilitates centralized control and unified management of large-scale lighting equipment.

[0003] In practical applications, the connectivity of lighting networks is typically influenced by factors such as the wiring method at the installation site, the number of node devices, the branch connection method, and subsequent maintenance and expansion. Multiple levels of node devices may exist downstream of the same main control device, and the downstream branches of different node devices may be connected to lighting loads or continue to connect to the next level of node devices. Therefore, the main control device needs to accurately determine the level of each node device, its parent node, its corresponding branch, and the cascading relationships between nodes to provide a reliable foundation for subsequent lighting control, fault location, load statistics, and equipment maintenance.

[0004] In existing technologies, the topology of lighting networks typically relies on manual configuration or management through pre-defined node addresses and port correspondences. When the lighting network is large, has many cascaded levels, or when field wiring changes, manual configuration is not only cumbersome but also prone to errors in node hierarchy, branch relationships, or device location configuration.

[0005] Therefore, how to provide a topology identification method for lighting networks that can automatically identify the presence and topological location of node devices in multi-level cascaded lighting networks, thereby reducing manual configuration and improving the accuracy of lighting network management, has become an urgent technical problem to be solved. Summary of the Invention

[0006] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for topology identification of lighting networks to address the aforementioned technical problems and solve the problem of low accuracy in lighting network management caused by traditional topology identification methods.

[0007] A method for topology identification of a lighting network, the lighting network including a main control device and at least one node device cascaded with the main control device, the node device being connected to lighting loads, the method being applied to the main control device, the method comprising:

[0008] Taking the main control device as the starting point of the topology search, the main control device or the existing node device is taken as the current parent node, and the address of the next level target node to be detected is determined based on the branch to be detected of the current parent node.

[0009] Send a node detection command carrying the target node address to the lighting network. The node detection command is used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response.

[0010] After sending the node detection command, the load current change of the lighting network is detected, and the existence of the target node device is determined based on the load current change;

[0011] When the existence of the target node device is determined, the topological position of the target node device in the lighting network is determined based on the current parent node, the branch to be detected, and the address of the target node, and the target node device is identified as a node device that has been determined to exist.

[0012] Based on the determined topological locations of the target node devices, the topology identification results of the lighting network are generated.

[0013] Optionally, the target node address includes target hierarchy information and target device number information;

[0014] Before determining the address of the next-level target node to be probed based on the branch to be probed of the current parent node, the method further includes:

[0015] Send an address configuration command to the lighting network so that the node device determines its own node address based on the received hierarchical information and device number information, and forwards the updated hierarchical information and device number information downstream;

[0016] The main control device corresponds to root level information and root device number information;

[0017] The process of determining the address of the next-level target node to be detected based on the branch to be detected of the current parent node includes:

[0018] The target level information is determined based on the node level of the current parent node;

[0019] The target device number information is determined based on the node number of the current parent node and the branch number of the branch to be detected.

[0020] Optionally, the node detection instruction is further configured to cause the node device receiving the node detection instruction to match its own node address with the target node address;

[0021] When the node device matches its own node address with the target node address, it controls the downstream lighting load to generate the load response.

[0022] When the node device does not match the target node address, it forwards the node detection command downstream.

[0023] Optionally, determining whether the target node device exists based on the load current change includes:

[0024] If the load current change reaches a preset current change threshold within a preset detection time, then the existence of the target node device is determined.

[0025] If the load current change does not reach the preset current change threshold within the preset detection time, it is determined that the target node device does not exist.

[0026] Optionally, the method further includes:

[0027] Before sending the node detection command, the preset detection duration is determined;

[0028] Determining the preset detection duration includes:

[0029] If the branch to be detected does not identify any existing lower-level node devices, the basic waiting time is set to the preset detection time.

[0030] If the branch to be detected has identified a known lower-level node device, then the preset detection time is determined based on the basic waiting time and the hierarchical depth and / or number of downstream branches corresponding to the lower-level node device.

[0031] Optionally, generating the topology identification result of the lighting network based on the determined topology location of the target node device includes:

[0032] According to the arrangement order of the lighting loads, the main control device and / or the node device are controlled to generate load changes in sequence for the lighting loads to be detected;

[0033] Detect changes in the load current of the lighting network;

[0034] The number of lighting loads corresponding to at least one branch in the lighting network is determined based on the load current change.

[0035] Based on the topological location of the target node device and the number of lighting loads, a topology identification result of the lighting network is generated.

[0036] Optionally, generating the topology identification result of the lighting network based on the topological location of the target node device and the number of lighting loads includes:

[0037] Send a topology information reporting command carrying the address of the node to be reported to the identified target node device, so that the target node device matching the address to be reported can generate a current-coded signal by controlling the on / off state of the downstream lighting load.

[0038] The current-encoded signal is sampled and decoded to obtain the branch lighting load quantity information corresponding to the target node device;

[0039] The number of lighting loads is updated based on the branch lighting load quantity information;

[0040] The updated lighting load quantity is associated with the topological location of the target node device to generate the topology identification result of the lighting network.

[0041] A topology identification device for a lighting network, the lighting network including a main control device and at least one node device cascaded with the main control device, the node device being connected to lighting loads, the method being applied to the main control device, the device comprising:

[0042] The first determining module is used to take the main control device as the starting point of the topology search, take the main control device or the already determined existing node device as the current superior node, and determine the address of the next level target node to be detected based on the branch to be detected of the current superior node.

[0043] The sending module is used to send a node detection command carrying the target node address to the lighting network. The node detection command is used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response.

[0044] The detection module is used to detect the load current change of the lighting network after sending the node detection command, and determine whether the target node device exists based on the load current change;

[0045] The second determining module is used to determine the topological position of the target node device in the lighting network based on the current parent node, the branch to be detected, and the target node address when the existence of the target node device is determined, and to determine the target node device as a node device that has been determined to exist;

[0046] The generation module is used to generate the topology identification result of the lighting network based on the determined topology location of the target node device.

[0047] A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer-readable instructions, implements the above-described method for topology identification of a lighting network.

[0048] A readable storage medium having stored computer-readable instructions thereon, which, when executed by a processor, implement a topology identification method for the lighting network.

[0049] The aforementioned topology identification method, apparatus, computer equipment, and storage medium for a lighting network, wherein the lighting network includes a main control device and at least one node device cascaded with the main control device, the node device being connected to lighting loads, the method being applied to the main control device, the method comprising: taking the main control device as the starting point for topology search, designating the main control device or a known existing node device as the current superior node, and determining the address of the next-level target node to be detected based on the branch to be detected of the current superior node; sending a node detection command carrying the target node address to the lighting network, the node detection command being used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response; after sending the node detection command, detecting changes in the load current of the lighting network, and determining whether the target node device exists based on the changes in the load current; when the target node device is determined to exist, determining the topological position of the target node device in the lighting network based on the current superior node, the branch to be detected, and the target node address, and identifying the target node device as a known existing node device; and generating a topology identification result for the lighting network based on the determined topological position of the target node device. By using the main control device as the starting point for topology search and designating the main control device or a known existing node as the current parent node, the addresses of target nodes to be detected at each level are determined progressively. Then, node detection commands are used to instruct the matched target node to control the downstream lighting loads, generating a load response. This allows the main control device to determine the presence of the target node based on load current changes and further pinpoint its topological location within the lighting network. Therefore, the connection relationships between nodes in a multi-level cascaded lighting network can be automatically identified without manual configuration, improving the accuracy of lighting network topology identification and management efficiency. Attached Figure Description

[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a flowchart illustrating a method for topology identification of a lighting network according to an embodiment of the present invention;

[0052] Figure 2 This is a schematic diagram of a lighting network structure in one embodiment of the present invention;

[0053] Figure 3 This is a flowchart illustrating the second method for topology identification of a lighting network in one embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of a topology identification device for a lighting network in one embodiment of the present invention;

[0055] Figure 5 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] In one embodiment, such as Figure 1 As shown, a topology identification method for a lighting network is provided. The lighting network includes a main control device and at least one node device cascaded with the main control device. The node device is connected to a lighting load. The method is applied to the main control device and includes the following steps:

[0058] 101. Taking the main control device as the starting point of the topology search, the main control device or the existing node device is taken as the current parent node, and the address of the next level target node to be detected is determined based on the branch to be detected of the current parent node.

[0059] In this embodiment of the invention, the lighting network can be understood as a cascaded control network formed by a main control device, node devices, and lighting loads. The main control device can be an LED main controller, a lighting controller, a light strip controller, or a control gateway with lighting control and current detection capabilities, used to initiate topology identification, send node detection commands, detect load current changes, and generate topology identification results. Node devices can be splitters, power supply tees, cascaded control nodes, or other devices with downstream branch connection capabilities. Node devices can receive commands from higher-level devices and perform address matching, forwarding to downstream devices, or controlling downstream lighting loads to generate load responses based on the commands. Lighting loads can be LED chips, light strips, lighting modules, or other light-emitting loads that cause load current changes when turned on, off, or switching operating states.

[0060] When performing topology identification, the main control device can first broadcast the topology start command CMD_TOPO_START, enabling the cascaded node devices to enter a working mode that can participate in topology identification. The main control device can also abstract the main control device, splitter nodes, supplementary power nodes, and other node devices in the lighting network into topology nodes, and configure node information for each topology node, including node type (type), node level (layer), node number (node_num), parent node, child node set (child[]), connection port number (branch_index), number of lamps (led_count), and maximum number of branches (max_branch). Through this node information, the main control device can record the hierarchical relationships, connection branch relationships, and lighting load distribution between nodes in the form of a data structure.

[0061] The starting point of the topology search can be understood as the position where the main control device begins searching for lower-level devices during the topology identification process. As the initial control terminal of the lighting network, the main control device can correspond to root level information and root device number information, for example, layer 0 and node_num 0. A confirmed node device can be one whose existence has been confirmed by the main control device through node probe commands and load current changes. For example, after sending a node probe command to the target node address, if the main control device detects a load current change that reaches a preset current change threshold, it can confirm the existence of the node device corresponding to the target node address and record that node device as a confirmed node device.

[0062] The current parent node can be understood as the node currently used to continue the search to the next level. The current parent node can be the main control device or a node device that has already been confirmed to exist. When the current parent node is the main control device, it can determine the branch to be probed based on its own output ports. When the current parent node is a splitter or a power supply tee, the main control device can determine the branch to be probed based on the node device's maximum number of branches (max_branch), the recorded connection port number (branch_index), or a preset branch traversal order. For example, if a splitter has three downstream branches, the main control device can sequentially select branches 1, 2, and 3 as branches to be probed and determine the corresponding next-level target node addresses for each.

[0063] The target node address can be address information used to uniquely identify the node device to be probed. The target node address may include target level information and target device number information, and may further include port number, branch number, or address verification information. For example, starting with layer=0 and node_num=0, when probing a first-level node under the first output branch of the main control device, the target level information can be determined as layer=1, and the target device number information can be generated based on the branch number corresponding to the first output branch. After confirming the existence of a first-level node, this first-level node can be taken as the current parent node, and the target node address of layer=2 can be generated based on the branch to be probed of this first-level node. Thus, the main control device can search downwards level by level from itself, and continue to probe the downstream branches around the node device after confirming its existence, thereby gradually constructing the topology of the lighting network.

[0064] In one possible embodiment, the target node address may consist of a node level (layer) and a node number (node_num). The node level indicates the cascade position of the node device, and the node number distinguishes different node devices at the same level or under the same parent node.

[0065] In one possible embodiment, the branches to be detected can be determined sequentially according to the branch numbers of the current parent node in ascending order, or they can be determined according to the actual wiring port, historical topology records, or user-configured priority order.

[0066] In one possible embodiment, the main control device can maintain a queue of nodes to be detected locally, add the main control device and the identified node devices to the queue of nodes to be detected in sequence, and take out a node from the queue of nodes to be detected as the current parent node in order to continue to determine the address of the next level of target node to be detected.

[0067] 102. Send a node probe command carrying the target node address to the lighting network.

[0068] In this embodiment of the invention, the node detection command can be understood as a command used by the main control device to specifically detect the presence of a target node device. The node detection command can be a topology discovery command (CMD_STAGE1_DISCOVER) or other control commands with equivalent detection capabilities. The node detection command may carry the target node address, which may include target layer information (layer) and target device number information (node_num). It may also further carry information such as detection thresholds, command verification information, topology identification batch identifiers, or timeout parameters, depending on the actual communication protocol.

[0069] After determining that its own node address matches the target node address, the target node device can control the downstream lighting load to generate a load response. The load response can be generated by lighting one or more LEDs, switching the on / off state of the light strip, briefly controlling the lighting load at a specified location, or changing according to a preset on / off pattern. Since the lighting load's on / off state or its switching operation causes changes in the load current detected by the main control device, the main control device can determine the actual existence of the target node device through subsequent current detection. For example, after the main control device sends a node detection command carrying layer=1 and node_num=1, the first-level splitter matching that address controls at least one LED in each of its downstream branches to light up. Once the main control device detects an increase in load current, it can confirm the existence of that first-level splitter.

[0070] In one possible embodiment, the node detection command may carry target layer information, target device number information node_num, and branch identifier branch_index, enabling the target node device to be matched based on layer, number, and branch source simultaneously, thereby improving the accuracy of node detection.

[0071] In one possible embodiment, when the target node device generates a load response, it can control only one downstream lighting load to light up briefly to reduce power consumption during topology identification; or it can control the lighting loads in multiple branches to light up simultaneously to increase the load current variation amplitude, making it easier for the main control device to detect.

[0072] In one possible embodiment, the node detection command may carry a topology identification batch identifier. The node device only performs address matching or forwards downstream when the batch identifier matches the current topology identification process, thereby reducing the impact of historical commands, duplicate commands, or abnormal commands on the topology identification results.

[0073] 103. After sending the node detection command, detect the load current change of the lighting network and determine whether the target node device exists based on the load current change.

[0074] In this embodiment of the invention, after the main control device sends a node detection command, it can detect the load current of the lighting network within a preset detection period to determine whether the target node device corresponding to the target node address actually exists. Load current changes can be understood as current changes caused by the lighting load being turned on, off, briefly switched on, or brightness switching. Since the target node device will control the downstream lighting load to generate a load response after successful address matching, the main control device can indirectly determine whether the target node device is connected to the lighting network by detecting whether the load current changes as expected.

[0075] The main control device can acquire load current changes through current sampling circuits, sampling resistors, ADC sampling modules, or other current detection units. During the detection process, the main control device can perform continuous or intensive sampling within a preset detection time after sending the node detection command, and compare the sampled current value with the reference current value before sending the node detection command to obtain the load current change. The reference current value can be the average current value over a period of time before sending the node detection command, or it can be the stable current value when the lighting load is kept off. By using the difference between the reference current value and the current value during the response period, the impact of environmental noise, line interference, or power fluctuations on the judgment result can be reduced.

[0076] For example, after the main control device sends a node probe command to the target node address layer=1, node_num=1, the first-level splitter matching the address controls a downstream LED to light up briefly. The main control device detects the load current within 200ms. If it detects that the load current has increased relative to the reference current and exceeds a preset current change threshold, it confirms the existence of the first-level splitter corresponding to layer=1, node_num=1. If, after the main control device sends a node probe command to layer=1, node_num=2, no effective current change is detected within 200ms, it can be confirmed that the target node address does not currently correspond to a valid node device.

[0077] In one possible embodiment, the main control device can sample the load current change multiple times, and determine the existence of the target node device when the results of multiple consecutive samplings reach the preset current change threshold, thereby reducing the probability of misjudgment caused by transient interference.

[0078] In one possible embodiment, the main control device can make a judgment by combining the current change amplitude and duration. Only when the load current change reaches a preset current change threshold and the duration reaches a preset duration will the existence of the target node device be determined.

[0079] In one possible embodiment, the main control device can dynamically adjust the preset current change threshold according to the line length of the current branch to be detected, the downstream layer depth, or historical detection results, so as to adapt to the different branch load scales and line loss differences and improve the accuracy of the target node device existence judgment.

[0080] 104. When the existence of the target node device is determined, the topological position of the target node device in the lighting network is determined based on the current parent node, the branch to be detected, and the address of the target node device, and the target node device is identified as a node device that has been determined to exist.

[0081] In this embodiment of the invention, after the main control device determines the existence of the target node device based on the load current change, it can add the target node device to the node set corresponding to the topology identification result, and determine the topological position of the target node device in the lighting network based on the current parent node, the branch to be detected, and the target node address. The topological position can be used to indicate which branch of which parent node the target node device is located under, as well as the level and number of the target node device in the lighting network.

[0082] The current parent node can be used as the parent node of the target node device, the branch to be probed can be used as the connection port number (branch_index) of the target node device relative to the parent node, and the target node address can be used to determine the node level (layer) and node number (node_num) of the target node device. The master control device can then establish a topology node record corresponding to the target node device. The topology node record can include information such as node type (type), node level (layer), node number (node_num), parent node, child node set (child[]), connection port number (branch_index), number of lights (led_count), and maximum number of branches (max_branch). By establishing the topology node record, the master control device can convert the node existence results obtained from a single probe into manageable topology relationship data.

[0083] For example, when the main control device is the current parent node, if the target node address corresponding to the second output branch of the main control device is confirmed to exist, the target node device can be recorded as a child node of the main control device, and the branch_index can be recorded as the branch number corresponding to the second output branch. As another example, when splitter B has been confirmed to exist and is the current parent node, if the target node address corresponding to the third downstream branch of splitter B is confirmed to exist, the newly discovered target node device can be recorded as a child node of splitter B, the parent of the target node device can be recorded as splitter B, and the branch_index can be recorded as the branch number corresponding to the third downstream branch.

[0084] Once a target node is confirmed as an existing node, the master control device can continue to use it as the new current parent node during subsequent topology identification and probe its downstream branches. If the maximum number of branches (max_branch) corresponding to the target node is three, the master control device can sequentially determine new target node addresses around the first, second, and third downstream branches of the target node and continue sending node probe commands. Thus, the master control device can expand the topology relationship downwards from itself level by level until all branch probes are completed, the maximum level limit is reached, or other topology identification termination conditions are met.

[0085] In one possible embodiment, when the target node device exists, the main control device can write the node identifier of the target node device into the child node set child[] of the current parent node, and write the node identifier of the current parent node into the parent node of the target node device, so as to form a bidirectional queryable parent-child node relationship.

[0086] In one possible embodiment, the main control device can determine the node type (type) based on the response characteristics of the target node device in the load response. For example, if the response characteristics correspond to a splitter node, the type is recorded as a splitter; if the response characteristics correspond to a power supply tee node, the type is recorded as a power supply node.

[0087] In one possible embodiment, after determining the topological location of the target node device, the main control device can configure the initial number of lamps (led_count) and the maximum number of branches (max_branch) for the target node device. The initial number of lamps can be set to zero or an unknown value and updated during subsequent load count detection or topology information reporting.

[0088] 105. Based on the determined topological locations of the target node devices, generate the topology identification results of the lighting network.

[0089] In this embodiment of the invention, after determining the existence and topology location of multiple target node devices, the main control device can generate a topology identification result of the lighting network based on the determined topology location of the target node devices. The topology identification result may include the node level, node number, parent node, connection branches, and child node relationships of each target node device, which are used to characterize the cascade connection relationship between the main control device and node devices at each level.

[0090] The main control device can abstract each identified target node device into a topology node and update the topology node information according to the topology location corresponding to the target node device. The main control device can form a tree topology diagram or topology data table based on the above topology node information, thereby clarifying the hierarchical relationship and branch connection relationship of each node device in the lighting network.

[0091] For example, the main control device can record itself as the root node, the first-level splitter as a child node of the root node, and record the branch_index according to the output branch connected to the splitter. When a downstream branch of a first-level splitter detects a second-level node device, the second-level node device can be recorded as a child node of that first-level splitter. In this way, the main control device can gradually form a complete lighting network topology identification result, providing a data foundation for subsequent lighting load control, node maintenance, fault location, and lighting load quantity management.

[0092] In one possible embodiment, the topology identification result can also be associated with the number of lighting loads, enabling the main control device to know the number of LEDs or lamps under different branches.

[0093] In one possible embodiment, the main control device can store the topology identification results in local memory and recall them upon the next power-on or maintenance for topology comparison or anomaly detection.

[0094] In one possible embodiment, the main control device can send a topology end command CMD_TOPO_END after the topology identification is completed, causing the node device to exit the topology identification process and resume normal lighting control.

[0095] In this embodiment of the invention, the lighting network includes a main control device and at least one node device cascaded with the main control device. The node device is connected to a lighting load. The method is applied to the main control device and includes: taking the main control device as the starting point for topology search, designating the main control device or a known existing node device as the current parent node, and determining the address of the next-level target node to be detected based on the branch to be detected of the current parent node; sending a node detection command carrying the target node address to the lighting network, the node detection command being used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response; after sending the node detection command, detecting the load current change of the lighting network, and determining whether the target node device exists based on the load current change; when the target node device is determined to exist, determining the topological position of the target node device in the lighting network based on the current parent node, the branch to be detected, and the target node address, and identifying the target node device as a known existing node device; generating a topology identification result of the lighting network based on the determined topological position of the target node device. By using the main control device as the starting point for topology search and designating the main control device or a known existing node as the current parent node, the addresses of target nodes to be detected at each level are determined progressively. Then, node detection commands are used to instruct the matched target node to control the downstream lighting loads, generating a load response. This allows the main control device to determine the presence of the target node based on load current changes and further pinpoint its topological location within the lighting network. Therefore, the connection relationships between nodes in a multi-level cascaded lighting network can be automatically identified without manual configuration, improving the accuracy of lighting network topology identification and management efficiency.

[0096] Optionally, the target node address includes target hierarchy information and target device number information;

[0097] Before determining the address of the next-level target node based on the branch to be detected of the current parent node, an address configuration command can be sent to the lighting network so that the node device can determine its own node address based on the received hierarchical information and device number information, and forward the updated hierarchical information and device number information downstream; among them, the main control device has root hierarchical information and root device number information.

[0098] In the step of determining the address of the next level target node to be detected based on the branch to be detected of the current parent node, the target level information can also be determined based on the node level of the current parent node; and the target device number information can be determined based on the node number of the current parent node and the branch number of the branch to be detected.

[0099] In this embodiment of the invention, the target node address can be used to indicate the next-level node device to be detected in the lighting network. The target node address may include target hierarchy information and target device number information. The target hierarchy information can be used to indicate the cascade level of the target node device relative to the main control device, and the target device number information can be used to distinguish node devices corresponding to different branches or different positions within the same hierarchy. Through the combination of target hierarchy information and target device number information, the main control device can locate and detect target node devices in a multi-level cascaded lighting network.

[0100] Before determining the target node address, the main control device can send an address configuration command to the lighting network. This command can be the initial discovery start command (CMD_STAGE1_START) or other commands with address allocation or refresh functions. The address configuration command can carry information such as the current hierarchy, current device number, detection threshold, and total topology timeout parameters. Upon receiving the address configuration command, the node device can determine its own node address based on the received hierarchy and device number information. When forwarding the address configuration command downstream, it updates the hierarchy and device number information, enabling downstream node devices to continue generating their corresponding node addresses.

[0101] The master control device can correspond to root level information and root device number information. For example, the master control device can correspond to layer=0 and node_num=0. A first-level node device directly cascaded with the master control device can determine layer=1 and its corresponding node_num based on the address configuration instructions issued by the master control device. After the first-level node device continues to forward the updated level information and device number information downstream, the second-level node device can determine layer=2 and its corresponding node_num. Through hierarchical updates and forwarding, node devices in the lighting network can form their own node addresses corresponding to their cascaded locations.

[0102] When determining the address of the next-level target node to be probed, the main control device can determine the target layer information based on the node layer of the current parent node. For example, if the node layer of the current parent node is layer=1, the target layer information of the next-level target node device can be determined as layer=2. The main control device can also determine the target device number information based on the node number of the current parent node and the branch number of the branch to be probed. For example, if the node number of the current parent node is node_num=3 and the branch number of the branch to be probed is branch_index=2, the main control device can generate the target device number information of the next-level target node device according to a preset number mapping rule.

[0103] Through the address configuration method described above, the master control device enables each level of node device to form its own node address and can generate the address of the next level target node to be probed based on the current parent node and the branch to be probed. Thus, when a node probe command is subsequently sent, the node device receiving the command can compare its own node address with the target node address to determine whether it is the target node device that needs to be responded to.

[0104] In one possible embodiment, the target device number information can be generated by concatenating the node number of the current parent node and the branch number of the branch to be probed. For example, if the node_num of the current parent node is B and the branch_index of the branch to be probed is 3, the target device number information of the next level can be represented as B-3, so as to reflect the branch dependency relationship between the target node device and the current parent node.

[0105] In one possible embodiment, the target device number information can be generated according to a preset numbering table. The main control device can pre-configure numbering ranges corresponding to different levels and branches. After determining the current parent node and the branch to be detected, the corresponding number is selected from the numbering range as the target device number information.

[0106] In one possible embodiment, the address configuration instruction may also carry a topology identification batch identifier, enabling the node device to determine its own node address using only the hierarchical information and device number information corresponding to the current batch during the same round of topology identification, thereby avoiding the influence of historical address information on the current topology identification result.

[0107] Optionally, the node detection command is also used to cause the node device that receives the node detection command to match its own node address with the target node address; wherein, when the node device matches its own node address with the target node address, it controls the downstream lighting load to generate a load response; when the node device does not match its own node address with the target node address, it forwards the node detection command downstream.

[0108] In this embodiment of the invention, the node detection command can be used to trigger node devices in a lighting network to perform address matching and load response. The node detection command can be the topology discovery command CMD_STAGE1_DISCOVER, or other control commands with target node detection functionality. After the node detection command carries the target node address, the node device receiving the command can read the target node address and compare it with its own node address to determine whether the current node device is the target node device that the main control device needs to detect this time.

[0109] The node's own address can be generated by the node device during the address configuration process. For example, after receiving an address configuration command, the node device can determine its own address based on the received layer information and device number information (node_num). The target node address can also include target layer information and target device number information. When both layer and node_num in the node's own address match the corresponding information in the target node address, the node device can determine that its own node address matches the target node address; when either piece of information is inconsistent, the node device can determine that its own node address does not match the target node address.

[0110] When a node device's own node address matches that of a target node, it can identify itself as the target node device and control the downstream lighting loads to generate a load response. A load response can be generated by lighting at least one LED, briefly switching the on / off state of a light strip, or controlling the conduction of lighting loads in a specified branch. After generating a load response, the target node device can stop forwarding the current node probe command downstream to avoid downstream node devices repeatedly responding to the same probe command.

[0111] When a node device's address does not match the target node's address, it can forward the node probe command downstream, allowing the next-level node device to continue address matching. Forwarding can be done as is, or it can be done by adding a forwarding identifier or verification information while keeping the target node address unchanged. By responding when a match occurs and forwarding when a mismatch occurs, the main control device can ensure that node probe commands reach the target node device in a multi-level cascaded lighting network, and determine the existence of the target node device based on its load response.

[0112] For example, after the main control device sends a node probe command carrying layer=2 and node_num=5, the first-level node device receives the command and finds that its own node address is layer=1 and node_num=2, which does not match the target node address. Therefore, the first-level node device continues to forward the node probe command downstream. After receiving the node probe command, if the second-level node device's own node address is layer=2 and node_num=5, it can control the downstream lighting load to light up briefly, thereby generating a load current change that can be detected by the main control device.

[0113] In one possible embodiment, after a successful address match, the node device can control one of the lighting loads in each downstream branch to generate a load response, thereby improving the reliability of the main control device in detecting changes in load current.

[0114] In one possible implementation, after an address match fails, the node device can forward the node probe command only to downstream branches that have a physical connection or are configured as valid outputs, in order to reduce the waiting time caused by invalid forwarding.

[0115] In one possible embodiment, the node device can verify the instruction checksum, topology identification batch identifier, or target level information before forwarding the node probe instruction. Only when the verification is successful can the instruction be forwarded downstream, thereby reducing the impact of abnormal instructions on the topology identification process.

[0116] Optionally, in the step of determining whether the target node device exists based on the load current change, if the load current change reaches a preset current change threshold within a preset detection time, the target node device is determined to exist; if the load current change does not reach the preset current change threshold within a preset detection time, the target node device is determined not to exist.

[0117] In this embodiment of the invention, the preset detection duration can be understood as a time window used by the main control device to wait for load response after sending the node detection command. Since the target node device will control the downstream lighting load to generate a load response after the address matching is successful, and the load response will cause a change in the load current in the lighting network, the main control device can detect the load current change within the preset detection duration and determine whether the target node device exists based on whether the load current change reaches the preset current change threshold.

[0118] Load current changes can be obtained from the current detection circuit, sampling resistor, ADC sampling module, or other current detection units in the main control device. The main control device can acquire a reference current value before sending the node detection command and continuously collect the current value after sending the node detection command. The current current value is compared with the reference current value to obtain the load current change. The reference current value can be the average current value within a preset time period before sending the node detection command, or it can be the current value when the lighting load is in an off state or a stable state.

[0119] The preset current change threshold can be determined based on the rated operating current of the lighting load, sampling noise, line loss, and power supply fluctuation range. For example, when a single LED is briefly lit, it will generate a certain amount of current rise. The main control device can set the preset current change threshold to be greater than the noise current but less than the current change value caused by a single LED being lit normally. In this way, when the target node device controls the downstream lighting load to generate an effective load response, the main control device can promptly identify the presence of the target node device; when only power supply fluctuations or interference signals exist, the main control device is less likely to misjudge the presence of the target node device.

[0120] If the main control device detects a load current change reaching a preset current change threshold within a preset detection period, it can determine that the target node device exists and record it as a confirmed node device. If the main control device does not detect a load current change reaching the preset current change threshold within the preset detection period, it can determine that the target node device does not exist, or that the target node address does not correspond to a valid node device. Therefore, the main control device can determine the existence of a node device based on the current changes generated by the lighting load, without requiring manual input of node connection relationships.

[0121] For example, after the main control device sends a node detection command to the target node device with layer=1 and node_num=1, it can collect the load current of the lighting network within 200ms. If the collected load current increases compared to the reference current and exceeds the preset current change threshold, it can be determined that the node device corresponding to layer=1 and node_num=1 exists; if no effective current change is detected within 200ms, it can be determined that the node device corresponding to the target node address does not exist.

[0122] In one possible embodiment, the main control device can perform multiple current samplings within a preset detection time, and determine the existence of the target node device when the results of multiple consecutive samplings all reach a preset current change threshold, so as to reduce the probability of misjudgment caused by transient interference.

[0123] In one possible embodiment, the main control device can jointly determine whether the target node device exists based on the magnitude and duration of the load current change. For example, when the load current change reaches a preset current change threshold and continues for a preset duration, the target node device is determined to exist.

[0124] In one possible embodiment, the preset current change threshold can be adjusted based on the line length of the current branch to be detected, historical current detection results, or the number of lighting loads, so that different branches can still obtain relatively stable node existence judgment results under different load scales or line losses.

[0125] Optionally, the method can also determine a preset detection duration before sending the node probe command; wherein, in the step of determining the preset detection duration, if the branch to be probed has not identified a confirmed lower-level node device, the basic waiting duration can be determined as the preset detection duration; if the branch to be probed has identified a confirmed lower-level node device, the preset detection duration can be determined based on the basic waiting duration and the hierarchical depth and / or the number of downstream branches corresponding to the lower-level node device.

[0126] In this embodiment of the invention, since the lighting network may have a multi-level cascaded structure, the number of nodes, cascade levels, and number of branches downstream of different branches to be detected may vary. If all branches adopt a fixed waiting time, unnecessary waiting may occur on shallow or empty branches, and effective load responses may be missed on deep branches due to insufficient waiting time. Therefore, the main control device can determine the preset detection time based on the identified topology of the branch to be detected before sending the node detection command.

[0127] When the branch to be probed has not yet identified any known downstream node devices, it can be assumed that a cascaded structure requiring additional waiting has not yet formed downstream of that branch. In this case, the main control device can set the basic waiting time to a preset detection time. The basic waiting time can be determined based on the time required for a single-level node device to receive instructions, complete address matching, control the lighting load to generate a load response, and for the main control device to complete current sampling. For example, the basic waiting time can be set to 200ms to meet the requirements for instruction transmission and current detection during the single-level node probe process.

[0128] When a branch under investigation has identified a confirmed lower-level node device, it indicates that there is a certain cascading depth or branch extension structure downstream of the branch under investigation. At this point, the main control device can determine a preset detection duration based on the basic waiting time and the hierarchical depth and / or the number of downstream branches corresponding to the lower-level node device. The greater the hierarchical depth, the longer the transmission and forwarding time of the node probe command in the cascading link may be; the more downstream branches there are, the higher the waiting time required for the node device to complete branch processing or load response may be. Therefore, the main control device can configure a longer preset detection duration for deep or complex branches, and a shorter preset detection duration for shallow branches or branches without lower-level node devices.

[0129] For example, if a branch to be probed fails to identify a lower-level node device, the main control device can set the preset detection time to a base waiting time of 200ms. If another branch to be probed has already identified a lower-level node device, and that lower-level node device has three downstream branches, the main control device can set the preset detection time to 600ms based on the base waiting time and the number of downstream branches. By configuring the waiting time differently, invalid waiting caused by fixed timeouts can be reduced, and the risk of missed detections of deeply cascaded nodes can be lowered.

[0130] During topology identification, after completing local topology identification, the master control device can configure the maximum waiting time for each branch to a specified node device via the topology configuration command CMD_STAGE1_CONFIG. Upon receiving the topology configuration command, the node device can use the corresponding waiting time in subsequent light count detection, branch response, or topology information reporting processes, ensuring that the master control device and node devices maintain a consistent timeout control strategy within the same round of topology identification.

[0131] In one possible embodiment, the preset detection duration can be determined by the product of the base waiting duration and the level depth. For example, if the base waiting duration is 200ms and the lower level depth corresponding to the branch to be detected is 3, the preset detection duration can be determined to be 600ms.

[0132] In one possible embodiment, the preset detection duration can be determined by multiplying the base waiting time by the number of downstream branches, so that node devices with a larger number of branches can have a longer waiting time.

[0133] In one possible embodiment, the main control device can adjust the preset detection time based on historical topology identification results. For example, if a branch can generate a stable load response in a short time during multiple identification processes, the preset detection time for that branch can be appropriately shortened; if a branch has historically had response delays, the preset detection time for that branch can be appropriately extended.

[0134] Optionally, in the step of generating the topology identification result of the lighting network based on the determined topology location of the target node device, the following steps can also be taken: control the main control device and / or the node device to be detected to generate load changes sequentially according to the arrangement order of the lighting loads; detect the load current change of the lighting network; determine the number of lighting loads corresponding to at least one branch in the lighting network based on the load current change; and generate the topology identification result of the lighting network based on the topology location of the target node device and the number of lighting loads.

[0135] In this embodiment of the invention, the number of lighting loads can be understood as the number of LED chips, LED strip units, or lighting modules connected downstream of a branch of the main control device or node device. After obtaining the topological location of the target node device, the main control device can further perform quantity detection on the lighting loads in the lighting network, so that the final generated topology identification result can not only represent the cascading relationship between node devices, but also the distribution of lighting loads downstream of each branch.

[0136] Load quantity detection can be triggered by a load quantity detection command. The load quantity detection command can be CMD_STAGE2_START or other commands with equivalent detection functionality. After the main control device sends the load quantity detection command, it can detect the lighting loads corresponding to its own output branches, and the node devices can also detect the lighting loads corresponding to their downstream branches. During the detection process, the lighting loads to be detected can be controlled to change loads sequentially according to their arrangement. For example, the first LED can be controlled to light up while the others remain off. If the main control device detects a load current change that reaches the detection threshold, it confirms the existence of a valid lighting load at the current location and continues to control the next LED to change load. If no valid load current change is detected within a preset time, the detection of the lighting load quantity for the current branch is considered complete.

[0137] The master control device can determine the number of lighting loads corresponding to at least one branch based on the current detection results corresponding to each load change. For the output branches of the master control device, the master control device can directly accumulate the number of lighting loads for that output branch based on the load current changes. For downstream branches of node devices, the node devices can perform lighting load quantity detection locally for the corresponding branch and provide the detected quantity information to the master control device during subsequent topology information reporting. The master control device can record the number of lighting loads in the led_count field of the corresponding topology node, or it can record the number of lighting loads corresponding to each branch in combination with the connection port number branch_index.

[0138] By associating the topological location of target node devices with the number of lighting loads, the main control device can determine which level each node device is located at, which branch of which parent node it is connected to, and how many lighting loads are connected downstream of that node device or branch. Based on this topology identification result, subsequent zoning control, light mapping, load management, and fault location can be performed more accurately.

[0139] In one possible embodiment, the detection of the number of lighting loads can be performed in order from the near end to the far end, enabling the main control device to sequentially confirm the valid location of each lighting load in the same branch.

[0140] In one possible embodiment, during the load quantity detection process, only a single lighting load may be controlled to generate a short-term load change in order to reduce the instantaneous power consumption during the detection process.

[0141] In one possible embodiment, the main control device can bind and store the number of lighting loads corresponding to each branch with the branch_index and led_count of the topology node, so that the lighting load distribution of the corresponding branch can be quickly queried according to the topology node later.

[0142] Optionally, in the step of generating the topology identification result of the lighting network based on the topology location of the target node device and the number of lighting loads, a topology information reporting command carrying the address of the node to be reported can be sent to the identified target node device, so that the target node device matching the address to be reported generates a current-coded signal by controlling the on / off state of the downstream lighting loads; the current-coded signal is sampled and decoded to obtain the branch lighting load quantity information corresponding to the target node device; the lighting load quantity is updated based on the branch lighting load quantity information; and the updated lighting load quantity is associated with the topology location of the target node device to generate the topology identification result of the lighting network.

[0143] In this embodiment of the invention, the topology information reporting command can be used to enable a confirmed target node device to report the lighting load quantity information of the corresponding branch to the main control device. The topology information reporting command can be CMD_STAGE3_REPORT, or other commands with equivalent reporting functions. When the lighting network also includes supplementary power nodes or supplementary power tee nodes, the topology information reporting command can also be CMD_STAGE4_REPORT or other commands used for reporting supplementary power node information.

[0144] After identifying the existence of node devices, the master control device can sequentially send topology information reporting commands to target node devices according to the determined topology locations. The topology information reporting command can carry the address of the node to be reported, which may include the layer information and the device number information (node_num) of the node to be reported. The node device receiving the topology information reporting command can match its own node address with the address of the node to be reported. If they match, the node device can be designated as the target node device for reporting information; if they do not match, the node device can choose not to report, or forward the topology information reporting command downstream according to preset rules.

[0145] After matching the address of the node to be reported, the target node device can generate a current-encoded signal by controlling the on / off state of the downstream lighting loads. The current-encoded signal can be understood as a sequence of load current changes formed by the lighting loads turning on and off according to preset encoding rules. Different on / off combinations, on / off durations, or on / off cycles can represent different branch lighting load quantity information. For example, the target node device can sequentially encode the lighting load quantities of the first, second, and third branches into corresponding on / off sequences, enabling the main control device to decode the current changes to obtain the corresponding lighting load quantity for each branch.

[0146] After sending the topology information reporting command, the main control device can perform intensive sampling of load current changes through the ADC sampling module and decode the sampling results according to the agreed encoding rules. The decoded information may include the number of branch lighting loads corresponding to each branch of the target node device, or it may include the branch number (branch_index), node number (node_num), verification information, or reporting end marker. The main control device can associate the decoded branch lighting load number information with the topology location of the target node device and update the lighting load number accordingly.

[0147] For example, the main control device has confirmed the existence of primary splitter A and determined that splitter A is connected to the first output branch of the main control device. Subsequently, the main control device sends a topology information reporting command carrying the node address of splitter A to splitter A. After successful matching, splitter A can generate a current-coded signal based on the on / off status of downstream lighting loads. After sampling and decoding the current-coded signal, the main control device obtains that the first, second, and third branches of splitter A correspond to 12, 24, and 24 lighting loads, respectively. The main control device can write the above branch lighting load quantity information into the led_count field of the corresponding topology node of splitter A and bind the number of each branch to the branch_index, thereby completing the topology identification result of the lighting network.

[0148] In this way, the main control device can not only confirm the topological location of the target node device in the lighting network, but also further obtain the number of lighting loads in each downstream branch of the target node device. The resulting topology identification result can simultaneously reflect the node cascading relationship and the distribution of lighting loads, providing a data foundation for subsequent lighting control, load management, anomaly detection, and maintenance location.

[0149] In one possible embodiment, the current-encoded signal can be generated using a binary encoding method, with the lighting load's on state representing the first encoded value and the lighting load's off state representing the second encoded value. The main control device combines the encoded values ​​obtained from continuous sampling to reconstruct the branch lighting load quantity information.

[0150] In one possible embodiment, the target node device can output a start identifier before generating the current-encoded signal and an end identifier after the branch lighting load quantity information is reported, so that the main control device can accurately determine the start and end positions of the current-encoded signal.

[0151] In one possible embodiment, the main control device can verify the number of branch lighting loads obtained by decoding, and update the number of lighting loads after the verification passes; if the verification fails, it can resend the topology information reporting command to make the target node device generate the current encoding signal again.

[0152] Furthermore, it should be noted that:

[0153] In one possible embodiment, the main control device can terminate the topology identification process when the topology identification termination conditions are met. The topology identification termination conditions may include: all branches to be detected have completed detection, the current detection level has reached a preset maximum level, the topology identification process duration exceeds the maximum topology duration, or a user-triggered termination command is received. The preset maximum level can be pre-set according to the size of the lighting network, for example, it can be set to 8 levels. After determining that the topology identification has ended, the main control device can send a topology termination command CMD_TOPO_END to the lighting network, causing each node device to exit the topology identification process and resume normal lighting control.

[0154] In one possible embodiment, the main control device can employ a state machine or event-driven approach to execute the topology identification process. The main control device can switch between states: sending a probe command, waiting for a response, timeout switching, node switching, hierarchy switching, and completion. For example, it may enter a waiting for a response state after sending a node probe command; enter a timeout switching state if no effective load current change is detected within a preset detection period; or enter a node switching or hierarchy switching state after the current node or branch has been processed. Using a state machine or event-driven approach avoids the topology identification process from occupying the main control device's control flow for extended periods.

[0155] In one possible embodiment, if the main control device does not detect a valid load response corresponding to the target node device, it may not record the node device corresponding to the target node address as a confirmed existing node device, nor may it continue to generate downstream target node addresses using the node device corresponding to the target node address as the current superior node. The main control device may switch to the next target node address at the same level, the next branch to be probed from the current superior node, or the next node device in the set of nodes to be reported to continue processing. During the topology information reporting process, if no current-encoded signal corresponding to the target node device is received within a preset reporting waiting time, the main control device may skip the current node address to be reported and continue traversing the next node address to be reported.

[0156] Furthermore, such as Figure 2 As shown in the figure, an embodiment of the present invention also provides a structural schematic diagram of a lighting network, through which... Figure 2 As can be seen, a lighting network can include a main control device, branch circuit breakers, supplementary power tees, and lighting loads. The main control device can be considered a layer 0 device. Branch circuit breakers can be cascaded downstream of the main control device, forming layer 1 and layer 2 branch circuit breakers. Supplementary power tees can be connected between the main control device and downstream branch circuit breakers to provide supplementary power to the subsequently connected lighting loads. The downstream branches of each branch circuit breaker can connect to lighting loads or continue to connect to the next level branch circuit breaker, thus forming a multi-level cascaded tree-like lighting network.

[0157] In one possible embodiment, the master control device can first establish a level 0 root node and add it to the search queue. Subsequently, the master control device can broadcast the topology start command CMD_TOPO_START, enabling each level of node device to enter a state where it can participate in topology identification.

[0158] The master control device can send a topology discovery start command (CMD_STAGE1_START) to enable next-level node devices to determine their own node addresses based on the received hierarchy and device number information, and forward the updated hierarchy and device number information downstream, thus providing each level of node device with a unique node address corresponding to this round of topology identification. Afterwards, the master control device can send a topology discovery command (CMD_STAGE1_DISCOVER) carrying the address of the target node to be detected. Node devices matching the target node address can control downstream lighting loads to generate a load response; node devices that do not match can continue to forward the topology discovery command downstream. The master control device can determine the existence of the target node device based on load current changes, and switch to the next target node address or the next branch to be detected if no effective load response is detected.

[0159] After initial topology discovery, the main control device can send the topology configuration command CMD_STAGE1_CONFIG to configure the maximum waiting time for each branch in the corresponding node devices, thereby reducing unnecessary waiting during subsequent lamp count detection or information reporting. The main control device can also send the lamp count detection command CMD_STAGE2_START, causing the main control device and node devices at all levels to sequentially control the lighting loads to be detected to generate load changes according to the lighting load arrangement order, and determine the number of lighting loads corresponding to each branch based on the load current changes.

[0160] After the lamp count is completed, the main control device can send a topology reporting start command CMD_STAGE3_START, causing each level of the branch circuit to enter the topology information reporting state, and send a topology information reporting command CMD_STAGE3_REPORT to the designated branch circuit. The corresponding branch circuit can generate a current-encoded signal by controlling the on / off state of the downstream lighting loads. The main control device can sample and decode the load current changes to obtain the lighting load quantity information of each branch of the corresponding branch circuit. If no valid reporting information is received within the preset reporting waiting time, the main control device can switch to the next node address to be reported and continue processing.

[0161] For the supplementary power tee node, the main control device can send a supplementary power tee topology information reporting command CMD_STAGE4_REPORT after detecting the number of lights, so that the supplementary power tee node reports topology information in the same or similar way as the branch circuit breaker. The main control device can generate a complete tree topology identification result based on the identified node topology location, the number of lighting loads in each branch, and the information reported by the supplementary power tee node.

[0162] Topology identification can end when certain conditions are met. These conditions may include: completion of all topology information acquisition, reaching the preset maximum level, exceeding the maximum topology duration, or receiving a user-initiated termination command. After topology identification concludes, the main control device can save the results and send a topology termination command (CMD_TOPO_END) to exit the topology identification state and return to normal operation for each node.

[0163] Furthermore, such as Figure 3 As shown in the figure, this embodiment of the invention also provides a flowchart of a second method for topology identification of lighting networks, through... Figure 3As can be seen, when determining the preset detection duration for the branch to be detected, the main control device can input the current node (node) and the branch number (branch_index), and first determine whether the input parameters are valid. If the input parameters are invalid, the duration determination process can end; if the input parameters are valid, the child node parameters of the current node under the specified branch can be obtained. If there are no child node parameters under the specified branch, the basic branch timeout duration, such as 200ms, can be returned; if there are child node parameters under the specified branch, the waiting durations of all branches under the child node can be accumulated on the basis of the basic branch timeout duration to obtain the preset detection duration for the branch to be detected. In this way, the main control device can dynamically determine the waiting duration based on whether there are child nodes downstream of the branch and the branch status of the child nodes, so that branches without lower-level nodes can quickly end the waiting period, and branches with lower-level nodes can be configured with a longer detection time.

[0164] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0165] In one embodiment, a topology identification device for a lighting network is provided, which corresponds one-to-one with the topology identification method for the lighting network described in the above embodiments. For example... Figure 4 As shown, the topology identification device for this lighting network includes a first determination module 401, a transmission module 402, a detection module 403, a second determination module 404, and a generation module 405. Detailed descriptions of each functional module are as follows:

[0166] The first determining module 401 is used to take the main control device as the starting point of the topology search, take the main control device or the already determined existing node device as the current superior node, and determine the address of the next level target node to be detected based on the branch to be detected of the current superior node.

[0167] The sending module 402 is used to send a node detection command carrying the target node address to the lighting network. The node detection command is used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response.

[0168] The detection module 403 is used to detect the load current change of the lighting network after sending the node detection command, and determine whether the target node device exists based on the load current change;

[0169] The second determining module 404 is used to determine the topological position of the target node device in the lighting network based on the current parent node, the branch to be detected, and the target node address when the existence of the target node device is determined, and to determine the target node device as a node device that has been determined to exist;

[0170] The generation module 405 is used to generate the topology identification result of the lighting network based on the determined topology location of the target node device.

[0171] Optionally, the target node address includes target hierarchy information and target device number information;

[0172] Before determining the address of the next-level target node to be detected based on the branch to be detected of the current parent node, the device is further configured to:

[0173] Send an address configuration command to the lighting network so that the node device determines its own node address based on the received hierarchical information and device number information, and forwards the updated hierarchical information and device number information downstream;

[0174] The main control device corresponds to root level information and root device number information;

[0175] The first determining module 401 is further configured to:

[0176] The target level information is determined based on the node level of the current parent node;

[0177] The target device number information is determined based on the node number of the current parent node and the branch number of the branch to be detected.

[0178] Optionally, the node detection instruction is further configured to cause the node device receiving the node detection instruction to match its own node address with the target node address;

[0179] When the node device matches its own node address with the target node address, it controls the downstream lighting load to generate the load response.

[0180] When the node device does not match the target node address, it forwards the node detection command downstream.

[0181] Optionally, the detection module 403 is further configured to:

[0182] If the load current change reaches a preset current change threshold within a preset detection time, then the existence of the target node device is determined.

[0183] If the load current change does not reach the preset current change threshold within the preset detection time, it is determined that the target node device does not exist.

[0184] Optionally, the device is further used for:

[0185] Before sending the node detection command, the preset detection duration is determined;

[0186] Determining the preset detection duration includes:

[0187] If the branch to be detected does not identify any existing lower-level node devices, the basic waiting time is set to the preset detection time.

[0188] If the branch to be detected has identified a known lower-level node device, then the preset detection time is determined based on the basic waiting time and the hierarchical depth and / or number of downstream branches corresponding to the lower-level node device.

[0189] Optionally, the generation module 405 is further configured to:

[0190] According to the arrangement order of the lighting loads, the main control device and / or the node device are controlled to generate load changes in sequence for the lighting loads to be detected;

[0191] Detect changes in the load current of the lighting network;

[0192] The number of lighting loads corresponding to at least one branch in the lighting network is determined based on the load current change.

[0193] Based on the topological location of the target node device and the number of lighting loads, a topology identification result of the lighting network is generated.

[0194] Optionally, the generation module 405 is further configured to:

[0195] Send a topology information reporting command carrying the address of the node to be reported to the identified target node device, so that the target node device matching the address to be reported can generate a current-coded signal by controlling the on / off state of the downstream lighting load.

[0196] The current-encoded signal is sampled and decoded to obtain the branch lighting load quantity information corresponding to the target node device;

[0197] The number of lighting loads is updated based on the branch lighting load quantity information;

[0198] The updated lighting load quantity is associated with the topological location of the target node device to generate the topology identification result of the lighting network.

[0199] Specific limitations regarding the topology identification device for lighting networks can be found in the limitations of the topology identification method for lighting networks described above, and will not be repeated here. Each module in the aforementioned topology identification device for lighting networks can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0200] In one embodiment, a computer device is provided, which may be a terminal device, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a readable storage medium storing computer-readable instructions. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer-readable instructions implement a topology identification method for a lighting network. The readable storage medium provided in this embodiment includes both non-volatile and volatile readable storage media.

[0201] In one embodiment of the application, a readable storage medium is provided, which stores computer-readable instructions. When executed by a processor, the computer-readable instructions implement the steps of the topology identification method for the lighting network described above.

[0202] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When executed, these computer-readable instructions can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0203] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0204] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for topology identification of a lighting network, characterized in that, The lighting network includes a main control device and at least one node device cascaded with the main control device, the node device being connected to lighting loads, and the method is applied to the main control device, the method comprising: Taking the main control device as the starting point of the topology search, the main control device or the existing node device is taken as the current parent node, and the address of the next level target node to be detected is determined based on the branch to be detected of the current parent node. Send a node detection command carrying the target node address to the lighting network. The node detection command is used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response. After sending the node detection command, the load current change of the lighting network is detected, and the existence of the target node device is determined based on the load current change; When the existence of the target node device is determined, the topological position of the target node device in the lighting network is determined based on the current parent node, the branch to be detected, and the address of the target node, and the target node device is identified as a node device that has been determined to exist. Based on the determined topological locations of the target node devices, the topology identification results of the lighting network are generated.

2. The topology identification method for a lighting network as described in claim 1, characterized in that, The target node address includes target hierarchy information and target device number information; Before determining the address of the next-level target node to be probed based on the branch to be probed of the current parent node, the method further includes: Send an address configuration command to the lighting network so that the node device determines its own node address based on the received hierarchical information and device number information, and forwards the updated hierarchical information and device number information downstream; The main control device corresponds to root level information and root device number information; The process of determining the address of the next-level target node to be detected based on the branch to be detected of the current parent node includes: The target level information is determined based on the node level of the current parent node; The target device number information is determined based on the node number of the current parent node and the branch number of the branch to be detected.

3. The topology identification method for a lighting network as described in claim 1, characterized in that, The node detection command is also used to cause the node device that receives the node detection command to match its own node address with the target node address; When the node device matches its own node address with the target node address, it controls the downstream lighting load to generate the load response. When the node device does not match the target node address, it forwards the node detection command downstream.

4. The topology identification method for a lighting network as described in claim 1, characterized in that, The step of determining whether the target node device exists based on the load current change includes: If the load current change reaches a preset current change threshold within a preset detection time, then the existence of the target node device is determined. If the load current change does not reach the preset current change threshold within the preset detection time, it is determined that the target node device does not exist.

5. The topology identification method for a lighting network as described in claim 4, characterized in that, The method further includes: Before sending the node detection command, the preset detection duration is determined; Determining the preset detection duration includes: If the branch to be detected does not identify any existing lower-level node devices, the basic waiting time is set to the preset detection time. If the branch to be detected has identified a known lower-level node device, then the preset detection time is determined based on the basic waiting time and the hierarchical depth and / or number of downstream branches corresponding to the lower-level node device.

6. The topology identification method for a lighting network as described in claim 1, characterized in that, The process of generating the topology identification result of the lighting network based on the determined topology location of the target node devices includes: According to the arrangement order of the lighting loads, the main control device and / or the node device are controlled to generate load changes in sequence for the lighting loads to be detected; Detect changes in the load current of the lighting network; The number of lighting loads corresponding to at least one branch in the lighting network is determined based on the load current change. Based on the topological location of the target node device and the number of lighting loads, a topology identification result of the lighting network is generated.

7. The topology identification method for a lighting network as described in claim 6, characterized in that, The process of generating a topology identification result for the lighting network based on the topological location of the target node device and the number of lighting loads includes: Send a topology information reporting command carrying the address of the node to be reported to the identified target node device, so that the target node device matching the address to be reported can generate a current-coded signal by controlling the on / off state of the downstream lighting load. The current-encoded signal is sampled and decoded to obtain the branch lighting load quantity information corresponding to the target node device; The number of lighting loads is updated based on the branch lighting load quantity information; The updated lighting load quantity is associated with the topological location of the target node device to generate the topology identification result of the lighting network.

8. A topology identification device for a lighting network, characterized in that, The lighting network includes a main control device and at least one node device cascaded with the main control device, the node device being connected to a lighting load, the method being applied to the main control device, and the apparatus comprising: The first determining module is used to take the main control device as the starting point of the topology search, take the main control device or the already determined existing node device as the current superior node, and determine the address of the next level target node to be detected based on the branch to be detected of the current superior node. The sending module is used to send a node detection command carrying the target node address to the lighting network. The node detection command is used to cause the target node device matching the target node address to control the downstream lighting load to generate a load response. The detection module is used to detect the load current change of the lighting network after sending the node detection command, and determine whether the target node device exists based on the load current change; The second determining module is used to determine the topological position of the target node device in the lighting network based on the current parent node, the branch to be detected, and the target node address when the existence of the target node device is determined, and to determine the target node device as a node device that has been determined to exist; The generation module is used to generate the topology identification result of the lighting network based on the determined topology location of the target node device.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, characterized in that, When the processor executes the computer-readable instructions, it implements the topology identification method for a lighting network as described in any one of claims 1 to 7.

10. A readable storage medium having computer-readable instructions stored thereon, characterized in that, When the computer-readable instructions are executed by a processor, they implement the topology identification method for a lighting network as described in any one of claims 1 to 7.