A sleep scheduling method and device

By dynamically updating the sleep wake-up information in a distributed system and using a unified sleep wake-up schedule to coordinate the scheduling, the problems of high equipment power consumption and insufficient burst service adaptability in many-to-many network topology in the prior art are solved, and equipment power consumption saving and business flexibility are achieved.

CN115278831BActive Publication Date: 2025-09-02HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110480045.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2025-09-02
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

The existing sleep scheduling method is mainly based on central nodes and cannot be applied to many-to-many network topology, resulting in high power consumption of equipment and inability to meet burst service needs.

Method used

In a distributed system, each device dynamically updates the sleep wake-up information according to business characteristics, coordinates the scheduling schedule through a unified sleep wake-up schedule, avoiding dependence on central nodes, and adapting to many-to-many connection scenarios.

Benefits of technology

Without affecting business interaction, it effectively saves equipment power consumption, adapts to the business needs of many-to-many connection scenarios, and flexibly responds to sudden services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115278831B_ABST
    Figure CN115278831B_ABST
Patent Text Reader

Abstract

The present application discloses a sleep scheduling method and device, which can be used in a distributed system including a first device, a second device and a third device. The method includes: the first device determines that a first service is coming according to first scenario information, generates second sleep wake-up information according to the first scenario information and the first sleep wake-up information, and updates the second sleep wake-up information to a sleep wake-up scheduling table. The first sleep wake-up information is used to indicate the sleep wake-up status of the first device on each time slice in the current sleep scheduling period. The second sleep wake-up information is used to indicate the sleep wake-up status on each time slice in the sleep scheduling period that needs to be met when the first device performs services including the first service. In the present application, when each device sends and receives services based on the sleep wake-up scheduling table, the power consumption of each device can be saved as much as possible without affecting the normal service interaction of each device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a sleep scheduling method and device. Background Art

[0002] In a network topology with multiple connected devices, the device load is heavier and the power consumption is higher than in a typical single-connection scenario due to the large number of links between the devices. To save power on each device in the network topology, sleep scheduling methods have been proposed. For example, the current sleep scheduling method is based on the power save mode (PSM) protocol; the target wake time (TWT) protocol; or the notice of absence (NOA) protocol.

[0003] The three sleep scheduling methods mentioned above can all be considered as scheduling methods based on a central node and cannot be applied to many-to-many network topologies. Summary of the Invention

[0004] The present application provides a sleep scheduling method and device for saving the power consumption of each device as much as possible without affecting the normal business interaction of each device in a distributed system.

[0005] In a first aspect, a sleep scheduling method is provided. The method can be used in a distributed system including a first device, a second device, and a third device. The distributed system can be a one-to-many system or a many-to-many system. The method is applicable to any device in the distributed system. The following example uses the method performed by the first device as an example. The method includes:

[0006] The first device determines that a first service is coming based on the first scenario information, generates second sleep wake-up information based on the first scenario information and the first sleep wake-up information, and updates the second sleep wake-up information to the sleep wake-up scheduling table. The first scenario information is used to indicate the service characteristics of the first service. The first sleep wake-up information is used to indicate the sleep wake-up status of the first device on each time slice in the current sleep scheduling period. The second sleep wake-up information is used to indicate the sleep wake-up status on each time slice in the sleep scheduling period that needs to be met when the first device performs services including the first service. The sleep wake-up scheduling table includes the sleep wake-up status of each device in the distributed system, and is used for the first device to send or receive data with other devices in the distributed system.

[0007] In an embodiment of the present application, in order to reduce the power consumption of each device in a distributed system, a minimum sleep wake-up time (also called a time slice) is defined in the time dimension, and N time slices are used as a sleep scheduling cycle. A unified sleep wake-up schedule is established for each device in the distributed system. The sleep wake-up schedule can indicate the latest sleep wake-up time of each time slice of all devices in the distributed system within the sleep scheduling cycle, so each device can select other suitable devices to collaborate on distributed services according to the sleep wake-up schedule. For example, there may be a business (such as a first business) to be transmitted between the first device and other devices (such as the second device) in the distributed system. The first device can update its own sleep wake-up status within the sleep wake-up cycle according to the characteristics of the first business to ensure the normal operation of the first business and save power consumption as much as possible. Further, the first device can update the updated sleep wake-up information to the sleep wake-up schedule. Other provinces are similar to the first device, so that each device in the distributed system can independently schedule each device according to the specific business, so that each device can enter sleep as much as possible without affecting the service delay throughput, saving power consumption. Each device dynamically updates its own sleep and wakeup status based on the sleep and wakeup status of other devices. This allows for flexible changes in sleep and wakeup status, thus facilitating the actual transmission needs of burst services. Furthermore, since each device in a distributed system does not need to rely on a fixed device in the distributed system, such as a central node, to update its sleep and wakeup schedule, the sleep scheduling method provided in this embodiment of the application is applicable to many-to-many connection scenarios.

[0008] In a possible implementation, the method further includes:

[0009] The first device broadcasts a first periodic notification frame (PNF) within a preset time slice within the sleep scheduling cycle, receives a second PNF from the second device, and updates the stored sleep wake-up schedule according to the second PNF. The first PNF is used to indicate the second sleep wake-up information, and the second PNF is used to indicate the sleep wake-up information of the second device. It is understandable that each device can broadcast its own current sleep wake-up information within a preset time slice within the sleep scheduling cycle, so that each device can maintain the sleep wake-up schedule based on the sleep wake-up information of other devices. This ensures that the sleep wake-up time of each time slice within the sleep scheduling cycle for all devices in the distributed system is the latest, ensuring that as many devices as possible enter sleep mode when conducting business between devices, saving power consumption.

[0010] In a possible implementation, the method further includes:

[0011] The first device determines that it has entered any of the following scenarios, and the first device updates the sleep and wake-up information of the corresponding link, and notifies the second device of the updated sleep and wake-up information of the corresponding link; wherein, the scenarios include: keep-alive scenarios, link change scenarios, emergency business scenarios or business change scenarios, and the keep-alive scenarios are used to indicate that the link of the first device remains connected, and there is no business data interaction between the first device and other devices. It should be understood that as the business of the first device proceeds, the application scenario of the first device may change, for example, there is an emergency business between the first device and the second device, or for example, the traffic of the transmission link between the first device and the second device changes significantly. In this case, the first device can adaptively adjust the sleep and wake-up information of the corresponding link and notify the second device. In this way, the second device can update the saved sleep and wake-up information of the corresponding link based on the latest sleep and wake-up information of the transmission link between the first device and the second device, without affecting the business on the transmission link of other devices.

[0012] In a possible implementation, the first device enters a keep-alive scenario, and the method further includes:

[0013] The first device queries the amount of cached data. If the amount of data is greater than or equal to a first preset threshold, the first device updates the sleep / wakeup information for the transmission link between the first and second devices to the sleep / wakeup information for the first link. The first device also sends a first notification frame to the second device and receives a second notification frame from the second device. The first notification frame carries the sleep / wakeup information for the first link, so that the second device updates the stored sleep / wakeup information for the transmission link between the first and second devices to the sleep / wakeup information for the second link based on the sleep / wakeup information for the first link. The second notification frame carries the sleep / wakeup information for the second link. This solution considers a possible application scenario, such as when the first device may not send service data in a timely manner due to interference or other factors. In this scenario, even though there may be no service transmission between the first and second devices, the first device can still update its own sleep / wakeup information to maximize the transmission of the data cached by the first device. For example, the first device can set the first P time slots within the sleep / wakeup period to the awake state to minimize cache space on the first device. To ensure that the sleep / wakeup information for the transmission link used to send the cached data is consistent between the first device and the peer device, the first device notifies the second device of the sleep / wakeup information for the first link. Similarly, the second device updates the sleep / wake-up information of the corresponding transmission link and can inform the first device of the sleep / wake-up information of the second link.

[0014] In a possible implementation, the first device enters a link change scenario, and the method further includes:

[0015] The first device determines that the traffic of the transmission link between the first device and the second device is greater than or equal to the second preset threshold, and updates the sleep and wake-up information of the transmission link between the first device and the second device to the first link sleep and wake-up information. The first device sends a first notification frame to the second device and receives a second notification frame from the second device. The first notification frame carries the first link sleep and wake-up information, so that the second device updates the stored sleep and wake-up information of the transmission link between the first device and the second device to the second link sleep and wake-up information according to the sleep and wake-up information of the first link; the second notification frame carries the second link sleep and wake-up information. This solution takes into account another possible application scenario. For example, as the traffic of the link between the first device and the second device changes, the current sleep and wake-up situation of the first device may not be optimal. In this case, the first device can adaptively increase the wake-up time slice temporarily according to the link traffic size to transmit the service data stored in the data cache module to the opposite device more quickly, thereby reducing latency.

[0016] In a possible implementation, the first device enters an emergency service scenario, and the method further includes:

[0017] The first device updates the sleep and wake-up information of the transmission link between the first device and the second device to the sleep and wake-up information of the first link. The first device sends a first notification frame to the second device and receives a second notification frame from the second device. The first notification frame carries the sleep and wake-up information of the first link, so that the second device updates the stored sleep and wake-up information of the transmission link between the first device and the second device to the sleep and wake-up information of the second link according to the sleep and wake-up information of the first link; the second notification frame carries the sleep and wake-up information of the second link. This solution takes into account another possible application scenario, that is, sudden business is generated between multiple interconnected devices. In this case, the various devices in the distributed system can be flexibly scheduled. For example, the first device and the second device negotiate the sleep and wake-up time slices for sending and receiving emergency business, so that the data of the burst business is transmitted as quickly as possible and does not affect the overall sleep of the distributed system as much as possible.

[0018] In one possible implementation, the first device generates second sleep wake-up information based on the first scenario information and the first sleep wake-up information, including: the first device generates the second sleep wake-up information based on the first preset rule, the first scenario information and the first sleep wake-up information, wherein the first preset rule satisfies one or more of the following preset rules.

[0019] In exemplary preset rule 1, the first device currently has no service and cannot determine the sleep / wakeup information for the first service. The second sleep / wakeup information indicates that the first device is awake during each time slice within the sleep scheduling period. It is understood that when the first device currently has no service and a first service arrives, it is impossible to determine the sleep / wakeup status of the first service. In this case, to ensure the normal operation of the subsequent first service, the first device may be set to remain awake throughout the entire sleep scheduling period.

[0020] In exemplary preset rule 2, the first device currently has a service, and the first sleep-wakeup information indicates that the first device is in an awake state during each time slice within the sleep scheduling period. The second sleep-wakeup information indicates that the first device is in an awake state during each time slice within the sleep scheduling period. It is understood that if the first device currently has a service, and the current service requires the first device to be awake throughout the entire sleep scheduling period, then to ensure the smooth operation of the current service, regardless of the sleep-wakeup conditions required by the first service, the first device must be awake throughout the entire sleep scheduling period.

[0021] In exemplary preset rule three, the first device is currently engaged in a service. The first sleep-wakeup information indicates that the first device is awake for a portion of the time slices within the sleep scheduling period. If the first device cannot determine the sleep-wakeup information for the first service, the second sleep-wakeup information indicates that the first device is awake for all time slices within the sleep scheduling period. If the first device can determine the sleep-wakeup information for the first service, the second sleep-wakeup information is generated based on the first sleep-wakeup information and the sleep-wakeup information for the first service. It is understandable that the first device may currently be engaged in a service, but the current service requires the first device to be awake for only a portion of the time slices within the entire sleep scheduling period. In this case, if the first device cannot determine the sleep-wakeup status for the incoming first service, to ensure the normal operation of subsequent first services, the first device may be set to be awake for the entire sleep scheduling period. If the first device can determine the sleep-wakeup status for the first service, it may determine the sleep-wakeup status required for the current service and the first service based on the sleep-wakeup status required for the current service and the first service, thereby ensuring that the first device enters sleep as often as possible and saving power.

[0022] In one possible implementation, the first scene information includes one or more of the following information:

[0023] The type information of the first service, the minimum delay tolerance value of the first service, the packet sending interval corresponding to the first service, and the scene gear corresponding to the first service, wherein the scene gear is used to indicate the sleep and wake-up status of each time slice of the first service within the sleep scheduling period, and different scene gears correspond to different sleep and wake-up status.

[0024] In the embodiments of the present application, there is no restriction on the specific form of the scenario information. For example, the scenario information may be the minimum delay tolerance value of the first service, and the first device determines the sleep and wake-up information that needs to be met based on the minimum delay tolerance value of the first service, which is relatively direct. For another example, the scenario information may also be the type information of the service. In this case, the first device may determine the service characteristics of the first service based on the relevant information sent by the application layer based on the service flow, and then determine the minimum delay tolerance value that needs to be met by the first service based on the service characteristics, and then determine the sleep and wake-up conditions that need to be met. Alternatively, the scenario information may be the packet sending interval of the first service. Since the application layer may not send the relevant information of the first service, in this case, the first device may monitor some characteristics of the first service by itself, such as the packet sending interval of the first service, to determine the sleep and wake-up conditions that need to be met. Alternatively, the scenario information may also be a scene gear, which directly characterizes the sleep scheduling conditions that need to be met by the first service, which is more direct.

[0025] In a second aspect, an electronic device is provided, comprising a display screen, one or more processing modules, a memory, and one or more programs. The one or more programs are stored in the memory and include instructions that, when executed by the electronic device, cause the electronic device to perform the method provided by the first device in the first aspect or any possible implementation, or cause the electronic device to perform the method provided by the second device in the first aspect or any possible implementation.

[0026] For example, the electronic device may execute: determining that a first service is coming according to the first scenario information, generating second sleep wake-up information according to the first scenario information and the first sleep wake-up information, and updating the second sleep wake-up information to the sleep wake-up scheduling table. The first scenario information is used to indicate the service characteristics of the first service. The first sleep wake-up information is used to indicate the sleep wake-up status of the first device at each time slice in the current sleep scheduling period. The second sleep wake-up information is used to indicate the sleep wake-up status at each time slice in the sleep scheduling period that needs to be met when the first device performs services including the first service. The sleep wake-up scheduling table includes the sleep wake-up status of each device in the distributed system, and is used for the first device to send or receive data with other devices in the distributed system.

[0027] As an optional implementation, the electronic device further includes a transceiver module, wherein the transceiver module is configured to broadcast a first PNF within a preset time slice within the sleep scheduling period and receive a second PNF from a second electronic device. The first PNF is configured to indicate the second sleep wakeup information, and the second PNF is configured to indicate the sleep wakeup information of the second electronic device.

[0028] As an optional implementation, the processing module is further configured to:

[0029] Determine that any of the following scenarios has been entered, update the sleep / wakeup information of the corresponding link, and notify the second device of the updated sleep / wakeup information of the corresponding link;

[0030] Among them, the scenarios include: keep-alive scenarios, link change scenarios, emergency business scenarios or business change scenarios. The keep-alive scenarios are used to indicate that the link of the first device remains connected and there is no business data interaction between the first device and other devices.

[0031] As an optional implementation, the electronic device enters a keep-alive scenario, wherein the processing module is further configured to: query the amount of cached data, and when the amount of data is greater than or equal to a first preset threshold, update the sleep / wake-up information of the transmission link between the electronic device and the second device to the first link sleep / wake-up information;

[0032] The transceiver module is also used to: send a first notification frame to the second device, the first notification frame carrying the first link sleep wake-up information, so that the second device updates the stored sleep wake-up information of the transmission link between the electronic device and the second device to the second link sleep wake-up information according to the sleep wake-up information of the first link; and receive a second notification frame from the second device, the second notification frame carrying the second link sleep wake-up information.

[0033] As an optional implementation, when the electronic device enters the link change scenario, the processing module is further configured to: determine that the traffic of the transmission link between the electronic device and the second device is greater than or equal to a second preset threshold, and update the sleep / wake-up information of the transmission link between the electronic device and the second device to the first link sleep / wake-up information;

[0034] The transceiver module is also used to: send a first notification frame to the second device, where the first notification frame carries the first link sleep wakeup information, so that the second device updates the stored sleep wakeup information of the transmission link between the electronic device and the second device to the second link sleep wakeup information according to the sleep wakeup information of the first link; and receive a second notification frame from the second device, where the second notification frame carries the second link sleep wakeup information.

[0035] As an optional implementation, when the electronic device enters an emergency service scenario, the processing module is further configured to: update the sleep / wakeup information of the transmission link between the electronic device and the second device to the first link sleep / wakeup information;

[0036] The transceiver module is also used to: send a first notification frame to the second device, where the first notification frame carries the first link sleep wakeup information, so that the second device updates the stored sleep wakeup information of the transmission link between the electronic device and the second device to the second link sleep wakeup information according to the sleep wakeup information of the first link; and receive a second notification frame from the second device, where the second notification frame carries the second link sleep wakeup information.

[0037] As an optional implementation, the processing module is specifically configured to generate second sleep / wake-up information based on a first preset rule, the first scenario information, and the first sleep / wake-up information, wherein the first preset rule satisfies one or more of the following:

[0038] The electronic device currently has no business and cannot determine the sleep wake-up information for the first business. The second sleep wake-up information is used to indicate that the electronic device is in the wake-up state in each time slice within the sleep scheduling period; or

[0039] The electronic device currently has a business, the first sleep-wake-up information indicates that the electronic device is in the awake state in each time slice within the sleep scheduling period, and the second sleep-wake-up information is used to indicate that the electronic device is in the awake state in each time slice within the sleep scheduling period; or

[0040] The electronic device currently has a business, and the first sleep wake-up information indicates that the electronic device is in a wake-up state in some time slices within the sleep scheduling cycle. If the electronic device cannot determine the sleep wake-up information for performing the first business, the second sleep wake-up information is used to indicate that the electronic device is in a wake-up state in each time slice within the sleep scheduling cycle; if the electronic device can determine the sleep wake-up information for performing the first business, the second sleep wake-up information is generated based on the first sleep wake-up information and the sleep wake-up information of the electronic device for performing the first business.

[0041] As an optional implementation, the first scenario information includes one or more of the following information:

[0042] The type information of the first service, the minimum latency tolerance value of the first service, the packet transmission interval corresponding to the first service, and the scene gear corresponding to the first service. The scene gear is used to indicate the sleep and wake-up status of the first service in each time slice within the sleep scheduling cycle. Different scene gears correspond to different sleep and wake-up status.

[0043] Regarding the technical effects brought about by the second aspect or various optional implementations, reference may be made to the introduction to the technical effects brought about by the first aspect or corresponding implementations.

[0044] According to a third aspect, an electronic device is provided, comprising a module / unit for executing the method executed by the first device in the first aspect or any possible implementation manner.

[0045] In a fourth aspect, a system is provided, comprising a first device, a second device, and a third device. Optionally, the system may further include other devices, wherein the devices included in the system are capable of implementing distributed services, such as multi-screen collaboration. Each device may be implemented by the electronic device of the second aspect or the electronic device of the third aspect.

[0046] In a fifth aspect, a chip is provided, which includes a processor and an interface, wherein the interface is used to communicate with the processor and receive information from other devices; the processor is used to execute the method described in the above-mentioned first aspect and any possible implementation method of the first aspect.

[0047] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program runs on a computer, the computer is caused to execute one or more of the following methods: the method executed by the first device in the above-mentioned first aspect or any possible implementation manner.

[0048] In a seventh aspect, a computer program product comprising instructions is provided, wherein the computer program product is used to store a computer program, and when the computer program runs on a computer, the computer is caused to execute one or more of the following methods: the method executed by the first device in any possible implementation of the above-mentioned first aspect or the method.

[0049] The technical solution provided by the embodiments of the present application establishes a unified sleep / wakeup schedule for each device in a distributed system. When each device receives and transmits services with other devices based on this sleep / wakeup schedule, the power consumption of each device is minimized as much as possible without affecting the normal service interactions of each device in the distributed system. Furthermore, because each device in the distributed system does not need to rely on a fixed device in the distributed system, such as a central node, to update the sleep / wakeup schedule, the sleep scheduling method provided by the embodiments of the present application is applicable to many-to-many connection scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is the working diagram of PSM;

[0051] Figure 2 This is a schematic diagram of the working of TWT;

[0052] Figure 3 This is a schematic diagram of the working of NOA;

[0053] Figure 4 A schematic diagram of the architecture of the first distributed system provided in an embodiment of the present application;

[0054] Figure 5 A schematic diagram of the architecture of the second distributed system provided in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of a sleep-wake cycle provided in an embodiment of the present application;

[0056] Figure 7A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0057] Figure 7B A schematic diagram of the software structure of the electronic device provided in an embodiment of the present application;

[0058] Figure 8 A schematic diagram illustrating the scheduling relationship between the functional modules of the sleep scheduling method provided in an embodiment of the present application;

[0059] Figure 9 A schematic diagram of a frame structure of the first part carrying the RP value provided in an embodiment of the present application;

[0060] Figure 10 A schematic diagram of a process flow of a sleep scheduling method for a distributed system provided in an embodiment of the present application;

[0061] Figure 11 A schematic diagram of the structure of a PNF provided in an embodiment of the present application;

[0062] Figure 12 A flowchart of an exemplary sleep scheduling method provided in an embodiment of the present application;

[0063] Figure 13 A schematic diagram of the emergency service processing flow provided in the embodiment of the present application;

[0064] Figure 14 A schematic diagram of the structure of a dynamic negotiation frame provided in an embodiment of the present application;

[0065] Figure 15 Another structural schematic diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below with reference to the accompanying drawings.

[0067] With the development of Internet of Things technology, more and more businesses or applications hope to be realized through the collaboration of multiple devices. For example, in order to improve the user experience, a multi-screen collaboration function (or, called a multi-device collaboration function) is provided, which can support applications and businesses that work together on multiple devices, such as multi-screen collaboration, information sharing, etc. For example, under the multi-screen collaboration function, device 1 can cast its screen to device 2, so that the file on device 1 can be opened on device 2. For example, if a mobile phone and a personal computer (personal computer, PC) perform multi-screen collaboration, the mirror image of the mobile phone will be displayed on the display screen of the PC, and the mirror image of the mobile phone displayed on the PC can also be understood as the projection interface. The user operates on the projection interface on the PC. For example, if the user chooses to open file A, the PC can open file A, but in fact file A is a file in the mobile phone. The display area of ​​the PC is larger than that of the mobile phone. When the user views the file on the PC, the user's viewing effect can be improved.

[0068] For ease of description, in the embodiments of this application, applications or services that rely on the collaborative operation of multiple devices are collectively referred to as distributed services. It should be understood that supporting distributed services requires connecting multiple terminal devices such as mobile phones, tablets, PCs, and display screens together to achieve one-to-one connections, one-to-many connections, or even many-to-many connections between multiple devices, that is, multi-device interconnection, so that distributed services can run collaboratively on multiple terminal devices.

[0069] It should be understood that in a network topology with multiple devices connected, due to the large number of links between devices, the device load is greater and the power consumption is higher than in a common single-connection scenario. Therefore, in some embodiments, multiple sleep scheduling methods are provided to save power consumption of each device in the network topology, such as the following sleep scheduling methods.

[0070] Sleep scheduling method 1: Sleep scheduling method based on the power save mode (PSM) protocol. This sleep scheduling method is suitable for one-to-many network topology architectures. Take the one-to-many network topology between access points (also known as access points, APs) and workstations (also known as stations, STAs) as an example. The AP can be considered a master node, and the STA can be considered a slave node. The AP acts as a central node to maintain the connection between multiple STA devices, so the sleep scheduling method based on the PSM protocol can also be considered a centralized sleep strategy. Its main idea is that the AP caches the STA's data, and when any STA actively requests data from the AP after waking up, the AP will send data to the STA. If the AP does not cache the data of a certain STA, the STA can continue to sleep, thereby achieving the purpose of saving power.

[0071] For easier understanding, see Figure 1, which is a schematic diagram of PSM operation. The server can send data from one or more STAs to the AP, and the AP caches the data of one or more devices. The AP periodically broadcasts the status of the AP's cache in beacon frames. Any STA can wake up periodically at the start of a fixed beacon frame according to the listen interval to listen to the beacon frames broadcast by the AP. If the STA listens to the beacon frame and determines from the beacon frame that the AP stores the STA's data, the STA will request the AP to obtain the data; on the contrary, if the STA determines from the beacon frame that the AP does not store the STA's data, the STA will continue to sleep.

[0072] Sleep scheduling method 2: A sleep scheduling method based on the target wake time (TWT) protocol. The TWT mechanism is applicable to energy-saving scenarios in large-scale IoT environments. Similar to sleep scheduling method 1, sleep scheduling method 2 is also a centralized sleep strategy, requiring a central node to perform scheduling. For example, the STA and AP negotiate to establish a schedule, which can be composed of TWT time periods. The AP schedules sleep for each STA in the network topology based on this schedule.

[0073] For easier understanding, see Figure 2 , which is a schematic diagram of TWT operation. Usually, the TWT time period negotiated by STA and AP includes one or more beacon periods. When the time period negotiated by STA and AP arrives, STA will wake up and wait for the trigger frame sent by AP to exchange data. When STA completes this data exchange, STA enters sleep state. Among them, each STA negotiates the TWT time period with AP independently, and each STA has a separate TWT time period. As shown in the figure, the TWT time periods of STA1 and STA2 are TW1 and TW2 respectively, that is, the wake-up time of STA1 and STA2 is different. AP can also group multiple STAs according to the set TWT time period, so that AP can schedule multiple STAs at the same time, thereby improving scheduling efficiency.

[0074] Sleep scheduling method 3: Sleep scheduling method based on the Notice of Absence (NOA) protocol. The NOA protocol can be applied to network topologies established by peer-to-peer (P2P) protocols. The general idea of ​​the NOA protocol is that the central node determines the time to enter and exit sleep, and the slave nodes sleep and wake up at the same time as the central node according to the central node's decision. For example, the central node sends NOA information to the slave nodes, so that the slave nodes sleep and wake up at the same time as the central node based on the received NOA information.

[0075] For easier understanding, see Figure 3 , which is a schematic diagram of NOA operation. The central node configures the time to enter and exit sleep and generates NOA information. The central node sends the NOA information to one or more slave nodes through beacon frames, etc. Any slave node receives the NOA information and goes into sleep or exits sleep according to the NOA information. For example, the central node is AP and the slave node is STA. AP sends a beacon frame carrying NOA information. STA1 and STA2 receive the beacon frame at the target beacon transmission time (TBTT). According to the NOA information carried by the beacon frame, the sleep time can be set to be consistent with the AP's sleep time. Here, TBTT can be considered as the time interval between two consecutive beacon transmissions by the AP.

[0076] The above three sleep scheduling methods can all be considered as scheduling methods based on the central node. For example, in sleep scheduling method one, the AP acts as the central node to maintain the connection of multiple STA devices. For example, in sleep scheduling method two, each STA independently negotiates the TWT time period with the AP, and the AP maintains the connection of multiple STA devices. For example, in sleep scheduling method three, the AP can be regarded as the central node, and multiple STAs sleep and wake up at the same time as the AP based on the NOA information of the AP. However, with the increase in the types of services or demands, more and more services may want to be realized through collaboration between any devices in the network. Obviously, a one-to-one or one-to-many network topology cannot meet the operation of such services. In order to support such services, a many-to-many network topology will be proposed, that is, there is no fixed central node in the network topology, and any devices can work together to realize such services.

[0077] However, the three sleep scheduling methods mentioned above can all be considered as scheduling methods based on a central node, which is obviously not applicable to many-to-many network topologies. In sleep scheduling method one, each STA needs to send a request to the AP every time to trigger the AP to send the cached data to the STA. For the STA, the signaling overhead is large and the efficiency of obtaining data is low. In sleep scheduling method three, the setting of NOA information is relatively simple and fixed. Once the NOA information is set, it will generally be fixed unless the NOA information is reset or canceled. However, there may be sudden business in the network topology, and it is obvious that sleep scheduling method three cannot meet the scenario of sudden business.

[0078] In view of this, an embodiment of the present application provides a sleep scheduling method for a distributed system, which saves the power consumption of each device as much as possible without affecting normal business interactions.

[0079] The sleep scheduling method provided in the embodiments of the present application can be applied to various distributed systems, such as the following distributed systems:

[0080] Distributed systems: One-to-one or one-to-many connection systems. For example, a distributed system is based on the Wireless Fidelity Peer-to-Peer (WiFi P2P) protocol developed and defined by the Wireless Fidelity (WiFi) Alliance (WFA). The WiFi P2P protocol is a peer-to-peer connection technology that enables multiple WiFi devices to form a network without an access point (AP). This network, also known as a P2P network or a P2P group, allows multiple WiFi devices to communicate with each other. The WiFi P2P protocol generally works by establishing a Transmission Control Protocol (TCP) / Internet Protocol (IP) link directly between two stations (STAs). One of these two STAs can be considered the traditional AP, called the group owner (GO), while the other STA can be called the group client (GC). In other words, a GC is similar to a STA, and a GO is similar to an AP. Just as a STA connects to an AP, a GC can also connect to a GO. It should be understood that in a P2P network or P2P group, a GO can correspond to one GC or multiple GCs. That is, the relationship between GOs and GCs can be one-to-one or one-to-many.

[0081] For example, see Figure 4 , showing a network architecture of a distributed system. Figure 4 The system includes three terminal devices, namely a terminal device 401, a terminal device 402 and a terminal device 403 located in a network. Figure 4 For example, terminal device 401 and terminal device 402 are mobile phones, and terminal device 403 is a PAD. Figure 4 In the example, after the initial link is established between terminal device 401, terminal device 402 and terminal device 403, terminal device 403 is the GO and terminal device 401 and terminal device 402 are both GCs. Terminal device 403 can perform collaborative services with terminal device 401 or with terminal device 402. Figure 1As shown, terminal device 403 and terminal device 402 can perform screen projection services. If the services that need to be coordinated exist in any two GCs in multiple interconnected settings, since GCs cannot communicate with each other, it is obvious that the coordinated services cannot be performed. For example, Figure 4 As shown, information sharing needs to be achieved between terminal device 401 and terminal device 402. However, since both terminal device 401 and terminal device 402 are GCs, the connection between terminal device 402 and terminal device 103 needs to be disconnected due to the role restrictions of terminal device 402 and terminal device 401. Re-establish the link between terminal device 401 and terminal device 402 so that terminal device 401 becomes GO, thereby achieving information sharing with terminal device 402. Otherwise, information sharing between terminal device 402 and terminal device 401 cannot be achieved. After terminal device 401 and terminal device 402 are re-established, one of terminal device 401 and terminal device 402 acts as GO and the other acts as GC. For example, Figure 4 For example, terminal device 401 acts as a GO and terminal device 402 acts as a GC. This means that the role of a device can change as the link is established. For example, after the initial link establishment, terminal device 401 acts as a GC. After the link is reestablished, terminal device 401 acts as a GO.

[0082] It should be understood that the WiFi P2P protocol is developed based on the 802.11 protocol framework and is a centralized network communication structure. In other words, WiFi P2P requires that each terminal device must be configured with a role, such as GO or GC. GO, as a central node, can communicate with any GC node connected to the GO, but GOs and GCs cannot communicate with each other. For example, if device 402, device 401, and device 403 watch a video on multiple screens in collaboration, and device 402 uses the information sharing function, then due to the role restrictions of device 403 and device 401, it is necessary to disconnect the connection between terminal device 402 and device 403 in order to achieve information sharing between device 402 and device 401. Otherwise, information sharing between device 402 and device 401 cannot be achieved.

[0083] Distributed system 2. A one-to-one connection, or a one-to-many connection, or a many-to-many connection system. For example, devices discover each other based on Bluetooth or WiFi, and establish connections with the discovered devices; then, through the established communication channel, they negotiate the link information for establishing WiFi direct communication with each other, and based on the link information, WiFi direct communication between devices is achieved, thereby forming a distributed system. Since the communication connection is established after the discovery between devices, and then the link information for establishing WiFi direct communication between devices is negotiated through the communication channel established between the devices, there is no need to assign specific roles to each device. The relationship between devices can be one-to-one, one-to-many, or many-to-many, and the roles of each device in the established distributed system are equal. In this way, distributed services can collaborate between any devices, and distributed services will not be restricted due to role issues. For example, the first device in a distributed system can project the screen to the second device, and files can be shared between the first and third devices, that is, there is no role conflict.

[0084] For example, see Figure 5 , which is a schematic diagram of a distributed system. Figure 5 Taking a distributed system including five devices as an example, it should be understood that these five devices are in the same network. These five devices are device 501, device 502, device 503, device 504, and device 505. Multi-screen collaboration or information sharing can be performed between devices 501, 502, 503, 504, and 505. For example, device 501 can perform multi-screen collaboration or information sharing with device 502 or device 503, device 502 can perform multi-screen collaboration with device 504, and device 503 can share information with device 505. Figure 5 For example, device 501 is a mobile phone, device 502 is a portable computer, device 503 is a tablet computer, device 504 is a personal computer, and device 505 is a smart speaker.

[0085] Taking device 501 as an example, device 501 can broadcast a discovery message via a Bluetooth communication channel. This discovery message is used to discover one or more devices, such as devices 502-505. Any device among devices 502-505, such as device 503, receives the discovery message and can send a response message to device 501 in response to the discovery message. After receiving the response message, device 501 can establish a Bluetooth connection with device 503 based on the response message. By analogy, other devices can also establish Bluetooth connections with device 501. After device 501 establishes a Bluetooth connection with each device, it can negotiate link information for establishing WiFi direct communication and establish WiFi direct communication with each other based on the link information, thereby forming distributed system 2.

[0086] The sleep scheduling method provided in the embodiments of the present application can be applied to various scenarios, such as the following:

[0087] Scenario one, also known as the keep-alive scenario, is when there is no interaction of business data between multiple interconnected devices. For example, multiple devices have established a connection to form a distributed system. However, the devices in the distributed system currently have no business that needs to be performed, so there is naturally no need for data interaction between devices. In this case, any device in the distributed system can be in a dormant state to save power consumption as much as possible. It should be understood that even if a device is in a dormant state, the link between the devices remains connected so that some data (that is, keep-alive data) can be maintained between the devices. For example, the interaction of small traffic and latency-insensitive data will not affect the normal operation of the devices.

[0088] Scenario 2, also known as the business scenario, involves the interaction of business data between multiple interconnected devices. For example, a mobile phone is the screen projection initiator, and PC1, PC2, and PC3 are the screen projection service devices. The mobile phone projects the screen or shares documents with PC1, PC2, and PC3. In this case, each device in the distributed system can be independently scheduled based on its specific business status, such as whether it is in progress or not, to ensure that each device enters sleep mode as much as possible without affecting business latency and throughput, thereby saving power.

[0089] Scenario three, also known as the business burst scenario, occurs when sudden business traffic is generated between multiple interconnected devices. In this case, the devices in the distributed system can be flexibly scheduled to ensure that the data of the sudden business traffic is transmitted as quickly as possible while minimizing the impact on the overall dormancy of the distributed system.

[0090] As described above, several application scenarios of the embodiments of the present application are introduced. Of course, in addition to the above scenarios, the embodiments of the present application can also be applied to other scenarios, and there is no specific limitation. In various application scenarios, in order to save the power consumption of each device as much as possible without affecting normal business interactions. The embodiments of the present application can define the minimum sleep wake-up time (unit) in the time dimension, for example, a time slot of 16ms is used as the minimum sleep wake-up time, and N minimum sleep wake-up times are used as the sleep wake-up cycle, where N is an integer greater than 2.

[0091] See Figure 6 Figure 2 shows a schematic diagram of a sleep-wake cycle. The time slots in a sleep-wake cycle can be divided into announcement slots and service slots. The announcement slots, for example, are the first M time slots in the sleep-wake cycle and are used by each device in the distributed system to notify the device of its sleep-wake status during the sleep-wake cycle. The time slots following the announcement slots are service slots, primarily used for data transmission and reception.

[0092] In an embodiment of the present application, any device in a distributed system, such as a first device, may send a periodic notification frame (PNF) in a notification time slot. The PNF indicates the sleep and wakeup status of the first device throughout the sleep and wakeup cycle. Each device in the distributed system receives the PNF from another device and, based on its own sleep and wakeup status, determines and updates its own sleep and wakeup time. For example, an embodiment of the present application may establish a sleep and wakeup schedule that indicates the sleep and wakeup times of each device in the distributed system. For example, the sleep and wakeup schedule is a bitmap of size K*N, where K is the number of devices in the distributed system and N is the number of time slots in the sleep and wakeup cycle. Because the sleep and wakeup schedule includes sleep and wakeup information for each device in the distributed system, each device can select other suitable devices to collaborate on distributed services based on the sleep and wakeup schedule. Because each device in the distributed system does not need to rely on a fixed device in the distributed system, such as a central node, to update the sleep and wakeup schedule, the sleep scheduling method provided in the embodiment of the present application is applicable to many-to-many connection scenarios. Furthermore, any device can proactively perform distributed services, namely data transmission, according to the sleep / wakeup schedule, without having to send a request in advance to trigger the other party to send data. Compared to the sleep / wakeup scheduling method 1 described above, this reduces signaling overhead between devices and improves data transmission efficiency. Each device dynamically updates its own sleep / wakeup status based on the sleep / wakeup status of other devices, allowing for flexible changes. Compared to the sleep / wakeup scheduling method 3 described above, this can meet the actual transmission needs of bursty services.

[0093] The technical solutions provided in the embodiments of the present application can be applied to electronic devices, such as any device constituting distributed system one or distributed system two. The following introduces electronic devices and embodiments for using such electronic devices. In some embodiments of the present application, the electronic device may be a portable electronic device, such as a mobile phone, a PAD, a portable computer, a wearable device with wireless communication capabilities (such as a smart watch, smart glasses, a smart bracelet, or a smart helmet, etc.), or a vehicle-mounted device, etc. Exemplary embodiments of portable electronic devices include but are not limited to devices equipped with It should also be understood that in some other embodiments of the present application, the electronic device may not be a portable device, for example, it may be a desktop computer, such as a PC, or it may be a television set or other device.

[0094] For example, Figure 7A A structural diagram of an electronic device 700 is provided.

[0095] It should be understood that the illustrated electronic device 700 is merely an example, and that the electronic device 700 may have more or fewer components than shown, may combine two or more components, or may have a different component configuration. The various components shown in the figures 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.

[0096] like Figure 7A As shown, the electronic device 700 may include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, an antenna 7, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a speaker 770A, a receiver 770B, a microphone 770C, an earphone interface 770D, a sensor module 780, a button 790, a motor 791, an indicator 792, a camera 793, a display screen 794, and a subscriber identification module (SIM) card interface 795, etc. The sensor module 780 may include a pressure sensor 780A, a gyroscope sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, an ambient light sensor 780L, a bone conduction sensor 780M, etc.

[0097] The following combination Figure 7A Each component of the electronic device 700 is introduced in detail.

[0098] The processor 710 may include one or more processing units. For example, the processor 710 may include an application processor (AP), 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). Different processing units may be independent devices or integrated into one or more processors. The controller may be the nerve center and command center of the electronic device 700. The controller may generate an operation control signal based on the instruction opcode and timing signal to complete the control of instruction fetching and execution.

[0099] Processor 710 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 710 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 710. If processor 710 needs to use the same instruction or data again, it can directly access it from the memory, thus avoiding repeated accesses and reducing processor 710 latency, thereby improving system efficiency.

[0100] The processor 710 can run the information sharing method provided by the embodiment of the present application. For example, the embodiment of the present application provides a collaborative quick operation service (Fast Collaborative Service). The collaborative quick operation service can be a software module. The software module can run on the processor 710, and the software module can be understood as a computer program. For example, the software module can provide system-level capabilities. Taking the Android system as an example, from a business perspective, the software module can be placed in the system service (system_server) process, and together with the activity manager service (activitymanager service, AMS), package manager service (package manager service, PMS), or window manager service (window manager service) in the system_server process, it builds the platform basic capabilities. Alternatively, from an implementation perspective, in addition to the system_server process, the collaborative quick operation service can also be placed in other processes. When the processor 710 integrates different devices, such as an integrated CPU and GPU, the CPU and GPU can cooperate to execute the method provided by the embodiment of the present application. For example, in the method provided by the embodiment of the present application, part of the algorithm is executed by the CPU, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.

[0101] In some embodiments, the processor 710 may include one or more interfaces. For example, the interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0102] USB interface 730 is an interface that complies with USB standards and specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. USB interface 730 can be used to connect a charger to charge electronic device 700, and can also be used to transfer data between electronic device 700 and peripheral devices. Charging management module 740 is used to receive charging input from a charger. Power management module 741 is used to connect battery 742, charging management module 740, and processor 710. Power management module 741 receives input from battery 742 and / or charging management module 740, and provides power to processor 710, internal memory 721, external memory, display screen 794, camera 793, and wireless communication module 770.

[0103] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 710 may include multiple I2C bus lines. The processor 710 may be coupled to the touch sensor 780K, the charger, the flash, the camera 793, and the like via different I2C bus interfaces. For example, the processor 710 may be coupled to the touch sensor 780K via the I2C interface, enabling communication between the processor 710 and the touch sensor 780K via the I2C bus interface, thereby enabling the touch function of the electronic device 700.

[0104] The mobile industry processor interface (MIPI) interface can be used to connect the processor 710 to peripheral devices such as the display 794 and the camera 793. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 710 and the camera 793 communicate via the CSI interface to enable the camera function of the electronic device 700. The processor 710 and the display 794 communicate via the DSI interface to enable the display function of the electronic device 700.

[0105] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 710 to the camera 793, the display 794, the wireless communication module 760, the audio module 770, the sensor module 780, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0106] The wireless communication functionality of electronic device 700 can be implemented using antenna 1, antenna 2, mobile communication module 750, wireless communication module 760, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 700 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0107] The mobile communication module 750 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 700. The mobile communication module 750 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 750 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 750 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 750 can be set in the processor 710. In some embodiments, at least some of the functional modules of the mobile communication module 750 can be set in the same device as at least some of the modules of the processor 710.

[0108] The wireless communication module 760 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 700. The wireless communication module 760 can be one or more devices that integrate at least one communication processing module. The wireless communication module 760 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 710. The wireless communication module 760 can also receive the signal to be sent from the processor 710, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0109] In some embodiments, antenna 1 of electronic device 700 is coupled to mobile communication module 750, and antenna 2 is coupled to wireless communication module 760, so that electronic device 700 can communicate with a network and other devices via 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).

[0110] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 700. In other embodiments of the present application, the electronic device 700 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.

[0111] Electronic device 700 implements display functionality through a GPU, display screen 794, and an application processor. The GPU is a microprocessor for image processing that connects display screen 794 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 710 may include one or more GPUs that execute program instructions to generate or modify display information.

[0112] Display screen 794 is used to display images, videos, etc. Display screen 794 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED).

[0113] The electronic device 700 can realize the shooting function, or the image acquisition function, through the ISP, camera 793, video codec, GPU, display screen 794 and application processor.

[0114] The ISP processes data fed back by camera 793. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 793.

[0115] The camera 793 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 700 may include 1 or N cameras 793, where N is a positive integer greater than 1.

[0116] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 700 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0117] Video codecs are used to compress or decompress digital video. Electronic device 700 may support one or more video codecs. This allows electronic device 700 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0118] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic device 700, such as image recognition, face recognition, speech recognition, and text comprehension.

[0119] The internal memory 721 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 721 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 700 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 721 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. The processor 710 executes various functional applications and data processing of the electronic device 700 by running instructions stored in the internal memory 721 and / or instructions stored in a memory provided in the processor.

[0120] External memory interface 720 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with processor 710 via external memory interface 720 to implement data storage functions. For example, files such as pictures and videos can be saved on the external memory card.

[0121] The electronic device 700 can implement audio functions such as music playback and recording through the audio module 770, the speaker 770A, the receiver 770B, the microphone 770C, the headphone jack 770D, and the application processor.

[0122] The buttons 790 include a power button, a volume button, etc. The button 790 can be a mechanical button. It can also be a touch button. The electronic device 700 can receive button input and generate key signal input related to the user settings and function control of the electronic device 700. The motor 791 can generate a vibration prompt. The motor 791 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The indicator 792 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. The SIM card interface 795 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 795 or pulled out from the SIM card interface 795 to achieve contact and separation with the electronic device 700.

[0123] It is understandable that Figure 7A The components shown do not constitute a specific limitation on the electronic device 700. The mobile phone may also include more or fewer components than shown, or combine some components, separate some components, or arrange the components differently. Figure 7A The combination / connection relationship between the components can also be adjusted and modified.

[0124] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0125] Figure 7B It is a software structure block diagram of the electronic device 700 according to an embodiment of the present application.

[0126] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: application layer, application framework layer, system library layer, and kernel layer, from top to bottom.

[0127] The application layer can include a series of application packages. Figure 7B As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0128] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 7BAs shown, the application framework layer can include a window manager, content provider, view system, telephony manager, resource manager, notification manager, etc. The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0129] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0130] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0131] The phone manager is used to provide communication functions for the electronic device 700, such as management of call status (including answering, hanging up, etc.).

[0132] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0133] The Notification Manager allows apps to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically, without requiring user interaction. For example, the Notification Manager can be used to notify apps of completed downloads, message reminders, and more. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background apps, or as dialog windows on the screen. Examples include displaying text messages in the status bar, sounding notifications, vibrating electronic devices, and flashing indicator lights.

[0134] The system library, including the core library and the virtual machine, is responsible for operating system scheduling and management. The system library consists of two parts: one containing the Java language's callable functions and the other the operating system's core libraries. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files in the application and application framework layers as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0135] The system library can include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. Among them, the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.

[0136] The kernel layer is the layer between hardware and software, providing the application programming interface (API) and programming framework for the application framework layer. Figure 7B As shown, the kernel layer includes at least a hardware abstraction layer (HAL), a driver layer, and a firmware layer. The firmware layer is located between the driver layer and the hardware. The sleep scheduling service provided in the embodiment of the present application can be located in the kernel layer. For example, the various algorithms involved in the sleep scheduling service can be present in the kernel layer in the form of corresponding functional modules through the form of encapsulated interfaces.

[0137] The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit, used to realize the recognition of sleep scenarios, the scheduling of the sleep and wake-up schedule of the device, and / or the power control of the device.

[0138] like Figure 7B As shown, the hardware abstraction layer includes a scene recognition module and a basic scheduling module. The scene recognition module is an interface with the application framework layer and provides the ability to parse commands from the application layer. Applications in the application layer set scenes through commands, and the scene recognition module determines the current application scene by parsing these commands. The scene recognition module notifies the basic scheduling module of the determined scene. The basic scheduling module receives information indicating the scene from the scene recognition module and, based on the scene, generates basic sleep and wakeup status for each link in the distributed system. The generated basic sleep and wakeup status for each link is then communicated to the low-power state machine module.

[0139] In some embodiments, the hardware abstraction layer may further include a dynamic scheduling module, which is used to determine whether the emergency service can be sent during the current sleep and wake-up cycle by cooperating with the low-power state machine module when an emergency service arrives, and pass the sleep and wake-up time obtained through dynamic negotiation to the low-power state machine module. It should be noted that the dynamic scheduling module is not indispensable, so in Figure 7B It is indicated by a dotted line.

[0140] The driver layer, also known as the host media access control (HAMC) layer, is used to implement the protocol stack. For example, it implements the generation and parsing of elements in the sleep and wakeup schedule in the PNF, the maintenance of the sleep and wakeup status of each device, the generation and parsing of sleep dynamic negotiation frames, the interactive process and state machine of sleep dynamic negotiation, and the power control interaction protocol.

[0141] like Figure 7B As shown, the driver layer may include a frame processing module, a low-power state machine module, a virtual access point (VAP) management module, a device link establishment module, a device synchronization module, and a master device election module.

[0142] The frame processing module is primarily responsible for parsing and generating relevant frames, such as PNFs, dynamic negotiation frames, and sleep / wakeup schedule notification frames. The low-power state machine module is a low-power state machine primarily responsible for generating device sleep / wakeup information and maintaining the sleep / wakeup schedule. For example, the low-power state machine module can be used to generate, reset, and update the sleep / wakeup schedule. The low-power state machine module can also interact with other modules. For example, the low-power state machine module can notify other modules of the device's sleep / wakeup information, dynamic negotiation information, and information required to generate various frames.

[0143] The VAP management module is used to create and delete VAPs. A VAP is a virtualized AP that represents multiple APs on a single physical AP. Each virtualized AP is a VAP, and each VAP provides the same functionality as a physical AP. Users can create different VAPs on a single AP to provide wireless access services to different user groups.

[0144] The device link module can be used for link creation, link removal and other related tasks between devices.

[0145] The device synchronization module can be used to synchronize devices in the system.

[0146] The master device election module can be used to elect a master device from multiple devices in a distributed system, as well as to update the master device.

[0147] The firmware layer, also known as the device media access control (DMAC) layer, is mainly used to directly control hardware registers. For example, it can generate timer wake-up and sleep interrupt offsets based on the sleep wake-up schedule, hardware timer interrupt wake-up based on TSF offset, hardware timer interrupt sleep based on TSF offset, data cache in the sleep state, power gating register configuration for deep sleep and light sleep states, and power level configuration for the external power amplifier (PA) and internal variable gain amplifier (VGA);

[0148] like Figure 7B As shown, the firmware layer may include a data cache module, a low power timer module, a power control scheduling module, a sleep / wake-up state machine module, and a demodulation module.

[0149] The data cache module manages cached data. For example, in the sleep (keep-alive) state, the data cache module can cache data that arrives during the device's sleep time, or cache urgent service data that arrives but cannot be sent in time. When the data cached in the data cache module exceeds a certain threshold, the data cache module can notify the low-power state machine module to increase the device's wake-up time.

[0150] The low-power timer module is mainly used to handle various interrupt events and distribution, sleep-related timers, to manage the start of each minimum sleep wake-up time and the start of the sleep scheduling cycle.

[0151] The power control scheduling module is mainly used for power control scheduling. For example, the power level can be adjusted according to the distance information between the devices and the bit error feedback from the receiving end. For example, the power control scheduling module determines the signal strength of the reference signal receiving power (RSRP) indicating the distance information between the transmitting and receiving ends, and converts it into different distance levels according to different signal strengths, thereby obtaining different power transmission level levels. For another example, the power control scheduling module dynamically adjusts the power according to the bit error information fed back by the receiving end. When the bit error fed back by the receiving end is high at a certain power level, the power is dynamically adjusted. When the bit error fed back by the receiving end is higher than a certain threshold, the power is triggered to increase.

[0152] The sleep / wake-up state machine module can control the sleep / wake-up status of each device according to the sleep / wake-up schedule.

[0153] It should be noted that the functional modules described above are merely examples. In actual applications, the sleep scheduling service may be divided into more or fewer functional modules based on other factors. Even if divided into eight functional modules, the functions of each functional module may be divided in other ways. Alternatively, the sleep scheduling service may not be divided into functional modules but may operate as a whole.

[0154] The following describes some workflows of the software and hardware of the electronic device 700 in combination with application scenarios.

[0155] See Figure 8 , which is a schematic diagram of the scheduling relationship between the various functional modules of the sleep scheduling method provided in the embodiment of the present application.

[0156] like Figure 8 ①, in the electronic device 700, the firmware layer can set a wake-up interrupt according to the sleep wake-up schedule, and the wake-up interrupt will trigger the low-power timer module to send a time slice arrival event to the low-power state machine module. The time slice arrival event is used to trigger the low-power timer module to set the start of the sleep wake-up time and the start of the sleep scheduling cycle. For example, when the low-power timer module receives a time slice arrival event, it can set a 16ms timer, that is, set the start of the sleep wake-up time. Of course, the low-power timer module can also detect the current time slot, such as a declaration time slot or a service time slot. The device can send and receive service data according to the set sleep wake-up time and sleep wake-up cycle.

[0157] like Figure 8 In step 2, when a service arrives, the application in the application layer can notify the scene recognition module of the service information (scene information) through the agreed interface. If the service changes, such as the service type or service characteristics, the scene recognition module can notify the basic scheduling module of the latest service information.

[0158] like Figure 8 In ③, the basic scheduling module estimates the sleep and wake-up status of the device based on the latest business information and current business conditions, and informs the low-power state machine module of the estimated result as the basic sleep and wake-up time information.

[0159] like Figure 8④, the low-power state machine module receives and saves the basic sleep and wake-up time information from the basic scheduling module. The low-power state machine module first queries the cache status of the data cache module in the declaration time slot of each sleep scheduling cycle, and then fills in the sleep and wake-up scheduling table according to the basic sleep and wake-up time information. In addition, when the size of the cached data of the data cache module exceeds a certain threshold, the data cache module can notify the low-power state machine module to temporarily increase the working time slot. Afterwards, the low-power state machine module sends the sleep and wake-up status notification frame of this device in this time slot, that is, PNF to the frame processing module. Of course, if there is an urgent business, the low-power state machine module will also send the information element (IE) used to generate the dynamic negotiation notification frame to the frame processing module (such as Figure 8 ⑤) in the above.

[0160] like Figure 8 In step ⑥, the frame processing module receives the PNF, parses the PNF, and notifies the low-power state machine module of the result of the parsed frame. The low-power state machine module can update the sleep and wake-up schedule according to the result sent by the frame processing module. The frame processing module receives the IE used to generate the dynamic negotiation notification frame, and generates a dynamic negotiation frame based on the IE. At the same time, during the dynamic negotiation, the frame processing module will also parse the received negotiation frame, and send the relevant information obtained after the parsing (such as the time information of the negotiated data transmission) to the low-power state machine module, so that the low-power state machine module can update the sleep and wake-up schedule, modify the interrupt, and set the low-power timer.

[0161] like Figure 8 In step ⑦, when the low-power timer times out, the low-power state machine module checks the sleep-wakeup schedule to see if the next time slot is 0 (i.e., the wakeup time slot). If so, it sets an offset interrupt based on the sleep-wakeup schedule. If the next time slot is 1 (i.e., the sleep time slot), it continues setting the timer.

[0162] Of course, if Figure 8 In ⑧, when the scene recognition module receives an indication from the application layer that there is an urgent service to be sent, it notifies the dynamic scheduling module. Figure 8 In step 9, the dynamic scheduling module parses the emergency service message, determines the address of the receiving end, and queries the low-power state machine module for the receiving end's busy / idle status. The low-power state machine module notifies the dynamic scheduling module of the receiving end's busy / idle status. The dynamic scheduling module then determines the nearest available time slot based on the receiving end's busy / idle status. The dynamic scheduling module then notifies the low-power state machine module of the nearest available time slot. The low-power state machine module modifies the sleep / wakeup schedule based on the received nearest available time slot information and marks the time slot as being used for negotiation of emergency service messages.

[0163] Any device in the distributed system can update its own sleep and wake-up status in the sleep and wake-up schedule according to the sleep and wake-up time of other devices. Therefore, each device selects other suitable devices at the appropriate time according to the sleep and wake-up schedule to cooperate in distributed services, avoiding unnecessary wake-ups and thus saving power consumption.

[0164] For ease of understanding, the following examples of this application will be described with Figure 7A Taking the electronic device 100 of the structure shown as an example, the sleep scheduling method provided in the embodiment of the present application is specifically described in conjunction with the accompanying drawings.

[0165] The embodiments of the present application provide multiple devices. These multiple devices can be the same device, such as electronic device 300; or these multiple devices can be different devices, such as some of the multiple devices are electronic devices 300 and some are displays. The embodiments of the present application do not limit the implementation form of these multiple devices. For example, these multiple devices can all be electronic devices, or these multiple devices can also be chips in electronic devices, or some of the multiple devices can be electronic devices and some can be chips in electronic devices.

[0166] The embodiment of the present application also provides a distributed system, which may include at least two devices among multiple devices. Of course, the distributed system may also include other devices. Any devices in the distributed system can perform multi-screen collaboration, information sharing, etc. In the embodiment of the present application, multiple interconnected devices can form a network as follows: Figure 4 The system shown can also be formed as Figure 5 The system shown.

[0167] The following describes the technical solution provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 4 or Figure 5 Take the network architecture shown as an example. It should be understood that when multiple devices are interconnected, if multiple devices have services with each other, such as projecting the screen of a first device to multiple devices or sharing files between devices. However, it may not be necessary for all devices in the system to work at the same time. In order to save energy consumption of each device as much as possible, in the embodiment of the present application, each device can independently control whether to sleep, so as to enter sleep for as long as possible and maximize energy saving.

[0168] In addition, each device in the embodiment of the present application realizes independent sleep and wake-up based on the same sleep scheduling cycle. For unified scheduling, the master device in the system can be the main one, that is, the master device sets the sleep scheduling cycle, and the other devices are based on the sleep scheduling cycle set by the master device. Figure 4 When the system shown in the figure establishes a link, each device has assigned a role. GO can be considered as the master device and GC can be considered as the slave device. Figure 5 Since the devices in the system can establish connections with each other through Bluetooth and WiFi, the roles of the devices in the system are equal, that is, there is no distinction between master and slave devices. Figure 5 How to select the master device in the system shown.

[0169] In a possible implementation, multiple devices in a distributed system can be prioritized, with the device with the highest priority being the master device. If the collection of all devices in a distributed system is called a domain, then the device with the highest priority within the domain is the master device. The embodiments of this application do not limit the method for determining priority.

[0170] As an example, device priority can be determined based on one or more of the following: device type, battery life, hardware capabilities, protocol version, number of connected devices, and MAC address. Device type includes, for example, a monitor, PC, tablet, mobile phone, IoT device, smart speaker, or wearable device. Device battery life includes, for example, the remaining battery level, such as high, medium, medium-low, and low. It should be noted that the present embodiment does not limit the number of remaining battery levels; each remaining battery level can be predefined. For example, if the remaining battery level is greater than or equal to 70% of the total battery, the remaining battery level is high; if the remaining battery level is greater than or equal to 50% and less than 70% of the total battery, the remaining battery level is medium; if the remaining battery level is greater than or equal to 30% and less than 50% of the total battery, the remaining battery level is medium-low; and if the remaining battery level is less than 30% of the total battery, the remaining battery level is low. Device hardware capabilities include, for example, whether the device uses dual WiFi chips or a single WiFi chip. It should be noted that the type of device, the battery life of the device, and the hardware capabilities of the device are merely examples, and the embodiments of the present application do not limit the specific forms of the type of device, the battery life of the device, and the hardware capabilities of the device.

[0171] In the embodiments of the present application, the priority of each device can be determined based on the priority information of each device, such as the device type, the device's battery life, the device's hardware capabilities, the protocol version used by the device, the number of devices connected to the device, and the priority of the device's MAC address. In other words, the priority of each device is determined based on the device type. If the priorities of each device determined based on the device type are consistent, the priority of the device can be further determined based on the device's battery life, and so on, until the priority of each device is determined. For example, the following can be executed in sequence: 1) Compare the types of each device. The device with the higher device type is the primary device. If the types of the devices are the same, proceed to 2); 2) Compare the battery life of each device. The device with the higher battery life is the primary device. If the battery life of the devices is the same, proceed to 3); 3) Compare the hardware capabilities of each device. The device with the higher hardware capability is the primary device. If the hardware capabilities of the devices are the same, proceed to 4); 4) Compare the protocol versions of each device. The device with the higher version number is the primary device. If the version numbers of the devices are the same, proceed to 5); 5) Compare the number of devices connected to each device. The device with the higher number of connections is the primary device. If the number of devices connected to each device is the same, proceed to 6); 6) Compare the MAC addresses of each device bit by bit. The device with the higher MAC address is the primary device.

[0172] Each device can report its own ranking priority (RP) value, which can be used to indicate the priority information of each device. The RP value can occupy one field or multiple fields, which is not limited by the embodiments of the present application. For example, the various contents indicated by the RP value can occupy different bits of the same field; or the various contents indicated by the RP value can occupy different fields.

[0173] For example, the RP value may include two parts: one indicating the ranking level and the other indicating the device's MAC address. The ranking level may include the device level, the device's protocol version number, and the number of connected devices. The device level may also include the device type, battery life, and hardware capabilities.

[0174] For example, see Figure 9 , a frame structure that carries the first part of the RP value. The sorting level field includes three fields: the device level field, the protocol version number field, and the connection number field. It should be noted that this embodiment of the application does not restrict the specific names of these three fields. This embodiment of the application does not restrict the number of bits occupied by each field. For example, the definition of the device level field can be found in Table 1.

[0175] Table 1

[0176]

[0177] After a master device is selected in a distributed system, slave devices can synchronize based on the master device's time, including but not limited to the following two methods.

[0178] For example, the master device may periodically transmit a time synchronization frame that carries time information used for time synchronization. For example, the time synchronization frame may be an 802.11 Beacon frame, carrying time information from the Timer Synchronization Function (TSF) and the basic service set identifier (BSSID) of the distributed system. Since 802.11 Beacon frames are used as time synchronization frames, the TSF of 802.11 Beacon frames can be used, enabling hardware clock synchronization with a 10µs error level and minimizing inter-device synchronization time. Any slave device that receives a time synchronization frame from the master device can obtain the BSSID carried in the frame. If the obtained BSSID matches its own BSSID, the time synchronization frame is considered to have been sent by a master device within the same network, and synchronization with the master device can be achieved based on the time synchronization frame. For example, if the slave device determines that the obtained BSSID matches its own BSSID, it can refresh the TSF counter, thereby achieving time synchronization with the master device.

[0179] Synchronization method 2: Active time synchronization, where the slave device proactively requests time synchronization. The slave device proactively requests time synchronization and does not need to wait for the master device to send a time synchronization frame. It can synchronize with the master device in advance, thus reducing synchronization latency.

[0180] For example, if the slave device requesting time synchronization is the first slave device, the first slave device can proactively broadcast a time synchronization request message, such as a sync_request action signaling frame, to request time synchronization from devices in the same network that have already completed time synchronization. Upon receiving the time synchronization request message, the master device or other slave devices can send a response message to the first slave device, such as a sync_response action signaling frame. The response message can carry the TSF time information of the master device or other slave device and the time domain (social slot) location of the transmitted information. The social slot location can be considered the time slot location where all near-field devices interact when discovering each other. Upon receiving the response message, the first slave device can complete time pre-synchronization based on the TSF time information carried in the response message, i.e., aligning it with the TSF time information of the master device. It should be understood that each device maintains TSF time information based on a local timer, but there is a delay in the device sending information. Therefore, after the first slave device receives the response message, it may not have yet discovered other slave devices in the network. Therefore, the first slave device may further monitor action signaling frames from the master device or other slave devices in the social slot to complete final synchronization according to the time information carried in the action signaling frames.

[0181] After the master device determines the status, it can set a sleep / wake cycle of N time slots. Each time slot can be considered a time slice. The minimum unit of the time slice can be preset, for example, 16ms, or other possible values. Each device in the system can choose to sleep or wake up in each time slot of the sleep / wake cycle based on actual needs, such as connection status with other devices and service conditions. In this embodiment, a bitmap can be used to identify the sleep or wake state of each time slot.

[0182] Each device can broadcast its own sleep / wakeup information. This allows all devices in the system to know their sleep / wakeup status and select the awakened device for distributed services, maximizing the number of sleep cycles across multiple devices and saving energy. For ease of distinction, the original basic sleep / wakeup information of each device is referred to as the first sleep / wakeup information, while the sleep / wakeup information generated by each device based on service needs is referred to as the second sleep / wakeup information.

[0183] It will be understood that this method involves Figure 4 or Figure 5 For ease of description, the following description takes the method involving a first device and multiple devices, where the multiple devices include, for example, a second device, a third device, and even a fourth device. The first device may be Figure 4 or Figure 5Any device in the Figure 4 or Figure 5 Since the process of updating its own sleep and wakeup information is the same for all devices, the following description uses the first device updating its own sleep and wakeup information as an example. In the following description, N = 32, M = 2, that is, the sleep scheduling period includes 32 time slots, and the announcement time slots are the first two time slots of the 32 time slots.

[0184] See Figure 10 , shows the process of the sleep scheduling method for a distributed system provided by an embodiment of the present application. This method is performed by the first device as an example.

[0185] S1001. A scene recognition module sends scene information to a basic scheduling module. Correspondingly, the basic scheduling module receives the scene information, where the scene information is used to indicate a service feature of a first service to be performed by a first device.

[0186] When a first service arrives, the first device may need to switch from a dormant state to an awake state during certain time slots. To this end, when the first service arrives, the application in the application layer can notify the scene recognition module of the first service's scenario information through a predetermined interface. The scene recognition module receives the scenario information from the application layer and identifies the scenario information to determine whether the first service requires the first device to be awakened from dormancy.

[0187] The scenario information may include the MAC address of the other end to inform the first device which device or devices the first service comes from. In addition, the scenario information may also include scenario-related information, such as one or more of the packet sending interval of the first service, the minimum delay tolerance value of the first service, and the number of frames per second (fps), or other information used to identify the first service, such as service type, audio type, video type, or file type. It should be understood that the sleep and wake-up situations corresponding to different scenario information are also different. For example, if the minimum delay tolerance value of the first service is low, then the first device is in the awake state in each time slot within the sleep scheduling period; if the minimum tolerance value of the first service is high, then the first device may be in the awake state for part of the time within the sleep scheduling period and in the sleep state for part of the time slot.

[0188] In some embodiments, the scene information may also include information for indicating scene-related information, such as a scene gear. The scene gear can be set according to the scene-related information. For example, if the minimum delay tolerance value of the first service is low, then the scene gear is high; if the minimum tolerance value of the first service is high, then the scene gear is low. It should be understood that the scene gear can be used to indicate the sleep and wake-up status of the first device in each time slice within the sleep scheduling cycle. The embodiment of the present application can pre-define multiple scene gears, and different scene gears correspond to different sleep and wake-up situations.

[0189] The embodiment of the present application does not limit the specific implementation form of the scene gear. In some embodiments, the scene gear may occupy multiple bits, or the scene gear may be defined according to the sleep and wake-up state of each time slot in the sleep scheduling cycle.

[0190] Exemplarily, four scene gears may be defined, such as the first gear, the second gear, the third gear, and the fourth gear. For example, the scene gear may occupy 2 bits, such as 00 identifies the first gear, 01 identifies the second gear, 10 identifies the third gear, and 11 identifies the fourth gear. For another example, the first gear is "1 ...

[0191] Of course, in some embodiments, the scene information may also include scene gear and scene-related information, which is not limited in the embodiments of the present application.

[0192] S1002: The basic scheduling module generates second sleep / wakeup information according to the scenario information and the first sleep / wakeup information, where the first sleep / wakeup information is used to indicate the current sleep / wakeup status of the first device.

[0193] The basic scheduling module receives the scenario information and estimates the sleep and wakeup status of the first device based on the scenario information and the current service status, namely the first sleep and wakeup information, to determine the time slots in which the first device needs to wake up. Generally speaking, after the first device establishes a connection with another device, such as a second device, the device link establishment module of the first device initializes the sleep and wakeup status of the first device. For example, the first device may be initialized to be awake at all time slots within the sleep scheduling period to ensure the normal operation of various services.

[0194] For example, in some embodiments, the structure of the sleep / wakeup information of each link may be defined as follows:

[0195]

[0196] Among them, Timeinfo is used to indicate the link's dormancy and wakeup information, MacAddr is the address of the link's peer, and AwakeDozeBitmap is used to indicate the link's dormancy and wakeup information. When initializing Timeinfo, for example, MacAddr can indicate the MAC address of the second device, and all bits in AwakeDozeBitmap are set to 1. Of course, if the link established between the first and second devices is disconnected, the device link establishment module can delete the Timeinfo of the link between the first and second devices, that is, release the Timeinfo.

[0197] After the device link establishment module initializes the Timeinfo of the first device and the second device, it may send AwakeDozeBitmap to the basic scheduling module.

[0198] The basic scheduling module may generate the first sleep-wake-up information based on the scene information. Exemplarily, the basic scheduling module may generate the first sleep-wake-up information based on the first preset rule and the scene information. The first preset rule may satisfy:

[0199] 1) If the scenario information is empty, the first sleep / wake-up information is generated based on the current service situation of the first device.

[0200] 2) If the scenario information is not empty, then generate the first sleep / wake-up information according to the scenario information and the current service situation.

[0201] The basic scheduling module can obtain scene information, such as the number of frames per second (fps), and generate the first sleep wake-up information based on the fps. The announcement slot is agreed to be the starting point of each sleep scheduling cycle, and the first slot after the announcement slot is the slot where services can be sent. Starting from the first slot where services can be sent, the number of consecutive sleep slots is (The packet transmission interval is equal to 1000 / fps.) For example, if the scene information indicates a 60fps scene, the number of consecutive sleep time slots is That is, the first device should not sleep. For another example, if the scene information indicates a 30fps scene, the number of time slots that can be continuously dormant is Therefore, the first dormancy awakening information of the link should be designed to awaken one time slot and dormant one time slot. In this case, the first dormancy awakening information, i.e., AwakeDozeBitmap, is shown in Table 2.

[0202] Table 2 First sleep / wake-up information corresponding to 30fps scene

[0203] 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[0204] Similarly, if the scene information indicates a 10fps scene, the number of consecutive sleep time slots is Therefore, the first doze-wakeup message for this link should be designed to wake up for one time slot and doze for five time slots. In this case, the first doze-wakeup message, AwakeDozeBitmap, is shown in Table 3. Table 3 also uses the agreed announcement time slot as the starting point of each doze scheduling cycle, and the first time slot after the announcement time slot as the time slot where services can be sent.

[0205] Table 3 First sleep / wake-up information corresponding to the 10fps scene

[0206] 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0

[0207] It should be understood that the arrival of the first service may require the first device to switch from a dormant state to an awake state in certain time slots. To this end, the first device needs to update the first dormancy wakeup information, that is, generate second dormancy wakeup information. The second dormancy wakeup information can be considered as indicating the dormancy wakeup conditions that the first device must meet for the original service and the first service.

[0208] For example, if the first device currently has no business to perform, the first sleep wake-up information can be used to indicate that the first device is in a sleep state in each time slot within the sleep scheduling period. If the scene recognition module detects the arrival of the first business, for example, the scene recognition module receives scene (business) information from the application layer, it can identify the scene information and notify the basic scheduling module of the identification result. The basic scheduling module estimates the sleep wake-up status of the first device for the first business based on the received scene information, and generates the second sleep wake-up information based on the estimation result and the first sleep wake-up information.

[0209] The basic scheduling module may estimate the sleep and wake-up status of the first device for the first service based on a preset rule according to the received scenario information.

[0210] As an example, the preset rules may satisfy one or more of the following:

[0211] 1) When the first device currently has no business and the first business arrives, the basic scheduling module cannot determine the sleep and wake-up status of the first device for the first business. The second sleep and wake-up information generated by the basic scheduling module is used to indicate that the first device is in the awake state in each time slot within the sleep scheduling period.

[0212] When the first device currently has no service, the basic scheduling module determines that a first service has arrived, for example, by receiving scenario information, but cannot identify a specific scenario based on the scenario information. For example, if the basic scheduling module cannot determine the minimum latency tolerance or scenario level for the first service, the first device may be set to be awake in each time slot within the sleep scheduling period to ensure the smooth operation of the first service.

[0213] 2) When the first device currently has a business and the first sleep wake-up information indicates that the first device is in an awake state in each time slot within the sleep scheduling period, the first business arrives, and the second sleep wake-up information generated by the basic scheduling module is used to indicate that the first device is in an awake state in each time slot within the sleep scheduling period.

[0214] Since the first device currently has a service, and the first sleep / wakeup information indicates that the first device is in the awake state in each time slot within the sleep scheduling period, it can be considered that the current service requires the first device to remain awake. To avoid affecting the current service of the first device, the first device remains awake even when the first service arrives.

[0215] 3) When the first device currently has a business and the first sleep wake-up information indicates that the first device is in the awake state in some time slots within the sleep scheduling cycle, the first business arrives, and the basic scheduling module cannot determine the sleep wake-up status of the first device for the first business. The second sleep wake-up information generated by the basic scheduling module is used to indicate that the first device is in the awake state in each time slot within the sleep scheduling cycle; the basic scheduling module can determine the sleep wake-up status of the first device for the first business. The basic scheduling module generates the second sleep wake-up information based on the first sleep wake-up information and the determined sleep wake-up status of the first device for the first business. The second sleep wake-up information can be used to indicate that the first device is in the awake state in some time slots within the sleep scheduling cycle, so that the first device is in the sleep state as much as possible, saving power consumption.

[0216] As an example, the first sleep-wakeup information of the first device may be as shown in Table 4.

[0217] Table 4 First sleep wake-up information

[0218] 1 1 1 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0

[0219] Assuming that there is a second service, the sleep / wake-up information corresponding to the second service is as shown in Table 5, for example.

[0220] Table 5 Sleep / wake-up information of the second service

[0221] 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[0222] Based on the first service requirement, the first device may update the first sleep / wakeup information, that is, regenerate sleep / wakeup information, that is, second sleep / wakeup information, according to the sleep / wakeup information of the first service and the first sleep / wakeup information.

[0223] Table 6 Second sleep wake-up information

[0224] 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0

[0225] As can be seen from Tables 4 to 6, when there is currently a service, if the basic scheduling module can determine the newly arrived service, it can update the first sleep-wakeup information based on the newly arrived service, that is, generate the second sleep-wakeup information.

[0226] Of course, if the first device completes certain tasks, that is, when certain tasks are finished, the first device may also update the first sleep-wakeup information based on a preset rule, that is, generate second sleep-wakeup information.

[0227] 4) When the first device currently has business and the first sleep-wake-up information indicates that the first device is in the awake state in each time slot of the sleep scheduling cycle, the basic scheduling module receives an instruction to delete the first business. The basic scheduling module cannot determine the sleep-wake-up conditions that the first device needs to meet for the remaining business, then the second sleep-wake-up information indicates that the first device is in the awake state in each time slot of the sleep scheduling cycle; on the contrary, the basic scheduling module can determine the sleep-wake-up conditions that the first device needs to meet for the remaining business, then the second sleep-wake-up information is generated based on the first sleep-wake-up information and the determined sleep-wake-up conditions.

[0228] 5) When the first device currently has business and the first sleep wake-up information indicates that the first device is in the awake state within part of the time slot of the sleep scheduling cycle, the basic scheduling module receives an instruction to delete the first business, and the basic scheduling module generates a second sleep wake-up information based on the sleep wake-up conditions that the first device needs to meet for the remaining business and the first sleep wake-up information.

[0229] 6) The basic scheduling module receives a command to adjust the service, and generates second sleep / wake-up information according to the first sleep / wake-up information and the sleep / wake-up condition required to be met by the adjusted service.

[0230] It should be understood that the update of the first sleep / wakeup information of the first device combines the sleep / wakeup information of all links of the first device. For each time slot, if the status of any link in that time slot is "1", the status of that time slot in the second sleep / wakeup information will still be "1". Only when the status of all links in that time slot is "0", the status of that time slot in the second sleep / wakeup information will be "0".

[0231] S1003: The basic scheduling module sends the second sleep-wake-up information to the low-power state machine module. Correspondingly, the low-power state machine module receives the second sleep-wake-up information.

[0232] S1004: The low power state machine module updates the sleep / wake-up schedule table according to the second sleep / wake-up information.

[0233] The basic scheduling module can notify the low-power state machine module of the device's latest sleep / wakeup status, i.e., the second sleep / wakeup information. The low-power state machine module updates the device's latest sleep / wakeup information to the sleep / wakeup schedule. Because the sleep / wakeup schedule can be used to schedule all devices in the distributed system, when a device's sleep / wakeup status is updated, the low-power state machine module can update the device's updated sleep / wakeup status to the sleep / wakeup schedule. This allows the first device to select an appropriate device for distributed services based on the sleep / wakeup schedule.

[0234] For example, when the sleep / wakeup status of any device changes, the frame processing module broadcasts a PNF in the announcement time slot of the next sleep scheduling cycle to inform each other of the corresponding sleep / wakeup information. Taking the first device as an example, the PNF is used to indicate the sleep / wakeup status of the first device in each time slot within the sleep scheduling cycle and can be considered a private broadcast action frame. In addition to including the sleep / wakeup information of the first device in each time slot within the sleep scheduling cycle, the PNF may also include other information, such as the MAC address of the first device, information used to identify the type of PNF, the number of devices connected to the first device, and other information.

[0235] As an example, see Figure 11 , is a structural diagram of a PNF provided in an embodiment of the present application. The PNF may include multiple fields, such as a MAC header field, a code field, an organizationally unique identifier (OUI) field, an OUI type field, an action type field, one or more attribute fields, a connection number field, a frame check sequence (FCS), etc. It should be noted that, Figure 11 This is just an example. The PNF may include more or fewer fields, and each field may occupy one or more bits. This is not limited in the embodiments of the present application.

[0236] Among them, the MAC header field can be determined according to the MAC header of the action frame, for example, it can carry the MAC address of the first device (also called the source address, that is, the PNF is the first device) and the destination address. Since the first device broadcasts the PNF, the destination address is the broadcast destination address. The code field can be filled in according to the category code of the action frame, for example, it can be determined as 127 according to the 802.11 protocol, indicating a Vendor-specific action. The OUI field can be pre-defined, for example, the OUI field can be used to carry "0x00-E0-FC" to indicate that the PNF is a private frame. The OUI Type field is used to identify the type of OUI, such as a private frame related to the PNF provided in the embodiment of the present application. The action type field is used to identify the action frame type, for example, the frame type of the PNF can be "0x01". One or more attribute fields are used to carry at least the sleep and wake-up information of the first device. The connection number field is used to carry the number of devices connected to the first device.

[0237] It should be understood that S1001 uses the first device as an example. In practice, each device in a distributed system broadcasts a PNF during the announcement time slot within the sleep schedule period. This allows a sleep / wakeup schedule table to be generated based on the sleep / wakeup information of each device. For example, the frame processing module of the first device may parse the PNF received from other devices and send the parsing results to the low-power state machine module, so that the low-power state machine module can update its stored sleep / wakeup schedule table based on the PNF sent by the other device during the announcement time slot. For example, the sleep / wakeup schedule table may contain identification information uniquely identifying the device, such as a MAC address or ID. After updating the sleep / wakeup schedule table, the low-power state machine module may broadcast a PNF frame during the next announcement time slot to establish a connection or transmit information between devices. It should be understood that the master device in the distributed system has defined a sleep schedule period, and the low-power timer modules of each device in the system set timers to set the start of the sleep schedule period and the start of the sleep / wakeup time. When a service arrives, the low-power state machine module may update its own sleep / wakeup state to enable the service to proceed normally. At the same time, the low power state machine module can update the updated sleep and wake-up state to the saved sleep and wake-up schedule table, and inform other devices of the updated sleep and wake-up state, so that other devices can update the saved sleep and wake-up schedule table, so that the system adopts a unified sleep and wake-up schedule table for sleep scheduling.

[0238] The first device may perform the first service according to the updated sleep / wakeup schedule. It should be understood that in certain scenarios, the first device may need to re-evaluate its own sleep / wakeup status. The following lists several scenarios in which the first device may need to update its own sleep / wakeup information and its stored sleep / wakeup schedule.

[0239] Scenario 1 can also be called a link change scenario.

[0240] For any link of the first device, the traffic volume on that link may change, and the current sleep / wakeup state of the first device may not be optimal. For example, if the traffic volume on a link of the first device increases, the data cache module of the first device may store more traffic data. To quickly transmit the traffic data stored in the data cache module to the peer device, the wakeup time slot may be temporarily increased. For another example, if traffic volume decreases over a period of time, the first device may be allowed to enter sleep mode more frequently to minimize power consumption. Based on this, the low-power state machine module of the first device may adaptively adjust the sleep / wakeup schedule based on the traffic volume of each link of the first device before updating the sleep / wakeup schedule in the announcement time slot of each sleep scheduling cycle (i.e., before sending the PNF). For example, when the traffic volume on the link between the first device and the second device exceeds a certain threshold, the low-power state machine module may temporarily increase the wakeup time slot, meaning that the sleep / wakeup information of the first device may indicate more wakeup states. Of course, a link of the first device may experience sudden emergency traffic; in this case, the wakeup time slot may also be temporarily increased. It should be noted that traffic statistics on the link between the first device and the second device can be achieved through the bottom layer, that is, the bottom layer monitors the traffic and counts it, or it can be based on business-related information sent down from the upper layer of the business flow. The embodiments of the present application do not limit this.

[0241] Of course, in order to ensure the normal operation of the business, if the sleep and wake-up information of any link of the first device changes, the first device needs to notify the opposite device of the corresponding link (such as the second device) of the changed sleep and wake-up information. Take the transmission link between the first device and the second device as an example, which is the first link. If the sleep and wake-up information of the first link of the first device changes, the first device can update the sleep and wake-up information of the first link and inform the second device of the updated sleep and wake-up information of the first link. The second device can update the saved sleep and wake-up information of the first link based on the updated sleep and wake-up information of the first link from the first device. The second device can inform the first device of the updated sleep and wake-up information of the first link, and the first device will update the sleep and wake-up information of the first link again based on this. In this way, the sleep and wake-up information of the first link saved by the first device and the second device are consistent to ensure the normal operation of the business.

[0242] It should be understood that the sleep / wakeup information of the first device must satisfy the sleep / wakeup information of each link of the first device. The first device can store the sleep / wakeup information of each link of the first device. If the sleep / wakeup information of any link of the first device changes, the sleep / wakeup information of the first device needs to be updated, and the updated sleep / wakeup information is updated in the sleep / wakeup schedule stored by the first device.

[0243] Scenario 2 is also called the emergency business scenario.

[0244] Emergency services can be considered priority services. When a second device requests an emergency service, or a first device needs to send an emergency service to a second device, the first device's current sleep / wakeup status may not be optimal. In this case, the first device can temporarily increase the wakeup slot to send or receive the emergency service. It should be understood that the first device must notify the second device of the temporary increase in the wakeup slot to ensure that emergency services can proceed normally between the first and second devices.

[0245] In some embodiments, the first device and the second device may negotiate a sleep / wakeup status for transmitting an emergency service and update sleep / wakeup information for a link (e.g., the first link) between the first device and the second device. A specific scheme for the first device and the second device to negotiate a sleep / wakeup status for transmitting an emergency service will be described below. Of course, the first device may update its own sleep / wakeup information and stored sleep / wakeup schedule based on the sleep / wakeup information for the transmission link finally updated by the first device.

[0246] Scenario three, also known as the keep-alive scenario, involves a link between interconnected devices remaining connected, but no service data is exchanged between them. In this scenario, although no service data is exchanged between the interconnected devices, the remaining connection allows some data to be stored between the devices, such as the exchange of low-volume, latency-insensitive data, without impacting normal operation. Therefore, in a keep-alive scenario, low-volume, latency-insensitive data may be exchanged, and the first device will naturally update its sleep / wakeup information and its stored sleep / wakeup schedule. For example, due to interference or other factors, the first device may not transmit service data promptly and instead store it in the data cache. If the data cache stores a large amount of data, this significantly reduces the storage space utilization of the first device. Therefore, in a keep-alive scenario, the data cache may contain untransmitted service data. Before updating the sleep / wakeup schedule in each sleep scheduling period's announcement slot, the first device's low-power state machine module may query the amount of data stored in the data cache. If the amount is greater than or equal to a preset threshold, the wakeup slot may be temporarily increased to expedite the transmission of the data stored in the data cache. In this scenario, the sleep / wakeup time slots of the first device's link also change because the first device needs to notify the peer device of the link's sleep / wakeup status change. Furthermore, the first device needs to update its sleep / wakeup information and update the updated sleep / wakeup information to its stored sleep / wakeup schedule.

[0247] It should be noted that the basic scheduling module can also start detecting the amount of data stored in the data cache module at each time slot. Once it is determined that the data amount is greater than or equal to the preset threshold, then unless the low power state machine module updates the sleep and wake-up information of the first device and the sleep and wake-up scheduling table.

[0248] Scenario 4 is also called the business change scenario.

[0249] It should be understood that the business of the first device may change, for example, the first device ends the first business, the first device has a second business added, or the first device's first business is changed to the second business, or the first device deletes the previously performed business, etc. In this case, the first device needs to re-estimate its own sleep and wake-up situation, that is, the first device can adaptively increase the wake-up time slot or reduce the wake-up time slot according to the change of the business. For example, if the first device ends the first business, the first device can temporarily reduce the wake-up time slot. For another example, if a second business is added to the first device, the first device can temporarily increase the wake-up time slot. Therefore, before the low-power state machine module of the first device updates the sleep and wake-up schedule table in the declaration time slot of each sleep scheduling cycle, it can first determine whether the business has changed. If it has changed, the sleep and wake-up information of the corresponding link of the first device can be adjusted, and the sleep and wake-up information and the sleep and wake-up schedule table can be updated according to the adjusted sleep and wake-up information of the corresponding link.

[0250] It should be understood that in either scenario 1 or scenario 4, the first device will update the sleep wake-up information and the sleep wake-up schedule. In addition to this, the first device also needs to inform the opposite device of the first device's latest sleep wake-up information. For example, if the sleep wake-up information of any link changes, the sleep wake-up information needs to be regenerated and saved. In order to keep the sleep wake-up of the devices at both ends of the link consistent based on the sleep wake-up information of the link, one end of the link can notify the frame processing module of the updated sleep wake-up information, and the frame processing module notifies the other end of the link of the new sleep wake-up information in the form of a notification frame in the declaration time slot.

[0251] It can be understood that after the first device generates the second sleep wake-up information and updates the sleep wake-up scheduling table, it can also flexibly adjust the sleep wake-up information of the corresponding link of the first device based on the actual application scenario, and update its own sleep wake-up information and sleep wake-up scheduling table according to the sleep wake-up information of the corresponding link, so as to enable the first device to enter sleep more often and save power consumption without affecting the various services of the first device.

[0252] The following takes multiple scenarios as examples, and takes the case where the opposite device of the first device is the second device as an example, to introduce how the first device updates the link-level sleep and wake-up information, as well as the timing of updating its own sleep and wake-up information and the stored sleep and wake-up schedule. It should be understood that the first device can monitor whether it enters any of the above four scenarios. If it enters a certain scenario, the sleep and wake-up information of the corresponding link of the first device is adaptively adjusted according to the actual needs of the scenario. For the sake of ease of description, the link-level sleep and wake-up information is referred to as link sleep and wake-up information hereinafter. For a certain transmission link between the first device and the second device, when a certain scenario occurs, the first device adjusts the sleep and wake-up information of the transmission link. The sleep and wake-up information adjusted by the first device for the transmission link can be referred to as the first link sleep and wake-up information; the sleep and wake-up information updated by the second device for the transmission link can be referred to as the second link sleep and wake-up information.

[0253] S1005: The low power state machine module determines that the first device enters any one of multiple scenarios, updates the sleep and wakeup information of the corresponding link, and updates its own sleep and wakeup information and sleep and wakeup schedule.

[0254] For ease of understanding, the specific process of the sleep scheduling method provided in the embodiment of the present application is introduced below in the keep-alive scenario and emergency business after normal business.

[0255] For example, see Figure 12 , which is a flow chart of the sleep scheduling method in the keep-alive scenario provided in an embodiment of the present application. Figure 12 Take the first device execution as an example.

[0256] S1201: When an interrupt event occurs, the low power timer determines whether the current time slot is a declared time slot.

[0257] You can set an interrupt event, such as a time slot arrival event, to trigger the low-power timer to send a time slot event to the low-power state machine module. Upon receiving the event, the low-power state machine module sets a timer and determines whether the current time slot is a declared time slot. If the current time slot is not a declared time slot, then S1202-S1203 are executed. If the current time slot is a declared time slot, then S1204 and subsequent steps are executed.

[0258] S1202: Send and receive service data in the service time slot.

[0259] S1203: Set a timer according to the sleep / wake-up schedule to set an interrupt event.

[0260] It should be understood that if the current time slot is a service time slot, service data can be sent and received in the time slot in the wake-up state according to the current sleep-wake-up schedule. Afterwards, a timer and an interrupt event can be set according to the sleep-wake-up schedule to continue the sleep schedule in the next sleep schedule period.

[0261] S1204: The current time slot is a declaration time slot, and the low power state machine module updates the sleep and wakeup schedule table.

[0262] If the current time slot is the announced time slot, the low power state machine module may update the stored sleep / wake-up schedule table according to the sleep / wake-up information indicated by the PNF frame from each device.

[0263] S1205: The basic scheduling module determines whether it is in a keep-alive scenario.

[0264] It should be understood that if a service arrives, the scene recognition module can identify the service and generate scene information to send to the basic scheduling module. The basic scheduling module determines whether the service has data transmission or reception based on the received scene information, that is, whether there is a new service. The specific implementation of the scene information can refer to the relevant content of S1001 above and will not be repeated here. If the scene information indicates that there is a service, the basic scheduling module generates the second sleep wakeup information based on the scene information and the current first sleep wakeup information.

[0265] Afterwards, if any one of the aforementioned scenarios 1 to 4 occurs, the low power state machine module in the first device will update the second sleep / wake-up information and the stored sleep / wake-up schedule.

[0266] S1206: If it is determined that the scenario is not a keep-alive scenario, it may be determined whether to enter another scenario.

[0267] S1207: If it is determined to be a keep-alive scenario, it may be possible to query whether there is any business data to be sent in the data cache module.

[0268] S1208: If the data cache module has no service data to send, the low power state machine module may set the first device to be in a sleep state in each time slot within the sleep scheduling period.

[0269] S1209: If the data cache module has service data to send, the low-power state machine module may update the sleep / wakeup status for the first P time slots within the sleep / wakeup scheduling period and update the sleep / wakeup scheduling table. P is a positive integer and should be as small as possible. The P time slots are consecutive time slots. In other words, the low-power state machine module updates the sleep / wakeup information for the P consecutive time slots that are as close as possible to the announcement time slot.

[0270] In a keep-alive scenario, the data cache module may contain untransmitted service data. In this case, the data cache module can be queried to determine whether any service data needs to be sent. If the data cache module contains service data, the service data can be sent in available time slots within the sleep scheduling period to expedite transmission. Preferably, P consecutive available time slots within the sleep scheduling period can be selected to send service data, improving data transmission efficiency. For example, P consecutive time slots can be set to the awake state. After the low-power state machine module updates the sleep wakeup information, it can update the updated sleep wakeup information to the stored sleep wakeup schedule and broadcast the updated sleep wakeup information in the announcement time slot. Considering that the amount of service data in the data cache module is relatively small, the impact on subsequent link transmission efficiency is minimal. In this case, to minimize power consumption of the first device, there is no need to adjust the sleep wakeup information for P time slots. In other words, if the data cache module contains service data and the amount of service data exceeds a preset threshold, the low-power state machine module can update the sleep wakeup information for P time slots. Of course, if there is no business data to be sent in the data cache module, the first device can be set to remain in sleep mode during the sleep scheduling period to save power consumption. Considering that the amount of data in the data cache module may be large or small. If the amount of data in the data cache module is small, setting P time slots to the awake state will consume relatively more power. Therefore, in some embodiments, when the low-power state machine module determines that the data cache module has business data to be sent, it can also adjust the current sleep wake-up information from one low-power gear to another low-power gear. For example, if the current low-power gear is the sixth gear, it can be adjusted from the sixth gear to the fourth gear, or other gears. The specific gear to be adjusted to can be predefined, such as raising 2 low-power gears. Alternatively, the gear to which the current low-power gear is adjusted can be determined based on the monitored link traffic size to maximize data transmission efficiency and minimize the power consumption of the first device.

[0271] It should be understood that after the first device updates the sleep and wakeup status of the first P time slots within the sleep scheduling cycle, it can notify the remaining devices in the system during the announcement time slot. The remaining devices will then update their own stored sleep and wakeup schedules based on the latest sleep and wakeup information of the first device. In this way, the sleep and wakeup schedules maintained by all devices in the entire system are consistent, ensuring normal business operations between devices. Each device can enter sleep mode as often as possible while conducting business normally, thereby saving power as much as possible.

[0272] See Figure 13, which is a schematic diagram of the emergency service processing flow. In the event of an emergency service, for example, when the first device needs to send an emergency service to the second device, or when the second device needs to send an emergency service to the first device, the first and second devices need to negotiate a time slot for the emergency service based on the emergency service and update their own sleep and wakeup information and stored sleep and wakeup schedule. For ease of understanding, the following describes how to implement the update of the link's sleep and wakeup information when there is an emergency service from the second device.

[0273] S1301: The first device determines that there is an urgent service to be sent after the announcement time slot.

[0274] S1302: The first device queries a sleep / wakeup schedule.

[0275] S1303: The first device determines whether the second device has been in sleep mode in a time slot after the current sleep scheduling period.

[0276] It should be understood that the sleep / wakeup schedule stored in the first device includes the sleep / wakeup information of the second device, so that it can be determined whether the second device has been in sleep mode in the time slot after the current sleep / wakeup schedule period based on the sleep / wakeup information of the second device.

[0277] S1304: If the second device has been in sleep mode during the time slot after the current sleep scheduling period, the incoming emergency service data is stored in a data cache module so that the emergency service data is preferentially sent when a sleep scheduling period arrives.

[0278] When the next sleep scheduling cycle arrives and the emergency service data is sent first, the first device and the second device negotiate a time slot for the emergency service in the announced time slot, and then send and receive the emergency service in the negotiated time slot.

[0279] S1305: If the second device is not in sleep mode all the time in the time slots after the current sleep scheduling period, the first device may select a time slot that can be used to send emergency services and update the sleep wakeup information of the first device.

[0280] S1306. The first device sends a first notification frame to the second device. Correspondingly, the second device receives the first notification frame.

[0281] After the first device selects a time slot available for sending emergency services, it can notify the second device that the first device will send emergency service data. The first notification frame can be sent in the wake-up time slot of the second device, for example, it can be sent in the latest time slot available to the second device. The first notification frame includes the identification information of the first device and information such as the time slot selected by the first device for sending emergency services (that is, the first link sleep wake-up information mentioned above).

[0282] S1307: The second device parses the first notification frame and updates the sleep / wake-up information of the corresponding link.

[0283] The second device receives the first notification frame and can parse the first notification frame to obtain the first link sleep wake-up information from the first notification frame, that is, the number of time slots used by the first device to send emergency services to the second device. The second device can set the time slots required for sending emergency services to the wake-up state based on the first link sleep wake-up information, obtain the second link sleep wake-up information, and update the saved sleep wake-up schedule. After the second device obtains the second link sleep wake-up information, it can inform the first device of the second link sleep wake-up information through a reply frame to the first notification frame, that is, the second notification frame, and start transmitting the time slots for emergency services.

[0284] S1308: The first device and the second device send and receive emergency services in the negotiated time slot.

[0285] For ease of understanding, the following is a specific example Figure 13 and Figure 14 The process shown is explained.

[0286] Assume that there are devices A, B, and C. Device A initiates a screen projection service to device B, such as a 30fps distributed video stream. Device A also initiates a screen projection service to device C, such as a 10fps distributed image gallery.

[0287] The sleep and wake-up conditions corresponding to the 30fps distributed video stream are shown in Table 7, that is, the sleep and wake-up information of device B in the sleep and wake-up schedule is:

[0288] Table 7

[0289] 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[0290] The sleep and wake-up conditions corresponding to the 10fps distributed image library are shown in Table 8, that is, the sleep and wake-up information of device C in the sleep and wake-up schedule is:

[0291] Table 8

[0292] 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0

[0293] Then, according to Table 7 and Table 8, device A can generate the sleep / wakeup information shown in Table 9. That is, the sleep / wakeup information of device A in the sleep / wakeup schedule is:

[0294] Table 9

[0295] 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[0296] After any device among device A, device B or device C generates new sleep wake-up information according to its own business needs, it can broadcast its own sleep wake-up information in the announcement time slot of the sleep scheduling period, and update the latest sleep wake-up information to the sleep wake-up schedule. Device A or device B or device C can perform sleep wake-up according to its own sleep wake-up information in the sleep wake-up schedule. Taking device A as an example, as shown in Table 9, device A wakes up in the first time slot, sleeps in the second time slot, wakes up in the third time slot, and so on. However, if device D is added to the system at this time, but there is no business between device A and device D, there may be business between device D and other devices. With the addition of device D, the sleep wake-up information of device A needs to be updated. Assume that the sleep wake-up information of device D is, for example, as shown in Table 10:

[0297] Table 10

[0298] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

[0299] Device A updates its own sleep / wakeup information according to the sleep / wakeup information of device D. The updated sleep / wakeup information is as shown in Table 11, for example.

[0300] Table 11

[0301] 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[0302] Suppose there is an emergency service between device A and device C that needs to be sent from device A to device C. Assume that the emergency service arrives in the 11th time slot and requires 4 time slots. Device A can then inform device C to adjust the sleep and wakeup information based on the emergency service. As can be seen from Table 8, after the emergency service arrives, the nearest wakeup time slot is the 13th time slot. And as can be seen from Table 11, device A is also in the awake state in the 13th time slot. Device A and device C can then negotiate an available time slot for the emergency service in the 13th time slot. That is, device A can send a third notification frame to device C in the 13th time slot. After receiving the first notification frame, device C will update the sleep and wakeup information based on the emergency service. For example, if device C determines that the emergency service requires 4 time slots, it can set 4 consecutive time slots starting from the 13th time slot to the awake state, that is, set time slots 14-17 to the awake state. Device C can inform device A of the updated sleep and wakeup information, that is, device C sends a second notification frame to device A. After receiving the second notification frame, device A may also set time slots 14-17 to the awake state. Devices C and A each update their own sleep / wakeup information and sleep / wakeup schedules based on the negotiation results. The updated sleep / wakeup information for device C is shown in Table 12, and the updated sleep / wakeup information for device A is shown in Table 13.

[0303] Table 12

[0304] 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0

[0305] Table 13

[0306] 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[0307] Device A can be awakened from sleep mode according to Table 13, and device C can be awakened from sleep mode according to Table 12 to enable the transmission and reception of emergency services. It should be noted that the fact that device C is awakened in the 13th time slot in Table 8 and device A is awakened in the 13th time slot in Table 11 is for example only. In some embodiments, even if device A is asleep in the 13th time slot, device A can still be awakened in the 13th time slot before sending the first notification frame to device C.

[0308] After adjusting the sleep / wake-up information of the corresponding link according to the actual scenario, the first device may inform the second device of the adjusted sleep / wake-up information of the corresponding link.

[0309] S1006. The low power state machine module sends a first notification frame to the second device. Correspondingly, the second device receives the first notification frame, where the first notification frame carries first link sleep and wake-up information.

[0310] S1007. The low power state machine module receives a second notification frame from the second device, where the second notification frame carries second link sleep and wake-up information.

[0311] After the first device performs the first service, the low-power state module determines whether the first device has entered any of the four scenarios described above. If it is determined that the first device has entered a specific scenario, the sleep / wakeup information for the corresponding link of the first device is updated to obtain the sleep / wakeup information for the first link. The first device also needs to notify the second device of the sleep / wakeup information for the first link, so that the second device can adaptively update the stored sleep / wakeup information for the corresponding link.

[0312] Take scenario one as an example. When the traffic of the transmission link between the first device and the second device increases, it can be considered that the data cache module of the first device stores a large amount of business data. In order to quickly transmit the business data stored in the data cache module to the second device, the wake-up time slot can be temporarily increased. That is, the first device can flexibly adjust the sleep wake-up information of the transmission link and obtain the sleep wake-up information of the first link. After the first device obtains the sleep wake-up information of the first link, it can send a first notification frame to the second device. The first notification frame carries the sleep wake-up information of the first link. That is, the first device informs the second device of the sleep wake-up information of the first link. The second device can update the sleep wake-up information of the transmission link that it has stored according to the sleep wake-up information of the first link and obtain the sleep wake-up information of the second link. For the specific update of the sleep wake-up information of the corresponding link stored by the second device according to the sleep wake-up information of the first link, please refer to Tables 3 to 5 above, which will not be repeated here. After the second device obtains the sleep wake-up information of the second link, it can inform the first device of the second link sleep wake-up information so that the first device updates the sleep wake-up information of the corresponding link according to the sleep wake-up information of the second link.

[0313] In some embodiments, the first notification frame may be sent in the wake-up time slot of the second device. For example, if the second device is awake in the 5th time slot within the sleep scheduling period, the first device may send the first notification frame to the second device in the 5th time slot. It should be noted that if both the first and second devices are awake in the 5th time slot, the first device may send the first notification frame directly to the second device in the 5th time slot. If the first device is asleep in the 5th time slot and the second device is awake in the 5th time slot, the first device may first wake up in the 5th time slot and then send the first notification frame to the second device in the 5th time slot. It should be understood that after receiving the first notification frame, the second device feeds back the second notification frame to the first device. If the latency is not large, the second notification frame may be sent in the 5th time slot or in another wake-up time slot, such as the 6th time slot. Considering that the second device may not receive the first notification frame due to factors such as interference, in order to ensure that the sleep and wake-up information for a certain link between the first and second devices is consistent, embodiments of the present application may also set a timer. If the timer times out and the first device has not received the second notification frame from the second device, it can be considered that the second device has not received the first notification frame, and the first device can resend the first notification frame to the second device.

[0314] Similarly, for scenario 2, when an emergency service occurs between the first and second devices, the first device can also temporarily increase the wake-up time slot. This means the first device needs to update the sleep / wake-up information for the transmission link between them. Similarly, after updating the sleep / wake-up information for this transmission link, the first device needs to notify the second device. In scenario 2, since the service between the first and second devices is an emergency service, in order to quickly complete the transmission of the emergency service data, as an alternative implementation of the first notification frame, the first notification frame can also instruct the second device to initiate the emergency service. For example, the first device sends the first notification frame to the second device in the fifth time slot of the second device. After receiving the first notification frame, the second device can wake up all time slots after the fifth time slot, and the first device can also wake up all time slots after the fifth time slot. In this way, the sleep / wake-up information for the link between the first and second devices is consistent. Of course, when the emergency service ends, the first device can notify the second device. For example, the first device sends the first notification frame again to the second device to indicate the end of the emergency service. Upon receiving the first notification frame, the second device can restore the sleep / wake-up information for the corresponding link to the sleep / wake-up information for the emergency service.

[0315] Scenario three and scenario four are similar to scenario one and scenario two. The first device also needs to update the sleep and wake-up information of the corresponding link, which will not be repeated here. Of course, after the low-power state machine module of the first device adjusts the sleep and wake-up information of any link, it needs to adaptively update its own sleep and wake-up information and sleep and wake-up scheduling table. After the first device updates its own sleep and wake-up information, it can inform other devices of the latest sleep and wake-up information of the first device. Exemplarily, the low-power state machine module can send the latest sleep and wake-up information of the first device to the frame processing module, and the frame processing module can generate a PNF based on the latest sleep and wake-up information of the first device to broadcast the PNF in the declaration time slot. It should be noted that the first notification frame and the second notification frame can be sent in the declaration time slot of the sleep scheduling period, or can be sent in the service time slot that is in the wake-up state during the sleep scheduling period.

[0316] As an example, see Figure 14 , which is a schematic diagram of the structure of a first notification frame or a second notification frame. Taking the first notification frame as an example, the first notification frame may include, for example, a MAC header field, a code field, an OUI field, an OUI type field, an action type field, an attribute field, and an FCS field. The attribute field is used to carry the sleep / wakeup information of the first device. Similar to the PNF frame, the specific functions of each field in the first notification frame can be found in the introduction to the PNF and will not be repeated here.

[0317] S1008. The first device updates the first link sleep and wake-up information according to the second notification frame, and transmits and receives service data in a service time slot of the sleep scheduling period based on the updated first link sleep and wake-up information.

[0318] Upon receiving the second notification frame, the first device may update the first link sleep / wakeup information based on the second notification frame to ensure that the link sleep / wakeup information stored by the first device and the second device is consistent. The first device may then transmit and receive service data during the service time slot in the wake-up state within the sleep scheduling period based on the updated link sleep / wakeup information.

[0319] The above uses four possible scenarios as examples to illustrate that the first device can flexibly adjust the sleep and wake-up information of the corresponding link according to the actual scenario. The following describes possible implementation methods for the first device to adjust the sleep and wake-up information.

[0320] As an example, an embodiment of the present application may predefine multiple low-power gears, each low-power gear being used to indicate the sleep and wake-up status of the first device in each time slot within the sleep scheduling cycle. Different low-power gears correspond to different sleep and wake-up information. The basic scheduling module may determine what kind of first sleep and wake-up information to generate based on the scenario information, that is, determine which low-power gear to use based on the scenario information. Of course, the low-power state machine module may also determine how to update the sleep and wake-up information according to the actual scenario, such as adjusting the low-power gear corresponding to the current sleep and wake-up information to another low-power gear.

[0321] In some embodiments, six low-power gears can be defined, including the first gear, the second gear, the third gear, the fourth gear, the fifth gear, and the sixth gear, wherein the higher the gear, the more power saving. The first device is in the awake state during the declaration time slot in the sleep scheduling period corresponding to any gear. For example:

[0322] The first sleep-wake-up information of the first gear may be “11111111111111111111111111111111”, that is, all time slots in the entire sleep scheduling cycle are in the wake-up state;

[0323] The first sleep-wake-up information of the second gear may be "1110101010101010101010101010101010", that is, the device wakes up once every service time slot;

[0324] The first sleep-wake-up information of the third gear may be "111001001001001001001001001001001", that is, the system wakes up once every two service time slots;

[0325] The first sleep wake-up information of the fourth gear can be "11100001000010000100001000010000", that is, the service time slot wakes up once every 4 time slots;

[0326] The first sleep wake-up information of the fifth gear can be "11100000010000001000000100000010", that is, the service time slot wakes up once every 6 time slots;

[0327] The first sleep-wake-up information of the sixth gear may be “1110000000000010000000000100000000”, that is, the system wakes up once every 10 service time slots.

[0328] To further conserve device energy, special gears can be defined. For example, a device can be awakened for two time slots every L*32 time slots, where L is a positive integer greater than or equal to 1. This special gear can also be understood as allowing the device to enter deep sleep. When in deep sleep, a dedicated method can be used to trigger the device to wake up, such as through Bluetooth.

[0329] It can be considered that the first to sixth gears are the gears that can be selected when the first device's screen is on or off, and the special gear is the gear that can be selected when the first device's screen is off. The new sleep and wake-up information initially transmitted by the basic scheduling module to the low-power state machine module can represent the lowest limit gear, that is, the first gear. The basic scheduling module can then adjust the gear in the first gear according to the scene information, that is, adjust the number of consecutive 0s in the first gear. For example, the basic scheduling module determines that the scene information from the application layer is "110000010000010000010000010000010", which requires waking up once every 5 time slots. At this time, the sleep and wake-up information can be set to any gear from the first to the fourth gear. Each gear can correspond to a threshold, such as the amount of data sent per unit time.

[0330] When the first device flexibly adjusts its sleep / wakeup information, for example, in scenario 1, the low-power timer module can set a timer to collect traffic statistics on the link between the first and second devices. When the timer starts, if the link traffic between the first and second devices remains below threshold X1 for a period of time, the low-power state machine module can determine to lower the sleep / wakeup information by one level, until it reaches level 4. Furthermore, if the current sleep / wakeup information has already been lowered to the lowest level, but the link traffic between the first and second devices remains below threshold X1 for a period of time, the low-power state machine module can continue to lower the lowest level and the level corresponding to the current sleep / wakeup information until it reaches the lowest selectable level, such as level 6 or a special level. Of course, if the link traffic between the first and second devices increases over a period of time and exceeds threshold X1, the low-power state machine module can raise the level corresponding to the sleep / wakeup information, for example, to full wakeup or a service-specified level. If the link traffic between the first and second devices continues to increase over a period of time and exceeds threshold X2, the low-power state machine module can continue to raise the level corresponding to the current sleep / wakeup information until it reaches the highest level.

[0331] Similarly, in scenario 2, when the first device determines that there is an urgent business, it can adjust the current sleep and wake-up information from one low-power gear to another low-power gear. For example, if the current low-power gear is the sixth gear, it can be adjusted from the sixth gear to the fourth gear, or other gears. The specific gear to be adjusted to can be predefined, such as raising 2 low-power gears. Alternatively, the gear to which the current low-power gear is adjusted can be determined based on the monitored link traffic size to maximize data transmission efficiency and minimize the power consumption of the first device.

[0332] In scenario three, the first device determines that the amount of data stored in the data cache module is greater than a preset threshold, and can adjust the current sleep and wake-up information from one low-power gear to another low-power gear. For example, if the current low-power gear is the sixth gear, then it can be adjusted from the sixth gear to the fourth gear, or other gears. The specific gear to be adjusted to can be predefined, such as increasing the low-power gear by 2. Alternatively, the gear to which the current low-power gear is adjusted can be determined based on the specific amount of data to maximize data transmission efficiency and minimize the power consumption of the first device.

[0333] In scenario four, the first device determines that the service has changed and can adjust the current sleep and wake-up information from one low-power gear to another low-power gear. For example, the first device is currently performing the first service and the current low-power gear is the fourth gear. If the second service arrives, it can be adjusted from the fourth gear to the third gear, or other gears. The specific gear to be adjusted to can be predefined, such as lowering 2 low-power gears. Alternatively, the gear to which the current low-power gear is adjusted can be determined based on the characteristics of the second service to minimize the power consumption of the first device. For another example, the first device is currently performing the first service and the current low-power gear is the fourth gear. If the first service is deleted, it can be adjusted from the fourth gear to the fifth gear, or other gears. The specific gear to be adjusted to can be predefined, such as raising 2 low-power gears.

[0334] In an embodiment of the present application, a system is formed by establishing a connection between multiple devices. One device can be selected from the multiple devices as a master device, and the master device determines that N time slices are a sleep scheduling cycle. Each device can independently select the sleep and wake-up state of each time slice in the sleep scheduling cycle. Each device can broadcast its own sleep and wake-up information in the preset time slice of the sleep scheduling cycle. Each device receives PNF from other devices and can determine and update the saved sleep and wake-up schedule based on its own sleep and wake-up situation. In this way, all devices in the system can implement sleep scheduling based on a unified sleep and wake-up schedule. Since each device in the system does not need to rely on a fixed device in the distributed system, such as a central node, to update the sleep and wake-up schedule, the sleep scheduling method provided in the embodiment of the present application is applicable to many-to-many connection scenarios.

[0335] Based on the above embodiments, the embodiments of the present application further provide an electronic device, which is, for example, a mobile phone, a PAD, a portable computer, or a smart speaker. Figure 15 As shown, the electronic device may include: a display screen 1501; one or more processors 1502; one or more memories 1503 for storing one or more programs 1504; and the aforementioned components may be connected via one or more communication buses 1505. The display screen 1501 may be used to display the contents of a file in the electronic device; or the display screen 1501 may be used to display the desktop of the electronic device; or the display screen 1501 may be used to display an image, etc.

[0336] When one or more programs 1504 stored in the memory 1503 are executed by one or more processors 1502, the electronic device can be used to perform the following operations: Figure 10 Or the various steps in the embodiment shown in 13 or 14 or other corresponding embodiments.

[0337] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The functional modules in the embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. For example, in the above embodiment, the basic scheduling module and the dynamic scheduling module can be the same module or different modules. The above-mentioned integrated modules can be implemented in the form of hardware, or in the form of software functional modules, or in the form of hardware combined with software functional modules.

[0338] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0339] The terms "include", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically emphasized otherwise.

[0340] Furthermore, unless otherwise indicated, ordinal numbers such as "first" and "second" in the embodiments of this application are used to distinguish between multiple objects and are not used to limit the size, content, order, timing, priority, or importance of the multiple objects. For example, "second file" and "second file" are only used to distinguish different files and do not indicate a difference in size, content, priority, or importance between the two files.

[0341] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A sleep scheduling method for a distributed system comprising a first device, a second device, and a third device, characterized in that: include: The first device determines, based on first scenario information, that a first service is arriving, where the first scenario information is used to indicate a service feature of the first service; The first device generates second sleep / wakeup information according to the first scenario information and the first sleep / wakeup information, where the first sleep / wakeup information is used to indicate the sleep / wakeup status of the first device in each time slice within the current sleep scheduling period, and the second sleep / wakeup information is used to indicate the sleep / wakeup status of each time slice within the sleep scheduling period that needs to be met when the first device performs services including the first service. The first device updates the second sleep / wakeup information to a sleep / wakeup schedule, where the sleep / wakeup schedule includes sleep / wakeup status of all devices in the distributed system. The sleep / wakeup schedule is used for the first device to send and receive data with other devices in the distributed system.

2. The method according to claim 1, wherein The method further comprises: The first device broadcasts a first timing notification frame PNF within a preset time slice within the sleep scheduling period, where the first PNF is used to indicate the second sleep wakeup information; The first device receives a second PNF from the second device, where the second PNF is used to indicate sleep / wakeup information of the second device; The first device updates the stored sleep / wake-up schedule according to the second PNF.

3. The method according to claim 2, wherein The method further comprises: The first device determines that it enters any one of the following scenarios: the first device updates the sleep / wakeup information of the corresponding link, and notifies the second device of the updated sleep / wakeup information of the corresponding link; Among them, the scenarios include: keep-alive scenarios, link change scenarios, emergency business scenarios or business change scenarios. The keep-alive scenarios are used to indicate that the link of the first device remains connected and there is no business data interaction between the first device and other devices.

4. The method according to claim 3, wherein The first device enters the keep-alive scenario, and the method further includes: The first device queries the amount of cached data; When the data volume is greater than or equal to a first preset threshold, the first device updates the sleep / wakeup information of the transmission link between the first device and the second device to first link sleep / wakeup information; The first device sends a first notification frame to the second device, where the first notification frame carries the first link sleep / wakeup information, so that the second device updates the stored sleep / wakeup information of the transmission link between the first device and the second device to the second link sleep / wakeup information according to the first link sleep / wakeup information; The first device receives a second notification frame from the second device, where the second notification frame carries the second link sleep / wake-up information.

5. The method according to claim 3, wherein The first device enters the link change scenario, and the method further includes: The first device determines that the traffic of the transmission link between the first device and the second device is greater than or equal to a second preset threshold, and the first device updates the sleep / wakeup information of the transmission link between the first device and the second device to the first link sleep / wakeup information; The first device sends a first notification frame to the second device, where the first notification frame carries the first link sleep / wakeup information, so that the second device updates the stored sleep / wakeup information of the transmission link between the first device and the second device to the second link sleep / wakeup information according to the first link sleep / wakeup information; The first device receives a second notification frame from the second device, where the second notification frame carries the second link sleep / wake-up information.

6. The method according to claim 3, wherein The first device enters the emergency service scenario, and the method further includes: The first device updates the sleep / wakeup information of the transmission link between the first device and the second device to first link sleep / wakeup information; The first device sends a first notification frame to the second device, where the first notification frame carries the first link sleep / wakeup information, so that the second device updates the stored sleep / wakeup information of the transmission link between the first device and the second device to the second link sleep / wakeup information according to the first link sleep / wakeup information; The first device receives a second notification frame from the second device, where the second notification frame carries the second link sleep / wake-up information.

7. The method according to any one of claims 1 to 6, wherein: The first device generates second sleep-wakeup information according to the first scenario information and the first sleep-wakeup information, including: The first device generates the second sleep / wakeup information based on a first preset rule, the first scenario information, and the first sleep / wakeup information, wherein the first preset rule satisfies one or more of the following: The first device currently has no service, and the first device cannot determine the sleep / wake-up information for performing the first service, and the second sleep / wake-up information is used to indicate that the first device is in the wake-up state in each time slice within the sleep scheduling period; or The first device currently has a service, the first sleep-wakeup information indicates that the first device is in an awake state in each time slice within the sleep scheduling period, and the second sleep-wakeup information indicates that the first device is in an awake state in each time slice within the sleep scheduling period; or The first device currently has a business, and the first sleep wake-up information indicates that the first device is in a wake-up state in some time slices within the sleep scheduling period. If the first device cannot determine the sleep wake-up information for performing the first business, the second sleep wake-up information is used to indicate that the first device is in a wake-up state in each time slice within the sleep scheduling period; if the first device can determine the sleep wake-up information for performing the first business, the second sleep wake-up information is generated based on the first sleep wake-up information and the sleep wake-up information of the first device for performing the first business.

8. The method according to any one of claims 1 to 6, wherein: The first scenario information includes one or more of the following information: The type information of the first service, the minimum delay tolerance value of the first service, the packet sending interval corresponding to the first service, and the scene gear corresponding to the first service, wherein the scene gear is used to indicate the sleep and wake-up status of each time slice of the first service in the sleep scheduling cycle, and different scene gears correspond to different sleep and wake-up status.

9. An electronic device, characterized in that: The electronic device is a first electronic device among multiple electronic devices in a distributed system, the distributed system also including a second device and a third device, the electronic device including a memory and at least one processing module coupled to the memory; the memory is configured to store instructions, and the at least one processing module is configured to execute the instructions; wherein, when the at least one processing module executes the instructions, the electronic device executes: determining, according to first scenario information, that a first service is arriving, where the first scenario information is used to indicate a service feature of the first service; generating second sleep / wakeup information according to the first scenario information and the first sleep / wakeup information, wherein the first sleep / wakeup information is used to indicate the sleep / wakeup status of the electronic device at each time slice in the current sleep / wakeup period, and the second sleep / wakeup information is used to indicate the sleep / wakeup status at each time slice in the sleep / wakeup period that needs to be met when the electronic device performs services including the first service; The second sleep / wake-up information is updated to a sleep / wake-up schedule, where the sleep / wake-up schedule includes sleep / wake-up status of all devices in the distributed system. The sleep / wake-up schedule is used for the electronic device to send and receive data with other devices in the distributed system.

10. The electronic device according to claim 9, wherein The electronic device further includes a transceiver module, wherein: The transceiver module is configured to: broadcast a first timing notification frame PNF within a preset time slice within the sleep scheduling period, and receive a second PNF from the second device, wherein the first PNF is used to indicate the second sleep wakeup information, and the second PNF is used to indicate the sleep wakeup information of the second device; The processing module is further configured to update the stored sleep / wake-up schedule according to the second PNF.

11. The electronic device according to claim 10, wherein: The processing module is further configured to: Determine that any of the following scenarios has been entered, update the sleep / wakeup information of the corresponding link, and notify the second device of the updated sleep / wakeup information of the corresponding link; Among them, the scenarios include: keep-alive scenarios, link change scenarios, emergency business scenarios or business change scenarios. The keep-alive scenarios are used to indicate that the link of the electronic device remains connected and there is no business data interaction between the electronic device and other devices.

12. The electronic device according to claim 11, wherein: The electronic device enters the keep-alive scenario, wherein the processing module is further configured to: query the amount of cached data, and when the amount of data is greater than or equal to a first preset threshold, update the sleep / wake-up information of the transmission link between the electronic device and the second device to the first link sleep / wake-up information; The transceiver module is also used to: send a first notification frame to the second device, where the first notification frame carries the first link sleep wakeup information, so that the second device updates the stored sleep wakeup information of the transmission link between the electronic device and the second device to the second link sleep wakeup information according to the sleep wakeup information of the first link; and receive a second notification frame from the second device, where the second notification frame carries the second link sleep wakeup information.

13. The electronic device according to claim 11, wherein The electronic device enters the link change scenario, and the processing module is further configured to: determine that the traffic of the transmission link between the electronic device and the second device is greater than or equal to a second preset threshold, and update the sleep / wake-up information of the transmission link between the electronic device and the second device to the first link sleep / wake-up information; The transceiver module is further configured to: send a first notification frame to the second device, where the first notification frame carries the first link sleep / wakeup information, so that the second device updates the stored sleep / wakeup information of the transmission link between the electronic device and the second device to the second link sleep / wakeup information according to the first link sleep / wakeup information; And receive a second notification frame from the second device, where the second notification frame carries the second link sleep and wake-up information.

14. The electronic device according to claim 11, wherein The electronic device enters the emergency service scenario, and the processing module is further configured to: update the sleep / wakeup information of the transmission link between the electronic device and the second device to the first link sleep / wakeup information; The transceiver module is further configured to: send a first notification frame to the second device, where the first notification frame carries the first link sleep / wakeup information, so that the second device updates the stored sleep / wakeup information of the transmission link between the electronic device and the second device to the second link sleep / wakeup information according to the first link sleep / wakeup information; And receive a second notification frame from the second device, where the second notification frame carries the second link sleep and wake-up information.

15. The electronic device according to any one of claims 9 to 14, characterized in that: The processing module is specifically used for: The second sleep / wake-up information is generated based on a first preset rule, the first scenario information, and the first sleep / wake-up information, wherein the first preset rule satisfies one or more of the following: The electronic device currently has no service, and the electronic device cannot determine the sleep / wake-up information for performing the first service, and the second sleep / wake-up information is used to indicate that the electronic device is in the wake-up state in each time slice within the sleep scheduling period; or The electronic device currently has a business, the first sleep-wake-up information indicates that the electronic device is in an awake state in each time slice within the sleep scheduling period, and the second sleep-wake-up information is used to indicate that the electronic device is in an awake state in each time slice within the sleep scheduling period; or The electronic device currently has a business, and the first sleep wake-up information indicates that the electronic device is in a wake-up state in some time slices within the sleep scheduling cycle. If the electronic device cannot determine the sleep wake-up information for performing the first business, the second sleep wake-up information is used to indicate that the electronic device is in a wake-up state in each time slice within the sleep scheduling cycle; if the electronic device can determine the sleep wake-up information for performing the first business, the second sleep wake-up information is generated based on the first sleep wake-up information and the sleep wake-up information of the electronic device for performing the first business.

16. The electronic device according to any one of claims 9 to 14, characterized in that: The first scenario information includes one or more of the following information: The type information of the first service, the minimum delay tolerance value of the first service, the packet sending interval corresponding to the first service, and the scene gear corresponding to the first service, wherein the scene gear is used to indicate the sleep and wake-up status of each time slice of the first service in the sleep scheduling cycle, and different scene gears correspond to different sleep and wake-up status.

17. A distributed system, characterized in that: The device comprises a plurality of electronic devices according to any one of claims 9 to 16.

18. A chip, characterized in that: The chip includes a processing module and an interface, wherein the interface is used to communicate with the processing module and receive information from other devices; the processing module is used to execute the method according to any one of claims 1 to 8.

19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called by an electronic device, the electronic device executes the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method of establishing sleep mode operation and mobile station

    CN105744608A

  • Low-power-consumption time slot scheduling method based on TDMA protocol in ad hoc network

    CN108093468A

  • Systems and methods of deploying a program to a distributed network

    CN112041816A