Single-bus communication method, apparatus and system

By grouping and judging the signal strength in a single bus communication system, the forwarding device and group leader are determined, solving the problem of low communication efficiency among multiple devices and achieving efficient data transmission and signal accuracy.

WO2025185451A1PCT designated stage Publication Date: 2025-09-11TENDYRON CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/078215
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-07
Filing Date
2025-02-20
Publication Date
2025-09-11

AI Technical Summary

Technical Problem

In a single bus communication system, especially when there are many controlled devices, the existing communication method consumes too much time and has low communication efficiency.

Method used

The master device obtains instructions by sending signal strength, gradually determines the signal strength of the slave devices, determines the forwarding device, and divides the slave devices into multiple groups. Each group has a group leader, who is responsible for data reporting. Only group leaders of non-adjacent groups are designated to respond to instructions to avoid signal interference.

Benefits of technology

It improves communication efficiency, avoids signal interference, and ensures the accuracy and integrity of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025078215_12092025_PF_FP_ABST
    Figure CN2025078215_12092025_PF_FP_ABST
Patent Text Reader

Abstract

A single-bus communication method, apparatus and system. The single-bus communication system comprises a master control device, and N slave control devices which are connected in series on a single bus, wherein the serial numbers of the N slave control devices are arranged in ascending order according to the distances between the N slave control devices and the master control device which are arranged in ascending order. In the present disclosure, N slave control devices are classified into a plurality of groups, each group is provided with a forwarding device to forward an instruction sent by a master control device, a group leader is further set for each group, each group leader acquires data from group members of the same group and uploads the data of the same group to the master control device, and the group leader, who is far away from the master control device, reports the data of the same group to the master control device by means of the forwarding device.
Need to check novelty before this filing date? Find Prior Art

Description

Single bus communication method, device and system

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application number 202410257530.8, filed on March 7, 2024, entitled “A Single Bus Communication Method, Device and System,” the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present disclosure relates to the field of bus communication technology, and in particular to a single bus communication method, device, and system. Background Art

[0004] A single-bus communication system uses a single signal line that can transmit both clock and data, and data transmission is bidirectional. This bus offers advantages such as simple wiring, minimal hardware overhead, low cost, and ease of bus expansion and maintenance. A single-bus is suitable for single-host systems and can control one or more slave devices. A single-bus communication system typically includes a master device, followed by multiple controlled devices connected in series on the single bus. The master device can send control commands to the controlled devices via the single bus, requesting them to return control responses. In existing solutions, the master device can receive control responses in two ways:

[0005] 1. The master device sends a control command to a specific controlled device. After receiving the control command, the specific controlled device returns a control response to the master device. Only one controlled device responds to a control command at a time.

[0006] Second, the master device broadcasts a control command on the single bus. Each controlled device that receives the control command returns a control response in turn according to the agreed method. For example, each controlled device returns a control response to the master device at different time points.

[0007] The above two methods take too much time and have low communication efficiency when there are many controlled devices. Summary of the Invention

[0008] The present disclosure aims to solve the above-mentioned problems.

[0009] To achieve the above objectives, the technical solution of the present disclosure is specifically implemented as follows:

[0010] In one aspect, the present disclosure provides a single bus communication method, which is applied to a single bus communication system. The single bus communication system includes: a master device and N slave devices connected in series on the single bus, wherein the N slave devices are numbered from smallest to largest according to their distance from the master device, and the numbers include: 1, 2, ..., n, where N is a positive integer and n is a positive integer;

[0011] The method comprises:

[0012] The master control device sends a signal strength acquisition instruction to the slave control device numbered 1, and receives a signal strength acquisition response returned by the slave control device numbered 1, where the signal strength acquisition response returned by the slave control device numbered 1 includes signal strength information calculated by the slave control device numbered 1 when receiving the signal strength acquisition instruction; the master control device determines whether the signal strength information sent by the slave control device numbered 1 meets a preset range;

[0013] If the signal strength information does not meet the preset range, the master device sends the signal strength acquisition instruction to the slave device numbered 2, and receives a signal strength acquisition response returned by the slave device numbered 2, where the signal strength acquisition response returned by the slave device numbered 2 includes the signal strength information calculated by the slave device numbered 2 when receiving the signal strength acquisition instruction; the master device determines whether the signal strength information sent by the slave device numbered 2 meets the preset range;

[0014] If the signal strength does not meet the preset range, the master device sends a signal strength acquisition instruction to the slave device numbered 3, and receives a signal strength acquisition response returned by the slave device numbered 3, where the signal strength acquisition response returned by the slave device numbered 3 includes the signal strength information calculated by the slave device numbered 3 when receiving the signal strength acquisition instruction;

[0015] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m1 meets the preset range, and the slave control device numbered m1 is determined as the first forwarding device.

[0016] The master control device forwards the signal strength acquisition instruction to the slave control device numbered m1+1 through the slave control device numbered m1, and receives a signal strength acquisition response returned by the slave control device numbered m1+1, where the signal strength acquisition response returned by the slave control device numbered m1+1 includes the signal strength information calculated by the slave control device numbered m1+1 when receiving the signal strength acquisition instruction; the master control device determines whether the signal strength information sent by the slave control device numbered m1+1 meets a preset range;

[0017] If the signal strength information does not meet the preset range, the master device sends the signal strength acquisition instruction to the slave device numbered m1+2, and receives a signal strength acquisition response returned by the slave device numbered m1+2, where the signal strength acquisition response returned by the slave device numbered m1+2 includes the signal strength information calculated by the slave device numbered m1+2 when receiving the signal strength acquisition instruction; the master device determines whether the signal strength information sent by the slave device numbered m1+2 meets the preset range;

[0018] If the signal strength acquisition instruction is not met within the preset range, the master device sends the signal strength acquisition instruction to the slave device numbered m1+3, and receives a signal strength acquisition response returned by the slave device numbered m1+3, where the signal strength acquisition response returned by the slave device numbered m1+3 includes the signal strength information calculated by the slave device numbered m1+3 when receiving the signal strength acquisition instruction;

[0019] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m2 meets the preset range, and the slave control device numbered m2 is determined as the second forwarding device.

[0020] And so on, until the number is m m The slave control device is determined to be the Mth forwarding device, where m is a positive integer and M is a positive integer;

[0021] The main control device is m m =n, the N slave control devices are divided into M groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the Mth group includes slave control devices numbered m m-1 +1 to number m m and determine the slave device numbered 1 as the leader of the first group, the slave device numbered m1+1 as the leader of the second group, and so on. m-1 The slave device with +1 is the leader of group M;

[0022] The main control device is m m <n, the N slave control devices are divided into M+1 groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the M+1 group includes slave control devices numbered m m +1 to the slave control device numbered n; and determine that the slave control device numbered 1 is the leader of the first group, the slave control device numbered m1+1 is the leader of the second group... and the slave control device numbered m m The slave device with the number +1 is the leader of the M+1 group;

[0023] The master control device sends a data reporting instruction, wherein the data reporting instruction includes a group leader number; wherein the group leader number includes a number of a group leader that is not a neighboring group;

[0024] The master control device receives the group reporting data reported by the slave control device corresponding to the group leader number.

[0025] The method further includes: the slave control device receives the data reporting instruction, determines whether its own number is consistent with the group leader number, and if consistent, obtains the reporting data of the group members, generates the group reporting data, and reports the group reporting data.

[0026] The method further includes: the master device notifies the numbers m1, m2...m m The slave control device marks itself as a forwarding device.

[0027] The method further includes: the slave control device receives the data reporting instruction, determines whether it is a forwarding device, and if it is a forwarding device, forwards the data reporting instruction downlink according to the preset signal strength; the slave control device receives the reported data of this group, determines whether it is a forwarding device, and if it is a forwarding device, forwards the reported data of this group uplink according to the preset signal strength.

[0028] The method further includes: a slave control device whose number is not 1 receives the data reporting instruction forwarded by the forwarding device, determines whether its own number is consistent with the group leader number, and if consistent, obtains the reporting data of the group members, generates the reporting data of the group, and sends the reporting data of the group to the master control device through the forwarding device.

[0029] In another aspect, the present disclosure provides a single bus communication device, applied to a master device in a single bus communication system, the single bus communication system comprising: the master device and N slave devices connected in series on the single bus, the N slave devices being numbered in ascending order of distance from the master device, the numbers comprising: 1, 2, ..., n, where N is a positive integer and n is a positive integer;

[0030] The device comprises: a grouping module and a communication module; wherein:

[0031] The grouping module is used to:

[0032] Sending a signal strength acquisition instruction to a slave control device numbered 1, and receiving a signal strength acquisition response returned by the slave control device numbered 1, where the signal strength acquisition response returned by the slave control device numbered 1 includes signal strength information calculated by the slave control device numbered 1 when receiving the signal strength acquisition instruction; and determining whether the signal strength information sent by the slave control device numbered 1 meets a preset range;

[0033] If the signal strength information does not meet the preset range, send the signal strength acquisition instruction to the slave control device numbered 2, and receive a signal strength acquisition response returned by the slave control device numbered 2, where the signal strength acquisition response returned by the slave control device numbered 2 includes the signal strength information calculated when the slave control device numbered 2 receives the signal strength acquisition instruction; and determine whether the signal strength information sent by the slave control device numbered 2 meets the preset range;

[0034] If the signal strength acquisition instruction is not met within the preset range, the signal strength acquisition instruction is sent to the slave control device numbered 3, and a signal strength acquisition response is received from the slave control device numbered 3, where the signal strength acquisition response returned by the slave control device numbered 3 includes the signal strength information calculated by the slave control device numbered 3 when receiving the signal strength acquisition instruction;

[0035] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m1 meets the preset range, and the slave control device numbered m1 is determined as the first forwarding device.

[0036] forwarding the signal strength acquisition instruction to the slave control device numbered m1+1 through the slave control device numbered m1, and receiving a signal strength acquisition response returned by the slave control device numbered m1+1, where the signal strength acquisition response returned by the slave control device numbered m1+1 includes the signal strength information calculated by the slave control device numbered m1+1 when receiving the signal strength acquisition instruction; and determining whether the signal strength information sent by the slave control device numbered m1+1 meets a preset range;

[0037] If the signal strength information does not meet the preset range, the signal strength acquisition instruction is sent to the slave control device numbered m1+2, and a signal strength acquisition response returned by the slave control device numbered m1+2 is received, where the signal strength acquisition response returned by the slave control device numbered m1+2 includes the signal strength information calculated by the slave control device numbered m1+2 when receiving the signal strength acquisition instruction; and whether the signal strength information sent by the slave control device numbered m1+2 meets the preset range;

[0038] If the signal strength acquisition instruction is not met, the signal strength acquisition instruction is sent to the slave control device numbered m1+3, and a signal strength acquisition response returned by the slave control device numbered m1+3 is received, where the signal strength acquisition response returned by the slave control device numbered m1+3 includes the signal strength information calculated by the slave control device numbered m1+3 when receiving the signal strength acquisition instruction.

[0039] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m2 meets the preset range, and the slave control device numbered m2 is determined as the second forwarding device.

[0040] And so on, until the number is m m The slave control device is determined to be the Mth forwarding device, where m is a positive integer and M is a positive integer;

[0041] In m m =n, the N slave control devices are divided into M groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the Mth group includes slave control devices numbered m m-1 +1 to number m m and determine the slave device numbered 1 as the leader of the first group, the slave device numbered m1+1 as the leader of the second group, and so on. m-1 The slave device with +1 is the leader of group M;

[0042] In m m <n, the N slave control devices are divided into M+1 groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the M+1 group includes slave control devices numbered m m +1 to the slave control device numbered n; and determine that the slave control device numbered 1 is the leader of the first group, the slave control device numbered m1+1 is the leader of the second group... and the slave control device numbered m m The slave device with the number +1 is the leader of the M+1 group;

[0043] The communication module is used to:

[0044] Sending a data reporting instruction, wherein the data reporting instruction includes a group leader number; wherein the group leader number includes the number of a group leader that is not a neighboring group;

[0045] Receive the group reporting data reported by the slave control device corresponding to the group leader number.

[0046] The grouping module is also used to notify the number m1, m2...m m The slave control device marks itself as a forwarding device.

[0047] On the other hand, the present disclosure provides a single-bus communication system, characterized in that it includes: a master device and N slave devices connected in series on the single bus, the N slave devices are numbered from small to large according to their distance from the master device, and the numbers include: 1, 2, ..., n, N is a positive integer, and n is a positive integer; the master device includes the above-mentioned single-bus communication device.

[0048] Among them, the slave control device is used to receive the data reporting instruction, determine whether its own number is consistent with the group leader number, and if consistent, obtain the reporting data of the group members, generate the group reporting data, and report the group reporting data.

[0049] Among them, the slave control device is used to receive the data reporting instruction, determine whether it is a forwarding device, and if it is a forwarding device, forward the data reporting instruction downlink according to the preset signal strength; receive the reported data of this group, determine whether it is a forwarding device, and if it is a forwarding device, forward the reported data of this group uplink according to the preset signal strength.

[0050] Among them, the slave control device whose number is not 1 is used to receive the data reporting instruction forwarded by the forwarding device, determine whether its own number is consistent with the group leader number, and if consistent, obtain the reporting data of the group members, generate the reporting data of the group, and send the reporting data of the group to the master control device through the forwarding device.

[0051] It can be seen from the technical solutions provided by the present disclosure that the present disclosure provides a single bus communication method, device and system, in which the master control device can perform long-distance data transmission on a single bus, and at the same time, grouping data reporting can improve communication efficiency, and reporting data in non-adjacent groups can avoid signal interference. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0053] FIG1 is a schematic structural diagram of a single bus communication system provided by an embodiment of the present disclosure;

[0054] FIG2 is a schematic structural diagram of a single bus communication device provided by an embodiment of the present disclosure;

[0055] FIG3 is a schematic diagram of a specific example of a single bus communication system provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0056] The following is a clear and complete description of the technical solutions in the embodiments of the present disclosure, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts are within the scope of protection of the present disclosure.

[0057] Figure 1 shows a structural diagram of a single-bus communication system provided by an embodiment of the present disclosure. Referring to Figure 1, the single-bus communication system provided by an embodiment of the present disclosure includes: a master device and N slave devices connected in series on the single bus. The N slave devices are numbered from small to large according to their distance from the master device. The numbers include: 1, 2, ..., n, where N is a positive integer and n is a positive integer.

[0058] Specifically, the single bus provided by the embodiment of the present disclosure may include a bus that uses a single signal line, such as a power line communication and an RS485 bus, and can transmit both a clock (or electric energy) and data.

[0059] The master device provided in the embodiment of the present disclosure may be a single bus host, and the master device may broadcast instructions or send instructions to slave devices with specific numbers to control all slave devices or slave devices with specific numbers in the single bus system.

[0060] In the present disclosure, the first slave device after the master device is numbered 1, the second slave device is numbered 2, and so on. The Nth slave device is numbered n. The master device can pre-store the correspondence between the numbers and MAC addresses of each slave device so that the master device can send instructions to the slave devices in a targeted manner.

[0061] The slave control device provided in the embodiment of the present disclosure can be a smoke detector, camera, smart light and other devices, which can communicate via a single bus, or can be used as an external device to be connected to existing smoke detectors, cameras, smart lights and other devices to control the existing devices.

[0062] After receiving the corresponding instructions from the master control device, each slave control device can perform corresponding operations according to the control type carried in the instruction. For example: if the instruction is a patrol instruction, such as a broadcast patrol instruction, then the operation of returning the patrol response is performed; if the instruction is an on operation, such as an instruction to turn on a light with a specific number, then the on operation is performed, such as an operation to light up a light with a specific number; if it is a data reporting instruction, such as an instruction to report video data, then the data reporting operation is performed, such as transmitting video data captured by the camera.

[0063] Since the single-bus communication system provided by the embodiment of the present disclosure is controlled by a master device, there will be a certain attenuation when the control instructions are transmitted on the single bus. When too many slave devices are connected, the slave devices far away from the master device will not be able to receive the correct instructions. Therefore, the present disclosure divides N slave devices into multiple groups, and each group is equipped with a forwarding device to forward the instructions sent by the master device, thereby achieving the purpose of the slave device receiving the instructions of the master device.

[0064] At the same time, the present disclosure also sets a group leader for each group. The group leader obtains the data of the group members and reports the group data to the main control device. The group leader who is far away from the main control device reports the group data to the main control device via the forwarding device.

[0065] In order to avoid signal interference caused by group leaders reporting data, the present disclosure specifies that the group leaders of non-adjacent groups respond to one instruction.

[0066] Based on the single bus communication system provided by the present disclosure, a single bus communication method is provided below. The method is applied to the single bus communication system, and the method includes:

[0067] The master device sends a signal strength acquisition instruction to the slave device numbered 1 and receives a signal strength acquisition response returned by the slave device numbered 1, wherein the signal strength acquisition response returned by the slave device numbered 1 includes the signal strength information calculated by the slave device numbered 1 when receiving the signal strength acquisition instruction; the master device determines whether the signal strength information sent by the slave device numbered 1 meets a preset range;

[0068] If the signal strength information does not meet the preset range, the master device sends a signal strength acquisition instruction to the slave device numbered 2 and receives a signal strength acquisition response returned by the slave device numbered 2, where the signal strength acquisition response returned by the slave device numbered 2 includes the signal strength information calculated when the slave device numbered 2 receives the signal strength acquisition instruction; the master device determines whether the signal strength information sent by the slave device numbered 2 meets the preset range;

[0069] If the signal strength does not meet the preset range, the master device sends a signal strength acquisition instruction to the slave device numbered 3 and receives a signal strength acquisition response returned by the slave device numbered 3. The signal strength acquisition response returned by the slave device numbered 3 includes the signal strength information calculated by the slave device numbered 3 when receiving the signal strength acquisition instruction.

[0070] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m1 meets the preset range, and the slave control device numbered m1 is determined as the first forwarding device.

[0071] The master device forwards a signal strength acquisition instruction to the slave device numbered m1+1 through the slave device numbered m1, and receives a signal strength acquisition response returned by the slave device numbered m1+1. The signal strength acquisition response returned by the slave device numbered m1+1 includes the signal strength information calculated by the slave device numbered m1+1 when receiving the signal strength acquisition instruction. The master device determines whether the signal strength information sent by the slave device numbered m1+1 meets a preset range.

[0072] If the signal strength does not meet the preset range, the master device sends a signal strength acquisition instruction to the slave device numbered m1+2, and receives a signal strength acquisition response returned by the slave device numbered m1+2. The signal strength acquisition response returned by the slave device numbered m1+2 includes the signal strength information calculated by the slave device numbered m1+2 when receiving the signal strength acquisition instruction. The master device determines whether the signal strength information sent by the slave device numbered m1+2 meets the preset range.

[0073] If the master device does not meet the preset range, the master device sends a signal strength acquisition instruction to the slave device numbered m1+3, and receives a signal strength acquisition response returned by the slave device numbered m1+3. The signal strength acquisition response returned by the slave device numbered m1+3 includes the signal strength information calculated by the slave device numbered m1+3 when receiving the signal strength acquisition instruction.

[0074] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m2 meets the preset range, and the slave control device numbered m2 is determined as the second forwarding device.

[0075] And so on, until the number is m m The slave control device is determined to be the Mth forwarding device, where m is a positive integer and M is a positive integer;

[0076] The master device is in m m =n, the N slave control devices are divided into M groups, the first group includes the slave control devices numbered 1 to m1, the second group includes the slave control devices numbered m1+1 to m2, ... the Mth group includes the slave control devices numbered m m-1 +1 to number m m and determine the slave device numbered 1 as the leader of the first group, the slave device numbered m1+1 as the leader of the second group, and so on. m-1 The slave device with +1 is the leader of group M;

[0077] The master device is in m m<n, the N slave control devices are divided into M+1 groups. The first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, and the M+1 group includes slave control devices numbered m. m +1 to the slave control device numbered n; and determine that the slave control device numbered 1 is the leader of the first group, the slave control device numbered m1+1 is the leader of the second group... and the slave control device numbered m m The slave device with the number +1 is the leader of the M+1 group;

[0078] The master device sends a data reporting instruction, which includes a group leader number; wherein the group leader number includes the number of a group leader that is not a neighboring group;

[0079] The master device receives the group report data reported by the slave device corresponding to the group leader number.

[0080] As an optional implementation of the embodiment of the present disclosure, the single bus communication method provided by the embodiment of the present disclosure also includes: receiving a data reporting instruction from the control device, determining whether its own number is consistent with the group leader number, and if consistent, obtaining the reporting data of the group members, generating the reporting data of the group, and reporting the reporting data of the group.

[0081] As an optional implementation of the embodiment of the present disclosure, the single bus communication method provided by the embodiment of the present disclosure also includes: a slave control device whose number is not 1 receives a data reporting instruction forwarded by a forwarding device, determines whether its own number is consistent with the group leader number, and if consistent, obtains the reporting data of the group members, generates the reporting data of the group, and sends the reporting data of the group to the master control device through the forwarding device.

[0082] Specifically, if the slave device is the leader of the first group, the slave device can directly report the data reported by the group to the master device. If the slave device is not the leader of the first group, the slave device can report the data reported by the group to the master device through the forwarding device of the previous group. The disclosed method of aggregating the data of the group by the group leader for uploading can simultaneously upload multiple groups of data, thereby improving data communication efficiency.

[0083] As an optional implementation of the embodiment of the present disclosure, the single bus communication method provided by the embodiment of the present disclosure further includes: the master device notifies the number m1, m2...m m The slave control device marks itself as a forwarding device.

[0084] As an optional implementation of the embodiment of the present disclosure, the single bus communication method provided by the embodiment of the present disclosure also includes: receiving a data reporting instruction from the control device, determining whether it is a forwarding device, and if it is a forwarding device, forwarding the data reporting instruction downlink according to a preset signal strength; receiving the reported data of this group from the control device, determining whether it is a forwarding device, and if it is a forwarding device, forwarding the reported data of this group uplink according to the preset signal strength.

[0085] Specifically, the slave device marked as a forwarding device can forward the downlink data sent by the master device, and can also forward the uplink data. At the same time, forwarding with a preset signal strength can ensure that the sent signal can at least reach the next or previous group of forwarding devices.

[0086] Because the single-bus communication system provided by the embodiments of the present disclosure is controlled by a single master device, control instructions transmitted on the single bus experience a certain degree of attenuation. When too many slave devices are connected, slave devices far from the master device may not receive the correct instructions. Therefore, the master device of the present disclosure first sends a signal strength acquisition instruction. Only some slave devices near the master device can receive the instruction, and then return a signal strength acquisition response to the master device, allowing the master device to determine which slave devices can correctly receive the signal. The slave devices that can correctly receive the signal are then divided into a first group. The preset range is the minimum signal strength range within which the slave devices can accurately receive the signal, and this preset range can be set based on the properties of different single-buses. The second group of slave devices, following the first group, cannot correctly receive the signal strength acquisition instruction sent by the master device. Therefore, after the master device determines the forwarding device in the first group, it forwards the signal strength acquisition instruction via the forwarding device. This allows the master device to determine which slave devices can receive the signal strength acquisition instruction forwarded by the forwarding device in the first group, thereby dividing them into a second group. This process continues in this manner until all N slave devices have been grouped. After the grouping is completed, the leader of each group can obtain the signals of the group members to ensure that data is not lost, and each group of forwarding devices can also accurately send the forwarded data to the previous group of forwarding devices or the next group of forwarding devices.

[0087] Furthermore, to avoid signal interference caused by group leaders reporting data, the present disclosure specifies that, under the same instruction, only the group leaders of non-adjacent groups should respond to the instruction, thereby avoiding signal interference caused by adjacent groups reporting data simultaneously. Furthermore, by having the group leader aggregate the data reported by their own group, communication efficiency can be improved.

[0088] The following describes a single-bus communication system provided by an embodiment of the present disclosure in conjunction with Figures 1 and 2. The single-bus communication system is applied to the above-mentioned single-bus communication method. The following only briefly describes the structure and function of the single-bus communication system. For other matters not covered, please refer to the relevant description of the above-mentioned single-bus communication method, which will not be described in detail here. The single-bus communication system provided by an embodiment of the present disclosure includes: a master device and N slave devices connected in series on the single bus. The N slave devices are numbered from small to large according to their distance from the master device, and the numbers include: 1, 2,..., n, where N is a positive integer and n is a positive integer.

[0089] The single bus communication device provided in the embodiment of the present disclosure is applied to a master device in a single bus communication system. The device includes: a grouping module and a communication module; wherein:

[0090] Grouping module for:

[0091] Sending a signal strength acquisition instruction to the slave control device numbered 1, and receiving a signal strength acquisition response returned by the slave control device numbered 1, the signal strength acquisition response returned by the slave control device numbered 1 including the signal strength information calculated when the slave control device numbered 1 receives the signal strength acquisition instruction; determining whether the signal strength information sent by the slave control device numbered 1 meets a preset range;

[0092] If the signal strength information does not meet the preset range, a signal strength acquisition instruction is sent to the slave control device numbered 2, and a signal strength acquisition response is received from the slave control device numbered 2, where the signal strength acquisition response returned by the slave control device numbered 2 includes the signal strength information calculated when the slave control device numbered 2 receives the signal strength acquisition instruction; and a determination is made as to whether the signal strength information sent by the slave control device numbered 2 meets the preset range;

[0093] If the signal strength does not meet the preset range, a signal strength acquisition instruction is sent to the slave control device numbered 3, and a signal strength acquisition response is received from the slave control device numbered 3. The signal strength acquisition response returned by the slave control device numbered 3 includes the signal strength information calculated by the slave control device numbered 3 when receiving the signal strength acquisition instruction.

[0094] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m1 meets the preset range, and the slave control device numbered m1 is determined as the first forwarding device.

[0095] forwarding a signal strength acquisition instruction to a slave control device numbered m1+1 through a slave control device numbered m1, and receiving a signal strength acquisition response returned by the slave control device numbered m1+1, wherein the signal strength acquisition response returned by the slave control device numbered m1+1 includes the signal strength information calculated when the slave control device numbered m1+1 receives the signal strength acquisition instruction; determining whether the signal strength information sent by the slave control device numbered m1+1 meets a preset range;

[0096] If the signal strength information does not meet the preset range, a signal strength acquisition instruction is sent to the slave control device numbered m1+2, and a signal strength acquisition response is received from the slave control device numbered m1+2, where the signal strength acquisition response returned by the slave control device numbered m1+2 includes the signal strength information calculated by the slave control device numbered m1+2 when receiving the signal strength acquisition instruction; and a determination is made as to whether the signal strength information sent by the slave control device numbered m1+2 meets the preset range;

[0097] If the preset range is not met, a signal strength acquisition instruction is sent to the slave control device numbered m1+3, and a signal strength acquisition response is received from the slave control device numbered m1+3. The signal strength acquisition response returned by the slave control device numbered m1+3 includes the signal strength information calculated by the slave control device numbered m1+3 when receiving the signal strength acquisition instruction.

[0098] This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m2 meets the preset range, and the slave control device numbered m2 is determined as the second forwarding device.

[0099] And so on, until the number is m m The slave control device is determined to be the Mth forwarding device, where m is a positive integer and M is a positive integer;

[0100] In m m =n, the N slave control devices are divided into M groups, the first group includes the slave control devices numbered 1 to m1, the second group includes the slave control devices numbered m1+1 to m2, ... the Mth group includes the slave control devices numbered m m-1 +1 to number m m and determine the slave device numbered 1 as the leader of the first group, the slave device numbered m1+1 as the leader of the second group, and so on. m-1 The slave device with +1 is the leader of group M;

[0101] In m m <n, the N slave control devices are divided into M+1 groups. The first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, and the M+1 group includes slave control devices numbered m. m+1 to the slave control device numbered n; and determine that the slave control device numbered 1 is the leader of the first group, the slave control device numbered m1+1 is the leader of the second group... and the slave control device numbered m m The slave device with the number +1 is the leader of the M+1 group;

[0102] Communication modules for:

[0103] Sending a data reporting instruction, the data reporting instruction including a group leader number; wherein the group leader number includes the number of a group leader that is not a neighboring group;

[0104] Receive the group report data reported by the slave control device corresponding to the group leader number.

[0105] As an optional implementation of the embodiment of the present disclosure, the grouping module is further used to notify the numbered m1, m2...m m The slave control device marks itself as a forwarding device.

[0106] As an optional implementation of the embodiment of the present disclosure, the slave control device is used to receive data reporting instructions, determine whether its own number is consistent with the group leader number, and if consistent, obtain the reporting data of the group members, generate the reporting data of the group, and report the reporting data of the group.

[0107] As an optional implementation manner of the embodiment of the present disclosure, the slave control device is used to receive data reporting instructions, determine whether it is a forwarding device, and if it is a forwarding device, forward the data reporting instructions downlink according to the preset signal strength; receive the reported data of this group, determine whether it is a forwarding device, and if it is a forwarding device, forward the reported data of this group uplink according to the preset signal strength.

[0108] As an optional implementation of the embodiment of the present disclosure, a slave control device numbered other than 1 is used to receive data reporting instructions forwarded by a forwarding device, determine whether its own number is consistent with the group leader number, and if consistent, obtain the reporting data of the group members, generate the reporting data of the group, and send the reporting data of the group to the master control device through the forwarding device.

[0109] Because the single-bus communication system provided by the embodiments of the present disclosure is controlled by a single master device, control instructions transmitted on the single bus experience a certain degree of attenuation. When too many slave devices are connected, slave devices far from the master device may not receive the correct instructions. Therefore, the master device of the present disclosure first sends a signal strength acquisition instruction. Only some slave devices near the master device can receive the instruction, and then return a signal strength acquisition response to the master device, allowing the master device to determine which slave devices can correctly receive the signal. The slave devices that can correctly receive the signal are then divided into a first group. The preset range is the minimum signal strength range within which the slave devices can accurately receive the signal, and this preset range can be set based on the properties of different single-buses. The second group of slave devices, following the first group, cannot correctly receive the signal strength acquisition instruction sent by the master device. Therefore, after the master device determines the forwarding device in the first group, it forwards the signal strength acquisition instruction via the forwarding device. This allows the master device to determine which slave devices can receive the signal strength acquisition instruction forwarded by the forwarding device in the first group, thereby dividing them into a second group. This process continues in this manner until all N slave devices have been grouped. After the grouping is completed, the leader of each group can obtain the signals of the group members to ensure that data is not lost, and each group of forwarding devices can also accurately send the forwarded data to the previous group of forwarding devices or the next group of forwarding devices.

[0110] Furthermore, to avoid signal interference caused by group leaders reporting data, the present disclosure specifies that, under the same instruction, only the group leaders of non-adjacent groups should respond to the instruction, thereby avoiding signal interference caused by adjacent groups reporting data simultaneously. Furthermore, by having the group leader aggregate the data reported by their own group, communication efficiency can be improved.

[0111] Hereinafter, in conjunction with FIG3 , a specific example is used to illustrate the single bus communication method provided by the embodiment of the present disclosure:

[0112] The master device sends a signal strength acquisition instruction to the slave device 1, and the slave device 1 returns a signal strength acquisition response carrying signal strength information;

[0113] The master device determines that the signal strength information returned by the slave device 1 does not meet the preset range;

[0114] The master device sends a signal strength acquisition instruction to the slave device 2, and the slave device 2 returns a signal strength acquisition response carrying signal strength information;

[0115] The master device determines that the signal strength information returned by the slave device 2 does not meet the preset range;

[0116] The master device sends a signal strength acquisition instruction to the slave device 3, and the slave device 3 returns a signal strength acquisition response carrying signal strength information;

[0117] The master device determines that the signal strength information returned by slave device 3 is within a preset range, determines that slave device 3 is a forwarding device, and determines that slave device 1 is the leader of the first group;

[0118] The master device sends a signal strength acquisition instruction to the slave device 4. The slave device 3 receives the instruction and forwards it to the slave device 4 according to the preset signal strength. The slave device 4 forwards the signal strength acquisition response containing the signal strength information returned by the slave device 3 according to the preset signal strength.

[0119] The master device determines that the signal strength information returned by the slave device 4 does not meet the preset range;

[0120] The master device sends a signal strength acquisition instruction to the slave device 5. The slave device 3 receives the instruction and forwards it to the slave device 5 according to the preset signal strength. The slave device 5 forwards the signal strength acquisition response containing the signal strength information returned by the slave device 3 according to the preset signal strength.

[0121] The master device determines that the signal strength information returned by the slave device 5 does not meet the preset range;

[0122] This process is repeated until the master device determines that the signal strength information returned by the slave device 7 meets the preset range, determines that the slave device 7 is the forwarding device, and determines that the slave device 4 is the leader of the second group.

[0123] This process is repeated until the master device determines that the signal strength information returned by the slave device 10 meets the preset range, determines that the slave device 10 is a forwarding device, and determines that the slave device 8 is the leader of the third group.

[0124] This process is repeated in this way until n slave controllers are grouped and the forwarding device and group leader are determined.

[0125] The master device sends an inspection instruction, which carries the group leader numbers 1 and 8. Of course, in the present disclosure, the numbers of the first and fifth group leaders can also be carried. As long as they are not the group leader numbers of adjacent groups, they should fall within the scope of protection of the present disclosure.

[0126] Slave device 1 receives the inspection instruction, obtains the reported data of slave devices 2 and 3, as well as its own reported data, generates the first group of reported data for this group, and returns it to the master device;

[0127] Slave control device 4 receives the inspection instruction through slave control device 3, but discards it because its own number is not included in the instruction.

[0128] Slave device 8 receives the inspection instruction through slave device 3 and slave device 7, obtains the reported data of slave device 9 and slave device 10, as well as its own reported data, generates the third group of reported data of this group, and forwards it back to the master device through slave device 3 and slave device 7.

[0129] In this way, the master device can transmit data over long distances on a single bus. Reporting data in groups can improve communication efficiency, and reporting data in non-adjacent groups can avoid signal interference.

[0130] Although the embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are illustrative and are not to be construed as limiting the present disclosure. Those skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure without departing from the principles and purpose of the present disclosure. The scope of the present disclosure is defined by the appended claims and their equivalents.

Claims

1. A single bus communication method, applied to a single bus communication system, the single bus communication system comprising: A master device and N slave devices connected in series on a single bus, wherein the N slave devices are numbered in ascending order of distance from the master device, and the numbers include: 1, 2, ..., n, where N is a positive integer and n is a positive integer; The method comprises: The master control device sends a signal strength acquisition instruction to the slave control device numbered 1, and receives a signal strength acquisition response returned by the slave control device numbered 1, where the signal strength acquisition response returned by the slave control device numbered 1 includes signal strength information calculated by the slave control device numbered 1 when receiving the signal strength acquisition instruction; the master control device determines whether the signal strength information sent by the slave control device numbered 1 meets a preset range; If the signal strength information does not meet the preset range, the master device sends the signal strength acquisition instruction to the slave device numbered 2, and receives a signal strength acquisition response returned by the slave device numbered 2, where the signal strength acquisition response returned by the slave device numbered 2 includes the signal strength information calculated by the slave device numbered 2 when receiving the signal strength acquisition instruction; the master device determines whether the signal strength information sent by the slave device numbered 2 meets the preset range; If the signal strength does not meet the preset range, the master device sends a signal strength acquisition instruction to the slave device numbered 3, and receives a signal strength acquisition response returned by the slave device numbered 3, where the signal strength acquisition response returned by the slave device numbered 3 includes the signal strength information calculated by the slave device numbered 3 when receiving the signal strength acquisition instruction; This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m1 meets the preset range, and the slave control device numbered m1 is determined as the first forwarding device. The master control device forwards the signal strength acquisition instruction to the slave control device numbered m1+1 through the slave control device numbered m1, and receives a signal strength acquisition response returned by the slave control device numbered m1+1, where the signal strength acquisition response returned by the slave control device numbered m1+1 includes the signal strength information calculated by the slave control device numbered m1+1 when receiving the signal strength acquisition instruction; the master control device determines whether the signal strength information sent by the slave control device numbered m1+1 meets a preset range; If the signal strength information does not meet the preset range, the master device sends the signal strength acquisition instruction to the slave device numbered m1+2, and receives a signal strength acquisition response returned by the slave device numbered m1+2, where the signal strength acquisition response returned by the slave device numbered m1+2 includes the signal strength information calculated by the slave device numbered m1+2 when receiving the signal strength acquisition instruction; the master device determines whether the signal strength information sent by the slave device numbered m1+2 meets the preset range; If the signal strength acquisition instruction is not met within the preset range, the master device sends the signal strength acquisition instruction to the slave device numbered m1+3, and receives a signal strength acquisition response returned by the slave device numbered m1+3, where the signal strength acquisition response returned by the slave device numbered m1+3 includes the signal strength information calculated by the slave device numbered m1+3 when receiving the signal strength acquisition instruction; This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m2 meets the preset range, and the slave control device numbered m2 is determined as the second forwarding device. And so on, until the number is m m The slave control device is determined to be the Mth forwarding device, where m is a positive integer and M is a positive integer; The main control device is m m =n, the N slave control devices are divided into M groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the Mth group includes slave control devices numbered m m-1 +1 to number m m and determine the slave control device numbered 1 as the leader of the first group, the slave control device numbered m1+1 as the leader of the second group, and so on. m-1 The slave device with +1 is the leader of group M; The main control device is m m <n, the N slave control devices are divided into M+1 groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the M+1 group includes slave control devices numbered m m +1 to the slave control device numbered n; and determine that the slave control device numbered 1 is the leader of the first group, the slave control device numbered m1+1 is the leader of the second group... and the slave control device numbered m m The slave device with the number +1 is the leader of the M+1 group; The master control device sends a data reporting instruction, wherein the data reporting instruction includes a group leader number; wherein the group leader number includes a number of a group leader that is not a neighboring group; The master control device receives the group reporting data reported by the slave control device corresponding to the group leader number.

2. The method according to claim 1, wherein Also includes: The slave control device receives the data reporting instruction, determines whether its own number is consistent with the group leader number, and if consistent, obtains the reporting data of the group members, generates the group reporting data, and reports the group reporting data.

3. The method according to claim 1, wherein Also includes: The master device notification number is m1, m2...m m The slave control device marks itself as a forwarding device.

4. The method according to claim 1 or 3, wherein Also includes: The slave control device receives the data reporting instruction, determines whether it is a forwarding device, and if it is a forwarding device, forwards the data reporting instruction downlink according to a preset signal strength; The slave control device receives the reported data of the group, determines whether it is a forwarding device, and if it is a forwarding device, forwards the reported data of the group uplink according to a preset signal strength.

5. The method according to claim 4, wherein Also includes: The slave control device whose number is not 1 receives the data reporting instruction forwarded by the forwarding device, determines whether its own number is consistent with the group leader number, and if consistent, obtains the reporting data of the group members, generates the reporting data of the group, and sends the reporting data of the group to the master control device through the forwarding device.

6. A single bus communication device, applied to a master device in a single bus communication system, the single bus communication system comprising: The master device and N slave devices connected in series on a single bus, the N slave devices being numbered in ascending order of distance from the master device, the numbers comprising: 1, 2, ..., n, where N is a positive integer and n is a positive integer; The device comprises: a grouping module and a communication module; wherein: The grouping module is used to: Sending a signal strength acquisition instruction to a slave control device numbered 1, and receiving a signal strength acquisition response returned by the slave control device numbered 1, where the signal strength acquisition response returned by the slave control device numbered 1 includes signal strength information calculated by the slave control device numbered 1 when receiving the signal strength acquisition instruction; and determining whether the signal strength information sent by the slave control device numbered 1 meets a preset range; If the signal strength information does not meet the preset range, send the signal strength acquisition instruction to the slave control device numbered 2, and receive a signal strength acquisition response returned by the slave control device numbered 2, where the signal strength acquisition response returned by the slave control device numbered 2 includes the signal strength information calculated when the slave control device numbered 2 receives the signal strength acquisition instruction; and determine whether the signal strength information sent by the slave control device numbered 2 meets the preset range; If the signal strength acquisition instruction is not met within the preset range, the signal strength acquisition instruction is sent to the slave control device numbered 3, and a signal strength acquisition response is received from the slave control device numbered 3, where the signal strength acquisition response returned by the slave control device numbered 3 includes the signal strength information calculated by the slave control device numbered 3 when receiving the signal strength acquisition instruction; This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m1 meets the preset range, and the slave control device numbered m1 is determined as the first forwarding device. forwarding the signal strength acquisition instruction to the slave control device numbered m1+1 through the slave control device numbered m1, and receiving a signal strength acquisition response returned by the slave control device numbered m1+1, where the signal strength acquisition response returned by the slave control device numbered m1+1 includes the signal strength information calculated by the slave control device numbered m1+1 when receiving the signal strength acquisition instruction; and determining whether the signal strength information sent by the slave control device numbered m1+1 meets a preset range; If the signal strength information does not meet the preset range, the signal strength acquisition instruction is sent to the slave control device numbered m1+2, and a signal strength acquisition response returned by the slave control device numbered m1+2 is received, where the signal strength acquisition response returned by the slave control device numbered m1+2 includes the signal strength information calculated by the slave control device numbered m1+2 when receiving the signal strength acquisition instruction; and whether the signal strength information sent by the slave control device numbered m1+2 meets the preset range; If the signal strength acquisition instruction is not met, the signal strength acquisition instruction is sent to the slave control device numbered m1+3, and a signal strength acquisition response returned by the slave control device numbered m1+3 is received, where the signal strength acquisition response returned by the slave control device numbered m1+3 includes the signal strength information calculated by the slave control device numbered m1+3 when receiving the signal strength acquisition instruction. This process is repeated until it is determined that the signal strength information sent by the slave control device numbered m2 meets the preset range, and the slave control device numbered m2 is determined as the second forwarding device. And so on, until the number is m m The slave control device is determined to be the Mth forwarding device, where m is a positive integer and M is a positive integer; In m m =n, the N slave control devices are divided into M groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the Mth group includes slave control devices numbered m m-1 +1 to number m m and determine the slave control device numbered 1 as the leader of the first group, the slave control device numbered m1+1 as the leader of the second group, and so on. m-1 The slave device with +1 is the leader of group M; In m m <n, the N slave control devices are divided into M+1 groups, the first group includes slave control devices numbered 1 to m1, the second group includes slave control devices numbered m1+1 to m2, ... the M+1 group includes slave control devices numbered m m +1 to the slave control device numbered n; and determine that the slave control device numbered 1 is the leader of the first group, the slave control device numbered m1+1 is the leader of the second group... and the slave control device numbered m m The slave device with the number +1 is the leader of the M+1 group; The communication module is used to: Sending a data reporting instruction, wherein the data reporting instruction includes a group leader number; wherein the group leader number includes the number of a group leader that is not a neighboring group; Receive the group reporting data reported by the slave control device corresponding to the group leader number.

7. The device according to claim 6, wherein The grouping module is also used to notify the number m1, m2...m m The slave control device marks itself as a forwarding device.

8. A single bus communication system comprising: A master device and N slave devices connected in series on a single bus, wherein the N slave devices are numbered from small to large according to their distance from the master device, and the numbers include: 1, 2, ..., n, where N is a positive integer and n is a positive integer; the master device includes the single bus communication device according to claim 6 or 7.

9. The system according to claim 8, wherein: The slave control device is used to receive the data reporting instruction, determine whether its own number is consistent with the group leader number, and if consistent, obtain the reporting data of the group members, generate the group reporting data, and report the group reporting data.

10. The system according to claim 8, wherein: The slave control device is used to receive the data reporting instruction, determine whether it is a forwarding device, and if it is a forwarding device, forward the data reporting instruction downlink according to the preset signal strength; receive the reported data of this group, determine whether it is a forwarding device, and if it is a forwarding device, forward the reported data of this group uplink according to the preset signal strength.

11. The system according to claim 10, wherein: The slave control device whose number is not 1 is used to receive the data reporting instruction forwarded by the forwarding device, determine whether its own number is consistent with the group leader number, and if consistent, obtain the reporting data of the group members, generate the reporting data of the group, and send the reporting data of the group to the master control device through the forwarding device.

Citation Information

Patent Citations

  • Serial port communication system and communication method

    CN112948299A

  • PLC bus communication method and system based on relay device and relay device

    CN114884765A

  • Data transmission method and device, electronic equipment and computer storage medium

    CN115441991A

  • Fog lamp networking communication method and system

    CN116405337A

  • Unibus communication method, device, system and equipment

    CN116578521A