Node binding method of detector, master device and computer program product
Patent Information
- Application Number
- CN202611177019.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本申请实施例提供了一种探测器的节点绑定方法、主控设备及计算机程序产品,以至少解决相关技术中探测器节点绑定的准确性较低的技术问题
[0017]通过本申请,主控设备接收各探测器响应于主控设备发送的第一探测信号返回的第一响应信号,并依据第一响应信号中携带的信号强度值由大到小对探测器进行排序,构建目标探测器序列,进而通过循环指令,按照目标探测器序列中探测器的顺序依次对各个探测器执行循环操作,利用各个探测器返回的第二响应信号确定探测器之间的下游关系,得到探测器之间的目标拓扑结构,并基于目标拓扑结构对探测器进行节点绑定。
Smart Images

Figure CN122994316A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a node binding method for a detector, a master control device, and a computer program product. Background Technology
[0002] In current intelligent fire protection systems, the main control equipment is typically connected to multiple smoke detectors via power lines, using power line carrier communication for data exchange. For centralized management, each smoke detector needs to be assigned a unique node number to identify its relative position on the physical link.
[0003] However, existing node binding methods rely on detectors having the ability to control whether they block downstream communication. The mapping between IDs and numbers is completed through a process of cut-retransmit-count-bind-restore. This process lacks a holistic understanding of the network's overall connectivity. If a node experiences abnormal counting due to signal interference, all subsequent nodes will be incorrectly numbered. Furthermore, the system lacks a mechanism to detect or correct this error, ultimately leading to some devices being incorrectly numbered or even unable to be correctly addressed by the master device.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides a method for binding nodes of a detector, a main control device, and a computer program product to at least solve the technical problem of low accuracy in detector node binding in related technologies.
[0006] According to one aspect of the embodiments of this application, a node binding method for detectors is provided, comprising: acquiring a target detector sequence, wherein the target detector sequence includes N detectors, the N detectors are ordered in descending order of signal strength values carried in a first response signal, the first response signal is the response signal of each detector to the first detection signal after the master control device sends a first detection signal to each detector, the signal strength value carried in the first response signal is measured when each detector receives the first detection signal, and N is an integer greater than 1; setting i=1, sequentially performing the following steps on the N detectors included in the target detector sequence until i=N+1 to end the following steps, thereby obtaining a target topology structure among the N detectors, wherein the target topology structure is used to bind the N detectors. Row node binding: Send a first instruction to the i-th detector, wherein the first instruction is used to instruct the i-th detector to amplify the second detection signal sent by the master control device and send the amplified second detection signal to the detector located downstream of the i-th detector; receive N-1 second response signals returned by N-1 detectors, wherein the N-1 second response signals include: the response signals of the detector located downstream of the i-th detector to the second detection signal and the amplified second detection signal, and the response signals of other detectors to the second detection signal, wherein the other detectors are the detectors among the N detectors other than the i-th detector and the detector located downstream of the i-th detector; determine the topological relationship between the i-th detector and other detectors based on the N-1 second response signals; perform an increment operation on i.
[0007] In an exemplary embodiment, determining the topological relationship between the i-th detector and other detectors based on N-1 second response signals includes: determining the second response signal that meets a preset condition among the N-1 second response signals as the target response signal; and determining the detector indicated by the target response signal as the detector downstream of the i-th detector.
[0008] In one exemplary embodiment, the preset conditions include at least one of the following: the signal strength value carried in the j-th second response signal is greater than the signal strength value carried in the j-th first response signal, the signal strength value carried in the j-th second response signal is measured when the j-th detector receives the second detection signal; the response delay of the j-th second response signal is greater than the response delay of the j-th first response signal; a reflection peak exists in the j-th second response signal; wherein the j-th second response signal and the j-th first response signal are response signals returned by the same detector.
[0009] In an exemplary embodiment, after obtaining the target topology among N detectors, the method further includes: dividing the N detectors according to the target detector sequence and the target topology to obtain M detector groups, wherein there are upstream and downstream relationships between detectors in the detector groups, and M is an integer greater than 0 and less than N; determining the downstream detector in each of the M detector groups as the first detector to obtain M first detectors; and binding the N detectors to nodes through the M first detectors.
[0010] In an exemplary embodiment, node binding of N detectors using M first detectors includes: sequentially performing the following operations on each of the M first detectors to obtain the positions of the M detector groups: sending a second instruction to the k-th first detector, wherein the second instruction is used to instruct the k-th first detector to turn off, and the first detector in the off state will not transmit the detection signal sent by the master control device to the detector located downstream of it; the M first detectors include the k-th first detector, and k is an integer greater than 0 and less than or equal to M; receiving S third response signals returned by S detectors, wherein the S third response signals are response signals of the S detectors to the third detection signal sent by the master control device, and the S detectors are the detectors among the N detectors excluding the k-th first detector and the detector located downstream of the k-th first detector; determining the upstream and downstream relationships of each detector group in the M detector groups based on the S third response signals; and node binding of the N detectors based on the upstream and downstream relationships of each detector group in the M detector groups.
[0011] In an exemplary embodiment, determining the upstream and downstream relationships of each detector group in the M detector groups based on the third response signals sent by the S detectors includes: determining the detector group to which the S detectors belong, resulting in R detector groups, where R is less than or equal to M; and determining that the R detector groups are upstream of the MR detector groups, where the MR detector groups are the detector groups in the M detector groups other than the R detector groups.
[0012] In one exemplary embodiment, node binding of N detectors is performed based on the upstream and downstream relationships of each of the M detector groups, including: determining the detector with the largest signal strength value carried in the first response signal returned by each of the M detector groups as the second detector, thus obtaining M second detectors; sorting the M detector groups according to the upstream and downstream relationships of the M detector groups and the signal strength values carried in the first response signals returned by the M second detectors to obtain a detector group sequence; and binding the identifiers of the N detectors to the numbers of the N nodes sequentially based on the detector group sequence and the downstream relationships between the detectors in each detector group.
[0013] According to another aspect of the embodiments of this application, a master control device is also provided, comprising: an acquisition module, configured to acquire a target detector sequence, wherein the target detector sequence includes N detectors, the N detectors are ordered in descending order of signal strength values carried in a first response signal, the first response signal is the response signal of each detector to the first detection signal after the master control device sends a first detection signal to each detector, the signal strength value carried in the first response signal is measured when each detector receives the first detection signal, and N is an integer greater than 1; and an execution module, configured to set i=1, sequentially execute the following steps on the N detectors included in the target detector sequence until i=N+1 to end the execution of the following steps, thereby obtaining a target topology structure among the N detectors, wherein the target topology structure is used for... N detectors are bound together: a first instruction is sent to the i-th detector, which instructs the i-th detector to amplify the second detection signal sent by the master control device and send the amplified second detection signal to the detector downstream of the i-th detector; N-1 second response signals are received from N-1 detectors, where the N-1 second response signals include: the response signals of the detector downstream of the i-th detector to the second detection signal and the amplified second detection signal, and the response signals of other detectors to the second detection signal. The other detectors are the detectors among the N detectors other than the i-th detector and the detector downstream of the i-th detector; the topological relationship between the i-th detector and other detectors is determined based on the N-1 second response signals; and an increment operation is performed on i.
[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.
[0015] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0017] According to this application, the main control device receives the first response signal returned by each detector in response to the first detection signal sent by the main control device, and sorts the detectors from largest to smallest according to the signal strength value carried in the first response signal to construct a target detector sequence. Then, through a loop instruction, the loop operation is performed on each detector in the order of the detectors in the target detector sequence. The downstream relationship between the detectors is determined by the second response signal returned by each detector, the target topology between the detectors is obtained, and the detectors are node-bound based on the target topology.
[0018] By binding detector nodes through a topology structure, the main control device can gain a holistic understanding of the network's connectivity, avoiding the cascading numbering misalignment issues caused by the accumulation of errors from physically disconnecting detectors one by one. This reduces the risk of communication interruptions due to physical disconnections. Furthermore, the topology structure reveals the upstream and downstream relationships and branching relationships between detectors, allowing numbering assignments to adapt to complex wiring structures and ensuring that each node number strictly corresponds to its actual physical location. This improves the accuracy and maintainability of node binding in large-scale networking scenarios. Therefore, it solves the problem of low detector node binding accuracy in related technologies, achieving the effect of improving the accuracy of detector node binding. Attached Figure Description
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of the node binding method for a detector according to an embodiment of this application;
[0020] Figure 2 This is a flowchart illustrating the node binding method for a detector according to an embodiment of this application;
[0021] Figure 3 This is a detector connection structure diagram according to an embodiment of this application;
[0022] Figure 4 This is a structural block diagram of the main control device according to an embodiment of this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] According to one aspect of the embodiments of this application, a node binding method for a detector is provided. Optionally, in this embodiment, the above-described node binding method for a detector may be applied, but is not limited to, to applications such as... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.
[0026] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0027] In this embodiment of the application, the main control device executing the node binding method of the detector can be a server 104, a terminal device 102, or a combination of a server 104 and a terminal device 102. The terminal device 102 executing the node binding method of the detector in this embodiment of the application can also be executed by a client installed on it.
[0028] Taking the node binding method of the detector in this embodiment as an example, where the main control device is server 104, Figure 2 This is a flowchart illustrating the node binding method for a detector according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0029] Step S202: Obtain the target detector sequence, wherein the target detector sequence includes N detectors, and the N detectors are sorted in descending order of the signal strength value carried in the first response signal. The first response signal is the response signal of each detector to the first detection signal after the main control device sends the first detection signal to each detector. The signal strength value carried in the first response signal is measured when each detector receives the first detection signal. N is an integer greater than 1.
[0030] The aforementioned detectors can be smoke detectors connected to power lines. Each detector has a unique identifier (ID) and is capable of bidirectional power line communication, signal strength detection, and relay forwarding. It can respond to commands from the main control device and transmit signals back.
[0031] The aforementioned first detection signal can be a broadcast signal sent by the master control device to request topology discovery, which is used to trigger the entire network detectors (i.e., N detectors) to perform initial response and signal strength acquisition.
[0032] In this embodiment, the master control device broadcasts a first detection signal to all network detectors to obtain the topology among them. After receiving the first detection signal, the detector responds to it and sends a first response signal back to the master control device. Then, after receiving the first response signal from the detector, the master control device sorts the network detectors (i.e., N detectors) in descending order based on the signal strength value carried in the first response signal to obtain the target detector sequence.
[0033] Example, Figure 3 This is a detector connection structure diagram according to an embodiment of this application, such as... Figure 3As shown, the master control device broadcasts a topology discovery request message (i.e., the first detection signal) to the entire power line. After receiving the request (i.e., the first detection signal), each of the nine smoke detectors sends back a response signal (i.e., the first response signal) to the master control device. The response signal carries its own unique device ID and the signal strength value (i.e., RSSI value) measured when the request was received. Then, the master control device collects the responses from all nodes, obtains the ID-RSSI correspondence table, and sorts the nine smoke detectors in descending order of RSSI value (i.e., from near to far distance). The resulting sequence (i.e., the target detector sequence) is as follows: Smoke Detector 1 (-42) → Smoke Detector 2 (-50) → Smoke Detector 3 (-58) → Smoke Detector 4 (-65) → Smoke Detector 7 (-67) → Smoke Detector 5 (-73) → Smoke Detector 8 (-75) → Smoke Detector 6 (-81) → Smoke Detector 9 (-83). The above method can only determine the approximate distance between the smoke detector and the main controller, and cannot distinguish whether smoke detector 4 and smoke detector 7, or smoke detector 5 and smoke detector 8 are in series or in parallel branch relationship. It can only obtain a coarse-grained ranking of the distance.
[0034] Step S204: Set i=1, and sequentially execute the following steps for the N detectors included in the target detector sequence until i=N+1, thereby obtaining the target topology among the N detectors. The target topology is used for node binding of the N detectors: Send a first instruction to the i-th detector, instructing the i-th detector to amplify the second detection signal sent by the main control device and send the amplified second detection signal to the detector downstream of the i-th detector; Receive N-1 second response signals returned by N-1 detectors, including: the response signals of the detector downstream of the i-th detector to the second detection signal and the amplified second detection signal, and the response signals of other detectors to the second detection signal. The other detectors are those among the N detectors other than the i-th detector and the detector downstream of the i-th detector; Determine the topological relationship between the i-th detector and other detectors based on the N-1 second response signals; Increment i by one.
[0035] The aforementioned first instruction may be an instruction to instruct the detector to enter echo mode. In this embodiment, after receiving the first instruction, the detector no longer responds to the signal broadcast by the master control device, but instead enters a signal reflection state, amplifying the received signal marker and reflecting it to downstream detectors to assist in topology identification.
[0036] The aforementioned second detection signal can be a broadcast signal sent by the master control device to request topology discovery, used to detect whether each detector receives a reflected signal, and to analyze changes in characteristics such as signal delay, attenuation gradient, and reflection peak.
[0037] In this embodiment, a first instruction is sent sequentially to each detector in the target detector sequence, according to their order. Specifically, after the i-th detector receives the first instruction, it enters echo mode. At this time, the master control device broadcasts a detection signal (i.e., a second detection signal) to all detectors in the network (i.e., N detectors). Upon receiving the second detection signal, the detector responds and sends a first response signal back to the master control device. Subsequently, since the i-th detector has entered echo mode, it will not respond to the detection signal broadcast by the master control device. Therefore, the master control device will only receive response signals (i.e., second signals) returned by N-1 detectors. After receiving the second response signals returned by the detectors, the master control device determines the topological relationship between the i-th detector and other detectors based on the second response signals. This determines the target topology among all detectors in the network (i.e., N detectors) and performs node binding on the N detectors based on the target topology to achieve efficient management of the detectors.
[0038] As an optional implementation, determining the topological relationship between the i-th detector and other detectors based on N-1 second response signals includes: determining the second response signal that meets the preset conditions among the N-1 second response signals as the target response signal; and determining the detector indicated by the target response signal as the detector downstream of the i-th detector.
[0039] The aforementioned preset conditions may refer to thresholds or rule criteria set during the topology identification process.
[0040] In this embodiment of the application, the preset conditions include at least one of the following: the signal strength value carried in the j-th second response signal is greater than the signal strength value carried in the j-th first response signal, and the signal strength value carried in the j-th second response signal is measured when the j-th detector receives the second detection signal; the response delay of the j-th second response signal is greater than the response delay of the j-th first response signal; a reflection peak exists in the j-th second response signal; wherein the j-th second response signal and the j-th first response signal are response signals returned by the same detector.
[0041] In this embodiment, since the detector downstream of the i-th detector can receive the amplified second detection signal reflected by the i-th detector, the signal strength value of the detection signal received by the detector downstream of the i-th detector and the second response signal generated therefrom are significantly different in terms of delay or waveform characteristics from the response signal generated by the non-downstream detector that only receives the original second detection signal and the signal strength of the received detection signal. Therefore, these specific signal feature differences are extracted as preset conditions, and the N-1 received second response signals are filtered by setting these preset conditions. The signals that meet the preset conditions among the N-1 second response signals are determined as target response signals, and the detectors indicated by these target response signals are determined as detectors downstream of the i-th detector. Thus, by matching these specific signal feature differences, the main control device can accurately identify which detectors are in the downstream link of the i-th detector.
[0042] For example, such as Figure 3 As shown, the target detector sequence is: Smoke Detector 1 (-42) → Smoke Detector 2 (-50) → Smoke Detector 3 (-58). →After the smoke detectors 4 (-65) → 7 (-67) → 5 (-73) → 8 (-75) → 6 (-81) → 9 (-83) are activated, smoke detector 1 is selected to enable echo mode: the main control device sends an echo mode activation command (i.e., the first command) to smoke detector 1, causing smoke detector 1 to enter the reflection state. The main control device broadcasts a topology discovery request (i.e., the second detection signal) again and collects the signal characteristics of all detectors. At this time, smoke detectors 2-9 receive both the direct signal from the main control device (i.e., the second detection signal) and the signal reflected by smoke detector 1 (i.e., the amplified second detection signal), resulting in obvious reflection peaks in the responses returned by smoke detectors 2-9, increased response delay, and increased signal strength of the detection signals received by smoke detectors 2-9 (due to receiving the amplified second detection signal). Thus, it is determined that smoke detectors 2-9 are all downstream of smoke detector 1. Next, smoke detector 2 is selected to enable echo mode and the same operation is performed until smoke detector 9 completes the same operation, determining the upstream and downstream relationship between the nine detectors and obtaining the target topology.
[0043] It should be noted that in practical applications, based on Figure 3 As shown in the diagram, after selecting smoke sensor 7, enabling echo mode, and performing the same operations as described above, the main control device can complete the link topology. At this point, the loop operation can be terminated directly without continuing subsequent operations; or, to ensure accuracy, the loop operation can continue until all smoke sensors have completed the loop operation; the specific method is not limited here.
[0044] Through the above operations, without physically severing the communication link, the inherent logic of signal response is used to distinguish between hierarchical relationships, effectively solving the problem of difficult node location identification in complex topologies and improving the efficiency and accuracy of topology construction.
[0045] Through the above steps, the main control device receives the first response signal returned by each detector in response to the first detection signal sent by the main control device, and sorts the detectors from largest to smallest according to the signal strength value carried in the first response signal to construct a target detector sequence. Then, through a loop instruction, the loop operation is performed on each detector in the order of the detectors in the target detector sequence. The downstream relationship between the detectors is determined by the second response signal returned by each detector, the target topology between the detectors is obtained, and the detectors are node-bound based on the target topology.
[0046] By binding detector nodes through a topology structure, the main control device can gain a holistic understanding of the network's connectivity, avoiding the cascading numbering misalignment issues caused by the accumulation of errors from physically disconnecting detectors one by one. This reduces the risk of communication interruptions due to physical disconnections. Furthermore, the topology structure reveals the upstream and downstream relationships and branching relationships between detectors, allowing numbering allocation to adapt to complex wiring structures and ensuring that each node number strictly corresponds to its actual physical location. This improves the accuracy and maintainability of node binding in large-scale networking scenarios. It solves the problem of low accuracy in detector node binding in related technologies and significantly enhances the accuracy of detector node binding.
[0047] As an optional implementation, after obtaining the target topology among the N detectors, the method further includes: dividing the N detectors according to the target detector sequence and the target topology to obtain M detector groups, wherein there are upstream and downstream relationships between the detectors in the detector groups, and M is an integer greater than 0 and less than N; determining the downstream detector in each of the M detector groups as the first detector to obtain M first detectors; and binding the N detectors to nodes through the M first detectors.
[0048] In this embodiment of the application, after obtaining the target topology, the N detectors are divided into M detector groups according to the upstream and downstream relationships between the detectors. Each detector group contains detectors with clear upstream and downstream relationships. Then, the downstream detector in each detector group is selected as the first detector, resulting in M first detectors. The N detectors are then bound to each other using the M first detectors.
[0049] For example, such as Figure 3As shown, after determining the target topology of the 9 smoke detectors, they can be grouped, for example, into 3 groups, resulting in three smoke detector groups (i.e., M detector groups). The first group includes smoke detectors 1-3, the second group includes smoke detectors 4-6, and the third group includes smoke detectors 7-9. There are clear upstream and downstream relationships between the smoke detectors within each group. Then, the downstream smoke detector (i.e., the first detector) in each group is selected, namely smoke detectors 3, 6, and 9.
[0050] Optionally, node binding of N detectors using M first detectors includes: sequentially performing the following operations on each of the M first detectors to obtain the positions of the M detector groups: sending a second instruction to the k-th first detector, wherein the second instruction is used to instruct the k-th first detector to turn off, and the first detector in the off state will not transmit the detection signal sent by the main control device to the detector located downstream of it; the M first detectors include the k-th first detector, where k is an integer greater than 0 and less than or equal to M; receiving S third response signals returned by S detectors, wherein the S third response signals are response signals of the S detectors to the third detection signal sent by the main control device, and the S detectors are the detectors among the N detectors excluding the k-th first detector and the detector located downstream of the k-th first detector; determining the upstream and downstream relationships of each detector group in the M detector groups based on the S third response signals; and node binding of the N detectors based on the upstream and downstream relationships of each detector group in the M detector groups.
[0051] The aforementioned second instruction may be an instruction to instruct the detector to enter a shutdown mode. In this embodiment, after receiving the second instruction, the detector no longer responds to the signals broadcast by the master control device, and its downstream detectors will no longer receive the signals broadcast by the detectors, thus partially cutting off the downstream link.
[0052] The aforementioned third detection signal can be a broadcast signal sent by the master control device to request topology discovery, used to detect whether each detector has received the signal, so as to analyze the changes in the number of detectors and the changes in signal characteristics.
[0053] In this embodiment, since the above-mentioned cyclic reflection test can only determine the relative link level and adjacency relationship between detectors, but cannot directly know the absolute position index of each detector in the physical topology, in order to further ensure the accuracy of the determined detector position, it is necessary to perform group testing on the detectors. Specifically, M first detectors are selected as key nodes, and a second instruction is sent to one first detector in sequence: after the kth first detector receives the second instruction, the kth second detector is in a closed state and blocks the downstream signal transmission. At this time, the master control device broadcasts the detection signal (i.e., the third detection signal) to all detectors in the network (i.e., N detectors). After receiving the third detection signal, the detector responds to the third detection signal and feeds back the third response signal to the master control device. Afterwards, since the kth first detector is closed and cuts off its downstream link, neither the kth first detector nor its downstream detectors will respond to the detection signal broadcast by the master control device. Therefore, the master control device will only receive the response signals (i.e., the third signal) returned by S detectors, and upon receiving the third response signal returned by the detectors, it can realize the rapid grouping and positioning of N detectors and node binding.
[0054] By utilizing the clearly defined upstream and downstream hierarchical features within the detector group, the complex overall topology identification is transformed into local positioning of specific nodes within the group (such as the downstream node). This allows the main controller to deduce the logical location range of the entire group by identifying the boundary detectors of each group, rather than detecting all devices one by one. This avoids the linear time overhead caused by performing cut-off or echo tests on each node sequentially in traditional methods, reducing the computational complexity and communication latency of topology construction. At the same time, it effectively avoids the cascading impact of single-point device failures or signal anomalies on the global bonding process, improving the bonding efficiency of large-scale sensor networks in complex power line topologies.
[0055] As an optional implementation, the upstream and downstream relationship of each detector group in the M detector groups is determined based on the third response signals sent by the S detectors, including: determining the detector group in which the S detectors are located, obtaining R detector groups, where R is less than or equal to M; determining that the R detector groups are located upstream of the MR detector groups, where the MR detector groups are the detector groups in the M detector groups other than the R detector groups.
[0056] For example, such as Figure 3As shown, after dividing the 9 smoke detectors into three groups (the first group includes smoke detectors 1-3, the second group includes smoke detectors 4-6, and the third group includes smoke detectors 7-9), and identifying the downstream smoke detector (i.e., the first detector) in each group, namely smoke detectors 3, 6, and 9, the main control device sends a cut-off command (i.e., the second command) to smoke detector 3, causing it to enter the off state. The main control device then broadcasts a topology discovery request (i.e., the third detection signal) and collects the response signals returned by all detectors. At this point, because smoke detector 3 simultaneously cuts off its downstream link, neither smoke detector 3 nor smoke detectors 4-9 will return a response. Only smoke detectors 1-2 will return a response signal (i.e., the third response signal), thus determining that the first group containing smoke detectors 1-2 is upstream of the second and third groups. Next, the main control device sends a cut-off command to smoke detector 6 and performs the same operation as above, determining that only smoke detector 6 will not return a response signal (i.e., the third response signal). At this time, smoke detector 6 is determined to be the end of the link, and the same applies to smoke detector 9. Thus, it can be determined that both smoke detectors 6 and 9 are the end of the link, and the second and third groups are connected in parallel, thereby clarifying the upstream and downstream positional relationship between each smoke detector group.
[0057] As an optional implementation, node binding of N detectors is performed based on the upstream and downstream relationships of each of the M detector groups. This includes: identifying the detector with the largest signal strength value carried in the first response signal returned by each of the M detector groups as the second detector, thus obtaining M second detectors; sorting the M detector groups according to the upstream and downstream relationships of the M detector groups and the signal strength values carried in the first response signals returned by the M second detectors to obtain a detector group sequence; and binding the identifiers of the N detectors to the numbers of the N nodes sequentially based on the detector group sequence and the downstream relationships between the detectors in each detector group.
[0058] In this embodiment of the application, the detector with the strongest signal strength in each detector group is determined as the second detector. The signal strength values carried in the first response signals returned by the M second detectors are used to sort the detector groups in combination with the upstream and downstream relationships of each detector group to construct a detector group sequence. Then, based on the sequence and the downstream relationships between the detectors in the group, the binding between the identifier and the node number is completed, thereby realizing the node binding of the detector.
[0059] For example, such as Figure 3As shown, taking the division of 9 smoke detectors into three groups (the first group includes smoke detectors 1-3, the second group includes smoke detectors 4-6, and the third group includes smoke detectors 7-9) as an example, the smoke detectors with the largest signal strength values in the first response signals returned by each group are identified, namely smoke detector 1 (-42), smoke detector 4 (-65), and smoke detector 7 (-67). Then, according to the signal strength values in the first response signals returned by the smoke detectors and the upstream and downstream positional relationships between the three groups, the three groups are sorted to obtain the detector group sequence: first group → second group → third group. Then, according to the detector group sequence and the downstream relationships between the smoke detectors in each group, each smoke detector in each group is bound to a node in turn, such as smoke detector 1 bound to node 1, smoke detector 2 bound to node 2, smoke detector 3 bound to node 3, etc., to achieve node binding of the smoke detectors.
[0060] By using the above operations and employing signal strength values as the quantitative basis for inter-group sorting, deviations in inter-group position judgment caused by network topology complexity are avoided. At the same time, by combining inter-group sorting with intra-group hierarchical relationships, orderly and conflict-free continuous numbering of detectors is achieved under the premise of a clear global topology structure. This improves the accuracy and logical consistency of node binding and ensures that, based on supporting parallel group identification, the final generated binding mapping table can accurately reflect the true relative position of the detector in the physical link.
[0061] As an optional implementation, if a detector (such as the j-th detector, where j is an integer greater than 0 and less than or equal to N) does not return a first response signal after sending the first detection signal, the detector is marked as a suspected fault node. In this case, the upstream and downstream detectors of the detector of the suspected fault node are determined by the signal coupling characteristics between detectors (such as RSSI abrupt change, delay jump, reflection peak distortion, etc.). For example, the upstream and downstream detectors of the j-th detector can be determined by the signal strength value carried in the first response signal returned by the detector: if the difference between the first signal strength value and the second signal strength value is greater than a first threshold, then the detector indicated by the first signal strength value and the detector indicated by the second signal strength value are determined as the upstream and downstream detectors of the j-th detector, respectively. The detector indicated by the smaller signal strength value is the upstream detector of the j-th detector, and the other detector is the downstream detector. Alternatively, the upstream and downstream detectors of the j-th detector can be determined by the response delay of the first response signal returned by the detector: if the difference between the first signal delay and the second signal delay is greater than a second threshold, then the detector indicated by the first signal delay and the detector indicated by the second signal delay are determined as the upstream and downstream detectors of the j-th detector, respectively. The detector indicated by the smaller signal strength value is the upstream detector of the j-th detector, and the other detector is the downstream detector, etc. Therefore, when binding nodes to detectors, the number of the third node between the first node bound to the upstream detector of the j-th detector and the second node bound to the downstream detector of the j-th detector is retained as the number to be bound to the j-th detector.
[0062] For example, such as Figure 3 As shown, taking smoke detector 5 as a suspected fault node as an example, the main control equipment infers its location by analyzing the signal coupling characteristics of the adjacent smoke detectors before and after smoke detector 5 (i.e., upstream smoke detector 4 and downstream smoke detector 6), such as:
[0063] RSSI coupling characteristics: The RSSI of smoke sensor 4 is -65dBm and the RSSI of smoke sensor 6 is -81dBm. The difference between the two is 16dB, which is much greater than the 8dB attenuation gradient of normal adjacent nodes (i.e., greater than the first threshold). This indicates that there must be one node between the two that has generated additional attenuation. Therefore, smoke sensor 4 is determined to be the upstream smoke sensor of smoke sensor 5 and smoke sensor 6 is the downstream smoke sensor of smoke sensor 5.
[0064] Delay coupling characteristics: The response delay of smoke sensor 4 (i.e. the first response signal) is t, and the response delay of smoke sensor 6 is t+2Δ. The difference is twice the delay of a single-level node (i.e., greater than the second threshold), indicating that the transmission delay is one node in between. Therefore, smoke sensor 4 is determined to be the upstream smoke sensor of smoke sensor 5, and smoke sensor 6 is the downstream smoke sensor of smoke sensor 5.
[0065] Reflection peak coupling characteristics: After the smoke sensor 4 is triggered to open the echo mode, the reflection peak in the second response signal returned by the smoke sensor 6 is distorted and the amplitude is greatly attenuated, which is consistent with the characteristics of the reflection path being blocked due to the failure of the intermediate node. Therefore, it is determined that the smoke sensor 4 is the upstream smoke sensor of the smoke sensor 5 and the smoke sensor 6 is the downstream smoke sensor of the smoke sensor 5.
[0066] Afterwards, placeholder number 5 is reserved for it, and an alarm message is reported; the binding process of the remaining nodes is unaffected, and the number allocation is completed normally.
[0067] As an optional implementation, if a new detector is connected, when the master control device detects an unknown ID response during periodic detection, it automatically triggers a local topology recalculation: by using the signal strength value and signal coupling characteristics carried in the fourth response signal returned by the detector (i.e., the response signal returned when the fourth detection signal sent by the master control device is received), the upstream and downstream neighbors of the new detector are located, and the minimum affected area of the new detector is delineated; and only local signal acquisition, topology reconstruction and rebinding are performed in this area, a new number is inserted and incrementally distributed, while the remaining binding relationships of the entire network are retained.
[0068] For example, such as Figure 3 As shown, taking the addition of a smoke detector 10 downstream of smoke detector 6 as an example, during normal system operation, the master control device receives a response with an unknown ID (i.e., the fourth response signal) during routine polling, determining that a new smoke detector has been added and automatically triggering a local topology recalculation. The master control device first uses the RSSI (-89dBm) carried in the response (i.e., the fourth response signal) returned by the new device, along with signal coupling characteristics, to locate its upstream neighbor as smoke detector 6, which has no downstream nodes. It also determines that the affected area is only the end segment of the second group (including smoke detectors 4-6), and the remaining nodes are unaffected. At this point, the master control only sends a local detection command to the end of the second group to verify the serial connection between smoke detector 6 and the new smoke detector. No operation is required on the first group (including smoke detectors 1-3) and the third group (smoke detectors 7-9), thus assigning the new smoke detector the number 10. The original binding relationships of all other nodes remain unchanged, requiring no global reset.
[0069] As an optional implementation method, the specific process for node binding of the detector is as follows:
[0070] Phase 1: Initial broadcast and response signal strength acquisition;
[0071] The main control device broadcasts a topology discovery request (i.e., the first detection signal) for the first time. All smoke detectors (i.e., N detectors) respond and send back their own IDs and the RSSI value of the signal strength received when the request was sent. Since power line signals attenuate with transmission distance, the farther the detector is, the lower the RSSI it sends back.
[0072] Phase Two: Multi-round excitation and reflection signal analysis;
[0073] The main control device sends an echo mode activation command (i.e., the first command) to each detector (i.e. the i-th detector) in sequence. After receiving the command, the detector enters echo mode: it no longer actively responds to requests, but marks and amplifies all received communication signals (i.e., the second detection signals) and reflects them back to the back end (i.e. the downstream detectors).
[0074] The main control device broadcasts the request again (i.e., the second detection signal), records the response of each detector and the changes in signal characteristics at this time, and constructs a preliminary link topology model (i.e., the target topology structure) by analyzing the delay, attenuation gradient and reflection peak in the signal path.
[0075] Phase 3: Parallel group identification and topology reconstruction;
[0076] The detectors are divided into several interval groups (i.e., M detector groups) according to RSSI distribution. A local cut-off test is performed simultaneously in each group, cutting off only the downstream detector in the group (i.e., the first detector). By combining the difference in the number of responses before and after (i.e. the third response signal) and the changes in signal characteristics, the position interval of each group on the link (i.e. the upstream and downstream relationship between each group) can be quickly located, thereby achieving batch binding.
[0077] Phase Four: Distribution and Local Storage of Binding Information;
[0078] After the binding is completed, the main control device will send the "ID-node number" mapping table to the local storage of each detector for subsequent self-identification and rapid reporting.
[0079] Phase 5: Dynamic Update Mechanism;
[0080] If a new detector is connected during system operation, the main control device will detect an unknown ID response (i.e., the fourth response signal) and automatically trigger a local topology recalculation, rebinding only the affected area without requiring a global reset.
[0081] Optionally, if a detector (i.e. the j-th detector) does not respond, it is marked as a suspected fault node, and its original location is inferred through the signal coupling characteristics between detectors. The placeholder number is retained, and an alarm is reported at the same time, without affecting the binding of other devices.
[0082] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0084] According to another aspect of the embodiments of this application, a master control device is also provided, which can be used to implement the node binding method of the detector provided in the above embodiments, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0085] Figure 4 This is a structural block diagram of the main control device according to an embodiment of this application, such as... Figure 4As shown, the main control device includes: an acquisition module 402, used to acquire a target detector sequence, wherein the target detector sequence includes N detectors, the N detectors are sorted in descending order of the signal strength value carried in the first response signal, the first response signal is the response signal of each detector to the first detection signal after the main control device sends the first detection signal to each detector, the signal strength value carried in the first response signal is measured when each detector receives the first detection signal, and N is an integer greater than 1; and an execution module 404, used to set i=1, and execute the following steps sequentially on the N detectors included in the target detector sequence until i=N+1 to end the execution of the following steps, to obtain the target topology structure between the N detectors, wherein the target topology structure is used to analyze the N detectors. Row node binding: Send a first instruction to the i-th detector, wherein the first instruction is used to instruct the i-th detector to amplify the second detection signal sent by the master control device and send the amplified second detection signal to the detector located downstream of the i-th detector; receive N-1 second response signals returned by N-1 detectors, wherein the N-1 second response signals include: the response signals of the detector located downstream of the i-th detector to the second detection signal and the amplified second detection signal, and the response signals of other detectors to the second detection signal, wherein the other detectors are the detectors among the N detectors other than the i-th detector and the detector located downstream of the i-th detector; determine the topological relationship between the i-th detector and other detectors based on the N-1 second response signals; perform an increment operation on i.
[0086] In an exemplary embodiment, the main control device is further configured to determine the second response signal that meets the preset conditions among the N-1 second response signals as the target response signal; and to determine the detector indicated by the target response signal as the detector downstream of the i-th detector.
[0087] In one exemplary embodiment, the preset conditions include at least one of the following: the signal strength value carried in the j-th second response signal is greater than the signal strength value carried in the j-th first response signal, the signal strength value carried in the j-th second response signal is measured when the j-th detector receives the second detection signal; the response delay of the j-th second response signal is greater than the response delay of the j-th first response signal; a reflection peak exists in the j-th second response signal; wherein the j-th second response signal and the j-th first response signal are response signals returned by the same detector.
[0088] In an exemplary embodiment, the main control device is further configured to, after obtaining the target topology among N detectors, divide the N detectors according to the target detector sequence and the target topology to obtain M detector groups, wherein there are upstream and downstream relationships between detectors in the detector groups, and M is an integer greater than 0 and less than N; determine the downstream detector in each of the M detector groups as the first detector to obtain M first detectors; and perform node binding on the N detectors through the M first detectors.
[0089] In an exemplary embodiment, the aforementioned master control device is further configured to sequentially perform the following operations on each of the M first detectors to obtain the positions of the M detector groups: sending a second instruction to the k-th first detector, wherein the second instruction is used to instruct the k-th first detector to turn off, and the first detector in the off state will not transmit the detection signal sent by the master control device to the detector located downstream of it, the M first detectors include the k-th first detector, and k is an integer greater than 0 and less than or equal to M; receiving S third response signals returned by S detectors, wherein the S third response signals are response signals of the S detectors to the third detection signal sent by the master control device, and the S detectors are the detectors among the N detectors excluding the k-th first detector and the detector located downstream of the k-th first detector; determining the upstream and downstream relationships of each detector group in the M detector groups based on the S third response signals; and performing node binding on the N detectors based on the upstream and downstream relationships of each detector group in the M detector groups.
[0090] In an exemplary embodiment, the main control device is further configured to determine the detector group where the S detectors are located, thereby obtaining R detector groups, wherein R is less than or equal to M; and to determine that the R detector groups are located upstream of the MR detector groups, wherein the MR detector groups are detector groups other than the R detector groups among the M detector groups.
[0091] In an exemplary embodiment, the main control device is further configured to identify the detector with the largest signal strength value carried in the first response signal returned by each of the M detector groups as the second detector, thereby obtaining M second detectors; sort the M detector groups according to the upstream and downstream relationships of the M detector groups and the signal strength values carried in the first response signals returned by the M second detectors to obtain a detector group sequence; and bind the identifiers of N detectors to the numbers of N nodes in sequence based on the detector group sequence and the downstream relationships between detectors in each detector group.
[0092] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0093] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0094] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0095] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0096] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0097] According to another aspect of the embodiments of this application, a computer program product is also provided, which includes a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0098] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0099] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A node binding method for a detector, characterized in that, Applied to main control equipment, including: Obtain a target detector sequence, wherein the target detector sequence includes N detectors, the N detectors are sorted in descending order of the signal strength value carried in the first response signal, the first response signal is the response signal of each detector to the first detection signal after the main control device sends the first detection signal to each detector, the signal strength value carried in the first response signal is measured when each detector receives the first detection signal, and N is an integer greater than 1; Set i=1, and sequentially execute the following steps for the N detectors included in the target detector sequence until i=N+1, thereby obtaining the target topology structure among the N detectors. The target topology structure is used for node binding of the N detectors. Send a first instruction to the i-th detector, wherein the first instruction is used to instruct the i-th detector to amplify the second detection signal sent by the main control device and send the amplified second detection signal to the detector located downstream of the i-th detector; Receive N-1 second response signals returned by N-1 detectors, wherein the N-1 second response signals include: the response signal of the detector located downstream of the i-th detector to the second detection signal and the amplified second detection signal, and the response signals of other detectors to the second detection signal, wherein the other detectors are the detectors other than the i-th detector and the detector located downstream of the i-th detector among the N detectors; The topological relationship between the i-th detector and the other detectors is determined based on the N-1 second response signals; Increment i by one.
2. The method according to claim 1, characterized in that, Determining the topological relationship between the i-th detector and the other detectors based on the N-1 second response signals includes: The second response signal that meets the preset condition among the N-1 second response signals is determined as the target response signal; The detector indicated by the target response signal is identified as the downstream detector of the i-th detector.
3. The method according to claim 2, characterized in that, The preset conditions include at least one of the following: The signal strength value carried in the j-th second response signal is greater than the signal strength value carried in the j-th first response signal. The signal strength value carried in the j-th second response signal is measured when the j-th detector receives the second detection signal. The response delay of the j-th second response signal is greater than the response delay of the j-th first response signal; The j-th second response signal contains a reflection peak; The j-th second response signal and the j-th first response signal are response signals returned by the same detector.
4. The method according to claim 1, characterized in that, After obtaining the target topology among the N detectors, the method further includes: The N detectors are divided into M detector groups based on the target detector sequence and the target topology, wherein there are upstream and downstream relationships between the detectors in the detector groups, and M is an integer greater than 0 and less than N; The downstream detector in each of the M detector groups is designated as the first detector, resulting in M first detectors. The node binding is performed on the N detectors through the M first detectors.
5. The method according to claim 4, characterized in that, The node binding of the N detectors through the M first detectors includes: The following operations are performed sequentially on each of the M first detectors to obtain the positions of the M detector groups: Send a second instruction to the k-th first detector, wherein the second instruction is used to instruct the k-th first detector to turn off. The first detector in the off state will not transmit the detection signal sent by the main control device to the detector located downstream of it. The M first detectors include the k-th first detector, and k is an integer greater than 0 and less than or equal to M. Receive S third response signals returned by S detectors, wherein the S third response signals are response signals of the S detectors to the third detection signals sent by the main control device, and the S detectors are the detectors other than the k-th first detector and the detector located downstream of the k-th first detector among the N detectors; The upstream and downstream relationships of each detector group in the M detector groups are determined based on the S third response signals. The node binding is performed on the N detectors based on the upstream and downstream relationships of each of the M detector groups.
6. The method according to claim 5, characterized in that, The upstream and downstream relationships of each detector group in the M detector groups are determined based on the third response signals sent by the S detectors, including: Determine the detector groups to which the S detectors belong, resulting in R detector groups, where R is less than or equal to M; The R detector groups are determined to be located upstream of the MR detector groups, wherein the MR detector groups are the detector groups other than the R detector groups among the M detector groups.
7. The method according to claim 6, characterized in that, Based on the upstream and downstream relationships of each of the M detector groups, the node binding of the N detectors includes: The detector with the largest signal strength value carried in the first response signal returned from each of the M detector groups is determined as the second detector, thus obtaining M second detectors. The M detector groups are sorted according to their upstream and downstream relationships and the signal strength values carried in the first response signals returned by the M second detectors to obtain a detector group sequence. Based on the detector group sequence and the downstream relationships between detectors within each detector group, the identifiers of the N detectors are sequentially bound to the numbers of the N nodes.
8. A master control device, characterized in that, include: An acquisition module is used to acquire a target detector sequence, wherein the target detector sequence includes N detectors, the N detectors are sorted in descending order of the signal strength value carried in the first response signal, the first response signal is the response signal of each detector to the first detection signal after the main control device sends the first detection signal to each detector, and the signal strength value carried in the first response signal is measured when each detector receives the first detection signal, and N is an integer greater than 1; An execution module is used to set i=1 and sequentially execute the following steps on the N detectors included in the target detector sequence until i=N+1, thereby obtaining the target topology among the N detectors. The target topology is used for node binding of the N detectors: sending a first instruction to the i-th detector, wherein the first instruction instructs the i-th detector to amplify the second detection signal sent by the main control device and send the amplified second detection signal to the detector downstream of the i-th detector; receiving N-1 second response signals returned by N-1 detectors, wherein the N-1 second response signals include: the response signals of the detector downstream of the i-th detector to the second detection signal and the amplified second detection signal, and the response signals of other detectors to the second detection signal, wherein the other detectors are the detectors among the N detectors other than the i-th detector and the detector downstream of the i-th detector; determining the topological relationship between the i-th detector and the other detectors based on the N-1 second response signals; and incrementing i by one.
9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.