Wi-Fi sleep scheduling method, communication system and related device
By sending CTS frames on the Wi-Fi channel for pre-preemption and carrying the end indicator, the problem of the time window of Wi-Fi devices being too long while waiting for sleep is solved, and the effective sleep of the device when there is no data transmission is achieved, reducing power consumption.
Patent Information
- Application Number
- CN202311271627.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
In the existing Wi-Fi protocol, the time window for Wi-Fi devices to wait for entering the dormant state is too long, resulting in the Wi-Fi devices being unable to enter the dormant state when the service packet transmission interval is less than the preset time window, and the power consumption is still high.
By sending CTS frames on the Wi-Fi channel for pre-preemption and carrying an end indicator in the data frame, the device enters a sleep state after the service data transmission is completed.
It effectively reduces power consumption under Wi-Fi service, improves the sleep time of the device when there is no data transmission, and saves battery life.
Smart Images

Figure CN119729714A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a Wi-Fi sleep scheduling method, a communication system, and related devices. Background Art
[0002] In a wireless fidelity (Wi-Fi) system, each Wi-Fi device accesses the channel in a decentralized self-organizing manner. Therefore, the transmission time of data packets on each Wi-Fi connection is random on the air interface. All Wi-Fi devices need to continuously monitor the channel during the service process, and receive and decode each packet transmitted on the air interface to determine whether it is a data packet sent to them. After confirming that the data packet from the other end is sent to them, the Wi-Fi device can enter the sleep state through the sleep mechanism defined in the Wi-Fi protocol to reduce power consumption.
[0003] In the existing Wi-Fi protocol, after the Wi-Fi device sends the last service packet, it waits for a preset time window (for example, 60ms). If no packet is sent to it from the other end within the time window, it is considered that there is no data transmission on the current Wi-Fi connection, and the Wi-Fi device can enter a sleep state. When the next service packet is detected in the Wi-Fi connection, the Wi-Fi device can wake itself up to perform the service. Currently, the time window for Wi-Fi devices to wait for entering the sleep state is too long. In some business scenarios, because the transmission interval of the service packet is less than the preset time window, the Wi-Fi device will not be able to enter the sleep state, and the power consumption of the Wi-Fi device under Wi-Fi services is still very high. Summary of the invention
[0004] The present application provides a Wi-Fi sleep scheduling method, a communication system and related devices, which enable Wi-Fi devices to sleep in the gaps between Wi-Fi services and reduce power consumption under Wi-Fi services.
[0005] In a first aspect, the present application provides a communication system, including a first device and a second device; wherein, after entering an activated state, the first device sends a first clear-to-send CTS frame on a Wi-Fi channel, and the CTS frame is used by the first device to preempt the Wi-Fi channel; the first device sends a first group of data frames to the second device on the Wi-Fi channel, wherein the first group of data frames includes one or more data frames, and the last data frame in the first group of data frames carries a first end indicator, and the first end indicator is used to indicate that the first group of data frames has been sent; after receiving the first group of data frames, the second device sends a first feedback frame to the first device, and the first feedback frame is used to indicate that the second device has received the first group of data frames; after receiving the first feedback frame, the first device enters a sleep state.
[0006] Through a communication system provided by the present application, the first device can use a CTS frame to pre-occupy the Wi-Fi channel before sending service data to the second device, so that the service data can be transmitted immediately after it is generated, reducing latency. When the first device finishes transmitting a group of data frames of service data, it can carry an end indicator in the last data frame of this group of data frames to indicate that the current group of data frames has been transmitted. After receiving the data frame carrying the end indicator, the second device will shake hands with the first device to sleep. In this way, the power consumption of the device can be reduced.
[0007] In a possible implementation, the second device enters the sleep state after sending the first feedback frame, so that the power consumption of the second device can be saved.
[0008] In a possible implementation, after entering the activated state, the first device sends a first clear to send CTS frame on the Wi-Fi channel, specifically including: the first device enters the activated state at the beginning of the first activation time slot, and sends the CTS frame on the Wi-Fi channel; the first device wakes up from the sleep state and enters the activated state at the beginning of the second activation time slot, and sends the CTS frame on the Wi-Fi channel; the first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries There is a second end indicator, the second end indicator is used to indicate that the second group of data frames has been sent. At the beginning of the second activation time slot, the second device is in the activation state and listens to the media access control MAC frame transmitted on the Wi-Fi channel. After the second device listens to the CTS frame on the Wi-Fi channel, it receives the second group of data frames sent by the first device. After receiving the second group of data frames, the second device sends a second feedback frame to the first device, and the second feedback frame is used to indicate that the second device has received the second group of data frames. After receiving the second feedback frame, the first device enters the sleep state. In this way, the first device can also enter sleep when there is no data transmission in the activation time slot to save power consumption of the first device.
[0009] In a possible implementation, the first device enters the activation state at the beginning of the first activation time slot, and before sending the CTS frame on the Wi-Fi channel, the first device negotiates with the second device a working time slot map, where the working time slot map includes the first activation time slot and the second activation time slot. In this way, by negotiating the working time slot map between the first device and the second device, the first device and the second device can align their working time slots, enter the activation state at the beginning of the activation time slot, and perform service transmission.
[0010] In a possible implementation, the working time slot map also includes a first sleep time slot; the first device is in the sleep state in the first sleep time slot. In this way, the first device can also enter the sleep state in the sleep time slot, saving power consumption of the first device.
[0011] In a possible implementation, the second device is in the sleep state during the first sleep time slot, so that the second device can also enter the sleep state during the sleep time slot, saving power consumption of the second device.
[0012] In a possible implementation, the last data frame in the first group of data frames also carries first subsequent data transmission indication information, where the first subsequent transmission indication information is used to instruct the first device to transmit a next group of data frames at a second time node; after entering the activated state, the first device sends a CTS frame on the Wi-Fi channel, specifically including: the first device enters the activated state at a first time node, and sends the CTS frame on the Wi-Fi channel; the first device wakes up from the sleep state at the second time node and enters the activated state, and sends the CTS frame on the Wi-Fi channel; the first device sends a second group of data frames to the second device on the Wi-Fi channel, where the second group of data frames includes one or more data frames, and the first The last data frame in the two groups of data frames carries a second end indicator and second subsequent data transmission indication information, the second end indicator is used to indicate that the second group of data frames has been sent, and the second subsequent transmission indication information is used to indicate that the first device transmits the next group of data frames at a third time node; the second device listens to the MAC frame transmitted on the Wi-Fi channel at the second time node; after the second device listens to the CTS frame on the Wi-Fi channel, it receives the second group of data frames sent by the first device; after receiving the second group of data frames, the second device sends a second feedback frame to the first device, and the second feedback frame is used to indicate that the second device has received the second group of data frames; after receiving the second feedback frame, the first device enters the sleep state. In this way, the first device can determine the time node for the next group of data transmission, and after transmitting the current group of data frames, the first device can enter the sleep state until the time node for the next group of data frames is transmitted, and then wake up and enter the active state, which can effectively save the power consumption of the first device.
[0013] In a possible implementation, the second device enters the sleep state after sending the second feedback frame. In this way, the second device can enter the sleep state after sending the second feedback frame, thereby saving power consumption of the second device.
[0014] In a possible implementation, the second device receives part of the first set of data frames before sending the first feedback frame; after receiving part of the first set of data frames, the second device sends a third feedback frame to the first device, and the third feedback frame is used to indicate that the second device has not completely received the first set of data frames; after receiving the third feedback frame, the first device resends the data frames in the first set of data frames that the second device has not received to the second device; after receiving all the data frames of the first set of data frames, the second device sends the first feedback frame to the first device. In this way, it can be ensured that after a set of data frames are transmitted, the first device enters a dormant state again, which saves power consumption and ensures that the opposite end receives the data frames completely.
[0015] In a possible implementation, when the first device is in the activated state, the first device powers on the Wi-Fi module of the first device; when the first device is in the dormant state, the first device powers off the Wi-Fi module of the first device.
[0016] In a possible implementation, when the second device is in the activated state, the second device powers on the Wi-Fi module of the second device; when the second device is in the dormant state, the second device powers off the Wi-Fi module of the second device.
[0017] In a possible implementation, the receiving address of the CTS frame is the MAC address of the first device.
[0018] In a second aspect, the present application provides a Wi-Fi sleep scheduling method, including: after entering an activated state, a first device sends a CTS frame on a Wi-Fi channel, where the CTS frame is used to seize the Wi-Fi channel; the first device sends a first group of data frames to a second device on the Wi-Fi channel, where the first group of data frames includes one or more data frames, and the last data frame in the first group of data frames carries a first end indicator, where the first end indicator is used to indicate that the first group of data frames has been sent; the first device receives a first feedback frame sent by the second device, where the first feedback frame is used to indicate that the second device has received the first group of data frames; after receiving the first feedback frame, the first device enters a sleep state.
[0019] In a possible implementation, after entering the active state, the first device sends a CTS frame on the Wi-Fi channel, specifically including: the first device enters the active state at the beginning of a first activation time slot, and sends the CTS frame on the Wi-Fi channel; after the first device enters the sleep state, the method further includes: the first device wakes up from the sleep state and enters the active state at the beginning of a second activation time slot, and sends the CTS frame on the Wi-Fi channel; the first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator, and the second end indicator is used to indicate that the second group of data frames has been sent; the first device receives a second feedback frame sent by the second device, and the second feedback frame is used to indicate that the second device has received the second group of data frames; after receiving the second feedback frame, the first device enters the sleep state.
[0020] In a possible implementation, when the first device starts the first activation time slot, the first device enters the activation state, and before sending the CTS frame on the Wi-Fi channel, the method further includes: the first device negotiates with the second device a working time slot map, the working time slot map including the first activation time slot and the second activation time slot.
[0021] In a possible implementation, the working time slot map also includes a first sleep time slot; the first device is in the sleep state in the first sleep time slot.
[0022] In a possible implementation, the last data frame in the first group of data frames also carries first subsequent data transmission indication information, and the first subsequent transmission indication information is used to indicate that the first device transmits a next group of data frames at a second time node; after the first device enters the activated state, sending a CTS frame on the Wi-Fi channel specifically includes: the first device enters the activated state at a first time node, and sends the CTS frame on the Wi-Fi channel; after the first device enters the sleep state, the method also includes: the first device wakes up from the sleep state at the second time node to enter the activated state, and sends the CTS frame on the Wi-Fi channel ; The first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator and second subsequent data transmission indication information, the second end indicator is used to indicate that the second group of data frames has been sent, and the second subsequent transmission indication information is used to instruct the first device to transmit a next group of data frames at a third time node; the first device receives a second feedback frame sent by the second device, and the second feedback frame is used to indicate that the second device has received the second group of data frames; after receiving the second feedback frame, the first device enters the sleep state.
[0023] In a possible implementation, before the first device receives the first feedback frame sent by the second device, the method also includes: the first device receives a third feedback frame sent by the second device, the third feedback frame being used to indicate that the second device has not completely received the first group of data frames; and the first device resends the data frames in the first group of data frames that the second device has not received to the second device.
[0024] In a possible implementation, the method further includes: when the first device is in the activated state, the first device powers on the Wi-Fi module of the first device; when the first device is in the sleep state, the first device powers off the Wi-Fi module of the first device.
[0025] In a possible implementation, the receiving address of the CTS frame is the MAC address of the first device.
[0026] In a third aspect, the present application provides a Wi-Fi sleep scheduling method, including: after entering an activated state, a second device receives a CTS frame sent by a first device, where the CTS frame is used by the first device to preempt the Wi-Fi channel; the second device receives a first group of data frames sent by the first device on the Wi-Fi channel, where the first group of data frames includes one or more data frames, and the last data frame in the first group of data frames carries a first end indicator, where the first end indicator is used to indicate that the first group of data frames has been sent; after receiving the first group of data frames, the second device sends a first feedback frame to the first device, where the first feedback frame is used to indicate that the second device has received the first group of data frames; after sending the first feedback frame, the second device enters a sleep state.
[0027] In a possible implementation, after the second device enters the activation state, receiving the CTS frame sent by the first device specifically includes: the second device enters the activation state at the beginning of the first activation time slot, and receives the CTS frame sent by the first device; after the second device enters the sleep state, the method further includes: the second device enters the activation state at the beginning of the second activation time slot, and listens to the media access control MAC frame transmitted on the Wi-Fi channel; after the second device listens to the CTS frame on the Wi-Fi channel, receiving the second group of data frames sent by the first device, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator, and the second end indicator is used to indicate that the second group of data frames has been sent. After receiving the second group of data frames, the second device sends a second feedback frame to the first device, and the second feedback frame is used to indicate that the second device has received the second group of data frames; after sending the second feedback frame, the second device enters the sleep state.
[0028] In a possible implementation, before the first activation time slot, the second device negotiates with the first device a working time slot map, where the working time slot map includes the first activation time slot and the second activation time slot.
[0029] In a possible implementation, the working time slot map also includes a first sleep time slot; the second device is in the sleep state in the first sleep time slot.
[0030] In a possible implementation, the last data frame in the first group of data frames also carries first subsequent data transmission indication information, and the first subsequent transmission indication information is used to instruct the first device to transmit the next group of data frames at a second time node; after the second device enters the activated state, receiving the CTS frame sent by the first device, specifically includes: the second device enters the activated state at a first time node, and receives the CTS frame sent by the first device; after the second device enters the dormant state, the method also includes: the second device enters the activated state at the beginning of the second time node, and listens to the MAC frame transmitted on the Wi-Fi channel; the second device enters the Wi-Fi signal After the channel detects the CTS frame, it receives a second group of data frames sent by the first device, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator and second subsequent data transmission indication information, the second end indicator is used to indicate that the second group of data frames has been sent, and the second subsequent transmission indication information is used to indicate that the first device transmits a next group of data frames at a third time node; after receiving the second group of data frames, the second device sends a second feedback frame to the first device, and the second feedback frame is used to indicate that the second device has received the second group of data frames; after sending the second feedback frame, the second device enters the sleep state.
[0031] In a possible implementation, the second device receives part of the data frames of the first group of data frames before sending the first feedback frame; after receiving part of the data frames of the first group of data frames, the second device sends a third feedback frame to the first device, where the third feedback frame is used to indicate that the second device has not completely received the first group of data frames; the second device receives the data frames that the second device has not received in the first group of data frames resent by the first device; and after receiving all the data frames of the first group of data frames, the second device sends the first feedback frame to the first device.
[0032] In a possible implementation, when the second device is in the activated state, the second device powers on the Wi-Fi module of the second device; when the second device is in the dormant state, the second device powers off the Wi-Fi module of the second device.
[0033] In a possible implementation, the receiving address of the CTS frame is the MAC address of the first device.
[0034] In a fourth aspect, the present application provides an electronic device, which is a first device, comprising: one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer programs. When the one or more processors execute the computer programs, the first device executes the method in the second aspect and any possible implementation of the second aspect.
[0035] In a fifth aspect, the present application provides an electronic device, which is a second device, comprising: one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer programs. When the one or more processors execute the computer programs, the second device executes the method in the third aspect and any possible implementation of the third aspect.
[0036] In the sixth aspect, the present application provides a chip system, which is applied to a first device, and the chip system includes: a processing circuit and an interface circuit, the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions so that the chip system executes the method in the above-mentioned second aspect and any possible implementation method of the second aspect.
[0037] In the seventh aspect, the present application provides a chip system, which is applied to a second device, and the chip system includes: a processing circuit and an interface circuit, the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions so that the chip system executes the method in the above-mentioned third aspect and any possible implementation method of the third aspect.
[0038] In an eighth aspect, the present application provides a computer storage medium storing a computer program. When the computer program runs on a processor of a first device, the first device executes the method in the above-mentioned second aspect and any possible implementation of the second aspect.
[0039] In a ninth aspect, the present application provides a computer storage medium storing a computer program, which, when the computer program runs on a processor of a second device, enables the second device to execute the method in the third aspect and any possible implementation of the third aspect.
[0040] In a tenth aspect, the present application provides a computer program product. When the computer program product runs on a processor of a first device, the first device executes the method in the above-mentioned second aspect and any possible implementation of the second aspect.
[0041] In an eleventh aspect, the present application provides a computer program product, which, when executed on a processor of a second device, enables the second device to execute the method in the third aspect and any possible implementation of the third aspect.
[0042] The beneficial effects of the second to eleventh aspects can refer to the beneficial effects of the aforementioned first aspect and any possible implementation method of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the architecture of another communication system provided in an embodiment of the present application;
[0045] Figure 3A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0046] Figure 3B A schematic diagram of the hardware structure of a routing device provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of a Wi-Fi sleep mechanism provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of a Wi-Fi sleep scheduling mechanism based on working time slots provided in an embodiment of the present application;
[0049] Figure 6 A schematic diagram of a service process under a Wi-Fi sleep scheduling mechanism based on working time slots provided in an embodiment of the present application;
[0050] Figure 7 A schematic diagram of a process of a Wi-Fi sleep scheduling method provided in an embodiment of the present application;
[0051] Fig. 8A A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a Wi-Fi direct connection scenario provided in an embodiment of the present application;
[0052] Figure 8B A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a multi-STA uplink scenario provided in an embodiment of the present application;
[0053] Figure 8C A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a multi-STA downlink scenario provided in an embodiment of the present application;
[0054] Fig. 9A schematic diagram of a flow chart of a Wi-Fi sleep scheduling method provided in another embodiment of the present application;
[0055] Fig. 10A A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a Wi-Fi direct connection scenario provided in another embodiment of the present application;
[0056] Fig. 10B This is a signaling interaction diagram of a Wi-Fi sleep scheduling method in a STA uplink scenario provided in another embodiment of the present application;
[0057] Fig. 10C This is a schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a STA downlink scenario provided in another embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0059] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0060] The following describes the communication system provided in the implementation of this application.
[0061] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application is shown.
[0062] like Figure 1 As shown, the communication system 10 may include an electronic device 100 and an electronic device 200 .
[0063] Among them, the electronic device 100 and the electronic device 200 can establish a Wi-Fi direct connection. Among them, in the Wi-Fi direct connection, the electronic device 100 can be used as a group client (group client, GC) device in the Wi-Fi direct connection, and the electronic device 200 can be used as a group owner (group owner, GO). Among them, the Wi-Fi direct connection can include wireless fidelity point to point (wireless fidelity point to point, Wi-Fi P2P), wireless fidelity hotspot (wireless fidelity soft access point, Wi-Fi Soft AP), and multi-link direct connection (Huawei magneto link, HML) connection. Among them, the device type of the electronic device 100 may include any one of a smart phone, a smart watch, a smart speaker, a personal computer, a smart TV, a tablet computer, a smart socket, an air purifier, a smart desk lamp, a smart air conditioner, a smart curtain, a smart water heater, a smart door lock, a smart camera, and the like.
[0064] The device type of the electronic device 200 may include any one of a smart phone, a smart watch, a smart speaker, a personal computer, a smart TV, a tablet computer, a smart socket, an air purifier, a smart desk lamp, a smart air conditioner, a smart curtain, a smart water heater, a router, etc. The device type of the routing device may include any one of a smart phone, a smart watch, a smart speaker, a personal computer, a smart TV, a tablet computer, a smart socket, an air purifier, a smart desk lamp, a smart air conditioner, a smart curtain, a smart water heater, a smart camera, etc.
[0065] Figure 2 A schematic diagram of the architecture of another communication system provided in an embodiment of the present application is shown.
[0066] like Figure 2 As shown, the communication system 20 may include an electronic device 100, an electronic device 200, and a routing device 300. The electronic device 100, the electronic device 200, and the routing device 300 may form a Wi-Fi network, wherein the routing device 300 may respectively establish a Wi-Fi connection with the electronic device 100 and the electronic device 200. The routing device 300 may serve as a wireless access point (AP) in the Wi-Fi network, and the electronic device 100 and the electronic device 200 may serve as a station (STA) in the Wi-Fi network.
[0067] The device types of the routing device 300 may include any one of a smart phone, a smart watch, a smart speaker, a personal computer, a smart TV, a tablet computer, a smart socket, an air purifier, a smart desk lamp, a smart air conditioner, a smart curtain, a smart water heater, a router, and the like.
[0068] The following introduces the hardware structure of an electronic device 100 provided in an embodiment of the present application.
[0069] Figure 3A A schematic diagram of the hardware structure of the electronic device 100 is shown.
[0070] The following is a detailed description of the embodiment using the electronic device 100 as an example. It should be understood that: Figure 3A The electronic device 100 shown is only an example, and the electronic device 100 may have more Figure 3A More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 3A The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0071] The electronic device 100 may include: a processor 110, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, an indicator 192, a camera 193, a display screen 194, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an acceleration sensor 180E, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and the like.
[0072] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0073] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0074] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0075] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0076] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0077] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0078] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0079] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0080] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0081] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0082] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0083] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0084] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2. Among them, the wireless communication module 160 may include a Wi-Fi module.
[0085] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0086] The wireless communication module 160 may include a Wi-Fi module.
[0087] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor. The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens, and the light signal is converted into an electrical signal. The camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The camera 193 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. The NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as drawing on the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0088] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0089] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc.
[0090] In the embodiment of the present application, the hardware structure of the electronic device 200 can refer to the above Figure 3A The hardware structure of the electronic device 100 is not described in detail here.
[0091] The following introduces the hardware structure of a routing device 300 provided in an embodiment of the present application.
[0092] Figure 3B A schematic diagram of the hardware structure of a routing device 300 provided in an embodiment of the present application is shown.
[0093] like Figure 3B As shown, the routing device 300 may include: a processor 301, a memory 302, a wireless communication module 303, an antenna 305, and a power management module 306. Among them:
[0094] The processor 301 may include one or more processing units, for example, the processor 301 may include an application processor, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0095] The controller may be the nerve center and command center of the routing device 300. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0096] The processor 301 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 301 is a cache memory. The memory may store instructions or data that the processor 301 has just used or cyclically used. If the processor 301 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 301, and thus improves the efficiency of the system.
[0097] It is understandable that the modules of the routing device 300 can communicate through a bus. The interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the routing device 300. In other embodiments of the present application, the routing device 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0098] In some embodiments, the processor 301 can be used to parse the signal received by the wireless communication module 303 and demodulate the signal. The processor 301 can respond according to the analysis result and perform corresponding operations, such as performing a sensing operation. In some embodiments, the processor 301 can also be used to generate a signal sent out by the wireless communication module 303, such as a Wi-Fi signal.
[0099] The memory 302 is coupled to the processor 301 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 302 may store an operating system, such as uCOS, VxWorks, RTLinux, and other embedded operating systems. The memory 302 may also store a communication program, which may be used to communicate with the routing device 300 or other devices.
[0100] The wireless communication module 303 may include a Wi-Fi module 304. The Wi-Fi module 304 may provide a solution for Wi-Fi wireless communication applied to the routing device 300. The Wi-Fi protocol used in the Wi-Fi module 304 may be IEEE802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, 802.11be, etc.
[0101] Possibly, the wireless communication module 303 may also include other communication modules to provide other wireless communication solutions (for example, Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR)).
[0102] Possibly, the Wi-Fi module 304 can be integrated with other communication modules (e.g., Bluetooth communication modules). The Wi-Fi module 304 can detect signals transmitted by other devices (e.g., the routing device 300), such as measurement signals, scanning signals, etc., and can send response signals, such as measurement responses, scanning responses, etc., so that other devices can find the routing device 300 and establish wireless communication connections with other devices through one or more of WLAN, Bluetooth, or other short-range wireless communication technologies to perform data transmission.
[0103] In other embodiments, one or more of the Wi-Fi modules 304 may also transmit signals, such as broadcast detection signals and beacon signals, so that other devices can discover the routing device 300 and establish wireless communication connections with other devices via WLAN or other short-range wireless communication technologies to transmit data.
[0104] The antenna 305 can be used to transmit and receive electromagnetic wave signals. The antennas of different communication modules can be reused or can be independent of each other to improve the utilization rate of the antenna.
[0105] The power management module 306 may be used to control the power supply to the routing device 300. The power supply may be a battery or an external power supply.
[0106] In some embodiments, the hardware structure of the routing device 300 may also include an audio module ( Figure 3B not shown) and a speaker ( Figure 3B The audio module is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module can also be used to encode and decode audio signals. The speaker, also known as a "horn", is used to convert audio electrical signals into sound signals.
[0107] In some embodiments, the hardware structure of the routing device 300 may also include a microphone ( Figure 3B(not shown). A microphone, also called a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, a user can speak by approaching the microphone with his mouth to input the sound signal into the microphone. The routing device 300 can be provided with at least one microphone.
[0108] In some embodiments, the hardware structure of the routing device 300 may also include a display screen ( Figure 3B ). The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the terminal may include 1 or N display screens, where N is a positive integer greater than 1.
[0109] In some embodiments, the hardware structure of the routing device 300 may also include one or more sensors ( Figure 3B The one or more sensors may include one or more of the following pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0110] It should be noted that Figure 3B The routing device 300 shown is only one implementation of the embodiment of the present application. In actual applications, the routing device 300 may also include more or fewer components, which is not limited here.
[0111] The following describes the Wi-Fi sleep mechanism provided in the embodiments of the present application.
[0112] In the Wi-Fi protocol, after the Wi-Fi device sends the last service packet, it waits for a preset time window (for example, 60ms). If the peer does not send any physical frames to it within the time window, it is considered that there is no data transmission on the Wi-Fi connection established between the current Wi-Fi device and the peer, and the Wi-Fi device can enter the sleep state. When it is detected that the Wi-Fi device needs to send a physical frame or the next physical frame is transmitted on the Wi-Fi connection, the Wi-Fi device can wake itself up and enter the active state to send and receive physical frames.
[0113] In the embodiment of the present application, when the Wi-Fi device enters the Sleep state, the Wi-Fi module of the Wi-Fi device can be powered off to save power consumption of the Wi-Fi device. When the Wi-Fi device enters the Active state, the Wi-Fi module of the Wi-Fi device can be powered on to allow the Wi-Fi module to work normally.
[0114] Figure 4 A schematic diagram of a Wi-Fi sleep mechanism provided in an embodiment of the present application is shown.
[0115] like Figure 4 As shown, Wi-Fi device A can send physical frames to Wi-Fi device B, and Wi-Fi device B can send physical frames to Wi-Fi device A. After Wi-Fi device A determines that there are no physical frames to be sent and Wi-Fi device B has no data packets to send to Wi-Fi device A, it can set an inactivity timer to mark the window without physical frame transmission. When the inactivity timer times out, Wi-Fi device A can enter the Sleep state. After Wi-Fi device A has the next physical frame to send or detects a physical frame in the Wi-Fi connection, Wi-Fi device A needs to wake up from the Sleep state and enter the Active state.
[0116] Wi-Fi device B can also set an inactivity timer to mark the window without physical frame transmission after determining that there is no physical frame to be sent and Wi-Fi device A has no data packets to send to Wi-Fi device B. When the inactivity timer times out, Wi-Fi device B can also enter the Sleep state. After Wi-Fi device B has the next physical frame to send or detects the physical frame in the Wi-Fi connection, Wi-Fi device A needs to wake up from the Sleep state and enter the Active state.
[0117] In some Wi-Fi protocols, the inactivity timer is set to a fixed inactivity time threshold for all Wi-Fi service scenarios, for example, 60 milliseconds (ms). In this way, Wi-Fi device A needs to wait for 60ms of inactivity after each physical frame transmission and reception before entering the sleep state. In some Wi-Fi service scenarios, the interval at which Wi-Fi device A sends physical frames will be less than the inactivity time threshold specified in the Wi-Fi protocol. For example, when Wi-Fi device A is a smart door lock and Wi-Fi device B is a router, Wi-Fi device A will transmit the captured video stream to Wi-Fi device B at a frame rate of 30 frames per second (fps), that is, Wi-Fi device A will send a frame of video image to Wi-Fi device B every 33ms. The data of a frame of video image needs to be transmitted in at least one physical frame, so the maximum time interval for Wi-Fi device A to send physical frames to Wi-Fi device B is 33ms. This will result in Wi-Fi device A being unable to wait for 60ms of inactivity after each physical frame transmission. Wi-Fi device B cannot wait for the 60ms inactivity time each time it receives a physical frame sent by Wi-Fi device A. Therefore, Wi-Fi device A and Wi-Fi device B will always be in the Active state and cannot enter the Sleep state. The power consumption of Wi-Fi device A and Wi-Fi device B in Wi-Fi services will be very high.
[0118] Figure 5 A schematic diagram of a Wi-Fi sleep scheduling mechanism based on working time slots provided in an embodiment of the present application is shown.
[0119] like Figure 5 As shown, in some Wi-Fi protocols, in order to reduce transmission power consumption, the air interface time can be divided into working time slots according to a fixed duration (e.g., 16ms). Two Wi-Fi devices that establish a Wi-Fi connection negotiate different sleep time slot spectra based on the needs of the business scenario, and control whether to enter the sleep state or the active state based on the negotiated working time slot spectra.
[0120] For example, the working time slots divided in the air interface time may include Slot1, Slot2, Slot3, Slot4, and Slot5. Among them, the working time slot spectrum may be: the working state corresponding to Slot1 is the Active state, the working state corresponding to Slot2 is the Sleep state, the working state corresponding to Slot3 is the Active state, the working state corresponding to Slot4 is the Sleep state, and the working state corresponding to Slot5 is the Active state. Therefore, two Wi-Fi devices that have established a Wi-Fi connection can be in the Active state in Slot1, Slot3, and Slot5, and send and receive physical frames normally. Two Wi-Fi devices that have established a Wi-Fi connection can be in the Sleep state in Slot2 and Slot4, stop sending and receiving physical frames, and thus reduce power consumption.
[0121] The following introduces the Wi-Fi channel access mechanism involved in the embodiments of the present application.
[0122] In some Wi-Fi protocols, Wi-Fi devices use the carrier sense multiple access with collision avoidance (CSMA / CA) mechanism to access the Wi-Fi channel. Among them, under the CSMA / CA mechanism, the Wi-Fi device needs to wait for an inter-frame gap before sending a media access control (MAC) frame. For example, before sending a data frame in the MAC layer, the Wi-Fi device must wait for at least a distributed inter-frame spacing (DIFS). Before sending an acknowledgement (ACK) in the MAC layer, the Wi-Fi device must wait for at least an inter-frame spacing (IFS), etc. After waiting for an inter-frame gap, the Wi-Fi device can select a random backoff counter value (backoff counter) in the contention window (for example, the contention window can be [0, 31]). During the backoff (BO) process, the Wi-Fi device may monitor the Wi-Fi channel once in each backoff slot (for example, the duration of each backoff slot may be 9us). If the Wi-Fi channel is idle, the Wi-Fi device may reduce the random backoff count by 1. When the random backoff count of the Wi-Fi device is reduced to 0, the Wi-Fi device competes for the transmission opportunity (TXOP) of the Wi-Fi channel, so that data frames can be sent on the Wi-Fi channel. In some Wi-Fi protocols, the maximum duration of the TXOP obtained by the Wi-Fi device in each competition may be 5ms.
[0123] Figure 6 A schematic diagram of a service process under a Wi-Fi sleep scheduling mechanism based on working time slots provided in an embodiment of the present application is shown.
[0124] like Figure 6 As shown, Wi-Fi device A can be used as the source of data, and Wi-Fi device B can be used as the sink of data. After establishing a Wi-Fi connection, Wi-Fi device A and Wi-Fi device B can negotiate a working time slot map. For example, the duration of each working time slot in the working time slot map is 16ms. The working state in Slot1 and Slot3 can be the Active state, and the working state in Slot2 can be the Sleep state. Wi-Fi device A can send data to Wi-Fi device B in Slot1 and Slot3.
[0125] In Slot1, Wi-Fi device A can first perform a backoff (BO). After the backoff is completed and a transmission opportunity (TXOP) on the Wi-Fi channel is obtained, Wi-Fi device A can send M data frames to Wi-Fi device B in TXOP, where M is a positive integer. For example, Wi-Fi device A can send a total of 4 data frames, namely, data frame P1, data frame P2, data frame P3, and data frame P4, to Wi-Fi device B in TXOP. After receiving the M data frames sent by device A, Wi-Fi device B can return an ACK to device A. The ACK can be used to characterize the reception of the M data frames by Wi-Fi device B. After receiving the ACK and confirming that the M data frames have been successfully received by Wi-Fi device B, Wi-Fi device A can keep listening to the Wi-Fi channel for the remaining time in Slot1. After sending the ACK, Wi-Fi device B can keep listening to the Wi-Fi channel until Slot1 ends.
[0126] Since the working state of Slot2 is Sleep state, in Slot2, Wi-Fi device A and Wi-Fi device B can enter Sleep state, stop sending and receiving physical frames, and stop listening to Wi-Fi channels, thereby saving power consumption of WiFi devices.
[0127] Since the working status of Slot3 and Slot1 are both Active, in Slot3, if Wi-Fi device A wants to send data to Wi-Fi device B, Wi-Fi device A also needs to fall back first. After the fallback is completed and the TXOP on the Wi-Fi channel is obtained, Wi-Fi device A can send M data frames to Wi-Fi device B in TXOP, where M is a positive integer. For example, Wi-Fi device A can send 4 data frames, namely data frame P5, data frame P6, data frame P7 and data frame P8, to Wi-Fi device B in TXOP. After receiving the M data frames sent by device A, Wi-Fi device B can return ACK to device A. Among them, the ACK can be used to represent the reception of the M data frames by Wi-Fi device B. After receiving the ACK and confirming that the M data frames have been successfully received by Wi-Fi device B, Wi-Fi device A can keep listening to the Wi-Fi channel for the remaining time in Slot1. After sending the ACK, Wi-Fi device B may keep monitoring the Wi-Fi channel until Slot 1 ends.
[0128] In the process of performing Wi-Fi services under the time slot-based Wi-Fi sleep scheduling mechanism, in order to avoid affecting the Wi-Fi service experience, more time slots in the Active state are generally reserved. This results in fewer time slots in the Sleep state, and the Wi-Fi device sleeps for a shorter time, which cannot effectively reduce the power consumption of Wi-Fi devices in Wi-Fi services. For example, when Wi-Fi device A and Wi-Fi device B are performing screen projection services, Wi-Fi device A can generate a service data packet every 16ms, but the duration of each slot is also 16ms. In order to avoid increasing transmission delays, the working state of each slot needs to be set to the Active state. Therefore, Wi-Fi device A and Wi-Fi device B cannot enter sleep mode.
[0129] Since the services carried by Wi-Fi devices are intermittent during operation, that is, after Wi-Fi devices exchange data through Wi-Fi connection, the Wi-Fi channel will be idle for a certain period of time. However, due to the limitations of the sleep mechanism in some Wi-Fi protocols, during this idle period, both Wi-Fi devices sending and receiving data cannot enter sleep mode and need to keep listening to the Wi-Fi channel, resulting in low Wi-Fi transmission efficiency.
[0130] Therefore, an embodiment of the present application provides a Wi-Fi sleep scheduling method, which can enable the first device to use a clear to send (CTS) frame to pre-occupy the Wi-Fi channel before sending service data to the second device, so that the service data can be transmitted immediately after it is generated, thereby reducing latency. When the first device finishes transmitting a group of data frames of service data, it can carry an end indicator in the last data frame of the group of data frames to indicate that the current group of data frames has been transmitted. After receiving the data frame carrying the end indicator, the second device will shake hands with the first device to sleep. In this way, the power consumption of the device can be reduced.
[0131] The following describes a Wi-Fi sleep scheduling method provided in an embodiment of the present application.
[0132] Figure 7 A schematic flow chart of a Wi-Fi sleep scheduling method provided in an embodiment of the present application is shown.
[0133] like Figure 7 As shown, the method may include the following steps:
[0134] S701. A first device establishes a Wi-Fi connection with a second device.
[0135] The first device may be the electronic device 100 , and the second device may be the electronic device 200 or the routing device 300 .
[0136] In a possible implementation, the first device may be the electronic device 200 described above, and the second device may be the electronic device 100 described above or the routing device 300 .
[0137] In a possible implementation, the first device may be the routing device 300 , and the second device may be the electronic device 100 or the electronic device 200 .
[0138] S702: The first device negotiates with the second device about a working time slot spectrum, wherein the working time slot spectrum includes an active time slot and a sleep time slot.
[0139] The first device and the second device may send and receive data in the activation time slot, and the first device and / or the second device may enter the Sleep state in the sleep time slot.
[0140] For example, the working time slot map may specify that the duration of each working time slot is 16 ms, wherein Slot 1 is an active time slot, Slot 2 is a sleep time slot, Slot 3 is an active time slot, Slot 4 is a sleep time slot, and so on.
[0141] In a possible implementation, when the Wi-Fi device (the first device or the second device) enters the Sleep state, the Wi-Fi device may power off the Wi-Fi module of the Wi-Fi device to save power consumption of the Wi-Fi device. When the Wi-Fi device enters the Active state, the Wi-Fi device may power on the Wi-Fi module to allow the Wi-Fi module to work normally.
[0142] S703: The first device may wake up and enter the Active state at the beginning of the first activation time slot.
[0143] S704: The second device may wake up and enter the Active state at the beginning of the first activation time slot.
[0144] S705: After entering the Active state, the first device may roll back. When the rollback is completed, a CTS frame is sent on the Wi-Fi channel to seize the Wi-Fi channel.
[0145] The process of the first device performing rollback may refer to the aforementioned embodiment and will not be described in detail here.
[0146] The CTS frame may be a CTS-to-self frame, that is, the CTS-to-self frame is a CTS frame of the MAC layer and the receiving address is equal to the sender address. Since the first device sends the CTS-to-self frame as the sender, the sender address and the receiver address in the CTS-to-self frame are both the MAC address of the first device.
[0147] After the fallback is completed, the first device can quickly complete the preemption of the Wi-Fi channel through CTS, thereby quickly obtaining the TXOP on the Wi-Fi channel, thereby shortening the waiting time of service data in the Wi-Fi channel competition and reducing the transmission delay of service data.
[0148] S706: After entering the Active state, the second device may monitor the Wi-Fi channel.
[0149] S707: After sending the CTS frame, the first device may send a first group of data frames to the second device, wherein the last data frame in the first group of data frames carries a first end indicator, and the first end indicator is used to indicate that the first group of data frames has been sent.
[0150] The first group of data frames may include M data frames, where M is a positive integer.
[0151] Specifically, the last data frame in the first group of data frames includes an end indication (MoreData) field, and the end indication field is used to carry the first end indicator. For example, when the value of the end indication field is 0, it indicates that the data frame carries the first end indicator, and when the value of the end indication field is 1, it indicates that the data frame carries the first unfinished indicator, and the first unfinished indicator can be used to indicate that the first group of data frames has not been sent out. Among them, the end indication field can be located in the frame header or data field of the data frame, which is not limited in the embodiment of the present application.
[0152] In a possible implementation manner, the last data frame in the first group of data frames may carry a first end indicator, and a non-last data frame in the first group of data frames may carry a first non-end indicator.
[0153] In a possible implementation, the last data frame in the first group of data frames may carry a first end indicator, and a non-last data frame in the first group of data frames may not carry an end indicator and an unended indicator.
[0154] Exemplarily, the first group of data frames may include data frame P1, data frame P2, data frame P3 and data frame P4. Among them, data frame P4 is the last data frame in the first group of data frames. Therefore, data frame P4 may carry a first end indicator.
[0155] S708: After receiving the first set of data frames, the second device may send a first feedback frame to the first device, wherein the first feedback frame is used to indicate that the second device has received the first set of data frames.
[0156] S709: After receiving the first feedback frame, the first device enters the Sleep state.
[0157] S710. After sending the first feedback frame, the second device enters the Sleep state.
[0158] In a possible implementation, if the second device does not completely receive the first group of data frames, for example, data frames of the first group of data frames are lost, the second device may return a third feedback frame to the first device. The third feedback frame is used to indicate that the second device has not completely received the first group of data frames and the frame sequence number of the lost data frame in the first group of data frames. After receiving the third feedback frame, the first device may retransmit the lost data frame in the first group of data frames to the second device. After completely receiving the first group of data frames, the second device may send the first feedback frame to the first device. The second device may enter the Sleep state after sending the first feedback frame to the first device. The first device may enter the Sleep state after receiving the first feedback frame.
[0159] S711. The first device wakes up and enters the Active state at the beginning of the second activation time slot.
[0160] S712: When the second activation time slot starts, the second device wakes up and enters the Active state.
[0161] The second activation time slot is the next activation time slot of the first activation time slot.
[0162] S713: After entering the Active state, the first device rolls back. When the rollback is completed, a CTS frame is sent on the Wi-Fi channel to seize the Wi-Fi channel.
[0163] The process of the first device performing rollback may refer to the aforementioned embodiment and will not be described in detail here.
[0164] S714: After entering the Active state, the second device may monitor the Wi-Fi channel.
[0165] S715: The first device may send a second group of data frames to the second device, wherein the last data frame in the second group of data frames carries a second end indicator, and the second end indicator is used to indicate that the second group of data frames has been sent.
[0166] The second group of data frames may include N data frames, where N is a positive integer.
[0167] Specifically, the last data frame in the second group of data frames includes an end indication (MoreData) field, and the end indication field is used to carry the second end indicator. For example, when the value of the end indication field is 0, it indicates that the data frame carries the second end indicator, and when the value of the end indication field is 1, it indicates that the data frame carries the second unfinished indicator, and the second unfinished indicator can be used to indicate that the second group of data frames has not been sent out. Among them, the end indication field can be located in the frame header or data field of the data frame, which is not limited in the embodiment of the present application.
[0168] In a possible implementation manner, the last data frame in the second group of data frames may carry a second end indicator, and a non-last data frame in the second group of data frames may carry a second non-end indicator.
[0169] In a possible implementation, the last data frame in the first group of data frames may carry a first end indicator, and a non-last data frame in the first group of data frames may not carry an end indicator and an unended indicator.
[0170] Exemplarily, the second group of data frames may include data frame P5, data frame P6, data frame P7 and data frame P8. Among them, data frame P8 is the last data frame in the second group of data frames. Therefore, data frame P8 may carry a second end indicator.
[0171] S716: After receiving the second set of data frames, the second device may send a second feedback frame to the first device, wherein the second feedback frame is used to indicate that the second device has received the second set of data frames.
[0172] S717: After receiving the second feedback frame, the first device enters the Sleep state.
[0173] S718. After sending the second feedback frame, the second device enters the Sleep state.
[0174] In a possible implementation, if the second device does not completely receive the second group of data frames, for example, data frames of the second group of data frames are lost, the second device may return a fourth feedback frame to the first device. The fourth feedback frame is used to indicate that the second device has not completely received the second group of data frames and the frame sequence number of the lost data frame in the second group of data frames. After receiving the fourth feedback frame, the first device may retransmit the lost data frame in the second group of data frames to the second device. After completely receiving the second group of data frames, the second device may send a second ACK to the first device. The second device may enter the Sleep state after sending the second ACK to the first device. The first device may enter the Sleep state after receiving the second feedback frame.
[0175] In the embodiment of the present application, the first feedback frame and the second feedback frame may be ACK, and the third feedback frame and the third feedback frame may be ACK or NACK frames.
[0176] S719: When the third activation time slot starts, the first device wakes up and enters the Active state.
[0177] S720: When the third activation time slot starts, the second device wakes up and enters the Active state.
[0178] Through a Wi-Fi sleep scheduling method provided by an embodiment of the present application, it can be achieved that after the first device and the second device divide the activation time slot and the sleep time slot, the first device and the second device can wake up and enter the Active state by default at the beginning of each activation time slot. The first device can send a CTS frame at the beginning of the activation time slot to seize the Wi-Fi channel. After seizing the Wi-Fi channel, it can send a group of data frames to the second device, and after sending this group of data frames to the second device, indicate to the second device that this group of data has been sent. Afterwards, the first device and / or the second device can enter the Sleep state during the remaining time of the activation time slot to save power consumption, until waking up and entering the Active state at the beginning of the next activation time slot. In this way, the power consumption of the device can be reduced.
[0179] For example, the first device can project the screen to the second device via Wi-Fi Direct. Among them, the frame rate of the image frame in the screen projection service is 60 frames per second, that is, the frame interval of the image frame can be 16ms. The amount of data encoded by an image frame using a predicted frame (predictedframe, P frame) can be 9.3kB, and the amount of data encoded by an image frame using a key frame (intra-codedframe, I frame) can be 127kB. At the transmission rate of a typical screen projection, the transmission time of each image frame is less than 1ms. In other words, the first device needs to transmit an image frame every 16ms. Therefore, each working time slot in the working time slot map will be an activation time slot, and the first device and the second device will always be in the Actibe state and cannot enter the Sleep state. However, the transmission time of each image frame only needs to be less than 1ms. After adopting the Wi-Fi sleep scheduling method provided in the embodiment of the present application, the first device and / or the second device can enter a sleep state after each image frame transmission, and wait until the beginning of the next activation time slot to wake up. Taking into account the Wi-Fi channel contention overhead and the frame service frame processing delay, the total transmission time of each image frame will be less than 2ms. That is, the first device and / or the second device will enter sleep mode 87.25% of the time.
[0180] The following is a detailed description of the above scenarios Figure 7 A Wi-Fi sleep scheduling method is provided in the illustrated embodiment.
[0181] Fig. 8A A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a Wi-Fi direct connection scenario is shown.
[0182] like Fig. 8A As shown, the electronic device 100 and the electronic device 200 can establish a Wi-Fi direct connection. After the electronic device 100 and the electronic device 200 establish a Wi-Fi direct connection, a working time slot spectrum can be negotiated. Among them, the working time slot spectrum may include the working state corresponding to each working time slot. For example, in the working time slot spectrum, there may be three adjacent working time slots: Slot1, Slot2, and Slot3. The working states corresponding to Slot1 and Slot3 are both Active states, and the working state corresponding to Slot2 is Sleep state. Therefore, Slot1 and Slot3 are activation time slots, and Slot2 is a sleep time slot. Among them, the duration of a working time slot can be 16ms. The electronic device 100 and the electronic device 200 will wake up by default at the starting time point of each working time slot where the working state is Active state.
[0183] In Slot1:
[0184] 1. When the electronic device 100 enters Slot1, it may first perform a backoff (BO). After the backoff is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 may send a CTS-to-self frame 1 on the Wi-Fi channel. Among them, the CTS-to-self frame 1 is a CTS frame of the MAC layer and the receiving address of the CTS-to-self frame 1 is the MAC address of the electronic device 100. After sending the CTS-to-self frame 1, the electronic device 100 may send a first group of data frames of service data, wherein the first group of data frames includes M data frames, and M is a positive integer. For example, the first group of data frames may include data frame P1, data frame P2, data frame P3, and data frame P4. The electronic device 100 may carry an end indication (MoreData) field in the last data frame of the first group of data frames, wherein the value of the end indication field may be 0. When the value of the end indication field is 0, it indicates that the electronic device 100 has no data to send to the electronic device 200 in the remaining time after the data frame P4 in Slot1.
[0185] 2. When the electronic device 200 enters Slot1, it can first listen to the Wi-Fi channel. After the CTS-to-self frame 1 sent by the electronic device 100 is heard on the Wi-Fi channel, the electronic device 200 can receive the data frame sent by the electronic device 100. When the electronic device 200 receives the first group of data frames sent by the electronic device 100 and parses the last data frame (data frame P4) of the first group of data frames to carry the end indication (MoreData) field with a value of 0, the electronic device 200 can return ACK1 to the electronic device 100, and after returning ACK1 to the electronic device 100, it enters the Sleep state until it wakes up and enters the Active state at the beginning of Slot3. Among them, the ACK1 can be used to indicate that the electronic device 200 has received the first group of data frames sent by the electronic device 100.
[0186] 3. After receiving ACK1 returned by electronic device 200, electronic device 100 can confirm that electronic device 200 has received the first group of data frames. Therefore, electronic device 100 can enter Sleep state until it wakes up and enters Active state at the beginning of Slot3.
[0187] In Slot 2:
[0188] 4. When the electronic device 100 enters Slot 2, it continues to remain in the Sleep state.
[0189] 5. When the electronic device 200 enters Slot 2, it continues to remain in the Sleep state.
[0190] In Slot 3:
[0191] 6. When the electronic device 100 enters Slot3, it can wake up and enter the Active state. The electronic device 100 can first perform a backoff (BO) after waking up and entering the Active state. After the backoff is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 can send a CTS-to-self frame 1 on the Wi-Fi channel. After sending the CTS-to-self frame 1, the electronic device 100 can continue to send a second group of data frames of business data, wherein the second group of data frames includes N data frames, and N is a positive integer. For example, the second group of data frames may include data frame P5, data frame P6, data frame P7, and data frame P8. The electronic device 100 may carry an end indication (MoreData) field in the last data frame of the second group of data frames, wherein the value of the end indication field may be 1. When the value of the end indication field is 1, it indicates that the electronic device 100 still has data to transmit to the electronic device 200 in the remaining time after the data frame P8 in Slot2.
[0192] 7. When the electronic device 200 enters Slot3, it can wake up and enter the Active state. After entering the Active state, the electronic device 200 can first listen to the Wi-Fi channel. After listening to the CTS-to-self frame 1 sent by the electronic device 100 on the Wi-Fi channel, the electronic device 200 can receive the data frame sent by the electronic device 100. When the electronic device 200 receives the second group of data frames sent by the electronic device 100 and parses out the last data frame (data frame P8) of the second group of data frames carrying an end indication (MoreData) field with a value of 1, the electronic device 200 can return ACK2 to the electronic device 100, and after returning ACK2 to the electronic device 100, it listens to the Wi-Fi channel. Among them, the ACK2 can be used to indicate that the electronic device 200 has received the second group of data frames sent by the electronic device 100.
[0193] 8. After receiving ACK2 returned by electronic device 200, electronic device 100 can confirm that electronic device 200 has received the first set of data frames. Since electronic device 200 still has data to send in the remaining time of Slot2, electronic device 100 can continue to fall back after receiving ACK2 and participate in the competition for TXOP on the Wi-Fi channel.
[0194] Figure 8B A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a multi-STA uplink scenario is shown.
[0195] like Figure 8BAs shown, the routing device 300 can establish a Wi-Fi connection with the electronic device 100 and the electronic device 200, respectively. The routing device 300 can act as a wireless access point (AP), and the electronic device 100 and the electronic device 200 can act as STA. After the routing device 300 establishes a Wi-Fi connection with the electronic device 100 and the electronic device 200, it can negotiate a working time slot spectrum with the electronic device 100 and the electronic device 200, respectively. Among them, the working time slot spectrum may include the working state corresponding to each working time slot. For example, in the working time slot spectrum, the end time of the working time slot Slot1 coincides with the start time of the working time slot Slot2. In the working time slot Slot1, the electronic device 100 is in the Active state, and the electronic device 200 is in the Sleep state. In the working time slot Slot2, the electronic device 100 is in the Sleep state, and the electronic device 200 is in the Active state. For example, the duration of a working time slot can be 16ms. Among them, the electronic device 100 and the electronic device 200 will be awakened by default at the starting time point of the working time slot in which they are in the Active state. The electronic device 100 and the electronic device 200 can send data to the routing device 300 in the working time slot in which they are in the Active state. Optionally, in some other working time slots in the working time slot map, the electronic device 100 and the electronic device 200 are both in the Active state or in the Sleep state, which is not limited here.
[0196] In Slot1:
[0197] 1. When the electronic device 100 enters Slot1, it may first perform a backoff (BO). After the backoff is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 may send a CTS-to-self frame 1 on the Wi-Fi channel. The CTS-to-self frame 1 is a CTS frame of the MAC layer and the receiving address of the CTS-to-self frame 1 is the MAC address of the electronic device 100. After sending the CTS-to-self frame 1, the electronic device 100 may send a first group of data frames of service data, wherein the first group of data frames includes M data frames, and M is a positive integer. For example, the first group of data frames may include data frame P1, data frame P2, data frame P3, and data frame P4. The electronic device 100 may carry an end indication (MoreData) field in the last data frame of the first group of data frames, wherein the value of the end indication field may be 0. When the value of the end indication field is 0, it indicates that the electronic device 100 has no data to send to the routing device 300 in the remaining time after the data frame P4 in Slot1.
[0198] 2. When the electronic device 200 enters Slot 1, it can be in the Sleep state until it wakes up and enters the Active state at the beginning of Slot 2.
[0199] 3. When entering Slot1, the routing device 300 may first listen to the Wi-Fi channel. After listening to the CTS-to-self frame 1 sent by the electronic device 100 on the Wi-Fi channel, the routing device 300 may receive the data frame sent by the electronic device 100. When the routing device 300 receives the first group of data frames sent by the electronic device 100 and parses the last data frame (data frame P4) of the first group of data frames to carry the end indication (MoreData) field with a value of 0, the routing device 300 may return ACK3 to the electronic device 100, and continue to listen to the Wi-Fi channel after returning ACK3 to the electronic device 100. The ACK3 may be used to indicate that the routing device 300 has received the first group of data frames sent by the electronic device 100.
[0200] 4. After receiving ACK3 returned by the routing device 300, the electronic device 100 can confirm that the routing device 300 has received the first group of data frames, so the electronic device 100 can enter the Sleep state.
[0201] In Slot 2:
[0202] 5. The electronic device 100 can be in Sleep state in Slot 2.
[0203] 6. When the electronic device 200 enters Slot2, it wakes up and enters the Active state. After entering the Active state, the electronic device 200 may first perform a backoff (BO). After the backoff is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 200 may send a CTS-to-self frame 2 on the Wi-Fi channel. Among them, the CTS-to-self frame 2 is a CTS frame of the MAC layer and the receiving address of the CTS-to-self frame 2 is the MAC address of the electronic device 200. After sending the CTS-to-self frame 2, the electronic device 200 may continue to send a second group of data frames of business data, wherein the second group of data frames includes N data frames, and N is a positive integer. For example, the second group of data frames may include data frame P5, data frame P6, data frame P7, and data frame P8. The electronic device 100 may carry an end indication (MoreData) field in the last data frame of the second group of data frames, wherein the value of the end indication field may be 0. When the value of the end indication field is 0, it means that the electronic device 200 has no data to transmit to the routing device 300 in the remaining time after the data frame P8 in Slot2.
[0204] 7. When entering Slot2, the routing device 300 may first listen to the Wi-Fi channel. After listening to the CTS-to-self frame 2 sent by the electronic device 200 on the Wi-Fi channel, the routing device 300 may receive the data frame sent by the electronic device 200. When the routing device 300 receives the second group of data frames sent by the electronic device 200 and parses the last data frame (data frame P8) of the second group of data frames to carry the end indication (MoreData) field with a value of 0, the routing device 300 may return ACK4 to the electronic device 200, and continue to listen to the Wi-Fi channel after returning ACK4 to the electronic device 200. Among them, the ACK4 can be used to indicate that the routing device 300 has received the second group of data frames sent by the electronic device 200.
[0205] 8. After receiving ACK4 returned by the routing device 300, the electronic device 200 can confirm that the routing device 300 has received the second group of data frames, so the electronic device 200 can enter the Sleep state.
[0206] In the embodiment of the present application, since the routing device 300 acts as an AP, it needs to ensure that new STAs can access, and STAs access the routing device 300 randomly. Therefore, in order to ensure the performance of the routing device 300 as an AP, the routing device 300 does not need to enter the Sleep state and can always be in the Active state.
[0207] Figure 8C A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a multi-STA downlink scenario is shown.
[0208] like Figure 8CAs shown, the routing device 300 can establish a Wi-Fi connection with the electronic device 100 and the electronic device 200, respectively. The routing device 300 can act as a wireless access point (AP), and the electronic device 100 and the electronic device 200 can act as STA. After the routing device 300 establishes a Wi-Fi connection with the electronic device 100 and the electronic device 200, it can negotiate a working time slot spectrum with the electronic device 100 and the electronic device 200, respectively. Among them, the working time slot spectrum may include the working state corresponding to each working time slot. For example, in the working time slot spectrum, the end time of the working time slot Slot1 coincides with the start time of the working time slot Slot2. In the working time slot Slot1, the electronic device 100 is in the Active state, and the electronic device 200 is in the Sleep state. In the working time slot Slot2, the electronic device 100 is in the Sleep state, and the electronic device 200 is in the Active state. For example, the duration of a working time slot can be 16ms. Among them, the electronic device 100 and the electronic device 200 will be awakened by default at the starting time point of the working time slot in which they are in the Active state. The electronic device 100 and the electronic device 200 can send data to the routing device 300 in the working time slot in which they are in the Active state. Optionally, in some other working time slots in the working time slot map, the electronic device 100 and the electronic device 200 are both in the Active state or in the Sleep state, which is not limited here.
[0209] In Slot1:
[0210] 1. When the routing device 300 enters Slot 1, it can first perform a backoff (BO). After the backoff is completed and the TXOP on the Wi-Fi channel is obtained, the routing device 300 can send a CTS-to-self frame 3 on the Wi-Fi channel. The CTS-to-self frame 3 is a CTS frame of the MAC layer and the receiving address of the CTS-to-self frame 3 is the MAC address of the routing device 300. After sending the CTS-to-self frame 3, the routing device 300 can send a first group of data frames to the electronic device 100, wherein the first group of data frames includes M data frames, and M is a positive integer. For example, the first group of data frames may include data frame P1, data frame P2, data frame P3, and data frame P4. The routing device 300 may carry an end indication (MoreData) field in the last data frame of the first group of data frames, wherein the value of the end indication field may be 0. When the value of the end indication field is 0, it indicates that the routing device 300 has no data to send to the electronic device 100 in the remaining time after the data frame P4 in Slot1.
[0211] 2. When the electronic device 100 enters Slot 1, it can first listen to the Wi-Fi channel. After the CTS-to-self frame 3 sent by the routing device 300 is heard on the Wi-Fi channel, the electronic device 100 can receive the data frame sent by the routing device 300. When the electronic device 100 receives the first group of data frames sent by the routing device 300 and parses the last data frame (data frame P4) of the first group of data frames to carry the end indication (MoreData) field with a value of 0, the electronic device 100 can return ACK5 to the electronic device 100, and enter the Sleep state after returning ACK5 to the routing device 300. The ACK5 can be used to indicate that the electronic device 100 has received the first group of data frames sent by the routing device 300.
[0212] 3. When the electronic device 200 enters Slot 1, it can be in the Sleep state until it wakes up and enters the Active state at the beginning of Slot 2.
[0213] 4. After receiving ACK5 returned by the electronic device 100, the routing device 300 can confirm that the electronic device 100 has received the first group of data frames, so the routing device 300 can continue to monitor the Wi-Fi channel.
[0214] In Slot 2:
[0215] 5. The electronic device 100 can be in Sleep state in Slot 2.
[0216] 6. When the routing device 300 enters Slot2, it may first perform a backoff (BO). After the backoff is completed and the TXOP on the Wi-Fi channel is obtained, the routing device 300 may send a CTS-to-self frame 3 on the Wi-Fi channel. The CTS-to-self frame 3 is a CTS frame of the MAC layer and the receiving address of the CTS-to-self frame 3 is the MAC address of the routing device 300. After sending the CTS-to-self frame 3, the routing device 300 may send a second group of data frames to the electronic device 200, wherein the second group of data frames includes N data frames, and N is a positive integer. For example, the second group of data frames may include data frame P5, data frame P6, data frame P7, and data frame P8. The routing device 300 may carry an end indication (MoreData) field in the last data frame of the second group of data frames (for example, data frame P8), wherein the value of the end indication field may be 0. When the value of the end indication field is 0, it indicates that the routing device 300 has no data to send to the electronic device 200 in the remaining time after the data frame P8 in Slot2.
[0217] 7. When the electronic device 200 enters Slot2, it can first listen to the Wi-Fi channel. After the CTS-to-self frame 3 sent by the routing device 300 is heard on the Wi-Fi channel, the electronic device 200 can receive the data frame sent by the routing device 300. When the electronic device 200 receives the second group of data frames sent by the routing device 300 and parses the last data frame (data frame P8) of the second group of data frames to carry the end indication (MoreData) field with a value of 0, the electronic device 200 can return ACK6 to the electronic device 200, and enter the Sleep state after returning ACK6 to the routing device 300. Among them, the ACK6 can be used to indicate that the electronic device 200 has received the second group of data frames sent by the routing device 300.
[0218] 8. After receiving ACK6 returned by the electronic device 200, the routing device 300 can confirm that the electronic device 200 has received the second set of data frames. Therefore, the routing device 300 can continue to monitor the Wi-Fi channel.
[0219] In the embodiment of the present application, since the routing device 300 acts as an AP, it needs to ensure that new STAs can access, and STAs access the routing device 300 randomly. Therefore, in order to ensure the performance of the routing device 300 as an AP, the routing device 300 does not need to enter the Sleep state and can always be in the Active state.
[0220] A Wi-Fi sleep scheduling method provided in another embodiment of the present application is introduced below.
[0221] Fig. 9 A schematic flow chart of a Wi-Fi sleep scheduling method provided in another embodiment of the present application is shown.
[0222] like Fig. 9 As shown, the method may include the following steps:
[0223] S901. A first device establishes a Wi-Fi connection with a second device.
[0224] The first device may be the electronic device 100 , and the second device may be the electronic device 200 or the routing device 300 .
[0225] In a possible implementation, the first device may be the electronic device 200 described above, and the second device may be the electronic device 100 described above or the routing device 300 .
[0226] In a possible implementation, the first device may be the routing device 300 , and the second device may be the electronic device 100 or the electronic device 200 .
[0227] S902: The first device wakes up and enters the Active state at the beginning of the first time node.
[0228] S903: After entering the Active state, the first device rolls back. When the rollback is completed, a CTS frame is sent on the Wi-Fi channel to seize the Wi-Fi channel.
[0229] For details, please refer to the above Figure 7 Step S705 in the illustrated embodiment will not be described in detail here.
[0230] S904, the first device sends a first group of data frames to the second device. The last data frame in the first group of data frames carries a first end indicator and first subsequent transmission indication information, the first end indicator is used to indicate that the first group of data frames has been sent, and the first subsequent transmission indication information is used to indicate the start time of the first device sending data to the second device next time, for example, the second time node.
[0231] The first group of data frames may include M data frames, where M is a positive integer.
[0232] The explanation of the first end indicator can be referred to in the above Figure 7 Step S707 in the illustrated embodiment will not be described in detail here.
[0233] The last data frame in the first group of data frames may include a subsequent transmission indication (nextBurstTSF) field, and the nextBurstTSF field is used to carry the first subsequent transmission indication information. The value of the subsequent transmission indication field is the second time node. For example, the first group of data frames may include data frame P1, data frame P2, data frame P3 and data frame P4, and data frame P4 is the last data frame in the first group of data frames. Therefore, data frame P4 carries a first end indicator and a first subsequent transmission indication information (for example, the second time node). Among them, the nextBurstTSF field can be located in the frame header or data field of the data frame.
[0234] S905: After receiving the first set of data frames, the second device may send a first feedback frame to the first device, wherein the first feedback frame is used to indicate that the second device has received the first set of data frames.
[0235] S906: After receiving the first feedback frame, the first device may enter the Sleep state.
[0236] S907: After sending the first feedback frame, the second device may enter the Sleep state.
[0237] In a possible implementation, if the second device does not completely receive the first group of data frames, for example, data frames of the first group of data frames are lost, the second device may return a third feedback frame to the first device. The third feedback frame is used to indicate that the second device has not completely received the first group of data frames and the frame sequence number of the lost data frame in the first group of data frames. After receiving the third feedback frame, the first device may retransmit the lost data frame in the first group of data frames to the second device. After completely receiving the first group of data frames, the second device may send a first ACK to the first device. The second device may enter the Sleep state after sending the first feedback frame to the first device. The first device may enter the Sleep state after receiving the first feedback frame.
[0238] S908. The first device wakes up and enters the Active state at the second time node.
[0239] S909: The second device wakes up and enters the Active state at the second time node.
[0240] In a possible implementation, the first device may determine the interval between the second time node and the first time node based on the type of business between the first device and the second device. When the first device can set the interval between the second time node and the first time node to the first interval based on the business between the first device and the second device being a low-latency business, when the first device can set the interval between the second time node and the first time node to the second interval based on the business between the first device and the second device being a non-low-latency business, wherein the second interval is greater than the first interval. In this way, low latency of data transmission in low-latency business can be prioritized, and in non-low-latency business, power consumption of the device can be saved as much as possible.
[0241] In a possible implementation, before sending the last data frame in the first group of data frames, the first device can determine the second time node according to the amount of data in the buffer of the MAC layer. The larger the amount of data in the buffer of the MAC layer, the more data the first device has to send. Therefore, the first device can set the time interval between the second time node and the first time node to be smaller. The smaller the amount of data in the buffer of the MAC layer, the less data the first device has to send. Therefore, the first device can set the time interval between the second time node and the first time node to be smaller. In this way, the interval for sending data can be adjusted in real time according to the cache amount of data to be sent, which can save power consumption of the device and avoid excessive accumulation of data to be sent.
[0242] S910: After entering the Active state, the first device performs a rollback. When the rollback is completed, the first device sends a CTS frame on the Wi-Fi channel to seize the Wi-Fi channel.
[0243] S911. After entering the Active state, the second device may monitor the Wi-Fi channel.
[0244] S912: After sending the CTS frame, the first device may send a second group of data frames to the second device, wherein the last data frame in the second group of data frames carries a second end indicator and second subsequent transmission indication information, the second end indicator is used to indicate that the second group of data frames has been sent, and the second subsequent transmission indication information is used to indicate the start time of the first device sending data to the second device next time, for example, the third time node.
[0245] The second group of data frames may include N data frames, where N is a positive integer.
[0246] The explanation of the second end indicator can be referred to in the above Figure 7 Step S715 in the illustrated embodiment will not be described in detail here.
[0247] The last data frame in the second group of data frames may include a subsequent transmission indication (nextBurstTSF) field. The nextBurstTSF field is used to carry the first subsequent transmission indication information. For example, the second group of data frames may include data frames P5, data frames P6, data frames P7, and data frames P8, and data frame P8 is the last data frame in the second group of data frames. Therefore, data frame P8 carries a second end indicator and the first subsequent transmission indication information (for example, a third time node). Among them, the nextBurstTSF field can be located in the frame header or data field of the data frame.
[0248] S913: After receiving the second set of data frames, the second device may send a second feedback frame to the first device, wherein the second feedback frame is used to indicate that the second device has received the second set of data frames.
[0249] S914: After receiving the second feedback frame, the first device may enter the Sleep state.
[0250] S915: After sending the second feedback frame, the second device may enter the Sleep state.
[0251] In a possible implementation, if the second device does not completely receive the second group of data frames, for example, data frames of the second group of data frames are lost, the second device may return a fourth feedback frame to the first device. The fourth feedback frame is used to indicate that the second device has not completely received the second group of data frames and the frame sequence number of the lost data frame in the second group of data frames. After receiving the fourth feedback frame, the first device may retransmit the lost data frame in the second group of data frames to the second device. After completely receiving the second group of data frames, the second device may send a second feedback frame to the first device. The second device may enter a Sleep state after sending the second feedback frame to the first device. The first device may enter a Sleep state after receiving the second feedback frame.
[0252] In the embodiment of the present application, the first feedback frame and the second feedback frame may be ACK, and the third feedback frame and the third feedback frame may be ACK or NACK frames.
[0253] S916. The first device may wake up and enter the Active state at a third time node.
[0254] S917: The second device may wake up and enter the Active state at a third time node.
[0255] Through a Wi-Fi sleep scheduling method provided by an embodiment of the present application, it can be realized that the first device can send a CTS frame to seize the Wi-Fi channel, and after seizing the Wi-Fi channel, a group of data frames can be sent to the second device, and after sending this group of data frames to the second device, the second device is indicated that this group of data has been sent and the next data transmission time node. After that, the first device and / or the second device can enter the Sleep state to save power consumption until the next data transmission time node arrives and wakes up to enter the Active state. In this way, the power consumption of the device can be reduced.
[0256] For example, the first device can be a door lock peephole, shoot a video, and transmit the shot video to the second device. Among them, the resolution of the video can be 1920×1080, and the frame rate can be 30 frames per second. That is, the frame interval of the video can be 33ms. The amount of data encoded by a predicted frame (predicted frame, P frame) for a video frame can be 9.3kB, and the amount of data encoded by a key frame (intra-coded frame, I frame) for an image frame can be 127kB. Assume that the Wi-Fi transmission capability uses 80MHz channel bandwidth, single antenna transmission, and modulation and coding scheme (MCS) order MCS9 under the 802.11ax protocol. Therefore, the Wi-Fi transmission rate is 120kB / ms, and the transmission time of each video frame is less than 1.5ms. That is to say, the first device needs to transmit a video frame every 33ms, but the transmission time of each video frame only needs to be less than 1.5ms. In some Wi-Fi protocols, it is stipulated that the Wi-Fi device needs to wait for 60ms without data transmission or reception after each data transmission before entering the Sleep state. This will cause the first device to be unable to enter the Sleep state. After adopting the Wi-Fi sleep scheduling method provided in the embodiment of the present application, after the first device transmits a group of data frames of a video frame each time, it can instruct the second device to transmit a group of data frames of the next video frame at the next time node and enter the sleep state, and wake up and enter the Active state when the next time node arrives. In this way, the first device and / or the second device can enter the Sleep state 90% of the time during the business process, thereby reducing power consumption.
[0257] The following is a detailed description of the above scenarios Fig. 9 A Wi-Fi sleep scheduling method is provided in the illustrated embodiment.
[0258] Fig. 10A A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a Wi-Fi direct connection scenario is shown.
[0259] like Fig. 10A As shown, the electronic device 100 and the electronic device 200 can establish a Wi-Fi direct connection. The electronic device 100 can determine the transmission interval of the service data according to its own service type, and then determine the data transmission time node according to the transmission interval of the service data. When the clock reaches the data transmission time node, the electronic device 100 can send the service data to the electronic device 200 on the Wi-Fi channel.
[0260] 1. When the clock reaches the data transmission time node T1, the electronic device 100 can wake up and enter the Active state, and roll back. After the rollback is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 can send a CTS-to-self frame 1 on the Wi-Fi channel. Among them, the CTS-to-self frame 1 is a CTS frame of the MAC layer and the receiving address of the CTS-to-self frame 1 is the MAC address of the electronic device 100. After sending the CTS-to-self frame 1, the electronic device 100 can send the first group of data frames of the service data to the electronic device 200. Among them, the electronic device 100 can carry the end indication (MoreData) field and the subsequent transmission indication field in the last data frame (for example, data frame P4) of the first group of data frames. Among them, the value of the end indication field can be 0. When the value of the end indication field is 0, the current service data transmission has ended. The subsequent transmission indication field can be used to indicate the starting time point of the next service data transmission. For example, the value of the subsequent transmission indication field in the data frame P4 is T2.
[0261] 2. When the clock reaches time node T1, the electronic device 200 can wake up and enter the Active state and listen to the Wi-Fi channel. After listening to the CTS-to-self frame 1 sent by the electronic device 100 on the Wi-Fi channel, the electronic device 200 can receive the data frame sent by the electronic device 100. When the electronic device 200 receives the first group of data frames sent by the electronic device 100 and parses the last data frame (data frame P4) of the first group of data frames to carry the end indication (MoreData) field with a value of 0 and the subsequent transmission indication field with a value of T2, the electronic device 200 can return ACK7 to the electronic device 100, and enter the Sleep state after returning ACK7 to the electronic device 100, until the clock reaches T2 and wakes up and enters the Active state.
[0262] 3. After receiving ACK7 returned by the electronic device 200, the electronic device 100 can confirm that the electronic device 200 has received the first group of data frames. Therefore, the electronic device 100 can enter the Sleep state until the clock reaches T2 and wakes up to enter the Active state.
[0263] 4. When the clock reaches time node T2, the electronic device 100 can wake up and enter the Active state, and roll back. After the rollback is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 can send CTS-to-self frame 1 on the Wi-Fi channel. Among them, CTS-to-self frame 1 is a CTS frame of the MAC layer and the receiving address of CTS-to-self frame 1 is the MAC address of the electronic device 100. After sending CTS-to-self frame 1, the electronic device 100 can send a second group of data frames of service data to the electronic device 200. For example, the second group of data frames includes data frame 5, data frame 6, data frame 7 and data frame 8. Among them, the electronic device 100 can carry an end indication (MoreData) field and a subsequent transmission indication field in the last data frame (for example, data frame P8) of the second group of data frames. Among them, the value of the end indication field can be 0. When the value of the end indication field is 0, the current service data transmission has ended. The subsequent transmission indication field can be used to indicate the starting time point of the next service data transmission. For example, the value of the subsequent transmission indication field in the data frame P8 is T3.
[0264] 5. When the clock reaches time node T2, the electronic device 200 can wake up and enter the Active state and listen to the Wi-Fi channel. After the CTS-to-self frame 1 sent by the electronic device 100 is heard on the Wi-Fi channel, the electronic device 200 can receive the data frame sent by the electronic device 100. When the electronic device 200 receives the second group of data frames sent by the electronic device 100 and parses the last data frame (data frame P8) of the second group of data frames to carry the end indication (MoreData) field with a value of 0 and the subsequent transmission indication field with a value of T3, the electronic device 200 can return ACK8 to the electronic device 100, and enter the Sleep state after returning ACK8 to the electronic device 100, until the clock reaches the time node T3 and wakes up and enters the Active state.
[0265] 6. After receiving ACK2 returned by electronic device 200, electronic device 100 can confirm that electronic device 200 has received the second set of data frames. Therefore, electronic device 100 can enter the Sleep state until the clock reaches T3 and wakes up to enter the Active state.
[0266] Fig. 10B A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a STA uplink scenario is shown.
[0267] like Fig. 10BAs shown, the electronic device 100 can establish a Wi-Fi connection as a STA with the routing device 300 as an AP. The electronic device 100 can determine the transmission interval of the service data according to its own service type, and then determine the data transmission time node according to the transmission interval of the service data. When the clock reaches the data transmission time node, the electronic device 100 can send the service data to the routing device 300 on the Wi-Fi channel.
[0268] 1. When the clock reaches time node T1, the electronic device 100 can wake up and enter the Active state, and then roll back. After the rollback is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 can send CTS-to-self frame 1 on the Wi-Fi channel. After sending CTS-to-self frame 1, the electronic device 100 can send the first group of data frames of service data to the routing device 300. Among them, the electronic device 100 can carry the end indication (MoreData) field and the subsequent transmission indication field in the last data frame (for example, data frame P4) of the first group of data frames. Among them, the value of the end indication field can be 0. When the value of the end indication field is 0, the current service data transmission has ended. The subsequent transmission indication field can be used to indicate the starting time point of the next service data transmission. For example, the value of the subsequent transmission indication field in data frame P4 is T2.
[0269] 2. After the routing device 300 detects the CTS-to-self frame 1 sent by the electronic device 100 on the Wi-Fi channel, the routing device 300 can receive the data frame sent by the electronic device 100. When the routing device 300 receives the first group of data frames sent by the electronic device 100 and parses the last data frame (data frame P4) of the first group of data frames to carry the end indication (MoreData) field with a value of 0 and the subsequent transmission indication field with a value of T2, the routing device 300 can return ACK9 to the electronic device 100, and detect the Wi-Fi channel after returning ACK9 to the electronic device 100.
[0270] 3. After receiving ACK9 returned by the routing device 300, the electronic device 100 can confirm that the routing device 300 has received the first group of data frames. Therefore, the electronic device 100 can enter the Sleep state until the clock reaches the time node T2 and wakes up to enter the Active state.
[0271] 4. When the clock reaches time node T2, the electronic device 100 can wake up and enter the Active state, and roll back. After the rollback is completed and the TXOP on the Wi-Fi channel is obtained, the electronic device 100 can send CTS-to-self frame 1 on the Wi-Fi channel. After sending CTS-to-self frame 1, the electronic device 100 can send a second group of data frames of business data to the electronic device 200. For example, the second group of data frames includes data frame 5, data frame 6, data frame 7 and data frame 8. Among them, the electronic device 100 can carry an end indication (MoreData) field and a subsequent transmission indication field in the last data frame of the second group of data frames (for example, data frame P8). Among them, the value of the end indication field can be 0. When the value of the end indication field is 0, the current business data transmission has ended. The subsequent transmission indication field can be used to indicate the starting time point of the next business data transmission. For example, the value of the subsequent transmission indication field in data frame P8 is T3.
[0272] 5. After the routing device 300 detects the CTS-to-self frame 1 sent by the electronic device 100 on the Wi-Fi channel, the routing device 300 may receive the data frame sent by the electronic device 100. When the routing device 300 receives the second group of data frames sent by the electronic device 100 and parses the last data frame (data frame P8) of the second group of data frames to carry the end indication (MoreData) field with a value of 0 and the subsequent transmission indication field with a value of T3, the routing device 300 may return ACK10 to the electronic device 100, and detect the Wi-Fi channel after returning ACK10 to the electronic device 100.
[0273] 6. After receiving ACK10 returned by the routing device 300, the electronic device 100 can confirm that the routing device 300 has received the second set of data frames. Therefore, the electronic device 100 can enter the Sleep state until the clock reaches the time node T3 and wakes up to enter the Active state.
[0274] In the embodiment of the present application, since the routing device 300 acts as an AP, it needs to ensure that new STAs can access, and STAs access the routing device 300 randomly. Therefore, in order to ensure the performance of the routing device 300 as an AP, the routing device 300 does not need to enter the Sleep state and can always be in the Active state.
[0275] Fig. 10C A schematic diagram of signaling interaction of a Wi-Fi sleep scheduling method in a STA downlink scenario is shown.
[0276] like Fig. 10CAs shown, the routing device 300 can serve as an AP to establish Wi-Fi connections with the electronic device 100 and the electronic device 200, which are STAs. The routing device 300 can determine the intervals for the electronic device 100 and the electronic device 200 to send downlink data, respectively, and then determine the data transmission time nodes of the electronic device 100 and the electronic device 200, respectively, according to the intervals of the downlink data. When the clock reaches the data transmission time node corresponding to the electronic device 100, the routing device 300 can send the downlink data of the electronic device 100 to the electronic device 100 on the Wi-Fi channel. When the clock reaches the data transmission time node corresponding to the electronic device 200, the routing device 300 can send the downlink data of the electronic device 200 to the electronic device 200 on the Wi-Fi channel.
[0277] 1. When the clock reaches the time node T1, the routing device 300 can send downlink data to the electronic device 100. Therefore, the routing device 300 can fall back first. After the fallback is completed and the TXOP on the Wi-Fi channel is obtained, the routing device 300 can send a CTS-to-self frame 3 on the Wi-Fi channel. After sending the CTS-to-self frame 3, the routing device 300 can send the first group of data frames in the downlink data of the electronic device 100 to the electronic device 100. Among them, the routing device 300 can carry an end indication (MoreData) field and a subsequent transmission indication field in the last data frame (for example, data frame P4) of the first group of data frames. Among them, the value of the end indication field can be 0. When the value of the end indication field is 0, the current service data transmission has ended. The subsequent transmission indication field can be used to indicate the starting time point of the next service data transmission. For example, the value of the subsequent transmission indication field in the data frame P4 is T3.
[0278] 2. When the clock reaches time node T1, the electronic device 100 can enter the Active state and listen to the Wi-Fi channel. After the electronic device 100 hears the CTS-to-self frame 3 sent by the routing device 300 on the Wi-Fi channel, it can receive the data frame sent by the routing device 300. When the electronic device 100 receives the first group of data frames sent by the routing device 300 and parses the last data frame (data frame P4) of the first group of data frames to carry the end indication (MoreData) field with a value of 0 and the subsequent transmission indication field with a value of T3, the electronic device 100 can return ACK11 to the routing device 300, and enter the Sleep state after returning ACK11 to the routing device 300, until the clock reaches the time node T3 and wakes up to enter the Active state.
[0279] 3. Since the routing device 300 has no downlink data to send to the electronic device 200 between the time node T1 and the time node T2, the routing device 300 can notify the electronic device 200 before the time node T1 to start receiving the downlink data of the electronic device 200 at the time node T2. Therefore, the electronic device 200 can be in the Sleep state between the time node T1 and the time node T2.
[0280] 4. When the clock reaches time node T2, the routing device 300 can send downlink data to the electronic device 200. Therefore, the routing device 300 can back off first. After the back off is completed and the TXOP on the Wi-Fi channel is obtained, the routing device 300 can send a CTS-to-self frame 3 on the Wi-Fi channel. After sending the CTS-to-self frame 3, the routing device 300 can send a second group of data frames in the downlink data of the electronic device 200 to the electronic device 200. Among them, the routing device 300 can carry an end indication (MoreData) field and a subsequent transmission indication field in the last data frame of the second group of data frames (for example, data frame P4). Among them, the value of the end indication field can be 0. When the value of the end indication field is 0, the current service data transmission has ended. The subsequent transmission indication field can be used to indicate the starting time point of the next service data transmission. For example, the value of the subsequent transmission indication field in data frame P8 is T4 ( Fig. 10C not shown).
[0281] 5. When the clock reaches time node T2, the electronic device 200 can enter the Active state and listen to the Wi-Fi channel. After the electronic device 200 hears the CTS-to-self frame 3 sent by the routing device 300 on the Wi-Fi channel, it can receive the data frame sent by the routing device 300. When the electronic device 200 receives the second group of data frames sent by the routing device 300 and parses the last data frame (data frame P8) of the second group of data frames to carry the end indication (MoreData) field with a value of 0 and the subsequent transmission indication field with a value of T4, the electronic device 100 can return ACK12 to the routing device 300, and enter the Sleep state after returning ACK12 to the routing device 300, until the clock reaches the time node T4 and wakes up to enter the Active state.
[0282] 6. Since the routing device 300 has no downlink data to send to the electronic device 100 between time node T2 and time node T3, the routing device 300 may have notified the electronic device 100 before time node T2 to start receiving downlink data from the electronic device 100 at time node T3. Therefore, the electronic device 100 may be in the Sleep state between time node T2 and time node T3.
[0283] In the embodiment of the present application, since the routing device 300 acts as an AP, it needs to ensure that new STAs can access, and STAs access the routing device 300 randomly. Therefore, in order to ensure the performance of the routing device 300 as an AP, the routing device 300 does not need to enter the Sleep state and can always be in the Active state.
[0284] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0285] The embodiments of the present application also provide a computer program product. When the computer program product is executed on a computer, the computer can implement the steps in the above-mentioned various method embodiments.
[0286] The embodiment of the present application also provides a chip system, the chip system includes a processing circuit interface circuit, the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions so that the chip system implements the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.
[0287] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A communication system, characterized in that: It includes a first device and a second device; wherein, After entering the activated state, the first device sends a Clear to Send (CTS) frame on a Wireless Fidelity (Wi-Fi) channel, where the CTS frame is used by the first device to preempt the Wi-Fi channel; The first device sends a first group of data frames to the second device on the Wi-Fi channel, wherein the first group of data frames includes one or more data frames, and the last data frame in the first group of data frames carries a first end indicator, and the first end indicator is used to indicate that the first group of data frames has been sent. After receiving the first group of data frames, the second device sends a first feedback frame to the first device, where the first feedback frame is used to indicate that the second device has received the first group of data frames; After receiving the first feedback frame, the first device enters a sleep state.
2. The system according to claim 1, characterized in that The second device enters the sleep state after sending the first feedback frame.
3. The system according to claim 1 or 2, characterized in that: After entering the activation state, the first device sends a first clear to send CTS frame on the Wi-Fi channel, specifically including: the first device enters the activation state at the beginning of a first activation time slot and sends the CTS frame on the Wi-Fi channel; The first device wakes up from the sleep state and enters the active state at the beginning of the second activation time slot, and sends the CTS frame on the Wi-Fi channel; The first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator, and the second end indicator is used to indicate that the second group of data frames has been sent. The second device is in the activation state at the beginning of the second activation time slot, and listens to the media access control MAC frame transmitted on the Wi-Fi channel; After the second device detects the CTS frame on the Wi-Fi channel, receiving the second group of data frames sent by the first device; After receiving the second group of data frames, the second device sends a second feedback frame to the first device, where the second feedback frame is used to indicate that the second device has received the second group of data frames; After receiving the second feedback frame, the first device enters the sleep state.
4. The system according to claim 3, characterized in that When the first device enters the activation state at the beginning of the first activation time slot, and before sending the CTS frame on the Wi-Fi channel, the first device negotiates with the second device a working time slot map, where the working time slot map includes the first activation time slot and the second activation time slot.
5. The system according to claim 4, characterized in that The working time slot map also includes a first sleep time slot; the first device is in the sleep state in the first sleep time slot.
6. The system according to claim 5, characterized in that The second device is in the sleep state during the first sleep time slot.
7. The system according to claim 1 or 2, characterized in that: The last data frame in the first group of data frames further carries first subsequent data transmission indication information, where the first subsequent transmission indication information is used to instruct the first device to transmit the next group of data frames at a second time node; After the first device enters the activated state, sending the CTS frame on the Wi-Fi channel specifically includes: the first device enters the activated state at a first time node, and sends the CTS frame on the Wi-Fi channel; The first device wakes up from the dormant state and enters the activated state at the second time node, and sends the CTS frame on the Wi-Fi channel; The first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator and second subsequent data transmission indication information, the second end indicator is used to indicate that the second group of data frames has been sent, and the second subsequent transmission indication information is used to instruct the first device to transmit a next group of data frames at a third time node; The second device listens to the MAC frame transmitted on the Wi-Fi channel at the second time node; After the second device detects the CTS frame on the Wi-Fi channel, receiving the second group of data frames sent by the first device; After receiving the second group of data frames, the second device sends a second feedback frame to the first device, where the second feedback frame is used to indicate that the second device has received the second group of data frames; After receiving the second feedback frame, the first device enters the sleep state.
8. The system according to any one of claims 3 to 7, characterized in that: After sending the second feedback frame, the second device enters the sleep state.
9. The system according to any one of claims 1 to 8, characterized in that: The second device receives some data frames of the first group of data frames before sending the first feedback frame; After receiving part of the data frames of the first group of data frames, the second device sends a third feedback frame to the first device, where the third feedback frame is used to indicate that the second device has not completely received the first group of data frames; After receiving the third feedback frame, the first device resends the data frame in the first group of data frames that the second device has not received to the second device; After receiving all data frames of the first group of data frames, the second device sends the first feedback frame to the first device.
10. The system according to any one of claims 1 to 9, characterized in that: When the first device is in the activated state, the first device powers on the Wi-Fi module of the first device; When the first device is in the sleep state, the first device powers off the Wi-Fi module of the first device.
11. The system according to any one of claims 1 to 10, characterized in that: The receiving address of the CTS frame is the MAC address of the first device.
12. A Wi-Fi sleep scheduling method, characterized in that: include: After entering the activated state, the first device sends a CTS frame on the Wi-Fi channel, where the CTS frame is used to seize the Wi-Fi channel; The first device sends a first group of data frames to the second device on the Wi-Fi channel, wherein the first group of data frames includes one or more data frames, and the last data frame in the first group of data frames carries a first end indicator, and the first end indicator is used to indicate that the first group of data frames has been sent. The first device receives a first feedback frame sent by the second device, where the first feedback frame is used to indicate that the second device has received the first group of data frames; After receiving the first feedback frame, the first device enters a sleep state.
13. The method according to claim 12, characterized in that After entering the activated state, the first device sends a CTS frame on the Wi-Fi channel, specifically including: The first device enters the activation state at the beginning of the first activation time slot and sends the CTS frame on the Wi-Fi channel; After the first device enters the sleep state, the method further includes: The first device wakes up from the sleep state and enters the active state at the beginning of the second activation time slot, and sends the CTS frame on the Wi-Fi channel; The first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator, and the second end indicator is used to indicate that the second group of data frames has been sent. The first device receives a second feedback frame sent by the second device, where the second feedback frame is used to indicate that the second device has received the second group of data frames; After receiving the second feedback frame, the first device enters the sleep state.
14. The method according to claim 13, characterized in that Before the first device enters the active state at the beginning of the first activation time slot and sends the CTS frame on the Wi-Fi channel, the method further includes: The first device negotiates a working time slot map with the second device, where the working time slot map includes the first activation time slot and the second activation time slot.
15. The method according to claim 14, characterized in that The working time slot spectrum also includes a first sleep time slot; The first device is in the sleep state in the first sleep time slot.
16. The method according to claim 12, characterized in that The last data frame in the first group of data frames further carries first subsequent data transmission indication information, where the first subsequent transmission indication information is used to instruct the first device to transmit the next group of data frames at a second time node; After entering the activated state, the first device sends a CTS frame on the Wi-Fi channel, specifically including: The first device enters the activated state at a first time node, and sends the CTS frame on the Wi-Fi channel; After the first device enters the sleep state, the method further includes: The first device wakes up from the dormant state and enters the activated state at the second time node, and sends the CTS frame on the Wi-Fi channel; The first device sends a second group of data frames to the second device on the Wi-Fi channel, wherein the second group of data frames includes one or more data frames, and the last data frame in the second group of data frames carries a second end indicator and second subsequent data transmission indication information, the second end indicator is used to indicate that the second group of data frames has been sent, and the second subsequent transmission indication information is used to instruct the first device to transmit a next group of data frames at a third time node; The first device receives a second feedback frame sent by the second device, where the second feedback frame is used to indicate that the second device has received the second group of data frames; After receiving the second feedback frame, the first device enters the sleep state.
17. The method according to any one of claims 12 to 16, characterized in that: Before the first device receives the first feedback frame sent by the second device, the method further includes: The first device receives a third feedback frame sent by the second device, where the third feedback frame is used to indicate that the second device has not completely received the first group of data frames; The first device resends the data frames in the first group of data frames that the second device has not received to the second device.
18. The method according to any one of claims 12 to 17, characterized in that: The method further comprises: When the first device is in the activated state, the first device powers on the Wi-Fi module of the first device; When the first device is in the sleep state, the first device powers off the Wi-Fi module of the first device.
19. The method according to any one of claims 12 to 18, characterized in that: The receiving address of the CTS frame is the MAC address of the first device.
20. An electronic device, being a first device, characterized in that: include: One or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program, and when the one or more processors execute the computer program, the method as described in any one of claims 12-19 is executed.
21. A chip system, characterized in that: Applied to the first device, the chip system includes: a processing circuit and an interface circuit, the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions so that the chip system executes the method as described in any one of claims 12-19.
22. A computer-readable storage medium, characterized in that: A computer program is stored, which, when executed on a processor of a first device, causes the method according to any one of claims 12 to 19 to be performed.