Communication method, electronic device, and related apparatus

By grouping and managing multiple electronic devices through access points (APs), the problems of long response time intervals and high probability of data collisions among electronic devices are solved, enabling simultaneous response from multiple devices and efficient data transmission.

WO2025223166A1PCT designated stage Publication Date: 2025-10-30HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/086800
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-24
Filing Date
2025-04-02
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

When a controller controls multiple electronic devices, the long time interval between the electronic devices' responses to control commands leads to a poor user experience. Furthermore, as the number of devices increases, the probability of data collisions also increases, affecting channel throughput and user experience.

Method used

Multiple electronic devices are grouped by access points (APs) and each group is assigned a different time slot. By using carrier sense multiple access/collision avoidance (CSMA/CA) and time synchronization mechanisms, it is ensured that electronic devices execute control commands and send back confirmation messages at the same time, reducing response time intervals and the probability of data collisions.

Benefits of technology

This enables multiple electronic devices to respond to control commands simultaneously, improving user experience, reducing the probability of data collisions, and increasing channel throughput and data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025086800_30102025_PF_FP_ABST
    Figure CN2025086800_30102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a communication method, an electronic device, and a related apparatus. The method comprises: an AP receiving a first control message from a control device, and sending a second control message to a first electronic device, wherein the second control message is used for indicating a first moment; and the AP receiving a third control message from the control device, and sending a fourth control message to a second electronic device, wherein the fourth control message is used for indicating a first moment, and the first moment is a moment at which the first electronic device and the second electronic device execute actions indicated by the control messages. In the present application, a control device can send control messages to a plurality of electronic devices by means of an AP in a time-sharing manner, and the AP can indicate a moment at which the plurality of electronic devices execute actions indicated by the control messages, such that the plurality of electronic devices can execute, at the same moment, the actions indicated by the control messages, thereby bringing to a user the feeling that the plurality of electronic devices simultaneously respond, and thus improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Communication methods, electronic devices and related apparatus

[0001] This application claims priority to Chinese Patent Application No. 202410512588.2, filed on April 24, 2024, entitled "Communication Method, Electronic Device and Related Apparatus", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication technology, and in particular to a communication method, electronic device, and related apparatus. Background Technology

[0003] With the development of electronic devices, multiple electronic devices are now deployed in homes, schools, factories, and other settings. A controller can control multiple electronic devices; for example, a user can turn on multiple lights by operating a controller (such as a control panel).

[0004] Currently, when a controller controls multiple electronic devices, it can use unicast to send control commands to each device in a time-sharing manner. The electronic devices can then respond to these commands. However, due to the time intervals between control commands and transmission delays, the time intervals between responses from multiple electronic devices are currently long, resulting in a poor user experience. For example, if a user operates the controller to turn on multiple lights, some lights may turn on first, while others may take a long time to do so, leading to a poor user experience. Summary of the Invention

[0005] This application provides a communication method, an electronic device, and related apparatus. After a control device sends control messages to multiple electronic devices in a time-sharing manner, the multiple electronic devices can simultaneously execute the actions indicated by the control messages, thereby improving the user experience.

[0006] Firstly, embodiments of this application provide a communication method. The executing entity of this communication method can be an access point (AP), or a chip or processor within the AP, etc. The following description uses the AP as the executing entity. In this method, a control device can send control messages to an electronic device via the AP in a time-sharing manner; correspondingly, the AP can forward control messages to the electronic device.

[0007] The access point (AP) can receive a first control message from a control device, which can be considered as a message sent by the control device to a first electronic device. In this embodiment, the AP can not only forward the content of the first control message, but also encapsulate a first moment in the first control message to obtain a second control message. The AP can then send the second control message to the first electronic device. The second control message indicates the first moment. The first moment indicates that the first electronic device performs the action indicated by the second control message at the first moment.

[0008] Similarly, the AP can receive a third control message from the control device, which can be considered as a message sent by the control device to the second electronic device. The AP can encapsulate a first moment in the third control message to obtain a fourth control message. The AP can then send the fourth control message to the second electronic device. The fourth control message is used to indicate the first moment. Specifically, the first moment indicates that the second electronic device performs the action indicated by the fourth control message at the first moment.

[0009] Accordingly, in this example, the first electronic device receives the second control message, and the second electronic device receives the fourth control message. The first electronic device can execute the action indicated by the second control message at a first moment, and the second electronic device can also execute the action indicated by the second control message at a first moment. For example, the second control message is an open instruction, the fourth control message is an open instruction, the first electronic device is 1, and the second electronic device is 2. In this example, lamp 1 and lamp 2 can be lit at the same time.

[0010] The communication method provided in this application embodiment responds to control messages, allowing multiple electronic devices to execute the actions executed by the control messages at the same time, giving users the feeling that multiple electronic devices are responding simultaneously and improving user experience.

[0011] In one possible implementation, the AP can group multiple electronic devices. For example, the AP can group the first electronic device and the second electronic device into a first group, and the third electronic device into a second group. The method by which the AP groups the multiple electronic devices, and the rationale for this grouping, can be found in the relevant descriptions below.

[0012] In this implementation, the AP can also receive a fifth control message from the control device, which can be considered as a message sent by the control device to the third electronic device. The AP can encapsulate a first moment in the fifth control message to obtain a sixth control message. The AP can then send the sixth control message to the third electronic device. The sixth control message indicates the first moment, and the first moment indicates that the third electronic device performs the action indicated by the sixth control message at the first moment.

[0013] Accordingly, in this example, the third electronic device receives the sixth control message, and the third electronic device can execute the action indicated by the sixth control message at the first moment, such as the third electronic device turning on at the first moment.

[0014] In this implementation, responding to control messages allows multiple electronic devices in different groups to execute the actions required by the control messages simultaneously, thus improving the user experience.

[0015] In one possible implementation, in response to a control message from a control device, the electronic device can not only perform the actions indicated by the control message, such as turning on the light or adjusting the color of the light, but also send a confirmation message back to the control device to indicate that the electronic device has received the control message and to prevent the control device from retransmitting the control message.

[0016] Because there are many electronic devices, the AP can group them into groups and allocate a preset time slot to each group. The number of electronic devices in each group is much smaller than the total number of electronic devices. Therefore, using grouping can reduce the probability of electronic devices simultaneously occupying the channel and also reduce the probability of data collisions. The data here can be understood as acknowledgment messages.

[0017] For example, the AP can assign the first electronic device and the second electronic device to the first group, and assign the third electronic device to the second group. The AP can allocate the first time slot to the first group and the second time slot to the second group. The first time slot is used for electronic devices in the first group to send back confirmation messages, and the second time slot is used for electronic devices in the second group to send back confirmation messages.

[0018] In some embodiments, the first time slot does not include the first moment.

[0019] In some embodiments, the first time slot is later than the first time slot, and the second time slot is later than the first time slot.

[0020] In some embodiments, the durations of the first time slot and the second time slot are equal.

[0021] To enable electronic devices in different groups to send acknowledgment messages in their corresponding time slots, thereby reducing the probability of acknowledgment message collisions, the AP can broadcast packet information. This packet information indicates that the first group includes the first electronic device and the second electronic device, the second group includes the third electronic device, the first time slot corresponding to the first group, and the second time slot corresponding to the second group.

[0022] In this example, after receiving the packet information, the first electronic device, the second electronic device, and the third electronic device can determine to send an acknowledgment message in the first time slot, the second electronic device can determine to send an acknowledgment message in the first time slot, and the third electronic device can determine to send an acknowledgment message in the second time slot. Accordingly, the first time slot is also used to indicate: the time when the first electronic device starts sending an acknowledgment message in the first time slot, the time when the second electronic device starts sending an acknowledgment message in the first time slot, and the time when the third electronic device starts sending an acknowledgment message in the second time slot.

[0023] In this example, the first electronic device receives a second control message from the AP, the second electronic device receives a fourth control message from the AP, and the third electronic device receives a sixth control message from the AP. The first electronic device can execute the action indicated by the second control message (such as turning on a light) at a first moment, the second electronic device can execute the action indicated by the fourth control message (such as turning on a light) at a first moment, and the third electronic device can execute the action indicated by the sixth control message (such as turning on a light) at a first moment. After multiple electronic devices execute the actions indicated by the control messages simultaneously, the first and second electronic devices can send back confirmation messages in a first time slot, and the third electronic device can send back confirmation messages in a second time slot.

[0024] In one possible implementation, multiple electronic devices can use a Carrier Sense Multiple Access / Collision Avoidance (CSMA / CA) mechanism to send acknowledgment messages within the same time slot. For example, a first electronic device and a second electronic device can use CSMA / CA to send acknowledgment messages within the first time slot. Exemplarily, the first electronic device sends a second acknowledgment message within the first time slot, and the second electronic device sends a third acknowledgment message within the same time slot.

[0025] In one possible implementation, the AP can dynamically adjust the grouping of electronic devices and the time slots allocated to each group. For example, the AP can group multiple electronic devices based on the channel duty cycle, making the groups (e.g., the number of electronic devices in each group) more suitable for the channel quality. For instance, when the channel duty cycle is large, less data can be transmitted within a preset time slot. To increase the probability of successful uplink data feedback, a smaller number of electronic devices can be allocated to each group. Thus, with fewer electronic devices carrying a preset time slot, the probability of electronic devices preempting the channel in that preset time slot is low, ensuring successful uplink data feedback.

[0026] Similarly, with a smaller channel duty cycle, more data can be transmitted within a preset time slot, allowing for the allocation of a larger number of electronic devices in each group. Thus, by carrying a larger number of electronic devices within a preset time slot, the smaller channel duty cycle also ensures successful uplink data feedback.

[0027] In one possible implementation, to ensure that multiple electronic devices simultaneously execute the actions indicated by the control message, the AP can synchronize its time with multiple electronic devices. In this implementation, the AP can broadcast synchronization information. This synchronization information includes the AP's current second time frame.

[0028] In this implementation, taking a first electronic device and a second electronic device as examples, the first electronic device can map the second time to its current third time, and the second electronic device can map the second time to its current fourth time. Thus, when the first electronic device receives the second control message, the first time carried in the second control message can be the AP's local time. The first electronic device can map this first time to its own local fifth time. Similarly, the second electronic device can also map this first time to its own local sixth time. In absolute time, the AP's local first time, the first electronic device's fifth time, and the second electronic device's sixth time are the same time.

[0029] In one possible implementation, to ensure real-time synchronization, the AP can periodically broadcast synchronization information. This allows electronic devices to periodically map the AP's time to their local time, ensuring synchronization.

[0030] In one possible implementation, packet information can be carried within the synchronization information. This reduces the signaling overhead of the AP.

[0031] In one possible implementation, the AP can periodically group multiple electronic devices according to the channel duty cycle, obtain group information, and carry the group information in the synchronization information.

[0032] In some embodiments, the period at which the AP packets electronic devices can be the same as or different from the period at which the AP broadcasts its own local data.

[0033] In one possible implementation, because the electronic device receives the control message but delays executing the action requested by the control message until the very first instant, and then sends out an acknowledgment message in the corresponding time slot after the first instant, the acknowledgment message is delayed. Thus, if the control device receives the acknowledgment message and the timeout expires, it will resend the control message, resulting in a timeout retransmission problem.

[0034] In this implementation, to avoid timeout retransmission issues, the AP, after sending a control message to the electronic device, does not need to wait for an ACK from the electronic device and can send a confirmation message to the control device in advance. Taking the first electronic device as an example, after the AP sends a second control message to the first electronic device, it can also send a first confirmation message to the control device.

[0035] Upon receiving the second control message, the first electronic device can send a second confirmation message back to the access point (AP). This first confirmation message precedes the second confirmation message. Because the AP has already sent a confirmation message to the control device in advance, it can release the second confirmation message upon receiving it from the first electronic device.

[0036] In one possible implementation, the AP can also cache control messages to ensure that if control message packets are lost, the AP can resend the control message to the electronic device without going through the control device, simplifying the implementation. Taking the first electronic device as an example, after the AP receives the first control message from the control device, it can also cache the first control message. In this example, after the AP sends the first acknowledgment message to the control device, if the AP does not receive the second acknowledgment message from the first electronic device, the AP can determine that the control message has been lost and can resend the first control message to the first electronic device.

[0037] In this implementation, when the AP receives a second confirmation message from the first electronic device, the AP can release the first control message.

[0038] The first control message is the first control message in a set of control messages. The control messages in the set indicate the same action; for example, all control messages in the set are "turn on" commands, or all control messages in the set are "adjust the color of the light".

[0039] The following describes the process by which the AP determines whether the first control message is the first control message in a set of control messages:

[0040] In some embodiments, before receiving a first control message from a control device, the AP may also receive a seventh control message from the control device. Wherein, when the time interval between receiving the first control message and receiving the seventh control message is greater than or equal to a first preset duration, the AP can determine that the first control message is the first control message in a set of control messages. When the time interval between receiving the first control message and receiving the seventh control message is less than the first preset duration, the AP can determine that the first control message is not the first control message in a set of control messages.

[0041] When the AP determines that the first control message is the first control message in a group of control messages, the AP can determine the first moment and encapsulate the first moment in each control message in the group so that multiple electronic devices can simultaneously execute the actions indicated by the group of control messages.

[0042] The method for AP to determine the first moment is described below:

[0043] In one possible implementation, the AP can determine the first duration based on the channel duty cycle, and the AP can determine the first moment based on the moment when the first control message is received and the first duration.

[0044] When the AP determines that the first control message is not the first control message in a group of control messages, the AP can encapsulate the first moment corresponding to the group of control messages in the control message.

[0045] In one possible implementation, the first electronic device, the second electronic device, and the third electronic device in the above embodiment can be any electronic device.

[0046] In one possible implementation, the first electronic device, the second electronic device, and the third electronic device in the above embodiment can be specific types of electronic devices. Taking the first electronic device and the second electronic device as examples, the traffic of the first electronic device within a second preset time period is less than or equal to the traffic threshold, and the first electronic device supports preset functions; the traffic of the second electronic device within the second preset time period is less than or equal to the traffic threshold, and the second electronic device supports the preset functions.

[0047] In one possible implementation, embodiments of this application also provide time slot allocation methods for other types of electronic devices:

[0048] Method 1: When the traffic of the fourth electronic device within the second preset duration is less than or equal to the traffic threshold, and the fourth electronic device does not support the preset function, the AP can allocate a third time slot to the fourth electronic device, the third time slot being later than the first time slot and the second time slot.

[0049] Method 2: When the traffic of the fifth electronic device within the second preset time period is greater than the traffic threshold, the AP can allocate a fourth time slot to the fifth electronic device, the fourth time slot being later than the first time slot and the second time slot.

[0050] Secondly, embodiments of this application provide a communication method. The entity executing this communication method can be a first electronic device, or a chip, processor, etc., within the first electronic device. The following description uses a first electronic device as an example. It should be understood that the solutions already described in the first aspect will be briefly described in the second aspect.

[0051] In this method, a first electronic device receives a second control message from an access point (AP), the second control message including a first time. The first electronic device executes the action indicated by the second control message at the first time, the first time being the time when the second electronic device executes the action indicated by a fourth control message.

[0052] In one possible implementation, the method further includes: receiving packet information broadcast from an access point (AP), the packet information indicating that a first group includes the first electronic device and the second electronic device, and a first time slot corresponding to the first group.

[0053] After receiving the second control message from the AP, the method further includes: starting at the first moment, sending a second confirmation message to the AP in the first time slot.

[0054] In one possible implementation, the method further includes: receiving synchronization information broadcast from the AP, the synchronization information including the AP's current second time; and mapping the second time to the first electronic device's current third time.

[0055] In one possible implementation, the grouping information is carried in the synchronization information.

[0056] In one possible implementation, the method further includes: sending function information to the AP, the function information indicating that the first electronic device supports a preset function.

[0057] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory for storing code instructions, and the processor for running the code instructions to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0058] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0059] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0060] Sixthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0061] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0062] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0063] Figure 1 is a schematic diagram of a scenario in which the communication method provided in the embodiment of this application is applicable;

[0064] Figure 2 is a schematic diagram of another scenario in which the communication method provided in the embodiments of this application is applicable;

[0065] Figure 3 is a schematic diagram of time slot allocation for electronic devices in the 802.11ah RAW protocol;

[0066] Figure 4 is a flowchart of a carrier sense multiple access / collision avoidance mechanism.

[0067] Figure 5 is a schematic diagram of a scenario where multiple electronic devices are deployed;

[0068] Figure 6 is a flowchart illustrating one embodiment of the communication method provided in this application.

[0069] Figure 7A is a schematic diagram of synchronization information provided in an embodiment of this application;

[0070] Figure 7B is another schematic diagram of synchronization information provided in an embodiment of this application;

[0071] Figure 8 is a schematic diagram of time synchronization between an access point and multiple electronic devices;

[0072] Figure 9 is a flowchart illustrating another embodiment of the communication method provided in this application.

[0073] Figure 10 is a flowchart illustrating another embodiment of the communication method provided in this application.

[0074] Figure 11 is a schematic diagram of a second control message provided in an embodiment of this application;

[0075] Figure 12A is a timing diagram of an access point, a first electronic device, and a second electronic device provided in an embodiment of this application;

[0076] Figure 12B is another timing diagram of the access point, the first electronic device, and the second electronic device provided in the embodiments of this application;

[0077] Figure 12C is a comparative diagram of the prior art and the technical solution of this application;

[0078] Figure 13 is a flowchart illustrating another embodiment of the communication method provided in this application.

[0079] Figure 14 is a schematic diagram of the transmission process of control messages and confirmation messages provided in an embodiment of this application;

[0080] Figure 15 is a schematic diagram of an access point and a first electronic device provided in an embodiment of this application;

[0081] Figure 16 is a schematic diagram of a window provided in an embodiment of this application;

[0082] Figure 17 is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0083] The communication method provided in this application can be applied to scenarios such as homes, schools, factories, and hospitals, and different electronic devices can be deployed in different scenarios. This application uses a home scenario as an example to illustrate the communication method provided in this application. For example, multiple electronic devices can be deployed in a home scenario, and these electronic devices may include, but are not limited to, lights, speakers, televisions, air conditioners, and cameras. Figure 1 is a schematic diagram of a scenario to which the communication method provided in this application is applicable. Referring to Figure 1, this scenario may include a controller, an access point (AP), and multiple electronic devices. It should be understood that Figure 1 uses the example of multiple electronic devices all being lights.

[0084] A controller is used to control multiple electronic devices. For example, a controller can be a control panel as shown in Figure 1. Alternatively, a controller can also be an electronic device such as a mobile phone or tablet.

[0085] The controller connects to the access point (AP). For example, the controller can connect wirelessly or via a wired connection to the AP. Similarly, when the controller is a control panel, it can connect either wired or wirelessly to the AP. Likewise, when the controller is an electronic device such as a mobile phone or tablet, it can connect wirelessly to the AP.

[0086] Each electronic device can access the AP, meaning each electronic device can connect to the AP. For example, each light in Figure 1 can be wirelessly connected to the AP.

[0087] In some embodiments, the wireless connection may be, for example, a Wi-Fi connection, a Bluetooth connection, or a near field communication (NFC) connection, etc., and this application embodiment does not limit this. In this application embodiment, a Wi-Fi connection is used as an example of wireless connection.

[0088] Because both the controller and the light are connected to the access point (AP), in some embodiments, the controller and the light can interact via the AP. Taking turning on the light as an example, for instance, a user can operate the controller when entering the room, or the controller can sense a user entering the room; in either case, the controller can send an on command to the light via the AP. In response to the on command from the AP, the light turns on.

[0089] It should be understood that, in Figure 1, an electronic device is used as an example of a light. In some embodiments, the electronic device may also include a speaker, a television, an air conditioner, etc. In this scenario, when a user enters the room, the controller can turn on the light, and can also control the speaker to play music, the television to play video, and the air conditioner to adjust the indoor temperature, etc. The following embodiments use an electronic device as an example of a light.

[0090] Figure 1 uses a controller as an example of a control panel. It can be understood that when the controller is an electronic device such as a mobile phone or tablet, the controller can control the electronic device as shown in Figure 2. Referring to Figure 2, taking a mobile phone as an example, this scenario can include: a controller, a server, an access point (AP), and multiple electronic devices.

[0091] Users can operate their mobile phones to turn on multiple lights. In this scenario, the phone, in response to the user's operation, can send trigger information to the server. This trigger information instructs the server to send an "on" command to the lights via the access point (AP). Accordingly, in response to the "on" command, the lights turn on.

[0092] It should be understood that different types of controllers send control messages to multiple electronic devices in different ways. However, regardless of whether the controller sends control messages directly to the electronic device, sends them through an access point (AP), or sends them through a server or AP, it can all be referred to as "the controller sending control messages to electronic devices." In some embodiments, "the controller sending control messages to electronic devices through an AP" and "the controller sending control messages to electronic devices through a server or AP" can be referred to as "the controller sending control messages to electronic devices through an AP."

[0093] In some embodiments, the controller in FIG1 and the server in FIG2 can be referred to as control devices. The following embodiments use the interaction between control devices, APs, and multiple electronic devices as examples to describe the communication method provided in this application.

[0094] In some embodiments, the control device in this application may be a control panel, a server, or other such device.

[0095] In some embodiments, the electronic device controlled by the controlled device can be referred to as user equipment (UE). For example, the electronic device controlled by the controller can be a lamp, speaker, television, air conditioner, camera, in-vehicle equipment or wearable device, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in smart home, etc. The form of the electronic device is not specifically limited in the embodiments of this application.

[0096] In some embodiments, the control device, the AP, and multiple electronic devices controlled by the controlled device can all be regarded as electronic devices. In this embodiment of the application, in order to distinguish between the control device, the AP, and the electronic devices controlled by the controlled device, only the electronic devices controlled by the controlled device are referred to as electronic devices.

[0097] To facilitate understanding of the embodiments of this application, the following uses the scenario in Figure 1 as an example to introduce the current interaction methods between control devices, APs, and multiple electronic devices:

[0098] In some embodiments, control messages sent by a control device to multiple electronic devices can be referred to as downlink data, and data sent by electronic devices to the control device can be referred to as uplink data. Control messages can be, for example, control commands, multimedia data, etc., while uplink data can be, for example, data requests, feedback messages, etc. For example, in the above embodiments, an open command sent by the control device to an electronic device can be considered a type of downlink data. Control commands can also be close commands, commands to adjust lamp brightness, color temperature, etc. The specific content of downlink and uplink data in this application embodiment is not limited.

[0099] Currently, control devices, access points (APs), and electronic devices can exchange data in half-duplex mode. In half-duplex mode, when a device sends data, it must wait for the data to be received before it can receive data from the other end. In a home scenario, the control device can exchange data with multiple electronic devices. If multiple electronic devices compete for the channel, data collisions can easily occur, leading to data packet loss. In this case, the electronic devices need to resend data to the control device, causing data transmission delays.

[0100] To avoid data collisions, the 802.11ax protocol incorporates technologies such as Orthogonal Frequency Division Multiple Access (OFDMA) and Multi-User Multiple-Input Multiple-Output (MU-MIMO) to improve the performance of Wi-Fi networks in scenarios with multiple electronic devices accessing the network. Additionally, the 802.11ax protocol introduces Target Wake Time (TWT) technology, which allows the access point (AP) to set a series of time intervals for electronic devices. After waiting for the predetermined time interval, the electronic device is "wake up" and interacts with the control device. In this example, because different electronic devices can interact with the control device after different time intervals, the problem of different electronic devices competing for the channel and data collisions can be avoided. It should be understood that this application briefly describes the methods for avoiding data collisions in the 802.11ax protocol; specific methods can be found in the description of the 802.11ax protocol itself.

[0101] Currently, the 802.11ah RAW protocol introduces a restricted access window (RAW) mechanism. In the RAW mechanism, an access point (AP) can divide multiple electronic devices into several groups and assign a RAW slot to each group. Referring to Figure 3, an AP can divide multiple electronic devices into three groups: A, B, and C, with each group including at least one electronic device. For example, the AP assigns RAW slot A to group A, RAW slot B to group B, and RAW slot C to group C. It should be understood that in Figure 3, RAW A represents RAW slot A, RAW B represents RAW slot B, and RAW C represents RAW slot C. Each RAW slot can include at least one time slot, and the electronic devices in the group can interact with the control device in at least one time slot. Taking RAW slot C as an example, RAW slot C can include time slot 0, time slot 1, ..., time slot N (N+1 time slots in total), and the electronic devices in group C can interact with the control device in these N+1 time slots.

[0102] Additionally, the AP can send a beacon frame at preset intervals. The beacon frame is used to synchronize the time between the AP and multiple electronic devices. The process by which the AP groups electronic devices and allocates RAW slots to each group can be found in the 802.11ah RAW protocol.

[0103] In the RAW mechanism, for electronic devices within a group, each device needs to interact with the control device within the RAW slot allocated to that group by the AP. Within a single RAW slot, multiple electronic devices can compete for the channel to send data to the control device. In this example, because the number of electronic devices in a group is less than the total number of electronic devices, channel contention within a group significantly reduces data collisions compared to a scenario where all electronic devices compete for the channel. For instance, for electronic devices in group A, they can send data back to the control device within RAW slot A. Specifically, within RAW slot A, electronic devices in group A can compete for the channel to send data to the control device.

[0104] Due to cost or compatibility considerations, most electronic devices deployed in homes, schools, factories, hospitals, and other similar settings do not support the 802.11ax or 802.11ah protocols. Therefore, these devices cannot use the aforementioned methods to avoid data collisions. Currently, most electronic devices deployed in homes, schools, factories, hospitals, and similar settings employ Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) to avoid data collisions. Referring to Figure 4, the CSMA / CA process may include:

[0105] 1) The transmitting end listens to the channel. If the channel is idle for a period of time, the transmitting end can randomly back off for a time T1 before sending data. It should be understood that while the transmitting end is sending data, other transmitting ends will detect that the channel is busy and will not send data to the receiving end on the channel, thus avoiding data collisions. In some embodiments, the period of time can be understood as the distributed inter-frame space (DIFS), the point coordination function inter-frame space (PIFS), or the short inter-frame space (SIFS).

[0106] 2) After receiving data from the sender, the receiver can send an acknowledgment character (ACK) back to the sender. ACK is used to indicate that the receiver has successfully received the data.

[0107] 3) When the sending end receives an ACK from the receiving end, it can be confirmed that the data transmission was successful.

[0108] Taking a scenario where a control device controls the lighting of multiple lights as an example, the control device can be considered the transmitter, and the electronic devices can be considered the receivers. The control device can send a first downlink data to the first electronic device (such as light 1) via an access point (AP), which can be an enable command. The control device can then send a second downlink data to the second electronic device (such as light 2), which can also be an enable command. This process continues, allowing the control device to send downlink data to each electronic device (light) in a time-sharing manner.

[0109] In response to an on command, the first electronic device (e.g., lamp 1) can send an ACK to the control device via the AP and turn on. Upon receiving the ACK from the first electronic device, the control device can determine that the first electronic device has received the first downlink data. Similarly, in response to an on command, the second electronic device (e.g., lamp 2) can send an ACK to the control device via the AP and turn on. And so on, when an electronic device (lamp) receives downlink data, it can send an ACK to the control device and turn on.

[0110] On the one hand, the control device currently uses unicast to send downlink data to the electronic devices. The time interval between two downlink data transmissions is n ms, and the downlink data transmission also causes increased latency. This results in a long time interval between different electronic devices receiving the corresponding downlink data. For example, n can be 4. In response to the downlink data, the electronic devices send an ACK to the control device. However, because the time interval between different electronic devices receiving their respective downlink data is long, the ACK feedback time interval between electronic devices becomes long.

[0111] For example, taking multiple electronic devices that are all lights, the control device first sends an "on" command 1 to light 1. In response to this "on" command 1, light 1 can send an ACK back to the control device, and light 1 lights up. After sending the "on" command 1 to light 1, the control device can send an "on" command 2 to light 2 after an interval of n ms. In response to this "on" command 2, light 2 can send an ACK back to the control device, and light 2 lights up. Because the time interval between sending the "on" command 1 and the "on" command 2 is n ms, and because of downlink data transmission delays and other issues, light 2 lights up at least n ms later than light 1.

[0112] In real-world applications, more electronic devices are deployed. If these devices respond to downlink data from the control device in the same way as described above, the response time between devices will be large, resulting in a poor user experience. For example, in a home scenario, there are 16 lights, designated as light 1, light 2, ..., light 16. If the control device sends the turn-on command sequentially for lights 1 through 16, light 1 will turn on first, light 2 will turn on n ms later, and so on, with subsequent lights turning on much later.

[0113] On the other hand, if the sending end does not receive an ACK from the receiving end, it can be determined that the data transmission has failed, and the sending end can retransmit the data. For example, if the control device does not receive an ACK from the first electronic device (such as lamp 1), the control device can resend the open command to the first electronic device (such as lamp 1). Additionally, other sending ends can execute a random backoff algorithm; for example, other sending ends can randomly backoff for a longer time T2 before sending data, where T2 is greater than T1.

[0114] Currently, in CSMA / CA, when more than five electronic devices simultaneously vie for the channel, the probability of data collisions increases, leading to increased packet transmission latency. For example, in a home scenario with 16 lights, if all 16 lights simultaneously vie for the channel, the probability of data collisions increases. Furthermore, if the control device repeatedly executes the random backoff algorithm but still fails to send data successfully, it will cause data retransmission, significantly reducing channel throughput.

[0115] Furthermore, hidden devices also increase the probability of data collisions. For example, in CSMA / CA as described above, electronic devices can monitor whether a channel is idle. In some embodiments, hidden devices exist. In scenarios with hidden devices, other electronic devices cannot detect whether the hidden device is occupying the channel to transmit data. Therefore, when a hidden device occupies a channel to transmit data, because other electronic devices cannot detect whether the hidden device is occupying the channel to transmit data, other electronic devices can preemptively occupy the channel to transmit data, which will also cause data collisions.

[0116] Currently, in home environments, the increasing number of electronic devices, which often use CSMA / CA for communication, increases the probability of multiple devices simultaneously vying for the same channel. This leads to a sharp rise in data collision probability, resulting in increased data transmission latency and decreased channel throughput. For example, this can manifest as video stuttering, network latency, or even Wi-Fi disconnections.

[0117] Furthermore, taking a scenario where a control device controls the lighting of multiple lights as an example, if the control device sends downlink data to an electronic device but does not receive an ACK from that electronic device, the control device can either resend the downlink data or stop sending downlink data. Resending downlink data delays the time it takes for the electronic device to receive the data, causing a response delay, such as some lights turning on first and others later. Stopping downlink data causes the electronic device to become unresponsive, such as some lights not turning on. Therefore, both resending and stopping downlink data transmission negatively impact the user experience.

[0118] In summary, the following problems exist in scenarios where control devices interact with data from multiple electronic devices:

[0119] 1) Due to the long response time between multiple electronic devices based on downlink data from the control device, the user experience is poor. For example, some lights turn on first, while others turn on only after a considerable interval.

[0120] 2) With the increase in electronic devices, the adoption of CSMA / CA by these devices increases the probability of simultaneous channel contention, which also increases the probability of data collisions. For example, the probability of collisions between ACKs from multiple LED feedback signals increases.

[0121] In this application embodiment, problem 1) is discussed as the primary problem and problem 2) as a secondary problem. This application embodiment provides a communication method in which, after receiving a control message from a control device, the AP can instruct electronic devices to synchronously send back acknowledgment messages, thereby reducing the response time interval between multiple electronic devices. Furthermore, to avoid channel contention among multiple electronic devices, the AP can group the electronic devices, allowing the AP to instruct the electronic devices in each group to send back acknowledgment messages in specific time slots. On one hand, the smaller time slot intervals between different electronic devices reduce the response time interval between multiple electronic devices, improving user experience. On the other hand, different electronic devices can send back acknowledgment messages in the time slots allocated to their groups by the AP. Since the time slots for electronic devices in different groups are different, this reduces the probability of channel contention and data collisions.

[0122] In addition, this application also provides a method for AP to dynamically group multiple electronic devices, which can be more adapted to the channel state and improve the data transmission success rate. For details, please refer to the description in the following embodiments.

[0123] It is understood that in some embodiments, the acknowledgment message may be an ACK or other type of acknowledgment message, as described in the following embodiments. The acknowledgment message is used to indicate that the electronic device has received a control message from the control device.

[0124] Figure 5 is a schematic diagram of a scenario where multiple electronic devices are deployed. Figure 5 uses a home scenario as an example, which may include: control devices, access points (APs), and multiple electronic devices. Specifically, Figure 5 uses examples of multiple electronic devices such as mobile phones, televisions, air conditioners, refrigerators, lights, and cameras.

[0125] In some embodiments, in practical applications within a home setting, users can control home appliances such as televisions, air conditioners, refrigerators, lights, and cameras through an operating control device. However, for terminal devices such as mobile phones and tablets, users do not need to control them through the operating control device. Therefore, in this embodiment, home appliances such as televisions, air conditioners, refrigerators, lights, and cameras can be classified as first-type electronic devices, and terminal devices such as mobile phones and tablets can be classified as second-type electronic devices. In some embodiments, terminal devices such as mobile phones and tablets can be classified as non-first-type electronic devices.

[0126] In some embodiments, to facilitate the AP's identification of different types of electronic devices, after an electronic device connects to the AP, the AP can detect the traffic of the electronic device within a second preset time period to determine whether the electronic device is a first type or a second type. Since mobile phones, tablets, and other terminal devices are frequently used and therefore have high traffic volumes, in some embodiments, when the traffic of the electronic device within the second preset time period is less than or equal to a traffic threshold, the AP can determine that the electronic device is a first type. When the traffic of the electronic device within the second preset time period is greater than the traffic threshold, the AP can determine that the electronic device is a second type.

[0127] The traffic of electronic devices can include uplink traffic and / or downlink traffic. Uplink traffic can be understood as the traffic corresponding to the data sent by the electronic device to the access point (AP), and downlink traffic can be understood as the traffic corresponding to the data sent by the AP to the electronic device.

[0128] In some embodiments, during or after an electronic device connects to an access point (AP), the electronic device may send device information to the AP, including the device type. The AP can then use this device type to determine whether the electronic device is a first type or a second type.

[0129] In some embodiments, the AP and the electronic device can interact by sending and receiving private frames to implement the communication method in the embodiments of this application. "Sending and receiving private frames" requires the electronic device to support the function of sending and receiving private frames, or requires the electronic device to support software modification, so that the electronic device can support the function of sending and receiving private frames. In some embodiments, "the electronic device supporting the function of sending and receiving private frames or supporting software modification" can be referred to as: the electronic device supports preset functions. For example, preset functions can be understood as the function of sending and receiving private frames or the function that supports software modification.

[0130] In one possible scenario, all home appliances in a home environment can support preset functions. In another possible scenario, some home appliances in a home environment can support preset functions.

[0131] In some embodiments, an electronic device that supports a preset function in the first type of electronic device may be referred to as the target electronic device in the first type of electronic device, and an electronic device that does not support the preset function in the first type of electronic device may be referred to as the non-target electronic device in the first type of electronic device.

[0132] In some embodiments, during or after a target electronic device connects to an access point (AP), the target electronic device may send a feature frame to the AP. This feature frame is a proprietary frame. In response to the feature frame, the AP can determine that the electronic device supports preset functions, and thus determine that the electronic device is the target electronic device.

[0133] In some embodiments, feature frames may be sent separately or carried in messages reported by electronic devices to the AP; this application does not impose any restrictions on this.

[0134] It should be understood that the above definitions of the first type of electronic device, the second type of electronic device, and the target electronic device are merely examples. In practical application scenarios, the first type of electronic device, the second type of electronic device, and the target electronic device can be redefined. In some embodiments, for example, if a user needs to control all electronic devices in a home environment through a control device, then mobile phones, tablets, televisions, air conditioners, refrigerators, lights, cameras, etc., can all be considered as the same type of electronic device, and can be referred to as the target electronic device.

[0135] In some embodiments, for example, the interaction between the AP and the electronic device is not conducted using private frames, but rather using broadcast or other non-private frames. In this case, for the first type of electronic device, there is no distinction between the target electronic device and the non-target electronic device.

[0136] It should be understood that the following embodiments use "distinguishing between a first type of electronic device, a second type of electronic device, and distinguishing between a target electronic device and a non-target electronic device in the first type of electronic device" as an example to introduce the communication method of the embodiments of this application.

[0137] The communication method provided in this application will be described below with reference to specific embodiments. These embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0138] Figure 6 is a flowchart illustrating one embodiment of the communication method provided in this application. It should be understood that Figure 6 depicts the process of time synchronization between the electronic device and the access point (AP).

[0139] Referring to Figure 6, the communication method provided in this embodiment may include:

[0140] S601, the electronic device sends function information to the AP.

[0141] Functional information is used to indicate that an electronic device supports preset functions. It should be understood that, in some embodiments, for electronic devices that support preset functions, the electronic device may send functional information to the AP during or after accessing the AP. For example, the functional information may be a private frame, or it may be carried in any message reported by the electronic device to the AP.

[0142] It should be understood that S601 can be executed for each electronic device that supports the preset function (i.e., the target electronic device).

[0143] It should be understood that Figure 6 uses multiple electronic devices supporting preset functions, including a first electronic device and a second electronic device, as an example. Referring to Figure 6, the first electronic device can send function information to the AP, and the second electronic device can also send function information to the AP.

[0144] S602, AP broadcasts synchronization information, which includes the AP's current second moment.

[0145] In this embodiment, the AP can use a broadcast method to achieve time synchronization between the AP and multiple electronic devices. It should be understood that time synchronization between the AP and multiple electronic devices provides a basis for multiple electronic devices to simultaneously respond to control messages from the control device.

[0146] In some embodiments, the AP may periodically broadcast synchronization information. The synchronization information includes the AP's current second moment.

[0147] In some embodiments, the AP can use private frames to periodically broadcast AP synchronization information. These private frames may include the AP's current second time. For example, taking a User Datagram Protocol (UDP) data frame as the private frame, the synchronization information format can be as shown in Figure 7A. Referring to Figure 7A, the UDP data frame may include a local timestamp, which is the AP's current second time. Additionally, the UDP data frame may also include MAC header, IP header, UDP header, and other information.

[0148] In some embodiments, the UDP header includes source port information and destination port information. In some embodiments, the source port and destination port can be ports negotiated between the AP and the electronic device. Alternatively, the source port can be a port in the AP, and the destination port can be a port negotiated between the AP and the electronic device.

[0149] S603, in response to the synchronization information, the first electronic device maps the second time to the current third time of the first electronic device.

[0150] The purpose of mapping the second time point to the current third time point of the first electronic device is that the electronic device can determine the time error between the AP and the first electronic device, so that the time point of the AP can be determined based on the time point of the first electronic device.

[0151] S604, in response to the synchronization information, the second electronic device maps the second time to the current fourth time of the second electronic device.

[0152] S604 can be referred to the description in S603.

[0153] Figure 8 illustrates a time synchronization method between an access point (AP) and multiple electronic devices. Referring to Figure 8, the AP can periodically broadcast synchronization information. This information can include the AP's current second time, and the time of electronic devices 1, 2, ..., N. Upon receiving the synchronization information, electronic device N can map the AP's second time to its own time. For example, let the AP's current second time be t. ap1 For example, when electronic device 1 receives synchronization information, it can... ap1 Mapped to the current time t of electronic device 1 sta1 Similarly, when electronic device 2 receives the synchronization information, it can... ap1 Mapped to the current time t of electronic device 1 sta2 Similarly, when electronic device N receives synchronization information, it can... ap1 Mapped to the current time t of electronic device 1 staN Referring to Figure 8, the period for AP broadcasting synchronization information can be T. After each AP broadcasts synchronization information, each electronic device can map the AP's second time to its own time.

[0154] In this embodiment, on the one hand, the electronic device can send function information to the AP, so that the AP can identify that the electronic device supports preset functions and thus determine that the electronic device is the target electronic device. Accordingly, the AP can use the method in the following embodiments to interact with the target electronic device. On the other hand, in this embodiment, the AP uses a broadcast method to achieve time synchronization between the AP and multiple electronic devices, which is low-cost, does not require consideration of compatibility issues, and is easy to implement.

[0155] Based on the embodiment shown in Figure 6, after an electronic device connects to the AP, the AP can further group multiple electronic devices and allocate a preset time slot to each group. The preset time slot is used for the electronic devices in the group to feed back uplink data (such as acknowledgment messages). In this embodiment, the electronic devices in a group can use CSMA / CA to feed back uplink data (such as acknowledgment messages) within the time slot corresponding to the group. It should be understood that because the AP groups multiple electronic devices, the number of electronic devices in each group is much smaller than the total number of electronic devices. Therefore, using a grouping method can reduce the probability of electronic devices simultaneously occupying the channel and also reduce the probability of data collisions.

[0156] Furthermore, compared to the grouping technology in existing technologies, in this embodiment, the AP can dynamically adjust the groups based on the channel duty cycle, making the groups (e.g., the number of electronic devices in each group) more suitable for the channel quality. For example, when the channel duty cycle is large, less data can be transmitted within a preset time slot. To increase the probability of successful uplink data feedback, a smaller number of electronic devices can be allocated to each group. Thus, with fewer electronic devices carrying a preset time slot, the probability of electronic devices preempting the channel in that preset time slot is low, ensuring successful uplink data feedback.

[0157] Similarly, with a smaller channel duty cycle, more data can be transmitted within a preset time slot, allowing for the allocation of a larger number of electronic devices in each group. Thus, by carrying a larger number of electronic devices within a preset time slot, the smaller channel duty cycle also ensures successful uplink data feedback.

[0158] In some embodiments, a preset time slot can be understood as a period of time with a fixed duration.

[0159] Referring to Figure 9, the communication method provided in this embodiment may include:

[0160] S901, the AP periodically detects the traffic of electronic devices within a second preset time period.

[0161] S902, when the traffic of the electronic device is less than or equal to the traffic threshold within the second preset time period, the AP determines that the first electronic device is an electronic device of the first type.

[0162] S903, when the traffic of the electronic device exceeds the traffic threshold within the second preset time period, the AP determines that the electronic device is a second type of electronic device.

[0163] For the first type of electronic device, the AP can perform the following steps:

[0164] S904, when functional information from an electronic device has been received, the AP determines that the electronic device is the target electronic device in the first type of electronic device.

[0165] S905, when no functional information is received from the electronic device, the AP determines that the electronic device is a non-target electronic device in the first type of electronic devices.

[0166] In this application embodiment, the AP can use different methods to interact with the electronic device for the second type of electronic device and for the target electronic device and non-target electronic device in the first type of electronic device.

[0167] The interaction process between the AP and the target electronic device is described below. It should be understood that the following embodiments use the example of a first electronic device and a second electronic device as the target electronic device. Referring to FIG10, the communication method provided in the embodiments of this application may include:

[0168] S1001, AP groups the first electronic device and the second electronic device in the same group, which is the first group.

[0169] It should be understood that the electronic device involved in the embodiment of FIG10 can be regarded as the target electronic device.

[0170] In some embodiments, for example, the number of electronic devices carried in each group can be preset, such as a predefined number. The AP can group multiple electronic devices according to the number of electronic devices and the preset number. For example, if the preset number is 3 and the number of electronic devices is 11, the AP can divide the electronic devices into four groups. Three groups each carry 3 electronic devices, and one group carries 2 electronic devices.

[0171] In some embodiments, the AP can dynamically group multiple electronic devices based on the channel duty cycle. Due to factors such as co-channel and / or adjacent-channel interference between multiple Wi-Fi networks, the channel duty cycle can increase. A larger channel duty cycle increases the probability of data transmission collisions within the same time slot. Specifically, a larger channel duty cycle indicates a busier or more interfered channel, resulting in less data that can be transmitted within the same time slot and a higher probability of data collisions. Conversely, a smaller channel duty cycle indicates a less busy channel, resulting in more data that can be transmitted within the same time slot and a lower probability of data collisions.

[0172] In this embodiment, a first duty cycle threshold can be preset. For example, when the channel duty cycle is greater than or equal to the first duty cycle threshold, the AP can configure a group to carry K1 electronic devices; when the channel duty cycle is less than the first duty cycle threshold, the AP can configure a group to carry K2 electronic devices. Here, K1 is less than K2. In some embodiments, K1 can be 8 and K2 can be 16; this embodiment does not impose such limitations.

[0173] In this example, the channel duty cycle and the mapping relationship between the channel duty cycle and the number of electronic devices carried in a group can be preset. This mapping relationship can be a formula or a curve, etc. For example, the AP can determine the number of electronic devices carried in a group based on the channel duty cycle and this mapping relationship.

[0174] In this embodiment, the AP can dynamically group multiple electronic devices according to the channel duty cycle, making the grouping more adaptable to the channel conditions and improving the data transmission success rate. Furthermore, since the number of electronic devices in each group is much smaller than the total number of electronic devices, the probability of electronic devices preempting the channel and the probability of data collisions can be reduced.

[0175] In some embodiments, the first electronic device and the second electronic device may be in different groups. The following embodiments use the example of the first electronic device and the second electronic device being in the same group. For example, the AP can group the first electronic device and the second electronic device into one group based on the channel duty cycle; this group can be referred to as the first group.

[0176] S1002, AP allocates the first time slot to the first group.

[0177] The first time slot is the preset time slot.

[0178] It's conceivable that when the AP further divides electronic devices into second groups, third groups, etc., the AP can also allocate time slots to the second and third groups. For example, if the AP further divides electronic devices into a second group, which includes a third electronic device, the AP can allocate a second time slot (a preset time slot) to the second group.

[0179] In some embodiments, the first time slot and the second time slot are adjacent. In some embodiments, the second time slot may be later than the first time slot, or the second time slot may be earlier than the first time slot. The embodiments of this application do not limit the order of the first time slot and the second time slot.

[0180] In some embodiments, the durations of the first time slot and the second time slot are equal, for example, both are 4ms.

[0181] It should be understood that the first time slot allocated by the AP to the first group is used for the first electronic device and the second electronic device in the first group to respond to control messages from the control device. For example, the first electronic device and the second electronic device can use CSMA / CA to send uplink data (such as acknowledgment messages) back to the control device in the first time slot.

[0182] In some embodiments, the AP can determine the feedback period of the electronic devices based on the number of packets, the preset time slot for each group, and a second preset duration. The feedback period can be understood as the period during which multiple electronic devices respond to a first control message from the control device. The AP can calculate the feedback period of the electronic devices based on "second preset duration + number of packets × preset time slot for each group". It is understood that when the channel duty cycle is high, the number of electronic devices carried in each group is small, and the number of packets is large, therefore the feedback period of the electronic devices is long. For example, the time it takes for multiple lights to be on is long. Conversely, when the channel duty cycle is low, the number of electronic devices carried in each group is large, and the number of packets is small, therefore the feedback period of the electronic devices is short. For example, the time it takes for multiple lights to be on is short.

[0183] S1003, AP broadcast packet information.

[0184] In some embodiments, after the AP groups multiple electronic devices and assigns a preset time slot to each group, the AP can broadcast grouping information. The grouping information may include: the electronic devices included in each group, and the time slot allocated to each group. Upon receiving the broadcast information, the electronic device can determine the time slot allocated to its group by the AP, and the electronic device can then send uplink data (such as an acknowledgment message) back to the control device in the corresponding time slot. In some embodiments, "the time slot allocated to each group" may be referred to as "the time slot corresponding to each group".

[0185] In some embodiments, the period during which the AP detects the traffic of the electronic devices can be the same as or different from the period during which the AP broadcasts synchronization information. When the period during which the AP detects the traffic of the electronic devices is different from the period during which the AP broadcasts synchronization information, the packet information can be sent independently of the synchronization information. Conversely, when the period during which the AP detects the traffic of the electronic devices is the same as the period during which the AP broadcasts synchronization information, the packet information can be sent simultaneously with the synchronization information.

[0186] For example, packet information can be carried in synchronization information. In this example, synchronization information may include: the current second time of the AP, the electronic devices included in each group, and the preset time slots allocated by the AP to each group, as shown in Figure 7B. In the case where "packet information is carried in synchronization information," S901-S905 and S1001-S1002 can be executed before S602.

[0187] In summary, in this example, after an electronic device connects to the AP, the AP can determine the type of the electronic device and periodically group multiple electronic devices (target electronic devices), allocating a preset time slot to each group. The AP can broadcast synchronization information, which may include: the AP's current second time, the electronic devices included in each group, and the time slot allocated by the AP to each electronic device in each group. In this example, after receiving the synchronization information, the electronic device can not only synchronize its time with the AP but also determine the time slot for feeding back its uplink data.

[0188] As described above in S601-S604, the process of synchronizing the AP with multiple electronic devices is as follows. S901-S905 and S1001-S1003 describe the process of the AP grouping multiple electronic devices and allocating preset time slots to each group. The following describes the process of the control device sending control messages to electronic devices through the AP, and the electronic devices responding with uplink data (such as acknowledgment messages):

[0189] In some embodiments, after S1003, the following steps may be performed:

[0190] S1004, the control device sends the first control message to the AP.

[0191] In this embodiment of the application, the control device can use unicast to send control messages to each electronic device in a time-division manner. Taking the control device sending a control message to the first electronic device as an example, this control message can be referred to as the first control message.

[0192] It should be noted that the control device can send multiple different control messages to the electronic devices. Taking multiple electronic devices as examples, where each device is a light, the control messages might include commands to turn on the lights or adjust their colors. For instance, if the multiple electronic devices include eight lights, the control device can use unicast to send turn-on commands to each of the eight lights sequentially. Furthermore, once all eight lights are on, the control device can also use unicast to send commands to adjust their colors sequentially to each of the eight lights.

[0193] In some embodiments, the opening instructions sent by the control device to multiple electronic devices can be considered as a set of control messages. For example, eight opening instructions can be considered as a set of control messages. Similarly, eight instructions to adjust the color of a light can be considered as a set of control messages.

[0194] In this embodiment, the control device can send a first control message to the access point (AP). Correspondingly, the AP can receive the first control message from the control device. In some embodiments, the AP can determine whether the received control messages are the same set of control messages based on the time interval between two consecutive received control messages.

[0195] In some embodiments, a first preset duration can be preset to identify the same set of control messages. For example, the first preset duration can be 200ms.

[0196] Specifically, if the time interval between two consecutive control messages received by the AP is less than a first preset duration, such as 8ms, the AP determines that the two control messages belong to the same set of control messages. For example, if the control device sends an open command to eight electronic devices sequentially, and the time interval between two consecutive open commands is less than the first preset duration, then the AP can determine that the two open commands belong to the same set of control messages.

[0197] Specifically, when the time interval between two consecutive control messages received by the AP is greater than or equal to a first preset duration, such as 200ms, the AP determines that the two control messages belong to different groups of control messages. For example, if the control device sends the last "on" command and the first command to adjust the light's color, because these two control messages belong to different groups of control messages, the time interval between sending the "on" command and the command to adjust the light's color is greater than or equal to 200ms. Accordingly, the AP can determine that the two consecutively received control messages belong to different groups of control messages, and the AP can determine that the latter received control message is the first control message in a new group of control messages. For example, the AP can determine that the latter received control message is the first command to adjust the light's color.

[0198] For example, before receiving the first control message (such as an instruction to adjust the color of a light), the AP also receives a seventh control message (such as an instruction to turn on) from the control device, and the time interval between the AP receiving the first control message and receiving the seventh control message is greater than or equal to a first preset duration. The AP can determine that the first control message is the first control message in a new set of control messages.

[0199] In this embodiment of the application, taking the first control message as the first control message in a new group (such as the first group) as an example, when the AP determines that the first control message is the first control message in the new group, the AP can recalculate the time when multiple electronic devices respond to the control message of the new group (such as the new first moment), so that the electronic devices in the group can all perform the action indicated by the control message at that moment and feed back the confirmation message in the corresponding time slot, so as to achieve the purpose of small time interval between different electronic devices responding to the control message.

[0200] S1005, the AP sends a second control message to the first electronic device.

[0201] In some embodiments, the AP can encapsulate a first moment in a first control message to obtain a second control message, and send the second control message to a first electronic device. The second control message includes the first moment, which is the moment when multiple electronic devices execute the action indicated by the control message, and the first moment is the moment when the multiple electronic devices begin to send back confirmation messages. In some embodiments, the first moment is the local moment of the AP.

[0202] For example, the second control message can be shown in Figure 11. Referring to Figure 11, the first control message may include a MAC header, an IP header, and a data portion. In this embodiment, the AP can encapsulate the first moment in the first control message. For example, the AP can use logical link control (LLC) encapsulation to encapsulate the first moment in the first control message. The second control message adds the first moment to the first control message compared to the first control message.

[0203] In some embodiments, the AP may further encapsulate a preset identifier into the first control message, and correspondingly, the second control message may include the preset identifier. The preset identifier is used to indicate that the control message is trustworthy. Compared to the first control message, the second control message adds a first moment and the preset identifier.

[0204] The method for AP to determine the first moment is described below:

[0205] Method 1:

[0206] In some embodiments, a first duration can be preset. The first duration can be an empirical value, calculated based on "the maximum number of electronic devices carried in a group, a preset time slot, and the time slot interval". For example, if the maximum number of electronic devices carried in a group is M, the preset time slot is t1, and the time slot interval between two adjacent groups is t2, then the AP can calculate "M×t1+(M-1)×t2", and the AP can set the first duration to be greater than or equal to this value "M×t1+(M-1)×t2".

[0207] In this embodiment, the AP can determine the first moment based on the time when it receives the first control message and the first duration. For example, if the time when the AP receives the first control message is T, then the first moment can be "T+M×t1+(M-1)×t2".

[0208] Method 2:

[0209] Because the preset first duration is calculated based on the "maximum number of electronic devices in a group," this first duration is typically large. In some embodiments, the AP can determine the first duration based on the channel duty cycle. For example, a second duty cycle threshold can be preset, which may be the same as or different from the first duty cycle threshold.

[0210] In some embodiments, for example, when the channel duty cycle is less than or equal to a second duty cycle threshold, the AP can determine the first duration as T3, and when the channel duty cycle is greater than the second duty cycle threshold, the AP can determine the first duration as T4. Wherein, T4 is greater than T3. For example, T3 is 200ms, and T4 is 400ms. It should be understood that the larger the channel duty cycle, the less bandwidth is available for data transmission, the less bandwidth is available for transmitting control messages on the channel, and the longer it takes to transmit the same number of control messages, resulting in a longer time for electronic devices in the same group to receive control messages. Therefore, to ensure that electronic devices in the same group all receive control messages, a larger channel duty cycle allows for a larger first duration.

[0211] In this embodiment, the AP can determine the first moment based on the time when it receives the first control message and the first duration. For example, if the time when the AP receives the first control message is T, then the first moment can be "T+200ms" or "T+400ms".

[0212] S1006, the first electronic device determines the fifth time corresponding to the first time based on the time mapping with the AP.

[0213] Referring to the description in Figure 6, the first electronic device has already synchronized its time with the AP. When the first electronic device receives the second control message, it can parse and obtain the first time. Because this first time is the AP's local time, the first electronic device can determine its local fifth time corresponding to the first time based on the time mapping with the AP.

[0214] S1007, the control device sends a third control message to the AP.

[0215] Correspondingly, the AP receives a third control message from the control device.

[0216] S1008, the AP sends a fourth control message to the second electronic device.

[0217] S1007-S1008 can be referred to the descriptions in S1004-S1005.

[0218] The fourth control message includes a first moment, which can be referred to in the description in the above embodiments.

[0219] S1009, the second electronic device determines the sixth time corresponding to the first time according to the time mapping with the AP.

[0220] Referring to the description in Figure 6, the second electronic device has already synchronized its time with the AP. When the second electronic device receives the fourth control message, it can parse the first time in the message. Because this first time is the AP's local time, the second electronic device can determine its local sixth time based on the time mapping with the AP.

[0221] It should be understood that the fifth moment local to the first electronic device, the sixth moment local to the second electronic device, and the first moment are all the same moment.

[0222] S1010, the first electronic device executes the action indicated by the second control message at the fifth time and feeds back the second confirmation message in the first time slot.

[0223] In some embodiments, the first time slot does not include the first moment.

[0224] For example, taking the first electronic device as lamp 1 and the second control message as the turn-on command, lamp 1 can execute the action indicated by the turn-on command at the fifth time slot, that is, turn on, and the first electronic device can send a second confirmation message to the AP in the first time slot. It should be understood that the electronic device can respond to different control messages in different ways. For example, taking a lamp as an example, the way the electronic device responds to the control message may include: sending a confirmation message to the control device, and executing the action indicated by the control message, such as turning on, adjusting the color of the lamp, etc.

[0225] In some embodiments, in response to a second confirmation message from the first electronic device, the AP may forward the second confirmation message from the first electronic device to the control device.

[0226] In some embodiments, the second confirmation message may be an ACK.

[0227] In some embodiments, the second acknowledgment message may be a data packet. For example, taking a TCP data packet as an example, the TCP data packet may include a TCP header and information indicating that the first electronic device has received the second control message.

[0228] S1011, the second electronic device executes the action indicated by the fourth control message at the sixth time and feeds back the third confirmation message in the first time slot.

[0229] For example, taking the second electronic device as lamp 2 and the fourth control message as the turn-on command, lamp 2 can be turned on at the sixth moment, and the second electronic device can send a third confirmation message to the AP in the first time slot.

[0230] In some embodiments, in response to a third acknowledgment message from a second electronic device, the AP may forward the third acknowledgment message from the second electronic device to the control device.

[0231] It is understandable that the first electronic device and the second electronic device can execute the action indicated by the control message at the same time, and in the same preset time slot (such as the first time slot), they can use the CSMA / CA method to send back confirmation messages.

[0232] Figure 12A illustrates a timing diagram of the AP, a first electronic device, and a second electronic device. Referring to Figure 12A, for example, the AP receives the first control message at 1000ms. This 1000ms is mapped to 6000ms for the first electronic device and 7000ms for the second electronic device. Both the second and fourth control messages carry a first time, for example, 1100ms locally at the AP. The first electronic device can map this first time to 6100ms locally at the first electronic device and 7100ms locally at the second electronic device.

[0233] Taking an example where both the second and fourth control messages are open commands, the first electronic device can light up at its local 6100ms and send a second confirmation message to the AP in the first time slot. The second electronic device can light up at its local 7100ms and send a third confirmation message to the AP in the first time slot. It should be noted that the local 6100ms for the first electronic device and the local 7100ms for the second electronic device are the same time in absolute time. It should also be noted that the first electronic device can light up at the same time and send confirmation messages in the first time slot.

[0234] Figure 12B illustrates the timing diagram of message transmission and reception between the AP, the first electronic device, and the second electronic device. Referring to Figure 12B, the AP receives the Kth group of control messages from the control device, for example, all of which are turn-on commands. For instance, the Kth group of control messages may include a first control message and a third control message. Upon receiving the first control message, the AP can send a second control message to the first electronic device; upon receiving the third control message, the AP can send a fourth control message to the second electronic device. Because both the second and fourth control messages carry a first timeframe, the first and second electronic devices in the first group can be turned on at the first timeframe, and both devices can send confirmation messages to the AP in the first time slot.

[0235] It is conceivable that the Kth group of control messages may include the fifth control message. Upon receiving the fifth control message, the AP can send a sixth control message to the third electronic device, which includes the first time slot. Therefore, the third electronic device in the second group can light up at the first time slot and send a confirmation message back to the AP in the second time slot.

[0236] Similarly, for groups of more electronic devices, for example, the electronic devices in the third group can light up at the first moment and send an acknowledgment message to the AP in time slot 3. The electronic devices in the fourth group can light up at the first moment and send an acknowledgment message to the AP in time slot 4.

[0237] It should be understood that in this embodiment, electronic devices in different groups can execute the actions indicated by the control message (such as turning on a light) at the same time, giving users the feeling that multiple electronic devices are responding simultaneously, thus improving the user experience. Furthermore, electronic devices in different groups send acknowledgment messages to the AP in different time slots, which can avoid electronic devices in different groups competing for the channel and reduce the probability of data collisions. Additionally, electronic devices in a group can use CSMA / CA in the time slot corresponding to the group to send uplink data (such as acknowledgment messages). Because the number of electronic devices in the same group is much smaller than the total number of electronic devices, this also reduces the probability of electronic devices simultaneously competing for the channel and the probability of data collisions.

[0238] Similarly, the AP receives the (K+1)th group of control messages from the control device. For example, all the (K+1)th group of control messages are instructions to adjust the color of the lights. When sending control messages to the electronic devices in each group, the AP can include the first moment in the control message. In this way, the electronic devices in each group can adjust the color of the lights at the first moment and send a confirmation message back to the AP in the corresponding time slot of the group.

[0239] Figure 12C illustrates the differences between the prior art and the technical solution of this application. Multiple electronic devices can be, for example, 12 lights, with group 1 including 6 lights and group 2 including 6 lights. Referring to Figure 12Ca, the prior art is illustrated. In the prior art, the control device uses unicast to send an on command to each light sequentially via the AP. The AP receives an on command and can send the control message to a light; correspondingly, the light can respond to the control message and turn on. Referring to Figure 12Ca, the 12 lights respond sequentially, with a long response time interval between lights, for example, the response time between the first and second lights is greater than 50ms.

[0240] Figure 12Cb illustrates the technical solution of this application. Taking the AP as an example, multiple electronic devices are divided into group 1 and group 2. Group 1 includes 6 lights (e.g., lights 1-6), and group 2 includes 6 lights (e.g., lights 7-12). The AP allocates time slot 1 to group 1 and time slot 2 to group 2. The control device uses unicast, sending an on command to each light sequentially through the AP. When sending the on command, the AP can include the first moment in the command. Thus, after all 12 lights receive the on command, they can light up at the first moment and provide confirmation messages in the corresponding time slot of the group. For example, the 12 lights can light up simultaneously, with the 6 lights in group 1 providing confirmation messages in time slot 1 and the 6 lights in group 2 providing confirmation messages in time slot 2. Therefore, in this embodiment, the response time interval of the 12 lights can be reduced, and the lighting time interval of the 12 lights can be reduced, allowing the user to perceive that the 12 lights are lit simultaneously, thus improving the user experience.

[0241] In this embodiment, the fifth local time of the first electronic device and the sixth local time of the second electronic device are the same. This allows the first and second electronic devices to start responding to control messages simultaneously. For multiple electronic devices, multiple electronic devices in different groups can execute the actions required by the control messages at the same time, giving the user the feeling of multiple electronic devices responding simultaneously and improving the user experience. Furthermore, electronic devices in different groups can send back confirmation messages in the time slots corresponding to their groups. This reduces the probability of electronic devices simultaneously occupying the channel, reduces the probability of data collisions, and shortens the response time interval between multiple electronic devices, further improving the user experience.

[0242] In the embodiment shown in Figure 10, because the first electronic device and the second electronic device execute the action of the control message at the same time and send back confirmation messages in the first time slot, the AP can forward the confirmation messages from the first electronic device and the second electronic device to the control device. Upon receiving the confirmation messages forwarded by the AP from the first electronic device and the second electronic device, the control device can determine that the first electronic device and the second electronic device have successfully received the control message. However, in this example, because multiple electronic devices delay sending confirmation messages until the first time slot after receiving the control message, the confirmation message is sent late, causing the control device to time out upon receiving the confirmation message. This results in the control device retransmitting the control message, causing a timeout retransmission problem.

[0243] To avoid timeout retransmission issues, in this embodiment, after sending a control message to the electronic device, the AP does not need to wait for an ACK from the electronic device and can send a confirmation message to the control device in advance. Referring to Figure 13, after S1005, the AP can execute S1005A:

[0244] S1005A, the AP sends the first confirmation message to the control device.

[0245] It should be understood that the first confirmation message comes earlier than the second confirmation message. In other words, the AP sends the first confirmation message to the control device before the AP receives the second confirmation message from the first electronic device.

[0246] In some embodiments, the formats of the first acknowledgment message and the second acknowledgment message may differ. For example, the first acknowledgment message may be a TCP acknowledgment message, which includes a TCP header but no data payload.

[0247] In this example, when the AP receives a second acknowledgment message from the first electronic device, the AP can execute S1005B: the AP releases the second acknowledgment message without forwarding it to the control device.

[0248] Similarly, after S1008, the AP can execute S1008A:

[0249] S1008A, the AP sends a fourth confirmation message to the control device.

[0250] It should be understood that this fourth confirmation message precedes the third confirmation message, as described in S1005A.

[0251] In this example, when the AP receives a third acknowledgment message from the second electronic device, the AP can execute S1008B: the AP releases the third acknowledgment message without forwarding it to the control device.

[0252] Figure 14 illustrates the transmission process of control and confirmation messages using the first electronic device in the first group as an example. In Figure 14, message 1 represents the first control message, message 2 represents the second control message, message 3 represents the third control message, and message 4 represents the fourth control message. Similarly, confirmation 1 represents the first confirmation message, confirmation 2 represents the second confirmation message, confirmation 3 represents the third confirmation message, and confirmation 4 represents the fourth confirmation message.

[0253] Referring to Figure 14, the control device sends message 1 to the AP. After receiving message 1, the AP can construct acknowledgment 1 and send acknowledgment 1 back to the control device. After receiving message 1, the AP can encapsulate the first time slot in message 1 to obtain message 2. The AP sends message 2 to the first electronic device. The first electronic device can send acknowledgment 2 back to the AP in the first time slot. After receiving acknowledgment 2, the AP can release acknowledgment 2.

[0254] Similarly, the control device sends message 3 to the AP. After receiving message 3, the AP can construct acknowledgment 4 and send acknowledgment 4 back to the control device. After receiving message 3, the AP can encapsulate the first time slot in message 3 to obtain message 4. The AP sends message 4 to the second electronic device, and the second electronic device can send acknowledgment 3 back to the AP in the first time slot. After receiving acknowledgment 3, the AP can release acknowledgment 3. It should be understood that the interaction process between the control device, the AP, and the second electronic device is not shown in Figure 14.

[0255] In this embodiment, after the AP sends a control message to the electronic device, it does not need to wait for an acknowledgment message from the electronic device. It can send an acknowledgment message back to the control device in advance, which can avoid the problem of control message retransmission due to acknowledgment message timeout.

[0256] Referring to the embodiments shown in Figures 13 and 14, the AP can send an acknowledgment message to the control device in advance to avoid timeout retransmission issues. In some embodiments, due to channel quality issues, control messages may be lost, resulting in the electronic device not actually receiving the control message from the AP even though the AP has sent an acknowledgment message to the control device in advance. To address this situation, in this embodiment, the AP can retransmit the control message, which ensures retransmission of the control message, or the AP can instruct the control device to retransmit the control message, simplifying the implementation logic.

[0257] In this embodiment, the AP receives a control message from the control device and can cache the control message. This allows the AP to retransmit the control message if it is lost. In some embodiments, multiple types of electronic devices exist in a real-world scenario. When the AP receives a control message from the control device, it can detect whether the electronic device corresponding to the control message is the target electronic device. If the electronic device corresponding to the control message is the target electronic device, the AP can cache the control message.

[0258] For example, after receiving a first control message, the AP can cache it. Similarly, after receiving a third control message, the AP can cache it. Taking a first electronic device as an example, after sending a second control message to the first electronic device, the AP can construct a first acknowledgment message and send it back to the control device. When the AP receives a second acknowledgment message from the first electronic device, it can release the second acknowledgment message and the cached first control message. If the AP does not receive a second acknowledgment message from the first electronic device, the AP determines that the control message has been lost and can resend the first control message to the first electronic device.

[0259] The above embodiment describes the interaction process between the AP and the target electronic device. The following describes the interaction process between the AP and the non-target electronic device in the first type of electronic device, and the interaction process between the AP and the second type of electronic device.

[0260] 1) The interaction process between the AP and the non-target electronic device in the first type of electronic device.

[0261] Referring to the description in the above embodiments, the AP can determine the type of each electronic device accessing the AP. For example, the fourth electronic device is a non-target electronic device. For the fourth electronic device, the AP can allocate a third time slot, which is later than the first and second time slots. In other words, the third time slot is later than the time slot allocated by the AP for the target electronic device, meaning the AP can allocate the target electronic device to provide feedback first, followed by feedback from the non-target electronic device.

[0262] In this example, when the AP receives a control message from a control device that corresponds to a fourth electronic device, the AP can forward the control message to the fourth electronic device. This control message includes a third time slot. In response to the control message, the fourth electronic device can respond within the third time slot. For example, in a home scenario, the target electronic devices are multiple lights, and the non-target electronic device is an air conditioner. The user triggers the control device to send a control message to the electronic device via the AP. The multiple lights can then be turned on, and after the lights are on, the air conditioner can be turned on.

[0263] 2) The interaction process between the AP and the second type of electronic device

[0264] Referring to the description in the above embodiments, the AP can determine the type of each electronic device accessing the AP. For example, the fifth electronic device is a second-type electronic device. For the fifth electronic device of the second type, which is frequently used by users, in order to ensure the transmission latency of high-priority services such as voice and video in the fifth electronic device, the AP can allocate time slots only for low-priority services in the fifth electronic device. Specifically, when the service performed by the fifth electronic device is a preset service (i.e., a low-priority service), the AP can allocate a fourth time slot for the fifth electronic device, which is later than the first and second time slots. In other words, the fourth time slot is later than the time slot allocated by the AP for the target electronic device, meaning the AP can allocate the target electronic device to provide feedback first, followed by feedback from the second-type electronic device. This application embodiment does not limit the order in which non-target electronic devices and second-type electronic devices provide feedback.

[0265] In this way, although the fourth time slot is later than the first time slot, this service is a low-priority service, and its later execution will not affect the user experience, and the AP can still control the fifth electronic device.

[0266] Figure 15 is a schematic diagram of an interaction between an AP and a target electronic device provided in an embodiment of this application. In Figure 15, the target electronic device is taken as a first electronic device.

[0267] Referring to Figure 15, the AP may include a kernel layer and a MAC layer. In this embodiment, an intermediate layer can be constructed in the AP, which may be located between the kernel layer and the MAC layer, or at either the kernel layer or the MAC layer. Referring to Figure 15, the kernel layer of the AP may include a protocol stack. The intermediate layer may include: a first processing station, a cache station, and a driver.

[0268] Taking the first control message as an example, after the AP's protocol stack receives the first control message from the control device, the first processing station can parse the first control message. The first control message corresponds to the target electronic device, and the caching station can copy the first control message and cache the copied first control message in a window, as shown in Figure 16a. The first processing station can construct a first confirmation message and send the first confirmation message back to the control device. When the first processing station receives a second confirmation message from the first electronic device, the first processing station can release the cached first control message and second confirmation message in the window, as shown in Figure 16b.

[0269] In some embodiments, when the AP does not receive a second acknowledgment message from the first electronic device, the driver can read the first control message from the window and resend the first control message to the first electronic device, as shown in c of Figure 16. Specifically, the AP's MAC layer can be set with a preset timeout. Once the MAC layer fails to receive a second acknowledgment message from the first electronic device, the MAC layer can trigger the driver in the intermediate layer to resend the first control message to the first electronic device.

[0270] Referring to Figure 15, the first electronic device may include a kernel layer, a middleware layer, and a MAC layer. The middleware layer may be located between the kernel layer and the MAC layer of the first electronic device, or within either the kernel layer or the MAC layer. The kernel layer of the first electronic device may include a protocol stack. The middleware layer of the first electronic device may include a second processing station.

[0271] The second processing station is used to parse the second control message from the AP and determine the first moment.

[0272] The second processing station can report a second acknowledgment message to the protocol stack of the first electronic device at a first moment. The protocol stack can instruct the first electronic device to perform the action indicated by the second control message and send the second acknowledgment message back to the AP in the first time slot.

[0273] Similarly, the processing station in the second electronic device can report a third acknowledgment message to the protocol stack of the second electronic device at the first moment. The protocol stack in the second electronic device can instruct the first electronic device to execute the action indicated by the second control message and send the third acknowledgment message back to the AP in the first time slot.

[0274] The embodiments of this application have the same technical principles and effects as the embodiments shown in Figures 13-14 above, and can be referred to the description in the above embodiments.

[0275] In some embodiments, the intermediate layer can be a higher MAC (UMAC) within the MAC layer, where the UMAC supports the implementation of the methods in the embodiments of this application. It should be noted that current APs and electronic devices can deploy time synchronization function (TSF) services and chips that call the TSF service. The AP can call the TSF service deployed in the AP through these chips, and the electronic device can call the TSF service deployed in the electronic device through these chips, thus achieving time synchronization between the AP and the electronic device. However, it should be noted that the chip's medium access control (MAC) layer can be divided into a higher MAC (UMAC) and a lower MAC (LMAC).

[0276] Currently, the LMAC of the chip deploys a TSF timing interface, which allows APs and electronic devices to synchronize time. However, in this embodiment, the APs and electronic devices use UMAC to implement the method provided in this embodiment, without going through the LMAC layer. Therefore, this embodiment provides the AP broadcasting method described in the above embodiments to achieve time synchronization between the AP and multiple electronic devices.

[0277] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0278] In one embodiment, this application also provides a device, which can be the control device, AP, or electronic device described in the above embodiments. Referring to FIG17, the device may include: a processor 1701 (e.g., CPU) and a memory 1702. The memory 1702 may include high-speed random-access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device. The memory 1702 may store various instructions for performing various processing functions and implementing the method steps of this application.

[0279] Optionally, the device involved in this application may further include: a power supply 1703, a communication bus 1704, and a communication port 1705. The communication port 1705 is used to enable communication between the device and other peripherals. In this embodiment, the memory 1702 is used to store computer-executable program code, which includes instructions; when the processor 1701 executes the instructions, the instructions cause the processor 1701 of the device to perform the actions in the above method embodiment, and the implementation principle and technical effect are similar, and will not be repeated here.

[0280] Optionally, the device involved in this application may further include: a display screen 1706. The display screen 1706 is used to display the interface of the device.

[0281] It should be noted that the modules or components described in the above embodiments can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc. Furthermore, when a module is implemented through processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors capable of calling program code, such as a controller. Additionally, these modules can be integrated together to implement a system-on-a-chip (SOC).

[0282] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0283] The term "multiple" in this document refers to two or more. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0284] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.

[0285] It is understood that, in the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

Claims

1. A communication method, characterized in that, Applied to an access point (AP), the method includes: Receive the first control message from the control device; Send a second control message to the first electronic device, the second control message being used to indicate a first moment, the first moment being used to indicate that the first electronic device performs the action indicated by the second control message at the first moment; Receive a third control message from the control device; A fourth control message is sent to the second electronic device, the fourth control message being used to indicate the first time, the first time being used to indicate that the second electronic device performs the action indicated by the fourth control message at the first time.

2. The method according to claim 1, characterized in that, The first electronic device and the second electronic device are in a first group, and the third electronic device is in a second group. The method further includes: Receive the fifth control message from the control device; A sixth control message is sent to a third electronic device, the sixth control message being used to indicate the first time, the first time being used to indicate that the third electronic device performs the action indicated by the sixth control message at the first time.

3. The method according to claim 2, characterized in that, The method further includes: Broadcast group information, wherein the group information is used to indicate that the first group includes the first electronic device and the second electronic device, the second group includes the third electronic device, the first time slot corresponding to the first group, and the second time slot corresponding to the second group; The first moment is also used to indicate the moment when the first electronic device starts to send a confirmation message in the first time slot, the moment when the second electronic device starts to send a confirmation message in the first time slot, and the moment when the third electronic device starts to send a confirmation message in the second time slot.

4. The method according to claim 3, characterized in that, The first control message is the first control message in a set of control messages, where the set of control messages corresponds to the first group and the second group; the method further includes: The first duration is determined based on the channel duty cycle; The first moment is determined based on the time when the first control message is received and the first duration.

5. The method according to claim 4, characterized in that, Before receiving the first control message from the control device, the method further includes: Receive the seventh control message from the control device; The method further includes: When the time interval between receiving the first control message and receiving the seventh control message is greater than or equal to a first preset duration, the first control message is determined to be the first control message in a set of control messages.

6. The method according to any one of claims 1-5, characterized in that, Before sending the second control message to the first electronic device, the method further includes: The first moment is encapsulated in the first control message to obtain the second control message.

7. The method according to claim 3, characterized in that, The method further includes: Based on the channel duty cycle, the first electronic device and the second electronic device are assigned to the first group, and the third electronic device is assigned to the second group.

8. The method according to claim 7, characterized in that, The method further includes: The first time slot is allocated to the first group, and the second time slot is allocated to the second group.

9. The method according to claim 8, characterized in that, The second time slot is later than the first time slot.

10. The method according to claim 8 or 9, characterized in that, The second time slot has the same duration as the first time slot.

11. The method according to any one of claims 7-10, characterized in that, The first electronic device has a traffic flow of less than or equal to a traffic threshold within a second preset time period, and the first electronic device supports a preset function; the second electronic device has a traffic flow of less than or equal to the traffic threshold within the second preset time period, and the second electronic device supports the preset function.

12. The method according to claim 11, characterized in that, The method further includes: When the traffic of the fourth electronic device within the second preset time period is less than or equal to the traffic threshold, and the fourth electronic device does not support the preset function, a third time slot is allocated to the fourth electronic device, and the third time slot is later than the first time slot and the second time slot.

13. The method according to claim 11 or 12, characterized in that, The method further includes: When the traffic of the fifth electronic device within the second preset time period is greater than the traffic threshold, a fourth time slot is allocated to the fifth electronic device, and the fourth time slot is later than the first time slot and the second time slot.

14. The method according to any one of claims 1-11, characterized in that, The method further includes: Broadcast synchronization information, the synchronization information including the AP's current second time, the second time being used for: the first electronic device to map the second time to the first electronic device's current third time, and the second electronic device to map the second time to the second electronic device's current fourth time.

15. The method according to claim 14, characterized in that, The grouping information is carried in the synchronization information.

16. The method according to any one of claims 1-15, characterized in that, After sending the second control message to the first electronic device, the method further includes: Send a first confirmation message to the control device; Receive a second confirmation message from the first electronic device, wherein the first confirmation message is received earlier than the second confirmation message; Release the second confirmation message.

17. The method according to claim 16, characterized in that, After receiving the first control message from the control device, the method further includes: Cache the first control message; After sending the first confirmation message to the control device, the method further includes: If the second confirmation message is not received from the first electronic device, the first control message is resent to the first electronic device.

18. A communication method, characterized in that, Applied to a first electronic device, the method includes: Receive a second control message from the access point (AP), the second control message being used to indicate the first moment; The action indicated by the second control message is executed at the first moment, where the first moment is the moment when the second electronic device executes the action indicated by the fourth control message.

19. The method according to claim 18, characterized in that, The method further includes: Receive packet information broadcast from access point (AP), the packet information being used to indicate that the first group includes the first electronic device and the second electronic device, and the first time slot corresponding to the first group; After receiving the second control message from the access point (AP), the method further includes: Starting at the first moment, a second confirmation message is sent to the AP in the first time slot.

20. The method according to claim 19, characterized in that, The method further includes: Receive synchronization information broadcast from the AP, the synchronization information including the AP's current second time; Map the second time point to the current third time point of the first electronic device.

21. The method according to claim 20, characterized in that, The grouping information is carried in the synchronization information.

22. The method according to any one of claims 18-21, characterized in that, The method further includes: The first electronic device sends function information to the AP, the function information indicating that the first electronic device supports preset functions.

23. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-22.

24. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-22.

25. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-22.

26. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-22.

Citation Information

Patent Citations

  • Control system and method for luminaires

    CN102984868A

  • Simultaneous response method and device

    CN110572799A

  • Equipment control method, equipment controlled method and equipment control system

    CN111176130A

  • Equipment control method and device, electronic equipment and storage medium

    CN114422559A

  • Equipment control method and device, electronic equipment and storage medium

    CN114967485A