Communication method, system, intelligent terminal, communication sub-device, device and medium

By introducing relay nodes and relay transmission mechanisms between terminals and devices, the problem of insufficient real-time performance in communication between terminals and multiple devices is solved, enabling fast and long-distance transmission of control commands.

CN115883581BActive Publication Date: 2026-06-02SHENZHEN INTELLIROCKS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN INTELLIROCKS TECH CO LTD
Filing Date
2021-08-11
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

When a terminal communicates with multiple devices, existing technologies result in significant differences in the time it takes for the devices to receive the communication content, which fails to meet real-time requirements, especially when there are a large number of devices, affecting the timely response of the devices.

Method used

By identifying the first device as a relay node, connecting to the first device and sending control commands, the control commands are relayed to the target communication sub-device in a relay manner, and the communication sub-device is used for forwarding, ensuring that each device receives the control commands quickly.

Benefits of technology

It improves the real-time performance of communication and extends the communication distance, enabling devices at greater distances to receive control commands and meeting the real-time response requirements of the devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883581B_ABST
    Figure CN115883581B_ABST
Patent Text Reader

Abstract

The application discloses a communication method, system, intelligent terminal, communication sub-device, equipment and medium. The method comprises the following steps: determining a first device, the first device being one of a plurality of communication sub-devices around the intelligent terminal; and sending a control instruction to the first device, the control instruction being used for instructing to take the first device as a relay node and to relay the control instruction to a target communication sub-device. Through the forwarding of the control instruction by the communication sub-devices, each communication sub-device can quickly receive the control instruction, the real-time performance of the communication is improved, and the communication sub-devices far away from the first device can also receive the control instruction through the forwarding, so that the communication distance is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to a communication method, system, smart terminal, communication sub-device, device, and medium. Background Technology

[0002] When a terminal communicates with multiple devices, it typically needs to establish a connection with each device individually and then send the communication content to each device separately. When there are a large number of devices, this communication method results in significant differences in the time it takes for the devices to receive the communication content, failing to meet the real-time requirements of device control. Summary of the Invention

[0003] In view of the above problems, this application proposes a communication method, system, smart terminal, communication sub-device, device, and medium to improve the real-time performance of communication and extend the communication distance.

[0004] In a first aspect, embodiments of this application provide a communication method applied to a smart terminal. The communication method includes: determining a first device, wherein the first device is one of a plurality of communication sub-devices surrounding the smart terminal; connecting to the first device; and sending a control command to the first device, wherein the control command is used to instruct the first device to act as a relay node and relay the control command to a target communication sub-device.

[0005] Secondly, embodiments of this application also provide a communication method applied to a first device. The communication method includes: receiving control commands sent by a smart terminal and / or a communication sub-device; using the first device as a relay node, relaying the control commands to a second device; the control commands are used to instruct the second device to use as a relay node to relay the control commands to a target communication sub-device; the second device is one of a plurality of communication sub-devices surrounding the first device.

[0006] Thirdly, embodiments of this application also provide a communication system, which includes a smart terminal and multiple communication sub-devices. The smart terminal is used to determine a first device, which is one of the multiple communication sub-devices surrounding the smart terminal. The smart terminal is also used to connect to the first device and send control commands to the first device. The first device is used to receive control commands sent by the smart terminal and / or the communication sub-devices. The first device is also used to relay the control commands to a second device, which is one of the multiple communication sub-devices surrounding the first device, using the first device as a relay node. The control commands are used to instruct the second device to relay the control commands to the target communication sub-device.

[0007] Fourthly, embodiments of this application also provide a smart terminal, which includes: a first device determination module, a connection module, and a transmission module, wherein the first device determination module is used to determine a first device, which is one of a plurality of communication sub-devices surrounding the smart terminal; the connection module is used to connect to the first device; the transmission module is used to send control commands to the first device; the control commands are used to instruct the first device to act as a relay node and relay the control commands to the target communication sub-device.

[0008] Fifthly, embodiments of this application also provide a communication sub-device, which includes: a control command receiving module and a sending module, wherein the control command receiving module is used to receive control commands sent by a smart terminal, and the sending module is used to relay the control commands to a second device using the first device as a relay node, wherein the control commands are used to instruct the second device to relay the control commands to a target communication sub-device using the second device as a relay node; the second device is one of a plurality of communication sub-devices surrounding the first device.

[0009] In a sixth aspect, embodiments of this application also provide an electronic device, the electronic device comprising: one or more processors, a memory, and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the methods described in the first or second aspect above.

[0010] In a seventh aspect, embodiments of this application also provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the methods described in the first or second aspect above.

[0011] The technical solution provided in this application involves identifying a first device, which is one of multiple communication sub-devices surrounding a smart terminal. The first device is then connected to, and control commands are sent to it. These control commands instruct the first device to act as a relay node, relaying the control commands to the target communication sub-device. By forwarding the control commands through the communication sub-devices, each communication sub-device can quickly receive the control commands, improving the real-time performance of communication. Furthermore, the forwarding allows communication sub-devices at greater distances to receive the control commands, extending the communication distance. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments and drawings obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0013] Figure 1 A schematic diagram of an application environment according to an embodiment of this application is shown.

[0014] Figure 2 A flowchart illustrating a communication method according to an embodiment of this application is shown.

[0015] Figure 3 A schematic diagram of the control command forwarding process in one embodiment of this application is shown.

[0016] Figure 4 A flowchart illustrating a communication method according to another embodiment of this application is shown.

[0017] Figure 5 A flowchart illustrating a communication method according to another embodiment of this application is shown.

[0018] Figure 6 A flowchart of step S450 in another embodiment of this application is shown.

[0019] Figure 7 A flowchart illustrating a communication method according to another embodiment of this application is shown.

[0020] Figure 8 A flowchart of step S540 in another embodiment of this application is shown.

[0021] Figure 9 A structural block diagram of a smart terminal according to an embodiment of this application is shown.

[0022] Figure 10 A structural block diagram of a communication sub-device according to another embodiment of this application is shown.

[0023] Figure 11 A structural block diagram of an electronic device according to an embodiment of this application is shown.

[0024] Figure 12 A structural block diagram of a computer-readable storage medium according to an embodiment of this application is shown. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0026] When a terminal communicates with multiple devices, such as when it needs to control multiple devices to execute the same control command simultaneously, the terminal must establish a connection with each device individually and then send the communication content to each device separately. Because the terminal establishes a connection and sends communication content to each device one by one, the device that establishes the connection later receives the communication content later. When there are many devices, this communication method results in a large difference in the time it takes for the devices to receive the communication content, causing some control commands that require timely responses to not be responded to in a timely manner, thus affecting the real-time performance of device communication.

[0027] To address the aforementioned issues, the inventors of this application have proposed a communication method, system, smart terminal, communication sub-device, device, and medium. By identifying a first device (one of multiple communication sub-devices surrounding the smart terminal), connecting to the first device, and sending control commands to the first device (including a preset number of commands), the control commands trigger the first device to send control commands to a preset number of second devices (communication sub-devices surrounding the first device that have not previously received control commands). Through the forwarding of control commands by the communication sub-devices, each communication sub-device can quickly receive the control commands, improving the real-time performance of communication. Furthermore, by forwarding, communication sub-devices at greater distances can also receive the control commands, extending the communication distance.

[0028] The application environment of the communication method provided in the embodiments of this application will be described below.

[0029] Please see Figure 1 , Figure 1 An embodiment of the present application illustrates a communication system 100, which includes a smart terminal 110 and multiple communication sub-devices 120.

[0030] In the embodiments of this application, the smart terminal 110 may include, but is not limited to, terminal devices such as smartphones, tablets, wearable devices, and smart control panels.

[0031] In the embodiments of this application, the smart terminal 110 can scan to search for communication sub-devices 120 that are also on the first network and obtain the signal strength of the searched communication sub-devices 120. When the smart terminal 110 receives a scan command, it can trigger the smart terminal 110 to perform a scan operation. In some embodiments, the scan operation can be directly triggered by the user, for example, the user can trigger a scan button on the interactive interface of the smart terminal 110 to trigger the generation of a scan command. In some embodiments, the scan operation can also be triggered by a related event, for example, when the smart terminal 110 receives communication content that needs to be sent to the communication sub-device 120, it triggers the generation of a scan command.

[0032] In embodiments of this application, the smart terminal 110 can establish a connection with the searched communication sub-devices 120 and transmit communication content. In some embodiments, the smart terminal 110 can search for multiple communication sub-devices 120 located in the same first network by scanning. The search results can be displayed in the interactive interface in the form of a list. Preferably, the list can also display the signal strength of the searched communication sub-devices 120, and can also be sorted by signal strength. In some embodiments, the user can select the communication sub-device 120 to establish a connection from the list, and trigger the smart terminal 110 to establish a connection with the selected communication sub-device 120. In some embodiments, the search results may not be displayed, and the smart terminal 110 can select the communication sub-device 120 to connect to from the multiple searched communication sub-devices 120 according to a preset rule. The preset rule can be, for example, the communication sub-device 120 with the strongest signal strength among the multiple searched communication sub-devices 120.

[0033] In embodiments of this application, multiple communication sub-devices 120 are provided, and multiple communication sub-devices 120 are located in the same second network. In embodiments of this application, the communication sub-devices 120 may include, but are not limited to, smart home products, such as smart lights, smart speakers, smart curtains, smart doors, etc.

[0034] In some implementations, the first network and the second network may be the same network, and the smart terminal 110 may communicate with all devices in the multiple communication sub-devices 120.

[0035] In other embodiments, the first network and the second network may be different networks. The smart terminal 110 can communicate with the communication sub-device 120, which is also in the first network. When the smart terminal 110 needs to communicate with the target communication sub-device 120 in the second network, the smart terminal 110 can first transmit the communication content to the communication sub-device 120 in the first network, and then the communication sub-device 120 that receives the communication content can transmit it to the target communication sub-device 120.

[0036] The first network and / or the second network may use standard communication technologies and / or protocols. The first network and / or the second network are typically the Internet, but can also be any network, including but not limited to any combination of Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless networks, private networks, or virtual private networks. In some implementations, devices in the first network and / or the second network may communicate using communication protocols, including but not limited to BLE (Bluetooth Low Energy), WLAN (Wireless Local Area Network), Bluetooth, ZigBee, or Wi-Fi (Wireless Fidelity).

[0037] In the embodiments of this application, each communication sub-device 120 can scan to search for other communication sub-devices 120 that are in the same second network as the communication sub-device 120 and obtain the signal strength of the searched communication sub-devices 120.

[0038] In embodiments of this application, the communication sub-device 120 can establish connections with other communication sub-devices 120. In some embodiments, the communication sub-device 120 can establish a connection with one of the communication sub-devices 120 and receive communication content sent by that communication sub-device 120. In some embodiments, the communication sub-device 120 can also establish a connection with one of the communication sub-devices 120 and send communication content to that communication sub-device 120. In some embodiments, the communication sub-device 120 can establish a connection with another communication sub-device 120 while simultaneously establishing a connection with one of the communication sub-devices 120, receiving communication content sent by that communication sub-device, and sending communication content to that communication sub-device.

[0039] In the embodiments of this application, the smart terminal 110 can send communication content to the communication sub-device 120, and the communication sub-device 120 can further send the communication content to other communication sub-devices 120, thereby enabling the communication content to be sent quickly to each communication sub-device 120 and improving the real-time performance of communication.

[0040] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0041] Please see Figure 2 One embodiment of this application provides a communication method that can be applied to a smart terminal. The method may include steps S210 to S230.

[0042] Step S210: Determine the first device, which is one of the multiple communication sub-devices surrounding the smart terminal.

[0043] In the embodiments of this application, the smart terminal can generate control commands to control the communication sub-devices. In some implementations, the user can trigger the generation of corresponding control commands through the interactive interface of the smart terminal. For example, the user can control the on / off state and mode of a smart light on the smart terminal's interface. In some implementations, the smart terminal can generate corresponding control commands according to preset rules. For example, the preset rule could be to control all smart lights to turn off within a specified time; in this case, the smart terminal generates corresponding control commands within the specified time to control all smart lights to turn off.

[0044] In some implementations, the control command may control only one communication sub-device. In some implementations, the control command may control all communication sub-devices. In some implementations, the control command may control a group or class of communication sub-devices.

[0045] To distinguish the control device corresponding to the control command, the control command can include a control type. Control types can be, for example, point control, group control, and cluster control. Specifically, point control indicates that the control command is used to control one specific communication sub-device among multiple communication sub-devices surrounding the smart terminal. Group control indicates that the control command is used to control all communication sub-devices among multiple communication sub-devices surrounding the smart terminal. Cluster control indicates that the control command is used to control communication sub-devices belonging to the same group among multiple communication sub-devices surrounding the smart terminal. Therefore, the communication method provided in this application embodiment can implement control methods with multiple different control types, thus facilitating user selection of the appropriate control method and making it applicable to more types of application scenarios.

[0046] In some implementations, different control types can be distinguished by setting control fields corresponding to different control types within the control command. For example, the highest bit of the control command can be defined as the control field. When the control field is "F", the control command controls one of the communication sub-devices, and the address of the communication sub-device can be used to further determine which sub-device to be controlled. As another example, when the control field is "E", the control command controls all communication sub-devices; in this case, all communication sub-devices receiving the control command need to execute the corresponding control command. Yet another example is when the control field is "D", the control command controls a group or / or class of communication sub-devices; the group or category of the communication sub-devices can be used to further determine which sub-device to be controlled. It is understood that other control methods can also be set, and different control methods can be distinguished in other ways; this application does not impose any limitations on this.

[0047] In the embodiments of this application, the smart terminal needs to send control commands to the communication sub-devices. The smart terminal sends control commands to one of the communication sub-devices each time. Therefore, the smart terminal needs to determine the first device before sending the control command.

[0048] In the embodiments of this application, the first device is one of a plurality of communication sub-devices surrounding the smart terminal. To ensure the stability of the communication process, the smart terminal may preferentially send control commands to the communication sub-device with the strongest signal strength among the surrounding plurality of communication sub-devices.

[0049] In embodiments of this application, the smart terminal can scan to find communication sub-devices that are also in the first network. Optionally, devices with stronger signal strength are easier to find, and the smart terminal can select the first communication sub-device found as the first device. Optionally, the smart terminal can compare the signal strengths of multiple found communication sub-devices and select the communication sub-device with the strongest signal strength as the first device.

[0050] Step S220: Connect the first device.

[0051] In the embodiments of this application, after the smart terminal identifies the first device, it connects to the first device. In the embodiments of this application, the established connection can be a BLE connection, etc., and the specific communication connection establishment process is a common technology in the art, which will not be described in detail here.

[0052] Step S230: Send control commands to the first device. The control commands are used to instruct the first device to act as a relay node and relay the control commands to the target communication sub-device.

[0053] In order to send control commands to all communication sub-devices, related technologies establish connections with each communication sub-device separately through a smart terminal and send the control commands to each communication sub-device separately. This process takes a long time and cannot meet the real-time requirements of communication.

[0054] To ensure real-time communication and facilitate the rapid transmission of control commands to all communication sub-devices, in this embodiment, the first device, upon receiving the control command, acts as a relay node, forwarding the command to surrounding communication sub-devices. Other communication sub-devices, upon receiving the control command, also act as relay nodes, forwarding the command to their respective surrounding sub-devices, thus relaying the control command to the target communication sub-device. The target communication sub-device is the communication sub-device that the smart terminal needs to communicate with and / or control. The number of target communication sub-devices can be one or more, or even all of them. By having the first device and other communication sub-devices that receive the control command act as relay nodes, the control command can be quickly sent to all communication sub-devices, thereby relaying the control command to the target communication sub-device.

[0055] In one implementation, the control commands may include a preset number. When the first device receives a control command, it parses the control command to obtain the preset number, and then sends the control command to the preset number of communication sub-devices, thereby relaying the control commands to the target communication sub-devices.

[0056] The preset quantity is the number of control commands that the first device needs to send to other communication sub-devices. Preferably, the preset quantity can be selected from 5 to 10. It is understood that the higher the preset quantity is set, the higher the transmission speed of the control commands, but the corresponding energy consumption is also higher. Therefore, the preset quantity can be set according to the actual needs of use, and this application does not impose any restrictions on it.

[0057] In other implementations, the control command also includes a timestamp. The timestamp is used to uniquely identify the control command. That is, different control commands generated by the smart terminal correspond to different timestamps, allowing the communication sub-device to compare the timestamp in the control command with locally recorded timestamps. Based on the comparison result, it is determined whether the corresponding control command has been received. If the comparison results match, it is determined that the control command has been received; otherwise, it is determined that the control command has not been received. The timestamp can be, for example, the time when the control command was generated. Each control command is generated at a different time; therefore, the timestamp can be used to uniquely distinguish the control commands.

[0058] In some other embodiments, the control command also includes command content. This command content includes control actions that the communication sub-device to be controlled needs to perform. Specifically, it may include control parameters for controlling the communication sub-device to operate, shut down, operate in a specific mode, or operate at a specific time.

[0059] In embodiments of this application, control commands can be sent in the form of messages. These messages may include a message header, a message body, etc. That is, control commands can be obtained by encapsulating a message header and a message body. Optionally, the message header may include a preset quantity, a command identifier, etc. Optionally, the message header may also include a device identifier, which may be, for example, the device identifier of a first device. Thus, the communication sub-device can obtain information such as the preset quantity and command identifier by parsing the message header. The message body may include command content, etc., so the communication sub-device can obtain the command content, etc., by parsing the message body.

[0060] It is understood that in the embodiments of this application, the core content of the control command sent by the smart terminal to the first device and the control command forwarded by the first device to the second device based on the control command sent by the smart terminal are consistent, namely, the preset quantity, command identifier, and command content in the control command are the same. The smart terminal sends the control command to the communication sub-device by directly sending or forwarding, and the communication sub-device can obtain the same preset quantity, command identifier, and command content based on the control command parsing. During the forwarding process, some fields of the control command will be adjusted accordingly depending on the forwarding object. For example, the header of the control command may include the address or identifier of the forwarding object. In the embodiments of this application, as long as the control command can be parsed by the communication sub-device to obtain the same preset quantity, command identifier, and command content, even if some fields are adjusted due to forwarding needs, it should be considered as the same control command.

[0061] In the embodiments of this application, the control command is used to instruct a first device to relay the control command to a preset number of second devices, using the first device as a relay node. The second devices are communication sub-devices that the first device has not previously sent control commands to. Specifically, the first device can save the identifiers of previously sent communication sub-devices in a sent list, and can select communication sub-devices whose identifiers are not in the sent list as forwarding targets. Thus, after receiving a control command, the first device continues to send the control command to other communication sub-devices, specifically those that the first device has not previously sent control commands to, allowing the control command to be quickly sent to all communication sub-devices, effectively improving the real-time performance of communication. Furthermore, the smart terminal sends the control command to the first device within its transmission distance, and the first device continues to send the control command to the second devices within its transmission distance; that is, the smart terminal can transmit the control command to second devices farther away from the smart terminal via the first device. For example, as... Figure 3 The diagram shown illustrates the communication connection between multiple devices in a scenario described in this application's embodiments. Figure 3 In an ideal scenario with no signal obstacles, the communication range of each device is a circular area centered on the device. The communication distance is the radius of this circular area, and this radius may vary between different devices due to the influence of radio frequency power. For example, the communication range of a terminal device is... Figure 3 In area A, the communication ranges of communication sub-devices 120a-120c are respectively Figure 3 Regions B, C, and D in the diagram. In existing technical solutions, because the five communication sub-devices 120a-120e are located relatively far apart, the terminal device 110 cannot control all five devices simultaneously regardless of its movement. However, through the technical solution of this application embodiment, the smart terminal 110 can relay the issued control commands through communication sub-device 120a to the more distant communication sub-devices 120b and 120c. Communication sub-devices 120b and 120c then relay the received control commands to communication sub-devices 120d and 120e, respectively, thereby achieving the technical effect of enabling the terminal device 110 to control over a longer distance.

[0062] One embodiment of this application provides a communication method that, by determining a first device (which is one of multiple communication sub-devices surrounding a smart terminal), connecting to the first device, and sending control commands to the first device, the control commands are used to instruct the first device to act as a relay node to relay the control commands to the target communication sub-device. Through the forwarding of control commands by the communication sub-devices, each communication sub-device can quickly receive the control commands, improving the real-time performance of communication. Furthermore, by forwarding, communication sub-devices at greater distances can also receive the control commands, extending the communication distance.

[0063] Please see Figure 4 Another embodiment of this application provides a communication method that can be applied to a first device side. The method may include steps S310 to S330.

[0064] Step S310: Receive control commands sent by the smart terminal and / or communication sub-device.

[0065] In the embodiments of this application, the first device can establish a communication connection with a smart terminal and receive control commands sent by the smart terminal. The first device can also establish a communication connection with other communication sub-devices and receive control commands sent by other communication sub-devices.

[0066] Step S320: Using the first device as a relay node, the control command is relayed to the second device. The second device is one of the multiple communication sub-devices around the first device. The control command is used to instruct the second device to be used as a relay node to relay the control command to the target communication sub-device.

[0067] In some implementations, the second device is a communication sub-device that the first device has not sent control commands to. Specifically, the first device can save the identifiers of communication sub-devices that have already sent commands to a sent list. The first device can then select communication sub-devices whose identifiers are not in the sent list as forwarding targets. In this way, after receiving a control command, the first device continues to send the control command to other communication sub-devices that have not yet sent control commands, thereby enabling the control command to be quickly sent to all communication sub-devices and effectively improving the real-time performance of communication.

[0068] In the embodiments of this application, the control command may include a number of commands. A first device determines the preset number by parsing the control command. For example, the preset number is set in a preset field in the header of the control command. The first device extracts the content corresponding to the preset field by parsing the control command, thereby determining the preset number. After receiving the control command, the first device, acting as a relay node, sends the control command to a preset number of second devices. The control command instructs the second devices to act as relay nodes and send the control command to a preset number of third devices, thereby relaying the control command to the target communication sub-device. The third device is one of several communication sub-devices surrounding the second device. Preferably, the third device is a communication sub-device that the second device has not sent a control command to. Thus, the control command is relayed from the first device to the second device, and then from the second device to the third device, continuously relaying the control command from the receiving communication sub-device to other communication sub-devices, thereby enabling each communication sub-device to quickly receive the control command and improving the real-time performance of communication.

[0069] In some implementations, the control command may also include command content. Command content includes, but is not limited to, control actions that the communication sub-device to be controlled needs to perform. For example, controlling the communication sub-device to operate, shut down, operate in a specific mode, or operate at a specific time. Command content can be set in the message body of the control command. The first device determines the command content by parsing the control command to extract the content of the message body.

[0070] In some implementations, the control command may also include a command identifier. The command identifier can be used to distinguish different control commands, with different command identifiers corresponding to different control commands. The first device can use the command identifier to distinguish whether a received control command is the first received control command. The command identifier can be set in the header of the control command. The first device determines the command identifier by parsing the control command to extract the fields corresponding to the command identifier in the header.

[0071] Preferably, the first device can save the instruction identifiers of all received control instructions. When the first device receives a control instruction, it can distinguish whether the received control instruction is the first control instruction received by comparing the instruction identifier in the received control instruction with the saved instruction identifier.

[0072] In some implementations, the first device can determine the number of other communication sub-devices to which it needs to send control commands by a preset number. In the embodiments of this application, the first device distributes the control commands to a preset number of second devices. That is, the first device sends a control command to one second device at a time until the control commands have been sent to the preset number of second devices. Specifically, the first device counts the number of second devices to which control commands have been sent. For example, the initial value of the number of second devices is zero. Each time the first device sends a control command to a second device, it updates the number of second devices by increasing the number of second devices by 1, thereby counting the number of second devices to which the first device has sent control commands.

[0073] In the embodiments of this application, the first device and multiple surrounding communication sub-devices may be in a state where a connection has been pre-established or a state where a connection has not been pre-established.

[0074] In some implementations, the first device is not pre-connected to any of the surrounding communication sub-devices. That is, the first device is in a disconnected state with the communication sub-devices. In this case, if the first device needs to send control commands to the communication sub-devices, it must first establish a connection with the communication sub-devices before sending the control commands to the corresponding communication sub-devices.

[0075] In some implementations, the first device establishes a connection with at least one of a plurality of surrounding communication sub-devices in advance. The first device may be in a constantly connected state with the communication sub-device, or the user may pre-set the connection to remain active for a preset period of time. It is understood that if the first device is connected to the communication sub-device, the first device can directly send control commands to the communication sub-device, thereby saving time in the connection establishment process and further improving the efficiency of control command issuance.

[0076] Optionally, the first device maintains a pre-connection with multiple surrounding communication sub-devices, allowing the first device to directly send control commands to any one of these sub-devices. For example, in an application scenario where multiple communication sub-devices are smart light modules, these modules can remain connected after installation.

[0077] Optionally, the first device may pre-establish connections with some of the surrounding communication sub-devices. These sub-devices may be, for example, the closest communication sub-device to the first device, or the communication sub-device with the strongest signal strength, or can be configured according to the user's actual needs; this application does not impose any limitations on this. Thus, the first device can directly send control commands to any of the connected communication sub-devices. Furthermore, if the first device needs to send control commands to some unconnected communication sub-devices, it must first establish a connection with the communication sub-devices before sending the control commands to the corresponding communication sub-devices.

[0078] In some implementations, the second device also pre-establishes a connection with at least one of the surrounding multiple communication sub-devices. That is, each of the multiple communication sub-devices can pre-establish a connection with at least one other communication sub-device. Before sending control commands, the pre-established connections between the multiple communication sub-devices allow for rapid forwarding of control commands, thereby greatly improving the efficiency of control command transmission.

[0079] In the embodiments of this application, in order to ensure that control commands can be quickly sent to all communication sub-devices, after receiving the control command, the first device needs to further send the received control command to a preset number of communication sub-devices. It is understood that if there is a communication sub-device to which the first device has already sent a control command, sending the control command to that sub-device again would result in the first device repeatedly sending the control command to the same sub-device, thus reducing the transmission efficiency of the control command. To improve the transmission efficiency of the control command and enhance the real-time performance of communication, in the embodiments of this application, the first device sends the control command to a preset number of second devices, which are communication sub-devices to which the first device has not sent control commands. That is, the first device sends the control command to a preset number of communication sub-devices to which the first device has not sent control commands. This ensures that the first device sends the control command to the preset number of communication sub-devices.

[0080] In some implementations, the first device sequentially acknowledges the second devices and sends control commands to them, until a preset number of second devices have received the control commands. Optionally, the first device can determine the order of sending control commands based on the strength of the second device's signal. That is, the first device can send control commands to the second devices with stronger signals first.

[0081] Furthermore, the control command can also trigger the second device to continue sending the control command to a preset number of third devices. Similarly, the third devices are the communication sub-devices among the multiple communication sub-devices surrounding the second device that the second device has not yet sent control commands to. The control command will be continuously sent to the surrounding communication sub-devices that have not yet sent control commands, effectively increasing the transmission distance of the communication sub-devices. Moreover, it is no longer just the smart terminal that participates in the transmission of the control command. After receiving the control command, all communication sub-devices will, in turn, act as the senders of the control command and continue to transmit it to the surrounding communication sub-devices until all communication sub-devices have received the control command, thereby greatly improving the real-time performance and transmission distance of the communication.

[0082] In some implementations, the first device sends control commands to a preset number of second devices and then stops forwarding the control commands. However, in other cases, the first device may be unable to send the control commands to the preset number of second devices. For example, the number of communication sub-devices around the first device that the first device has not sent control commands to may be less than the preset number. Alternatively, the first device may experience a network failure and be unable to transmit control commands to the second devices. To prevent the first device from remaining in a control command forwarding state indefinitely, in some implementations, a time limit is set for the first device to complete sending the control commands to the preset number of second devices. That is, if the first device fails to send the control commands to the preset number of second devices within a preset time, it continues to attempt to forward the control commands. After the preset time, if the first device still has not completed sending the control commands to the preset number of second devices, it will also stop forwarding the control commands, thus preventing the first device from remaining in a control command forwarding state indefinitely. The first device may send the control command to the preset number of second devices within a preset time period starting from when the first device determines the preset number according to the control command. The length of the preset time period can be set according to the actual needs of use, such as 20 seconds, 30 seconds, 60 seconds, etc. This application does not limit this.

[0083] In some implementations, the first device may also determine the control content and the execution device that needs to perform the control content based on the instruction content.

[0084] In some implementations, the instruction content may also include control types, for example, by setting a control field in the instruction content to distinguish control instructions of different control types.

[0085] As an example, when the control field is "F", the control instruction controls one of the communication sub-devices. In this case, the control instruction also includes the identifier of the communication sub-device to be controlled, such as its address. The first device can determine whether it belongs to the executing device by using the identifier of the communication sub-device to be controlled.

[0086] As an example, when the control field is "E", the control command controls all communication sub-devices. In this case, the first device and other communication sub-devices that receive the control command are all execution devices.

[0087] As an example, each communication sub-device is pre-divided into different groups, and each sub-device stores a corresponding group identifier. When the control field is "D", the control command controls one group of communication sub-devices. In this case, the control command also includes the group identifier corresponding to the group to be controlled. When a communication sub-device receives a control command, it compares the group identifier obtained by parsing the control command with the group identifier stored in the device. If they match, the communication sub-device executes the control content of the control command. If they do not match, the communication sub-device simply forwards the control command.

[0088] In some implementations, the instruction content may also include control content. If the first device is an execution device, then the first device also needs to execute the control content. The control content may include, but is not limited to, the event identifier of the event to be executed, the execution time, etc. Optionally, the execution device needs to complete the execution event. Optionally, the execution device needs to complete the execution event during the execution time.

[0089] Another embodiment of this application provides a communication method in which a first device receives control commands sent by a smart terminal and / or a communication sub-device. The first device acts as a relay node to relay the control commands to a second device, which is one of a plurality of communication sub-devices surrounding the first device. The control commands are used to instruct the second device to act as a relay node to relay the control commands to the target communication sub-device. Thus, the smart terminal is no longer the only participant in the transmission of control commands. After receiving the control commands, all communication sub-devices that receive the control commands will act as the senders of the control commands and continue to transmit them to the surrounding communication sub-devices until all communication sub-devices have received the control commands, thereby greatly improving the real-time performance and transmission distance of the communication.

[0090] Please see Figure 5 Another embodiment of this application provides a communication method that can be applied to a first device. This embodiment provides an implementation method for sending control commands to a preset number of second devices. The method may include steps S410 to S470.

[0091] Step S410: Receive control commands sent by the smart terminal and / or communication sub-device.

[0092] Step S420: Determine the preset quantity according to the control command.

[0093] For a detailed description of steps S410 to S420, please refer to the above embodiments, and they will not be repeated here.

[0094] Step S430: Determine the device to be forwarded. The device to be forwarded is one of the multiple communication sub-devices surrounding the first device.

[0095] In the embodiments of this application, the first device can determine the communication sub-device with the strongest signal strength among multiple surrounding communication sub-devices by scanning as the device to be forwarded.

[0096] In some implementations, the first device may store the identifiers of communication sub-devices that have sent control commands. These identifiers may be, for example, device addresses or device identification codes. The first device may first determine the communication sub-device with the strongest signal among multiple surrounding communication sub-devices and compare its identifier with the stored identifiers. If the identifier of that communication sub-device is not found in the stored identifiers, then that communication sub-device is determined to be the device to be forwarded.

[0097] Step S440: Send the control command to the device to be forwarded.

[0098] In the embodiments of this application, the first device and the device to be forwarded may be in a state where a connection has been pre-established. Alternatively, the first device and the device to be forwarded may be in a state where a connection has not been pre-established.

[0099] In some implementations, if the first device is pre-connected to the device to be forwarded, the control commands are sent directly to the device to be forwarded.

[0100] In other implementations, if the first device and the device to be forwarded are not pre-connected, the first device first connects to the device to be forwarded and then sends control commands to the device to be forwarded.

[0101] Step S450: Determine whether the device to be forwarded is receiving control commands for the first time.

[0102] In the embodiments of this application, when the first device is connected to the device to be forwarded, the first device further sends control commands to the device to be forwarded. It is understood that it is also necessary to further determine whether the device to be forwarded has received the same control command before the first device sends the control command. If the device to be forwarded has not received the same control command, then the forwarding by the first device is a valid forwarding. By determining whether the device to be forwarded is receiving the control command for the first time, it can be ensured that the first device forwards the control command to the communication sub-device that has not received the control command before, thereby preventing the communication sub-device from repeatedly receiving the control command and affecting the forwarding efficiency of the control command.

[0103] In an embodiment of this application, the first device sends a control command to the device to be forwarded. The device to be forwarded further determines whether it is receiving the control command for the first time and sends the determination result to the first device.

[0104] Specifically, please refer to Figure 6 , Figure 6A flowchart of step S450 in another embodiment of this application is shown. In the embodiment of this application, step S450 may include steps S451 to S452.

[0105] Step S451: Receive instruction confirmation information sent by the device to be forwarded. The instruction confirmation information is used to indicate whether the device to be forwarded has received a control instruction.

[0106] The instruction identifier table of the device to be forwarded includes the instruction identifiers of all control instructions received by the device. If there is no instruction identifier in the instruction identifier table of the device to be forwarded that matches the instruction identifier of the control instruction, it indicates that the device to be forwarded has not received the control instruction.

[0107] To determine whether the device to be forwarded is receiving a control command for the first time, in one embodiment of this application, the device to be forwarded compares the command identifier in the control command with the command identifier in the command identifier table stored by the device. In this embodiment, the device to be forwarded stores the command identifiers of previously received control commands to form a command identifier table. If there is no command identifier in the command identifier table that matches the command identifier of the control command, the device to be forwarded has not received the control command before, meaning it is receiving the control command for the first time. If there is a command identifier in the command identifier table that matches the command identifier of the control command, the device to be forwarded has received the control command before.

[0108] In some implementations, after determining whether it has received the control command, the device to be forwarded generates command determination information indicating whether it has received the control command, and the device to be forwarded sends the command determination information to the first device.

[0109] In some implementations, if the instruction identifier table of the device to be forwarded does not contain an instruction identifier that is the same as the instruction identifier of the control instruction, that is, the device to be forwarded determines that it has not received the control instruction before, then the device to be forwarded updates the stored instruction identifier table, that is, stores the instruction identifier of the control instruction in the instruction identifier table.

[0110] Step S452: Determine whether the device to be forwarded is receiving control commands for the first time based on the instruction determination information.

[0111] In this embodiment, after receiving the instruction confirmation information, the first device parses the instruction confirmation information to further determine whether the device to be forwarded has received the control instruction for the first time. The instruction confirmation information may include a field indicating whether it has been received before. This field can be preset. If the field is 1, it indicates that the device to be forwarded has received the control instruction. If the field is 0, it indicates that the device to be forwarded has not received the control instruction. It is understood that other methods can also be used to define the meaning of the instruction confirmation information, and this application does not limit this.

[0112] In the embodiments of this application, if the first device determines, based on the instruction determination information, that the device to be forwarded has received a control instruction, then it determines that the device to be forwarded is not the second device and returns to the step of determining the device to be forwarded.

[0113] Step S460: If yes, then determine that the device to be forwarded is the second device.

[0114] In the embodiments of this application, if the first device determines, based on the instruction determination information, that the device to be forwarded has received a control instruction, then the device to be forwarded is determined to be the second device. The initial value of the number of second devices is zero. When the first device determines that the device to be forwarded is the second device, the number of second devices is updated. Specifically, when it is confirmed that the device to be forwarded is the second device, the number of second devices is increased by 1; when it is confirmed that the device to be forwarded is not the second device, the number of second devices remains unchanged.

[0115] Step S470: If the number of second devices is not equal to the preset number, return to the step of determining the devices to be forwarded.

[0116] In the embodiments of this application, if the number of second devices is not equal to the preset number, the process returns to the step of determining the device to be forwarded, and the first device continues to send control commands to other communication sub-devices.

[0117] When the first device sends control commands to a preset number of second devices, the first device stops forwarding control commands.

[0118] In some implementations, when the first device finishes forwarding control commands, that is, when the first device has forwarded the control commands to a preset number of second devices, the stored identifiers of the communication sub-devices that have sent control commands can be deleted so as not to affect the first device's forwarding of other control commands.

[0119] Another embodiment of this application relates to a communication method. This further embodiment improves upon the above embodiments, primarily by sending a control command to a device to be forwarded. The received command determination information from the device to be forwarded determines whether the device has received the control command. The control command is then sent to a preset number of second devices. This means the control command is continuously transmitted to surrounding communication sub-devices until all communication sub-devices have received the control command, thereby significantly improving the real-time performance and transmission distance of the communication.

[0120] Please see Figure 7 Another embodiment of this application provides a communication method that can be applied to a first device side. The method may include steps S510 to S570.

[0121] Step S510: Receive control commands sent by the smart terminal and / or communication sub-device.

[0122] Step S520: Determine the preset quantity according to the control command.

[0123] Step S530: Determine the device to be forwarded. The device to be forwarded is one of the multiple communication sub-devices surrounding the first device.

[0124] For a detailed description of steps S510 to S530, please refer to steps S410 to S430, which will not be repeated here.

[0125] Step S540: Determine whether the device to be forwarded is receiving control commands for the first time.

[0126] In the embodiments of this application, unlike the embodiments described above, when the first device connects to the device to be forwarded, the first device first determines whether the device to be forwarded is receiving the control command for the first time. If the first device is receiving the control command for the first time, it then sends the control command to the device to be forwarded, thereby saving the process of repeatedly sending control commands and improving forwarding efficiency.

[0127] Specifically, please refer to Figure 8 , Figure 8 The diagram shows a flowchart of step S540 in another embodiment of the present application. In the embodiment of the present application, step S540 may include steps S451 to S452.

[0128] Step S541: Receive instruction identification information sent by the device to be forwarded. The instruction identification information includes an instruction identification table, which includes the instruction identifiers of all control instructions received by the device to be forwarded.

[0129] In embodiments of this application, a first device receives instruction identification information sent by a device to be forwarded. In some embodiments, if the first device establishes a connection with the device to be forwarded, the device to be forwarded can send instruction identification information to the first device. The instruction identification information includes an instruction identification table, which includes instruction identifiers of all control instructions received by the device to be forwarded. The first device can further determine whether the device to be forwarded has received the control instruction by using the instruction identifier of the control instruction and the instruction identification information sent by the device to be forwarded.

[0130] Step S542: If there is no instruction identifier in the instruction identifier table that is the same as the instruction identifier of the control instruction, then it is determined that the device to be forwarded is receiving the control instruction for the first time.

[0131] In the embodiments of this application, if there is no identifier in the instruction identifier table that is the same as the instruction identifier of the control instruction, it can be determined that the device to be forwarded is receiving the control instruction for the first time.

[0132] Step S550: If yes, then send the control command to the device to be forwarded.

[0133] Furthermore, by sending control commands to the device to which the control commands are first received, and by determining in advance whether the device to which the control commands are to be forwarded has received control commands before, the number of control commands sent to the device to which the control commands have already been received can be reduced, thereby improving the forwarding efficiency of control commands.

[0134] In some implementations, if the instruction identifier table of the device to be forwarded contains an instruction identifier that is the same as the instruction identifier of the control instruction, then the device to be forwarded has previously received the control instruction, and the process returns to the step of determining the device to be forwarded.

[0135] Step S560: Determine the device to be forwarded as the second device.

[0136] In the embodiments of this application, if the first device determines, based on the instruction determination information, that the device to be forwarded has received a control instruction, then the device to be forwarded is determined to be the second device. The initial value of the number of second devices is zero. When the first device determines that the device to be forwarded is the second device, the number of second devices is updated. Specifically, when it is confirmed that the device to be forwarded is the second device, the number of second devices is increased by 1; when it is confirmed that the device to be forwarded is not the second device, the number of second devices remains unchanged.

[0137] Step S570: If the number of second devices is not equal to the preset number, return to the step of determining the device to be forwarded.

[0138] In the embodiments of this application, if the number of second devices is not equal to the preset number, the process returns to the step of determining the device to be forwarded, and the first device continues to send control commands to other communication sub-devices.

[0139] When the first device sends control commands to a preset number of second devices, the first device stops forwarding control commands.

[0140] In some implementations, when the first device finishes forwarding control commands, that is, when the first device has forwarded the control commands to a preset number of second devices, the stored identifiers of the communication sub-devices that have sent control commands can be deleted so as not to affect the first device's forwarding of other control commands.

[0141] Another embodiment of this application relates to a communication method. This further embodiment improves upon the above embodiments, primarily by providing another real-time method for determining whether a communication sub-device is a second device. Specifically, by receiving instruction identification information sent by the device to be forwarded, if no instruction identifier identical to the control instruction exists in the instruction identification information, the device to be forwarded is determined to be a second device. The control instruction is then sent to the device to be forwarded, thereby sending the control instruction to a preset number of second devices. That is, the control instruction is continuously transmitted to surrounding communication sub-devices until all communication sub-devices have received the control instruction, thus greatly improving the real-time performance and transmission distance of the communication.

[0142] Please see Figure 1 The illustration shows a communication system 100 provided in an embodiment of this application, which includes a smart terminal 110 and a plurality of communication sub-devices 120.

[0143] The smart terminal 110 is used to identify a first device, which is one of a plurality of communication sub-devices 120 surrounding the smart terminal 110. The smart terminal 110 is also used to send control commands to the first device.

[0144] In embodiments of this application, a first device is used to receive control commands sent by a smart terminal 110 and / or a communication sub-device 120. The first device is also used to determine a preset quantity based on the control commands. The first device is further used to relay the control commands to a second device, which is one of a plurality of communication sub-devices 120 surrounding the first device, using the first device as a relay node; the control commands are used to instruct the second device to act as a relay node and relay the control commands to a target communication sub-device.

[0145] Please see Figure 9 The illustration shows a smart terminal 600 provided in one embodiment of this application. The smart terminal 600 includes: a first device determination module 610 and a transmission module 620.

[0146] The first device determination module 610 is used to determine the first device. The first device is one of a plurality of communication sub-devices surrounding the smart terminal.

[0147] The sending module 620 is used to send control commands to the first device. The control commands are used to instruct the first device to act as a relay node to relay the control commands to the target communication sub-device.

[0148] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For device embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to in the descriptions of the method embodiments. Any processing method described in the method embodiments can be implemented in the device embodiments through corresponding processing modules, and will not be elaborated upon further in the device embodiments.

[0149] Please see Figure 10 This illustrates a communication sub-device 700 provided in another embodiment of this application, which includes a control command receiving module 710 and a sending module 720.

[0150] The control command receiving module 710 is used to receive control commands sent by smart terminals and other communication sub-devices.

[0151] The sending module 720 is used to relay control commands to the second device using the first device as a relay node. The control commands are used to instruct the second device to relay control commands to the target communication sub-device using the second device as a relay node. The second device is one of a plurality of communication sub-devices surrounding the first device.

[0152] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For device embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to in the descriptions of the method embodiments. Any processing method described in the method embodiments can be implemented in the device embodiments through corresponding processing modules, and will not be elaborated upon further in the device embodiments.

[0153] Please see Figure 11Based on the above-described communication method, this application embodiment also provides another electronic device 800 including a processor capable of executing the aforementioned communication method. The electronic device 800 further includes one or more processors 810, a memory 820, and one or more application programs. The memory 820 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 810 can execute the programs stored in the memory 820.

[0154] The processor 810 may include one or more cores for data processing and message matrix units. The processor 810 connects to various parts of the electronic device 800 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 820, and by calling data stored in the memory 820. Optionally, the processor 810 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 810 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also be implemented separately as a communication chip, without being integrated into the processor.

[0155] The memory 820 may include random access memory (RAM) or read-only memory (ROM). The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory 820 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created by the terminal during use (such as instruction content, instruction identifier, preset quantity, etc.).

[0156] Please refer to Figure 9This diagram illustrates a structural block diagram of a computer-readable storage medium 900 provided in an embodiment of this application. The computer-readable storage medium 900 stores program code 910, which can be called by a processor to execute the methods described in the above method embodiments.

[0157] The computer-readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code may, for example, be compressed in a suitable form.

[0158] In summary, the communication method, system, smart terminal, communication sub-device, and medium provided in this application, by determining a first device (which is one of multiple communication sub-devices surrounding the smart terminal), sends control commands to the first device. The control commands instruct the first device to act as a relay node to relay the control commands to the target communication sub-device. Through the forwarding of control commands by the communication sub-devices, each communication sub-device can quickly receive the control commands, improving the real-time performance of communication. Furthermore, by forwarding, communication sub-devices at greater distances can also receive the control commands, extending the communication distance.

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

Claims

1. A communication method characterized by comprising: The communication method is applied to a smart terminal, and the communication method includes: A first device is identified, which is one of a plurality of communication sub-devices surrounding the smart terminal; Connect to the first device; A control command is sent to the first device, the control command being used to instruct the first device to act as a relay node and send the control command to a preset number of second devices, thereby relaying the control command to the target communication sub-device; the control command includes a preset number, command content, command identifier, and control type; If the first device sends the control command to the preset number of second devices within a preset time, or if the first device fails to send the control command to the preset number of second devices after the preset time has expired, the first device will stop forwarding the control command. Wherein, after receiving the control command, the second device sends the control command to a preset number of third devices, wherein the third device is one of a plurality of communication sub-devices surrounding the second device; The first device sequentially sends the control command to a preset number of second devices in descending order of signal strength, following the process below: First, it determines a device to be forwarded to, which is the communication sub-device with the strongest signal strength among multiple communication sub-devices surrounding the first device, whose identifier is not in the first device's sent list. The first device's sent list stores the identifiers of communication sub-devices that have sent control commands. Second, it receives command identifier information from the device to be forwarded to, the command identifier information including a command identifier table containing the command identifiers of all control commands received by the device to be forwarded to. Third, if no command identifier matching the command identifier of the control command exists in the command identifier table, it determines that the device to be forwarded is receiving the control command for the first time. Fourth, if it determines that the device to be forwarded is receiving the control command for the first time, it sends the control command to the device to be forwarded to and identifies the device to be forwarded as a second device. Fifth, if the number of second devices is not equal to the preset number, it returns to the step of determining the device to be forwarded to.

2. The communication method according to claim 1, characterized by, The determination of the first device includes: The communication sub-device with the strongest signal strength among the multiple communication sub-devices surrounding the smart terminal is designated as the first device.

3. The method of claim 1, wherein, The instruction content is used to enable the communication sub-device receiving the control instruction to determine the control content and the execution device that needs to execute the control content. If the communication sub-device receiving the control instruction belongs to the execution device, then the control content is executed. When the control type in the control instruction is group control, all communication sub-devices receiving the control instruction belong to the execution device. When the control type in the control instruction is group control, if the group identifier pre-stored locally by the communication sub-device receiving the control instruction is the same as the group identifier in the control instruction, then the communication sub-device belongs to the execution device.

4. A communication method characterized by comprising: The communication method is applied to a first device, which is one of a plurality of communication sub-devices surrounding a smart terminal; the communication method includes: The device receives control commands sent by the smart terminal; the control commands include a preset number, command content, command identifier, and control type; if the first device sends the control commands to the preset number of second devices within a preset time, or if the first device fails to send the control commands to the preset number of second devices after the preset time has elapsed, the first device ends the forwarding of the control commands. Using the first device as a relay node, the control command is sent to the preset number of second devices. The control command is used to instruct the second devices to relay the control command to the target communication sub-device. The first device sequentially sends the control command to the preset number of second devices in descending order of signal strength, following the process below: A forwarding device is determined, which is the communication sub-device with the strongest signal strength among multiple communication sub-devices surrounding the first device, and is not listed in the first device's sent list. The first device's sent list stores communication sub-devices that have already sent control commands. The device identifier is determined; the instruction identifier information sent by the device to be forwarded is received, the instruction identifier information including an instruction identifier table, the instruction identifier table including the instruction identifiers of all control instructions received by the device to be forwarded; if there is no instruction identifier in the instruction identifier table that is the same as the instruction identifier of the control instruction, it is determined that the device to be forwarded is receiving the control instruction for the first time; if it is determined that the device to be forwarded is receiving the control instruction for the first time, the control instruction is sent to the device to be forwarded, and the device to be forwarded is determined to be a second device; if the number of second devices is not equal to the preset number, the process returns to the step of determining the device to be forwarded. Wherein, after receiving the control command, the second device sends the control command to a preset number of third devices, wherein the third device is one of a plurality of communication sub-devices surrounding the second device.

5. The communication method according to claim 4, wherein, The step of using the first device as a relay node to send the control command to the preset number of second devices includes: The preset quantity is determined according to the control command; Using the first device as a relay node, the control commands are sent to the preset number of second devices respectively; the control commands are used to instruct the second devices to be used as relay nodes to send the control commands to the preset number of third devices respectively, thereby relaying the control commands to the target communication sub-device.

6. The communication method according to claim 5, wherein, The third device is a communication sub-device that the second device has not sent the control command to.

7. The communication method according to claim 5, wherein, The first device establishes a pre-connection with at least one of the surrounding multiple communication sub-devices; the second device establishes a pre-connection with at least one of the surrounding multiple communication sub-devices.

8. The communication method according to claim 5, wherein, Determining the preset quantity according to the control command includes: determining the preset quantity and command content according to the control command; The instruction content is used to enable the communication sub-device receiving the control instruction to determine the control content and the execution device that needs to execute the control content. If the communication sub-device receiving the control instruction belongs to the execution device, then the control content is executed. When the control type in the control instruction is group control, all communication sub-devices receiving the control instruction belong to the execution device. When the control type in the control instruction is group control, if the group identifier pre-stored locally by the communication sub-device receiving the control instruction is the same as the group identifier in the control instruction, then the communication sub-device belongs to the execution device. After determining the preset quantity and instruction content according to the control instruction, the method further includes: The control content and the execution device that needs to execute the control content are determined according to the instruction content; the control content represents the content to be executed by the execution device; If the first device is the execution device, then the control content is executed.

9. A communication system, characterized by The communication system includes a smart terminal and multiple communication sub-devices. The smart terminal is used to identify a first device, which is one of a plurality of communication sub-devices surrounding the smart terminal. The smart terminal is also used to connect to the first device; The smart terminal is also used to send control instructions to the first device; the control instructions include a preset number, instruction content, instruction identifier and control type; if the first device sends the control instructions to the preset number of second devices within a preset time, or if the first device fails to send the control instructions to the preset number of second devices after the preset time has expired, the first device ends the forwarding of the control instructions; The first device is used to receive control commands sent by the smart terminal; The first device is also used as a relay node to send the control command to a preset number of second devices; the control command is used to instruct the second devices to relay the control command to the target communication sub-device. The first device sequentially sends the control commands to a preset number of second devices in descending order of signal strength, following the process below: First, it determines a device to be forwarded to, which is the communication sub-device with the strongest signal strength among a plurality of communication sub-devices surrounding the first device, whose identifier is not in the first device's sent list. The first device's sent list stores the identifiers of communication sub-devices that have previously sent control commands. Second, it receives command identifier information from the device to be forwarded to, the command identifier information including a command identifier table containing the command identifiers of all control commands received by the device to be forwarded to. Third, if no command identifier matching the command identifier of the control command is found in the command identifier table, it is determined that the device to be forwarded is receiving the control command for the first time. If it is determined that the device to be forwarded is receiving the control command for the first time, the control command is sent to the device to be forwarded, and the device to be forwarded is determined to be a second device; if the number of second devices is not equal to the preset number, the process returns to the step of determining the device to be forwarded. After receiving the control command, the second device sends the control command to a preset number of third devices, wherein each third device is one of a plurality of communication sub-devices surrounding the second device.

10. A smart terminal, characterized by The smart terminal includes: The first device determination module is used to determine the first device, which is one of the multiple communication sub-devices surrounding the smart terminal. The sending module is used to send control commands to the first device. The control commands are used to instruct the first device to act as a relay node and send the control commands to a preset number of second devices, thereby relaying the control commands to the target communication sub-device. The control command includes a preset number, command content, command identifier, and control type; if the first device sends the control command to the preset number of second devices within a preset time, or if the first device fails to send the control command to the preset number of second devices after the preset time has elapsed, the first device stops forwarding the control command. After receiving the control command, the second device sends the control command to a preset number of third devices, wherein each third device is one of a plurality of communication sub-devices surrounding the second device; The first device sequentially sends the control command to a preset number of second devices in descending order of signal strength, following the process below: First, it determines a device to be forwarded to, which is the communication sub-device with the strongest signal strength among multiple communication sub-devices surrounding the first device, whose identifier is not in the first device's sent list. The first device's sent list stores the identifiers of communication sub-devices that have sent control commands. Second, it receives command identifier information from the device to be forwarded to, the command identifier information including a command identifier table containing the command identifiers of all control commands received by the device to be forwarded to. Third, if no command identifier matching the command identifier of the control command exists in the command identifier table, it determines that the device to be forwarded is receiving the control command for the first time. Fourth, if it determines that the device to be forwarded is receiving the control command for the first time, it sends the control command to the device to be forwarded to and identifies the device to be forwarded as a second device. Fifth, if the number of second devices is not equal to the preset number, it returns to the step of determining the device to be forwarded to.

11. A communication sub-device, characterized in that The communication sub-device serves as a first device, which is one of multiple communication sub-devices surrounding the smart terminal; it includes: A control instruction receiving module is used to receive control instructions sent by a smart terminal; the control instructions include a preset quantity, instruction content, instruction identifier, and control type; The sending module is configured to send the control command to a preset number of second devices, using the first device as a relay node. The control command instructs the second devices to relay the control command to the target communication sub-device. If the first device sends the control command to the preset number of second devices within a preset time, or if the first device fails to send the control command to the preset number of second devices after the preset time has elapsed, the first device terminates the forwarding of the control command. The first device sends the control command to the preset number of second devices according to the following process: determining a device to be forwarded, wherein the device to be forwarded is a communication sub-device among multiple communication sub-devices surrounding the first device that is not located in the sent list of the first device. The communication sub-device with the strongest signal strength is selected. The first device's sent list is used to store the identifiers of communication sub-devices that have sent control commands. The system receives command identifier information from the device to be forwarded, the command identifier information including a command identifier table containing the command identifiers of all control commands received by the device to be forwarded. If no command identifier matching the command identifier of the control command exists in the command identifier table, it is determined that the device to be forwarded is receiving the control command for the first time. If it is determined that the device to be forwarded is receiving the control command for the first time, the control command is sent to the device to be forwarded, and the device to be forwarded is identified as a second device. If the number of second devices is not equal to the preset number, the system returns to the step of identifying the device to be forwarded. After receiving the control command, the second device sends the control command to a preset number of third devices, wherein each third device is one of a plurality of communication sub-devices surrounding the second device.

12. An electronic device, comprising: include: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the communication method as described in any one of claims 1 to 8.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that can be invoked by a processor to execute the communication method as described in any one of claims 1 to 8.