Method, system, and electronic device for controlling device power consumption
Patent Information
- Application Number
- CN202210825921.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-07-14
AI Technical Summary
但是,电子设备的功耗并不仅仅来源于运行在电子设备上的应用程序,在更多的情况下,电子设备的功耗往往来源于电子设备上操作系统中底层的一些机制
[0057] In a twelfth aspect, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the second aspect, third aspect, fourth aspect, fifth aspect, any possible implementation of the second aspect, any possible implementation of the third aspect, any possible implementation of the fourth aspect, and any possible implementation of the fifth aspect.
Smart Images

Figure CN117440479B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to methods, systems and electronic devices for controlling device power consumption. Background Technology
[0002] With the development of electronic technology, the functions of electronic devices are constantly being enhanced, and electronic devices are participating more and more frequently in consumers' daily lives. Among them, wearable electronic devices, due to differences in consumer usage habits, product form, and product purpose compared to mobile phones, tablets, and other electronic devices, require electronic devices with stronger battery life.
[0003] To improve the battery life of electronic devices, such as wearable devices, one feasible method is to terminate or shut down the running programs on the electronic device when it is determined to be in a specific state, such as not being worn, thereby reducing the power consumption of the electronic device and improving its battery life.
[0004] The methods mentioned above can only reduce the power consumption of some electronic devices, resulting in limited benefits. However, the power consumption of electronic devices does not solely originate from applications running on them. In many cases, power consumption stems from underlying mechanisms within the operating system. For example, in numerous situations, when the network status of other electronic devices (such as wearable devices) providing internet access changes, these devices update the network status on the device using that internet access, triggering certain operations and ultimately reducing battery life. Summary of the Invention
[0005] This application discloses a method, system, and electronic device for controlling device power consumption, relating to the field of electronic technology. The method provided in this application, when an electronic device such as a watch accesses the internet through a network proxy provided by another electronic device, sends a notification to the network proxy-providing electronic device before the watch enters sleep mode. This notification instructs the network proxy-providing electronic device not to send a network status change notification to the watch after a network status change, preventing the watch from being woken up during sleep mode. This reduces the watch's power consumption during sleep mode and improves the battery life of the watch and other electronic devices.
[0006] In a first aspect, this application provides a system comprising a first electronic device and a second electronic device connected together, wherein the second electronic device accesses the Internet through the first electronic device, wherein: the second electronic device is configured to send a first notification to the first electronic device before transitioning from a non-dormant phase to a dormant phase, the first notification instructing the second electronic device to prohibit the second electronic device from sending network status change notifications; the first electronic device, upon receiving the first notification and determining that its network status has changed, is configured not to send the network status change notification to the second electronic device, the network status change notification including the network status of the first electronic device; the second electronic device is configured to send a second notification to the first electronic device after transitioning from the dormant phase to the non-dormant phase, the second notification instructing the second electronic device to allow the second electronic device to send the network status change notification; and the first electronic device, upon receiving the second notification, sends the network status change notification to the second electronic device.
[0007] In the above embodiments, since the second electronic device can send a first notification to the first electronic device before entering the sleep phase, instructing the first electronic device not to send network status change notifications, the second electronic device can be prevented from being woken up during the sleep phase; when the second electronic device enters the non-sleep phase, the first electronic device sends a second notification to the second electronic device, instructing the second electronic device to send network status change notifications, so that the first electronic device can obtain the correct network status and does not affect the user's normal use of the second electronic device.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the second electronic device sends data for internet access to the second electronic device through the first data channel; the second electronic device is also configured to: shut down the first data channel before transitioning from the non-sleep phase to the sleep phase.
[0009] In the above embodiments, the second electronic device can also release some resources used for network proxy, reduce memory and CPU usage, and further reduce the power consumption of the second electronic device during the sleep phase.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the first electronic device receives and forwards data sent by the second electronic device for internet access via the second data channel; the first electronic device is further configured to: close the second data channel after receiving the first notification.
[0011] In the above embodiments, the first electronic device can also release some resources used for network proxy, reduce memory and CPU usage, and thus reduce the power consumption of the first electronic device.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the second electronic device is further configured to: configure the network state of the second electronic device to no network or network unavailable before transitioning from the non-dormant phase to the dormant phase.
[0013] In the above embodiments, the second electronic device can also be configured to have no network during the sleep phase. In the absence of network, the application on the second electronic device may perform fewer operations, thereby reducing the power consumption of the second electronic device.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the second electronic device is further configured to: acquire a first parameter and determine the state of the second electronic device as a first state based on the first parameter; the second electronic device is further configured to: determine, based on the first state, to transition from the hibernation phase to the non-hibernation phase or from the non-hibernation phase to the hibernation phase.
[0015] In the above embodiments, the second electronic device can determine whether to enter a sleep phase or a non-sleep phase based on a variety of parameters, which is more in line with the user's usage habits.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, when the second electronic device determines, based on the first state, to transition from the non-dormant phase to the dormant phase, the first state is a sleep state or an unworn state.
[0017] In the above embodiments, when the second electronic device determines that the user has fallen asleep or has not been worn for a long time, it can determine that it has entered a sleep stage. During the sleep stage, the power consumption of the second electronic device is low, so entering the sleep stage in a timely manner can reduce the power consumption of the second electronic device and improve its battery life.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the second electronic device is further configured to send a network probe request to the first electronic device during the non-dormant phase; the first electronic device is further configured to determine the network probe result based on the network status of the first electronic device; and the first electronic device is further configured to send the network probe result to the second electronic device.
[0019] In the above embodiments, in some cases, after the second electronic device initiates network probing, the first electronic device can directly determine the network probing result of the network probing initiated by the second electronic device based on the network status of the first electronic device and / or the historical network probing results of the first electronic device, and return the network probing result to the second electronic device.
[0020] In conjunction with some embodiments of the first aspect, in some embodiments, in some cases, the second electronic device may not initiate network probing.
[0021] In the above embodiments, since the first electronic device also performs network probing, the second electronic device does not need to initiate the same network probing. For example, if both the first and second electronic devices are Huawei devices, the network probing of the operating systems of the first and second electronic devices will point to the server with the same domain name. Secondly, in most cases, the application server will not lose network access, so once the second electronic device is connected to the Internet, it can be assumed that the second electronic device and the server can communicate.
[0022] Secondly, this application provides a method for controlling device power consumption, applied to a second electronic device, wherein a first electronic device is connected to the second electronic device, and the second electronic device accesses the Internet through the first electronic device. The method includes: when the second electronic device is in a non-sleep phase, after receiving a network status change notification sent by the first electronic device, updating the network status based on the network status change notification, the network status change notification including the network status of the first electronic device; before determining to enter a sleep phase from the non-sleep phase, sending a first notification to the first electronic device, the first notification being used to instruct the first electronic device to prohibit the first electronic device from sending network status change notifications; after determining to enter the non-sleep phase from the sleep phase, sending a second notification to the first electronic device, the second notification being used to instruct the first electronic device to allow the first electronic device to send network status change notifications.
[0023] In the above embodiments, since the second electronic device can send a first notification to the first electronic device before entering the sleep phase, instructing the first electronic device not to send network status change notifications, the second electronic device can be prevented from being woken up during the sleep phase; when the second electronic device enters the non-sleep phase, the first electronic device sends a second notification to the second electronic device, instructing the second electronic device to send network status change notifications, so that the first electronic device can obtain the correct network status and does not affect the user's normal use of the second electronic device.
[0024] In conjunction with some embodiments of the second aspect, in some embodiments, the second electronic device sends data for internet access to the second electronic device through the first data channel; the method further includes: the second electronic device shutting down the first data channel before determining that it is entering the sleep phase from the non-sleep phase.
[0025] In the above embodiments, the second electronic device can also release some resources used for network proxy, reduce memory and CPU usage, and thus reduce the power consumption of the second electronic device.
[0026] In conjunction with some embodiments of the second aspect, in some embodiments, the second electronic device shuts down the first data channel, specifically including: the second electronic device configuring the network status to no network or network unavailable.
[0027] In the above embodiments, the second electronic device can also be configured to have no network during the sleep phase. In the absence of network, the application on the second electronic device may perform fewer operations, thereby reducing the power consumption of the second electronic device.
[0028] Thirdly, this application provides a method for controlling device power consumption, applied to a second electronic device, wherein a first electronic device is connected to the second electronic device, and the second electronic device accesses the Internet through the first electronic device. The method includes: when the second electronic device is in a sleep phase, after receiving a network status change notification sent by the first electronic device, storing the network status change notification; after the second electronic device enters a non-sleep phase from the sleep phase, updating the network status based on the network status change notification received during the sleep phase; and when the second electronic device is in a non-sleep phase, after receiving a network status change notification sent by the first electronic device, updating the network status based on the network status change notification received during the non-sleep phase.
[0029] In the above embodiments, since the second electronic device does not respond to the network status change notification sent by the first electronic device after entering the sleep stage, the power consumption of the second electronic device during the sleep stage can be reduced; when the second electronic device enters the non-sleep stage, it can determine the current network status based on the saved network status change notification, which does not affect the normal use of the second electronic device.
[0030] In conjunction with some embodiments of the third aspect, in some embodiments, the second electronic device sends data for internet access to the second electronic device through the first data channel; the method further includes: the second electronic device shutting down the first data channel before determining that it is entering the sleep phase from the non-sleep phase.
[0031] In the above embodiments, the second electronic device can also release some resources used for network proxy, reduce memory and CPU usage, and thus reduce the power consumption of the second electronic device.
[0032] In conjunction with some embodiments of the third aspect, in some embodiments, the second electronic device shuts down the first data channel, specifically including: the second electronic device configuring the network status to no network or network unavailable.
[0033] In the above embodiments, the second electronic device can also be configured to have no network during the sleep phase. In the absence of network, the application on the second electronic device may perform fewer operations, thereby reducing the power consumption of the second electronic device.
[0034] Fourthly, this application provides a method for controlling device power consumption, applied to a second electronic device, wherein a first electronic device is connected to the second electronic device, and the second electronic device accesses the Internet through the first electronic device. The method includes: when the second electronic device is in a shallow sleep phase, after receiving a network status change notification sent by the first electronic device, storing the network status change notification; after the second electronic device enters a non-sleep phase from the shallow sleep phase, updating the network status based on the network status change notification received during the shallow sleep phase; before determining whether to enter a deep sleep phase from the non-sleep phase or the shallow sleep phase, the second electronic device sends a first notification to the first electronic device, the first notification being used to instruct the first electronic device not to send network status change notifications, or the first notification being used to determine that the first electronic device is in the deep sleep phase; after the second electronic device enters the non-sleep phase from the deep sleep phase, sending a second notification to the first electronic device, the second notification being used to instruct the first electronic device to allow the first electronic device to send network status change notifications, or the second notification being used to determine that the second electronic device is in the non-sleep phase.
[0035] In the above embodiments, when the second electronic device is in a shallow sleep phase, it does not respond to network status change notifications sent by the first electronic device. When the second electronic device enters a non-sleep phase from the shallow sleep phase, it can determine the current network status based on the saved network status change notifications, without affecting the normal use of the second electronic device. Before the second electronic device enters a deep sleep phase, it sends a first notification to the first electronic device, instructing the first electronic device not to send network status change notifications, which can prevent the second electronic device from being woken up during the sleep phase. When the second electronic device enters a non-sleep phase, the first electronic device sends a second notification to the second electronic device, instructing the second electronic device to send network status change notifications, so that the first electronic device can obtain the correct network status without affecting the user's normal use of the second electronic device.
[0036] In conjunction with some embodiments of the fourth aspect, in some embodiments, the second electronic device sends data for internet access to the second electronic device through the first data channel; the method further includes: before the second electronic device determines to enter the sleep phase from the non-sleep phase, the second electronic device shuts down the first data channel.
[0037] In the above embodiments, the second electronic device can also release some resources used for network proxy, reduce memory and CPU usage, and thus reduce the power consumption of the first electronic device.
[0038] In conjunction with some embodiments of the fourth aspect, in some embodiments, the second electronic device is configured with a network status of no network or network unavailable.
[0039] In the above embodiments, the second electronic device can also be configured to have no network during the sleep phase. In the absence of network, the application on the second electronic device may perform fewer operations, thereby reducing the power consumption of the second electronic device.
[0040] Fifthly, this application provides a method for controlling device power consumption, applied to a first electronic device connected to a second electronic device, the first electronic device providing internet access capability to the second electronic device. The method includes: after the first electronic device receives a first notification sent by the second electronic device, the second electronic device, after determining a network status change, not sending a network status change notification to the first electronic device, the network status change notification including the changed network status of the first electronic device; after the first electronic device receives a second notification sent by the second electronic device, sending a network status change notification to the first electronic device, the second notification indicating permission for the first electronic device to send a network status change notification.
[0041] In the above embodiments, since the second electronic device can send a first notification to the first electronic device before entering the sleep phase, instructing the first electronic device not to send network status change notifications, the second electronic device can be prevented from being woken up during the sleep phase; when the second electronic device enters the non-sleep phase, the first electronic device sends a second notification to the second electronic device, instructing the second electronic device to send network status change notifications, so that the first electronic device can obtain the correct network status and does not affect the user's normal use of the second electronic device.
[0042] In conjunction with some embodiments of the fifth aspect, in some embodiments, the first electronic device receives a network probe request sent by the second electronic device; the first electronic device determines a network probe result based on the network status of the second electronic device; and the first electronic device sends the network probe result to the second electronic device.
[0043] In the above embodiments, in some cases, after the second electronic device initiates network probing, the first electronic device can directly determine the network probing result initiated by the second electronic device based on the network status of the first electronic device and / or the historical network probing results of the first electronic device, and return the network probing result to the second electronic device, thereby reducing the power consumption of the first electronic device.
[0044] In a sixth aspect, embodiments of this application provide an electronic device comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to execute: when a second electronic device is in a non-sleep phase, after receiving a network status change notification sent by a first electronic device, it updates the network status based on the network status change notification, the network status change notification including the network status of the first electronic device; before determining to enter a sleep phase from the non-sleep phase, the second electronic device sends a first notification to the first electronic device, the first notification indicating that the first electronic device is prohibited from sending network status change notifications; after determining to enter the non-sleep phase from the sleep phase, the second electronic device sends a second notification to the first electronic device, the second notification indicating that the first electronic device is allowed to send network status change notifications.
[0045] In conjunction with some embodiments of the sixth aspect, in some embodiments, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: the second electronic device shuts down the first data channel before determining that it is entering the hibernation phase from the non-hibernation phase.
[0046] In conjunction with some embodiments of the sixth aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: the second electronic device configures the network state to be no network or network unavailable.
[0047] In a seventh aspect, embodiments of this application provide an electronic device comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors call the computer instructions to cause the electronic device to execute: when a second electronic device is in a sleep phase, after receiving a network status change notification sent by a first electronic device, it stores the network status change notification; after the second electronic device enters a non-sleep phase from the sleep phase, it updates the network status based on the network status change notification received during the sleep phase; when the second electronic device is in a non-sleep phase, after receiving a network status change notification sent by the first electronic device, it updates the network status based on the network status change notification received during the non-sleep phase.
[0048] In conjunction with some embodiments of the seventh aspect, in some embodiments, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: the second electronic device shuts down the first data channel before determining that it is entering the hibernation phase from the non-hibernation phase.
[0049] In conjunction with some embodiments of the seventh aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: the second electronic device configures the network state to be no network or network unavailable.
[0050] Eighthly, embodiments of this application provide an electronic device, the electronic device including: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to execute: when a second electronic device is in a shallow sleep phase, after receiving a network status change notification sent by a first electronic device, it stores the network status change notification; after the second electronic device enters a non-sleep phase from the shallow sleep phase, it updates the network status based on the network status change notification received during the shallow sleep phase; before determining whether to enter a deep sleep phase from the non-sleep phase or the shallow sleep phase, the second electronic device sends a first notification to the first electronic device, the first notification being used to instruct the first electronic device not to send a network status change notification, or the first notification being used to determine that the first electronic device is in the deep sleep phase; after the second electronic device enters the non-sleep phase from the deep sleep phase, it sends a second notification to the first electronic device, the second notification being used to instruct the first electronic device to allow it to send a network status change notification, or the second notification being used to determine that the second electronic device is in the non-sleep phase.
[0051] In conjunction with some embodiments of the eighth aspect, in some embodiments, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: the second electronic device shuts down the first data channel before determining that it is entering the hibernation phase from the non-hibernation phase.
[0052] In conjunction with some embodiments of the eighth aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: the second electronic device configures the network state to be no network or network unavailable.
[0053] Ninthly, embodiments of this application provide an electronic device, the electronic device including: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to execute: after the first electronic device receives a first notification sent by the second electronic device, the second electronic device, after determining a network state change, does not send a network state change notification to the first electronic device, the network state change notification including the changed network state of the first electronic device; after the first electronic device receives a second notification sent by the second electronic device, the second notification is used to indicate that the first electronic device is allowed to send a network state change notification.
[0054] In conjunction with some embodiments of the ninth aspect, in some embodiments, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: receiving a network probe request sent by the second electronic device; the first electronic device determining a network probe result based on the network status of the second electronic device; and the first electronic device sending the network probe result to the second electronic device.
[0055] In a tenth aspect, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are configured to invoke computer instructions to cause the electronic device to perform the methods described in the second, third, fourth, and fifth aspects, any possible implementations of the second, third, fourth, and fifth aspects.
[0056] Eleventhly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method described in the second aspect, third aspect, fourth aspect, fifth aspect, any possible implementation of the second aspect, any possible implementation of the third aspect, any possible implementation of the fourth aspect, and any possible implementation of the fifth aspect.
[0057] In a twelfth aspect, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the second aspect, third aspect, fourth aspect, fifth aspect, any possible implementation of the second aspect, any possible implementation of the third aspect, any possible implementation of the fourth aspect, and any possible implementation of the fifth aspect.
[0058] It is understood that the electronic devices provided in the sixth, seventh, eighth, and ninth aspects, the chip system provided in the tenth aspect, the computer program product provided in the eleventh aspect, and the computer storage medium provided in the twelfth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0059] Figure 1 This is an exemplary schematic diagram showing how the power consumption of the second electronic device provided in this application changes with different states when it is not interfered with by other electronic devices.
[0060] Figure 2 This is an exemplary schematic diagram illustrating the impact of network state changes of the first electronic device on the power consumption of the second electronic device, as provided in an embodiment of this application.
[0061] Figure 3 This is an exemplary schematic diagram of the process of a method for controlling device power consumption provided in an embodiment of this application.
[0062] Figure 4 An exemplary schematic diagram of a data channel provided in an embodiment of this application.
[0063] Figure 5 The first electronic device and the second electronic device provided in the embodiments of this application perform the following functions: Figure 3 An exemplary schematic diagram of the power consumption of the second electronic device following the method for controlling the power consumption of the device shown.
[0064] Figure 6 This is another exemplary schematic diagram of the process of the method for controlling device power consumption provided in the embodiments of this application.
[0065] Figure 7 The second electronic device provided in the embodiments of this application performs the following functions: Figure 6 An exemplary schematic diagram of the power consumption of the second electronic device following the method for controlling the power consumption of the device shown.
[0066] Figure 8 This is another exemplary schematic diagram of the process of the method for controlling device power consumption provided in the embodiments of this application.
[0067] Figure 9 The second electronic device provided in the embodiments of this application performs the following functions: Figure 8 An exemplary schematic diagram of the power consumption of the second electronic device following the method for controlling the power consumption of the device shown.
[0068] Figure 10This is an exemplary schematic diagram of the network detection process provided in the embodiments of this application.
[0069] Figure 11 This is another exemplary schematic diagram of the process of the method for controlling device power consumption provided in the embodiments of this application.
[0070] Figure 12 This is an exemplary schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.
[0071] Figure 13A This is an exemplary schematic diagram of the software architecture of the second electronic device provided in the embodiments of this application.
[0072] Figure 13B This is an exemplary schematic diagram of the software architecture of a system including a second electronic device and a first electronic device, provided for embodiments of this application. Detailed Implementation
[0073] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0074] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0075] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0076] In this embodiment, the first electronic device is an electronic device with internet access capabilities, such as a mobile phone. The first electronic device provides a network proxy for the second electronic device, which can be a wearable electronic device such as a wristband, watch, or glasses, or a tablet computer, or a smart home device such as a refrigerator. Specifically, the first electronic device providing a network proxy for the second electronic device means that after the first and second electronic devices establish a connection, the second electronic device can send a request to access the network to the first electronic device, which then forwards the request to a server on the internet. Conversely, after receiving the response to the network request from the network device, the first electronic device also forwards the response to the second electronic device.
[0077] Optionally, in some embodiments of this application, the second electronic device itself has internet access capability, for example, a watch that can insert a SIM card, a watch with a built-in e-SIM card, or a watch that supports WiFi functionality. Optionally, in some embodiments of this application, the second electronic device does not have internet access capability, such as a wristband.
[0078] Because consumers' usage habits for wearable electronic devices such as watches and fitness trackers differ from those for computers and other electronic devices, users typically don't charge their wearable devices while using them; furthermore, wearable electronic devices generally have smaller battery capacities. Therefore, to maximize the user experience, power consumption should be minimized as much as possible without compromising user experience or the normal operation of the electronic device, thereby extending its battery life.
[0079] Figure 1This is an exemplary schematic diagram showing how the power consumption of the second electronic device provided in this application changes with different states when it is not interfered with by other electronic devices.
[0080] From time T0 to time T1, the second electronic device is in the non-sleep stage, and its power consumption is P1; from time T1 to time T2, the second electronic device is in the sleep stage, and its power consumption is P2. P2 is lower than P1.
[0081] In the case of not wearing the device or in a sleep state, the second electronic device enters a sleep phase, during which its power consumption is low. When worn or awake, the second electronic device enters a non-sleep phase, during which its power consumption is higher. The sleep state refers to the state entered after the second electronic device directly or indirectly confirms that the user has fallen asleep. Specifically, when the second electronic device is wearable and worn by the user, it can determine whether the user has fallen asleep by acquiring the user's physiological parameters, thus determining whether it has entered a sleep state. When the second electronic device is not wearable, such as a tablet, it can predict whether the user has fallen asleep based on ambient light, time, and / or the user's habits, thus determining whether it has entered a sleep state.
[0082] It is worth noting that the conditions for a second electronic device to enter the sleep stage are not limited to being unworn or asleep, and similarly, the conditions for a second electronic device to enter the non-sleep stage are not limited to being worn or awake.
[0083] Optionally, in some embodiments of this application, when a connection is established between the first electronic device and the second electronic device, and the internet access capability of the second electronic device is achieved through the internet access capability of the first electronic device, and the network status of the first electronic device remains unchanged, the power consumption trend of the second electronic device is similar to... Figure 1 The power consumption of the second electronic device follows the same trend as the first electronic device. The second electronic device establishes a connection with the first electronic device via near-field communication (NFC) technology, and the second electronic device connects to the internet through a network proxy provided by the first electronic device. NFC technology can include one or more communication protocols such as Bluetooth, WiFi, NFC, and Apple Wireless Direct Link (AWDL).
[0084] The statement that the network status of the first electronic device has not changed means that the first electronic device is always in a state of having a network or not having a network. A state of not having a network means that the electronic device cannot connect to the internet; for example, the first electronic device has its mobile data function and WiFi function turned off; or, the first electronic device is accessing a local area network (LAN) that is not connected to the internet via WiFi.
[0085] Optionally, in some embodiments of this application, "the network state of the first electronic device remains unchanged" means that the network standard of the first electronic device does not change, and the network standard can be 2G, 3G, 4G, 5G, and / or WiFi, etc. Optionally, in some embodiments of this application, "the network state of the first electronic device remains unchanged" means that the state of the first electronic device's network being a paid network or a free network remains unchanged.
[0086] When an electronic device detects a change in network status, its operating system broadcasts the new network status to applications on the device, allowing these applications to obtain the updated network information promptly. Broadcasting is a system component used for inter-process communication.
[0087] For example, in the Android system, the ConnectivityManager is used to inform applications of the current network status of the electronic device. Since network status can change at any time, and most applications need to determine the latest network status of the electronic device, applications often register a callback with the ConnectivityManager to promptly determine the latest network status after a change. Alternatively, applications can register a NetworkReceiver to receive network status broadcasts from the ConnectivityManager after a network status change.
[0088] When a connection is established between the first electronic device and the second electronic device, and the first electronic device provides a network proxy for the second electronic device, after the network state of the first electronic device changes, the first electronic device needs to send the network state to the second electronic device so that the operating system and applications on the second electronic device can determine the correct network state.
[0089] After receiving a network status change notification from the first electronic device, the second electronic device can determine the network status of the first electronic device based on the notification and use the first electronic device's network status as its own. Once the second electronic device determines the network status change, it will synchronize the current network status with the applications running on the second electronic device.
[0090] In some implementations, after the second electronic device detects a change in network status, its operating system and / or applications will initiate a network probe. For example, in the Android system, the operating system or applications on the second electronic device can initiate a network probe by calling the `isReachable()` method provided by the `InetAddress` class or the `reportNetworkConnectivity()` method of the `Connectivitymanager` class, thereby determining whether the second electronic device is connected to a specific server. The server's address is configurable; it can be determined in the form of a domain name or a specific IP address.
[0091] In addition, if the second electronic device receives a network status change notification while in sleep mode, it will be woken up. During the brief wake-up period, the second electronic device may also perform some operations for other services or other applications.
[0092] Figure 2 This is an exemplary schematic diagram illustrating the impact of network state changes of the first electronic device on the power consumption of the second electronic device, as provided in an embodiment of this application.
[0093] Figure 2 The second electronic device in Figure 1 The first and second electronic devices are identical, and a connection is established between the first and second electronic devices, with the first electronic device providing a network proxy for the second electronic device.
[0094] Figure 2 and Figure 1 The content shown is different, such as Figure 2As shown, from time T0 to T1, the second electronic device is in a non-sleep state, and its power consumption is P1. At time T1, the second electronic device enters a sleep state, and its power consumption is P2. At time T3, due to a change in the network state of the first electronic device, the second electronic device receives a network state change notification from the first electronic device and is woken up. From time T3 to T4, the power consumption of the second electronic device is P1 because it has been woken up. From time T4 to T5, the second electronic device returns to the sleep state, and its power consumption is P2. At time T5, due to a change in the network state of the first electronic device, the second electronic device receives... The first electronic device sends a network status change notification, waking up the second electronic device. From time T5 to T6, the second electronic device is in a non-sleep state, and its power consumption is P4. From time T6 to T7, the second electronic device is in a sleep state, and its power consumption is P2. At time T7, due to the network status change of the first electronic device, the second electronic device receives the network status change notification sent by the first electronic device and is woken up. From time T7 to T8, due to the wake-up of the second electronic device, its power consumption is P3. From time T8 to T2, the second electronic device returns to the sleep state, and its power consumption is P2.
[0095] Among them, P1 is greater than P3, P3 is greater than P4, and P4 is greater than P2. At times T3, T5, and T7, the second electronic device will receive network status change notifications sent by the first electronic device. Therefore, during the three time periods of T3 to T4, T5 to T6, and T7 to T8, the second electronic device needs to read the network status change notifications from the underlying Bluetooth module or other modules that carry the connection between the first and second electronic devices, parse them to obtain the updated network status, and update the network status to the ConnectivityManager. Therefore, the power consumption of the second electronic device is higher than P2 during these three time periods.
[0096] Although the second electronic device is always responding to network status change notifications, it may also perform other operations for other services or applications after being woken up by a network status change notification. Therefore, the power consumption and wake-up duration of the second electronic device can vary each time it is woken up by a network status change notification.
[0097] In this scenario, at times T4, T6, and T8, the second electronic device, since the network status change notification is equivalent to an interrupt, will return to its pre-interruption state after processing the interruption; that is, the second electronic device will enter a sleep phase. Alternatively, in some embodiments of this application, after processing the network status change notification, the second electronic device also needs to determine whether the conditions for entering the sleep phase are met, and then determine whether to enter the sleep phase. In this case, at times T4, T6, and T8, the second electronic device determines whether the conditions for entering the sleep phase are met.
[0098] The change in the network status of the first electronic device may include the change between the network-connected state and the network-free state of the first electronic device.
[0099] Optionally, in some embodiments of this application, the change in the network state of the first electronic device may further include: a change in the network standard of the first electronic device. This change in the network standard of the first electronic device includes changes in whether the first electronic device is connected to a 2G network, a 3G network, a 4G network, a 5G network, or a WiFi network.
[0100] Optionally, in some embodiments of this application, the change in the network status of the first electronic device may further include: whether the network connected to the first electronic device is a paid network.
[0101] In some embodiments, the case where the network state of the first electronic device remains unchanged and the case where the network state of the first electronic device changes can be complementary.
[0102] contrast Figure 1 and Figure 2 As shown, when the first electronic device and the second electronic device establish a connection and the network status of the first electronic device changes, the first electronic device will send a network status change notification to the second electronic device. This requires the second electronic device to process the notification, which in turn increases the power consumption of the second electronic device and reduces its battery life.
[0103] Therefore, in order to reduce the power consumption of the second electronic device, embodiments of this application provide a method, system, and electronic device for controlling device power consumption. When the second electronic device and the first electronic device are connected, and the first electronic device provides a network proxy for the second electronic device, the method for controlling device power consumption provided in this application, when the second electronic device is in a sleep state, does not respond to network status change notifications sent by the first electronic device. This reduces the operations that the second electronic device needs to perform after receiving network status change notifications, thereby reducing the power consumption of the second electronic device.
[0104] Optionally, in some embodiments of this application, before the second electronic device enters the sleep phase, the second electronic device may send a first notification to the first electronic device to instruct the first electronic device not to send a network status change notification to the second electronic device after determining that the network status has changed. Since the second electronic device will not receive the network status change notification, it will not be woken up, thus keeping the power consumption of the second electronic device at a low level during the sleep phase. Furthermore, since the first electronic device does not need to send a network status change notification to the second electronic device after a network status change, its power consumption is also reduced.
[0105] Optionally, in some embodiments of this application, before the second electronic device enters the sleep phase, the data transmission channel corresponding to the network proxy can be shut down on the second electronic device side and / or the first electronic device can be notified to shut down the data transmission channel corresponding to the network proxy. Since the second electronic device shuts down the data channel corresponding to the network proxy, resources are further released, thereby further reducing the power consumption of the second electronic device; in addition, since the first electronic device shuts down the data channel corresponding to the network proxy, the power consumption of the first electronic device can be reduced.
[0106] Figure 3 This is an exemplary schematic diagram of the process of a method for controlling device power consumption provided in an embodiment of this application.
[0107] S301: The second electronic device accesses the network through the data channel established by the first electronic device.
[0108] In this system, the first electronic device and the second electronic device establish a connection, and the first electronic device provides a network proxy for the second electronic device.
[0109] In this system, after the first electronic device provides a network proxy for the second electronic device, it establishes a data channel for the second electronic device to forward data sent by the second electronic device for internet access. This data channel is used to transmit data sent by the first electronic device for data exchange with servers on the internet.
[0110] The data channel is not equivalent to the connection between the first electronic device and the second electronic device.
[0111] Optionally, in some embodiments of this application, the data channel can be a channel provided by a socket for transmitting data sent by a second electronic device for internet access, for example... Figure 4 The content shown.
[0112] Figure 4 An exemplary schematic diagram of a data channel provided in an embodiment of this application.
[0113] The protocol stack of the second electronic device will establish a first socket, which is used to send the data used by the second electronic device for Internet access to the first electronic device.
[0114] Correspondingly, the protocol stack on the first electronic device will establish a second socket and a third socket. The second socket is used to receive data sent by the first electronic device for internet access, and the third socket is used to send the data sent by the second electronic device for internet access to a network device such as a server, or the third socket is used to send the data sent by the second electronic device for internet access and the data sent by the first electronic device for internet access to a network device such as a server.
[0115] The first socket and the second socket are a pair of sockets.
[0116] exist Figure 4 In the content shown, the data channel is the channel used for transmitting data, which consists of the first socket, the second socket, and the third socket.
[0117] Optionally, the data channel on the first electronic device may be described as including the second socket and the third socket; the data channel on the second electronic device may be described as including the first socket.
[0118] Optionally, in some embodiments of this application, the first socket is further used to receive data sent by the first electronic device; the second socket is further used to send data to the second electronic device; and the third socket is further used to receive data sent by a network device such as a server.
[0119] Optionally, in some embodiments of this application, the data sent by the second electronic device may not include the source IP address, but the source IP address may be added by the second electronic device to achieve network proxy.
[0120] Optionally, in some embodiments of this application, the data in the first socket and the second socket are transport layer messages or application messages.
[0121] It's worth noting that data channels can also be implemented in other ways; that is, data channels don't necessarily have to be implemented through sockets. For example, they can also be implemented through the Wearable Data Layer API provided by Google Play services; or through other APIs pre-agreed upon by the second electronic device and the first electronic device.
[0122] S302: After determining that the conditions for entering the hibernation phase are met, the second electronic device sends a first notification to the first electronic device to instruct the first electronic device not to send a network status change notification to the second electronic device.
[0123] The second electronic device can determine whether it meets the conditions for entering the sleep stage in various ways, which are not limited here. For example, when the second electronic device is a wearable electronic device such as a wristband or watch, it meets the conditions for entering the sleep stage after determining that it is not being worn, in a screen-off state, or in a sleep state. As another example, when the second electronic device is a wearable electronic device such as a wristband or watch, it meets the conditions for entering the sleep stage after determining that it has been in a non-wearing state for a preset time, or in a screen-off state for a preset time, or in a sleep state for a preset time.
[0124] Optionally, in some embodiments of this application, the first notification may be used to inform the first electronic device that the second electronic device is in a sleep state.
[0125] Optionally, in some embodiments of this application, the second electronic device may also determine whether it is in a sleep state by using parameters from an ambient light sensor or other sensors (excluding the user's physiological parameters) and / or the user's historical sleep data, and thus determine whether it has entered a hibernation stage.
[0126] Optionally, in some embodiments of this application, the first electronic device may send an instruction to the second electronic device after the parameters in the ambient light sensor or other sensors meet preset conditions. The instruction is used to instruct the second electronic device to enter a sleep phase. After receiving the instruction, the second electronic device can determine that the conditions for entering the sleep phase are met.
[0127] Optionally, in some embodiments of this application, the first electronic device and / or the second electronic device may also disconnect the data channel corresponding to the network proxy, as shown in steps S303 and S304 respectively.
[0128] S303: Optionally, after determining that the conditions for entering the sleep phase are met, the second electronic device disconnects the data channel on one side.
[0129] The concept of data channels can be found above. Figure 4 The corresponding textual description will not be repeated here. The data channel that is disconnected on one side of the second electronic device can be referred to as the first data channel. Figure 4 In the content shown, the first data channel includes a first socket, and the first data channel can also be referred to as the data channel on the second electronic device.
[0130] If the data channel is established in another way, the second electronic device shall close the established data channel.
[0131] In this scenario, if the data channel is disconnected on one side of the second electronic device, the connection between the first and second electronic devices can remain open or be closed. However, if the data channel is disconnected on one side of the second electronic device, the second electronic device cannot connect to a server on the Internet through the network proxy provided by the first electronic device.
[0132] Optionally, in some embodiments of this application, unilateral disconnection of the data channel by the second electronic device means that the second electronic device changes the network status in the ConnectivityManager to no network or no network access. In this case, the application and / or operating system on the second electronic device can automatically release resources prepared for internet access when determining a no-network or no-network state. Furthermore, the application and / or operating system may not perform the operation to wake up the electronic device in a no-network or no-network state; for example, a news application will not request the server to push news in a no-network or no-network state.
[0133] Before modifying the network status in ConnectivityManager to no network or unable to connect to the network, the second electronic device can save the current network status, which can be used to restore the saved network status of the second electronic device after executing step S306.
[0134] Understandably, by disconnecting the data channel on one side, the power consumption of the second electronic device can be further reduced.
[0135] Optionally, in some embodiments of this application, step S303 may occur before step S302.
[0136] S304: Optionally, after receiving the first notification, the first electronic device disconnects the data channel on one side.
[0137] The concept of data channels can be found above. Figure 4 The corresponding textual descriptions will not be repeated here. Here, "the first electronic device unilaterally disconnecting the data channel" refers to the first electronic device releasing resources prepared for the second electronic device to access the internet, or disabling the network proxy provided for the second electronic device. The data channel unilaterally disconnected by the first electronic device can be referred to as the second data channel. Figure 4 In the content shown, the first data channel includes a second socket and a third socket. The second data channel can also be referred to as the data channel on the first electronic device.
[0138] In this case, after the data channel of the first electronic device is disconnected on one side, the connection between the first electronic device and the second electronic device can be either maintained or disconnected.
[0139] If the data channel is established in another way, the first electronic device shall close the established data channel.
[0140] Optionally, in some embodiments of this application, the third socket may be turned off if it is only used to transmit data from the second electronic device.
[0141] It is understandable that the power consumption of the first electronic device can be reduced by disconnecting the data channel on one side.
[0142] S305: After determining that the conditions for entering the non-sleep phase are met, the second electronic device sends a second notification to the first electronic device to instruct the first electronic device to send a network status change notification to the second electronic device after the network status changes.
[0143] The non-sleep phase includes the second electronic device being in an awake state, being worn, or having its screen on, and the applications on the second electronic device being using the network (such as downloading, playing multimedia online, or navigating).
[0144] Corresponding to step S302, the second electronic device can also determine whether to enter the non-sleep stage in a variety of ways, which are not limited here. For details, please refer to the text description in step S302 above.
[0145] The second electronic device sends a second notification to the first electronic device, wherein the second notification is used to instruct the first electronic device to send a network status change notification to the second electronic device.
[0146] Optionally, in some embodiments of this application, the first notification may be used to inform the first electronic device that the second electronic device is in a non-dormant state.
[0147] Optionally, in some embodiments of this application, when the second electronic device is in a sleep phase, the first electronic device and / or the second electronic device disconnects the data channel corresponding to the network proxy. Then, after the second electronic device changes from the sleep phase to the non-sleep phase, it is necessary to restore the data channel corresponding to the network proxy, as shown in steps S306 and S307 respectively.
[0148] Optionally, in some embodiments of this application, after the first electronic device receives the second notification, the first electronic device can send the current network status of the first electronic device to the second electronic device, so that the second electronic device can quickly and accurately determine the current network status, and can also avoid the inaccuracy of the network status of the second electronic device due to the failure to notify the second electronic device in time when the network status of the first electronic device changes during the sleep phase.
[0149] Optionally, in some embodiments of this application, the second notification may include the network state saved by the second electronic device before entering the sleep phase, and the first electronic device determines whether it needs to update the current network state to the second electronic device based on the second notification. For example, before the second electronic device enters the sleep phase, the second electronic device determines that the network state of the second electronic device is a 4G network based on the network state of the first electronic device; after the second electronic device enters the sleep phase and transitions from the sleep phase to the non-sleep phase, the network state of the first electronic device changes from a 4G network to a WiFi network and then back to a 4G network; after the first electronic device receives the second notification including the 4G network identifier, the first electronic device does not send the latest network state to the second electronic device, but the second electronic device determines that the current network state is a 4G network based on the previously saved network state.
[0150] S306: Optionally, after determining that the conditions for entering the non-sleep phase are met, the second electronic device restores the data channel on one side.
[0151] Corresponding to step S303, if the second electronic device shuts down the data channel on one side in step S303, then the second electronic device restores the data channel on one side, that is, restores the first socket.
[0152] Corresponding to step S303, the second electronic device unilaterally restoring the data channel means that the second electronic device changes the network status in the ConnectivityManager to "network available"; or, the second electronic device restores the network status in the ConnectivityManager to the saved network status of the second electronic device.
[0153] S307: Optionally, after receiving the second notification, the first electronic device restores the data channel on one side.
[0154] Optionally, corresponding to step S304, the first electronic device restores the data channel on one side, that is, restores the second socket. Also, if the first electronic device closed the third socket in step S304, the third socket is restored accordingly.
[0155] Since the second electronic device sends a second notification to the first electronic device, the second electronic device can determine that it is in a non-dormant state based on the second notification, and thus can restore the data channel on one side.
[0156] S308: After determining that the network status has changed, the first electronic device sends a network status change notification to the second electronic device.
[0157] For details on network status changes and network status change notifications, please refer to the text description above; they will not be repeated here.
[0158] S309: The second electronic device updates the network status.
[0159] In response to receiving a network status change notification, the second electronic device updates the network status.
[0160] The information regarding the network status update by the second electronic device can be found in the text above. Figure 2 The corresponding textual descriptions will not be repeated here.
[0161] Combination Figure 3 As can be understood from the process shown, the second electronic device sends a first notification to the first electronic device, thereby preventing it from receiving network status change notifications during the sleep phase and thus preventing it from being woken up by network status change notifications. This reduces the power consumption of the second electronic device and improves its battery life.
[0162] Optionally, in some embodiments of this application, after the first electronic device and the second electronic device are disconnected and reconnected, the first electronic device may send a request to the second electronic device to determine the current stage of the second electronic device. The second electronic device may respond with its current stage, or if the second electronic device does not respond, the first electronic device assumes that the second electronic device is in a dormant stage.
[0163] Optionally, in some embodiments of this application, a second electronic device in a dormant state may send a first notification to a first electronic device after connecting to any one of the first electronic devices.
[0164] Optionally, in some embodiments of this application, the second electronic device may not send the first notification to the first electronic device, but instead does not respond to the network status change notification received from the first electronic device during the sleep phase.
[0165] Figure 5 The first electronic device and the second electronic device provided in the embodiments of this application perform the following functions: Figure 3 An exemplary schematic diagram of the power consumption of the second electronic device following the method for controlling the power consumption of the device shown.
[0166] Because the second electronic device sends a first notification to the first electronic device before entering the sleep phase, the second electronic device does not send a network status change notification to the first electronic device after determining that the network status has changed. Therefore, from time T1 to T2, the second electronic device does not receive a network status change notification, which allows the second electronic device to maintain a low power consumption P2.
[0167] Figure 6 This is another exemplary schematic diagram of the process of the method for controlling device power consumption provided in the embodiments of this application.
[0168] exist Figure 6In the content shown, the second electronic device establishes a connection with the first electronic device, and the first electronic device provides a network proxy for the second electronic device, that is, the second electronic device accesses the Internet through the network capabilities provided by the first electronic device.
[0169] S601: After determining that the conditions for entering the hibernation stage are met, the second electronic device enters the hibernation stage.
[0170] The conditions for entering the hibernation stage can be found in the textual description of step S302 above, and will not be repeated here.
[0171] Optionally, in some embodiments of this application, the second electronic device may also shut down the transmission channel on one side after determining that the conditions for entering the sleep phase are met.
[0172] When the second electronic device is in a sleep state, the transmission channel on the first electronic device may or may not be closed. For example, if the first electronic device determines that the transmission channel on the second electronic device is closed, then the first electronic device may close its own transmission channel.
[0173] S602: After receiving the network status change notification sent by the first electronic device, the second electronic device stores the network status change notification.
[0174] After receiving a network status change notification, the second electronic device does not parse the notification to obtain the latest network status; instead, it stores the notification locally or parses it and stores the updated network status locally.
[0175] S603: After the second electronic device determines that the conditions for entering the non-sleep phase are met, it enters the non-sleep phase, reads the stored network status change notification, and updates the network status.
[0176] After the second electronic device enters the non-sleep phase, it reads the latest network status change notifications or network status from the local device, and then notifies the application on the second electronic device of the latest network status through the connection manager.
[0177] Optionally, in some embodiments of this application, after determining that the conditions for entering the non-sleep phase are met, the second electronic device determines whether the transmission channel is closed, and if the transmission channel is closed, restores the data channel on one side.
[0178] Combination Figure 6 As can be understood from the content shown, since the second electronic device does not need to respond to network status change notifications during the sleep phase, the power consumption of the second electronic device is reduced, and the battery life of the second electronic device is improved.
[0179] Figure 7 The second electronic device provided in the embodiments of this application performs the following functions: Figure 6 An exemplary schematic diagram of the power consumption of the second electronic device following the method for controlling the power consumption of the device shown.
[0180] Figure 7 The content shown is the same as Figure 2 The difference is that at time T3, after the second electronic device receives the network status change notification from the first electronic device, its power consumption is P1. Since the second electronic device does not need to respond to this network status change notification, its power consumption drops to P2 very quickly. Similarly, at time T5, after the second electronic device receives the network status change notification from the first electronic device, its power consumption is P3, and it drops to P2 very quickly. Similarly, at time T7, after the second electronic device receives the network status change notification from the first electronic device, its power consumption is P4, and it drops to P2 very quickly.
[0181] Figure 8 This is another exemplary schematic diagram of the process of the method for controlling device power consumption provided in the embodiments of this application.
[0182] Optionally, in some embodiments of this application, the dormancy phase can be further divided into a shallow dormancy phase and a deep dormancy phase.
[0183] When the second electronic device is a wearable electronic device, the conditions for the second electronic device to enter the shallow sleep stage and the deep sleep stage are shown in Table 1 below.
[0184] Table 1 is an exemplary schematic diagram showing the conditions for the second electronic device to enter the shallow sleep stage and deep sleep stage according to the embodiments of this application.
[0185] Table 1
[0186]
[0187] As shown in Table 1, when the duration of the second electronic device's unworn state is U1 to U2, the second electronic device enters a shallow sleep stage; when the duration of the unworn state is greater than U2, the second electronic device enters a deep sleep stage; when the duration of the sleep state is U3 to U4, the second electronic device enters a shallow sleep stage; when the duration of the sleep state is greater than U4, the second electronic device enters a deep sleep stage; when the first electronic device is in a do-not-disturb state, the first electronic device sends a message to the second electronic device to cause the second electronic device to enter a deep sleep stage; when the duration of the screen-off state is greater than U5, the second electronic device enters a shallow sleep stage.
[0188] U1 and U3 can be 0. U2 and U4 can be positive infinity.
[0189] Based on the information shown in Table 1, it can be seen that in some cases, the second electronic device is in a shallow sleep stage before entering the deep sleep stage; in other cases, the second electronic device can directly enter the deep sleep stage.
[0190] Based on the information shown in Table 1, it can be seen that the second electronic device can independently determine whether to enter a shallow sleep stage or a deep sleep stage, or it can be instructed by the first electronic device to enter a specific stage.
[0191] It is worth noting that Table 1 is merely an example, that is, the conditions for entering the shallow dormancy stage and the conditions for entering the deep dormancy stage shown in Table 1 are provided as an example, and no limitations are made on the conditions for entering the shallow dormancy stage and the deep dormancy stage.
[0192] S801: After the second electronic device enters the shallow sleep stage, it receives the network status change notification sent by the first electronic device and stores the network status change notification.
[0193] The response of the second electronic device after entering the shallow sleep stage and receiving the network status change notification sent by the first electronic device can be referred to the textual description of step S602 above, and will not be repeated here.
[0194] Optionally, in some embodiments of this application, if the second electronic device enters a non-sleep phase from a shallow sleep phase, the second electronic device updates the network status based on the network status change notification received during the sleep phase.
[0195] S802: After the second electronic device determines that the conditions for entering the deep sleep stage are met, it sends a first notification to the first electronic device.
[0196] Once the second electronic device determines that the conditions for entering the deep sleep stage are met, the operations to be performed can be referred to the textual descriptions of steps S302 and S303 above, and will not be repeated here.
[0197] S803: After the second electronic device changes from deep sleep to non-sleep, it sends a second notification to the first electronic device.
[0198] After the second electronic device changes from deep sleep to non-sleep, the operation performed by the second electronic device can be referred to the textual description of step S305 above, and will not be repeated here.
[0199] S804: After receiving the network status change notification sent by the first electronic device, the second electronic device updates the network status.
[0200] When the second electronic device is not in sleep mode, the content of the network status change notification received can be referred to the text description in step S309 above.
[0201] Figure 9 The second electronic device provided in the embodiments of this application performs the following functions: Figure 8 An exemplary schematic diagram of the power consumption of the second electronic device following the method for controlling the power consumption of the device shown.
[0202] In this process, the second electronic device will not send the first notification to the first electronic device after entering the shallow sleep phase, but will still receive network status change notifications from the second electronic device during the shallow sleep phase. Conversely, before determining whether to enter the deep sleep phase, the second electronic device will send the first notification to the first electronic device, thereby instructing the first electronic device not to send network status change notifications to the second electronic device.
[0203] and Figure 2 The difference shown is in the comparison. Figure 2 As shown, at time T3, after the second electronic device receives the network status change notification sent by the first electronic device, the power consumption of the second electronic device is P1; after time T8, the second electronic device enters a deep sleep stage and sends a first notification to the first electronic device before entering the deep sleep stage; at times T5 and T7, after the first electronic device determines that the network status has changed, it will not send a network status change notification to the second electronic device, so the power consumption of the second electronic device does not change.
[0204] Obviously, the method for controlling device power consumption provided in this application embodiment can reduce the power consumption of the second electronic device and can also reduce the power consumption of the first electronic device. The following is in conjunction with... Figure 6 The content shown illustrates, by way of example, the process of a method for controlling device power consumption provided in the embodiments of this application.
[0205] When the network state change of the second electronic device is caused by a change in the network state of the first electronic device, the second electronic device may not need to initiate a network probe. This is because after the network state change of the first electronic device, it will initiate a network probe to determine whether it is connected to the Internet, thus eliminating the need for the second electronic device to initiate a network probe. It is understandable that by reducing the number of network probes initiated, the second electronic device can reduce its power consumption.
[0206] Optionally, in some embodiments of this application, if the application on the second electronic device actively initiates network probing or in other cases, and the second electronic device initiates a network probing request through the first electronic device, then the first electronic device may not forward the network probing request initiated by the second electronic device, such as... Figure 10 The content shown.
[0207] Figure 10 This is an exemplary schematic diagram of the network detection process provided in the embodiments of this application.
[0208] S1001: The second electronic device sends a network probe request to the first electronic device.
[0209] The second electronic device may initiate a network probe after the network status changes, or the application running on the second electronic device may initiate a network probe on its own initiative.
[0210] In various situations, the second electronic device can initiate network probes, such as those initiated by an application on the second electronic device, or after a change in network status, or after the second electronic device has reconnected to the first electronic device after being disconnected.
[0211] S1002: The first electronic device determines whether the network is connected to the Internet and uses the connection to the Internet as the result of the network probe request.
[0212] After receiving a network probe request from the second electronic device, the first electronic device determines whether it is connected to the Internet, but does not actually perform a network probe.
[0213] The first electronic device can determine whether it is connected to the Internet based on its own historical network detection results or its network status.
[0214] Optionally, in some embodiments of this application, Figure 10The content shown applies to situations where the network state change of the second electronic device is caused by the first electronic device, and to situations where the second electronic device reconnects to the first electronic device after a disconnection. Specifically, the second electronic device can add an identifier to the network probe request. This identifier determines whether the network probe request was caused by a change in the network state of the second electronic device or by a reconnection after a disconnection; or it can indicate that the network probe request was initiated by an application on the second electronic device. Furthermore, the first electronic device can use this identifier to determine whether to initiate a genuine network probe or simply return the result of the network probe request based on the current network state.
[0215] S1003: The first electronic device sends the network probe request result to the second electronic device.
[0216] The first electronic device can send network detection results to the second electronic device, and the network detection results can indicate whether or not the device is connected to the Internet.
[0217] Combination Figure 10 As can be understood from the content shown, since the first electronic device can reduce its power consumption by not performing an actual network probe after receiving a network probe request from the second electronic device.
[0218] Optionally, in some embodiments of this application, since the first electronic device performs network probing after a network state change, the second electronic device may not perform network probing after receiving a network state change notification. It is worth noting that the server probed by the first electronic device during network probing may be different from the server probed by the second electronic device. Considering that servers generally do not lose network access, the second electronic device not performing network probing generally will not cause erroneous results. Because the second electronic device can choose not to perform network probing, its power consumption can be reduced.
[0219] Figure 11 This is another exemplary schematic diagram of the process of the method for controlling device power consumption provided in the embodiments of this application.
[0220] S1101: After receiving the first notification, and after the first electronic device determines that the network status has changed, it does not send a network status change notification to the second electronic device.
[0221] Optionally, in some embodiments of this application, if the first electronic device has sent an instruction to the second electronic device before determining the network status change, and the instruction is used to instruct the second electronic device to enter a sleep phase, then the first electronic device will not send a network status change notification to the second electronic device after determining the network status change.
[0222] Optionally, in some embodiments of this application, if the first electronic device shuts down the data channel on one side when the second electronic device is in a sleep state, then after determining that the network status has changed, if the data channel on the first electronic device has been shut down, the first electronic device will not send a network status change notification to the second electronic device.
[0223] S1102: Optionally, after the first electronic device receives the first notification, it shuts down the data channel on one side.
[0224] If the data channel is not closed after the first electronic device receives the second notification, then the first electronic device will unilaterally close the data channel. The details of how the first electronic device unilaterally closes the data channel can be found in the textual description of step S304 above, and will not be repeated here.
[0225] S1103: After receiving the second notification, the first electronic device sends a network status change notification to the second electronic device.
[0226] It is understandable that after receiving the second notification, the first electronic device sends a network status change notification to the second electronic device, which allows the second electronic device to obtain the latest network status of the first electronic device and thus update its own network status.
[0227] Optionally, in some embodiments of this application, after the first electronic device determines that the network status has changed, it sends a network status change notification to the second electronic device.
[0228] Optionally, in some embodiments of this application, if the first electronic device has sent an instruction to the second electronic device before determining the network status change, and the instruction is used to instruct the second electronic device to enter a non-sleep phase, then the first electronic device can send a network status change notification to the second electronic device after determining the network status change.
[0229] Optionally, in some embodiments of this application, if the first electronic device will unilaterally restore the data channel when the second electronic device is in a non-sleep phase, then after determining that the network status has changed, if the data channel on the first electronic device is not closed, the first electronic device will send a network status change notification to the second electronic device.
[0230] S1104: Optionally, after the first electronic device receives the second notification, the data channel is restored on one side.
[0231] If the data channel is closed after the first electronic device receives the second notification, then the first electronic device unilaterally restores the data channel. The details of how the first electronic device unilaterally restores the data channel can be found in the textual description of step S307 above, and will not be repeated here.
[0232] Finally, the hardware structure and software architecture of the first electronic device and the second electronic device provided in the embodiments of this application are introduced.
[0233] In the following text, "electronic device" refers to both the first electronic device and the second electronic device.
[0234] Figure 12 This is an exemplary schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.
[0235] The electronic device can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. The embodiments of this application do not impose any special restrictions on the specific type of the electronic device.
[0236] Optionally, in some embodiments of this application, the first electronic device is an electronic device such as a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, super mobile personal computer, netbook, cellular phone, personal digital assistant, etc.; the second electronic device is a VR device, wearable device, or vehicle-mounted device.
[0237] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0238] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0239] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0240] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0241] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0242] In some embodiments, the processor 110 may include one or more interfaces. 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, etc.
[0243] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device.
[0244] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0245] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0246] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0247] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device to display images.
[0248] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0249] USB port 130 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic devices, and can also be used for data transfer between electronic devices and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0250] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0251] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0252] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0253] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0254] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more 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 some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0255] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G in electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0256] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0257] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0258] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the electronic device to communicate with networks 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 technologies. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0259] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0260] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may 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 miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 194, where N is a positive integer greater than 1.
[0261] Electronic devices can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0262] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, 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, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0263] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. 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, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.
[0264] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency, a DSP is used to perform Fourier transforms on the frequency energy.
[0265] Video codecs are used to compress or decompress digital video. Electronic devices can support one or more video codecs. This allows the electronic device to play or record video in various encoded formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0266] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission stages between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0267] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0268] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, fifth generation DDR SDRAM is generally called DDR5 SDRAM), etc.
[0269] Non-volatile memory can include disk storage devices and flash memory.
[0270] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.
[0271] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0272] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0273] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0274] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.
[0275] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0276] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic devices can listen to music or make hands-free calls through the speaker 170A.
[0277] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When an electronic device answers a phone call or voice message, the receiver 170B can be brought close to the ear to hear the voice.
[0278] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic devices can have at least one microphone 170C. In some embodiments, electronic devices can have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic devices can have three, four, or more microphones 170C, enabling sound signal collection, noise reduction, sound source identification, and directional recording, among other functions.
[0279] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0280] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, the electronic device detects the intensity of the touch operation based on pressure sensor 180A. The electronic device can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0281] The gyroscope sensor 180B can be used to determine the motion attitude of an electronic device. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing gaming scenarios.
[0282] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0283] The magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be configured.
[0284] The 180E accelerometer can detect the magnitude of acceleration in various directions (typically three axes) of an electronic device. When the electronic device is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices, and is applicable to screen orientation switching, pedometers, and other applications.
[0285] A distance sensor 180F is used to measure distance. Electronic devices can measure distance using infrared or laser. In some embodiments, during a shooting scene, the electronic device can utilize the distance sensor 180F to measure distance for rapid focusing.
[0286] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device emits infrared light outward through the LED. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that an object is near the electronic device. When insufficient reflected light is detected, the electronic device can determine that no object is near the electronic device. The electronic device can use the proximity sensor 180G to detect when a user holds the electronic device close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used for automatic unlocking and locking of the screen in cases and pockets.
[0287] The ambient light sensor 180L is used to detect ambient light levels. Electronic devices can adaptively adjust the brightness of their displays (194) based on the detected ambient light. The ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Furthermore, the ambient light sensor 180L can work in conjunction with the proximity sensor 180G to detect whether electronic devices are in a pocket, preventing accidental touches.
[0288] The fingerprint sensor 180H is used to collect fingerprints. Electronic devices can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, app access locks, fingerprint photography, fingerprint answering of calls, etc.
[0289] Temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, the electronic device reduces the performance of a processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device heats battery 142 to prevent abnormal shutdown of the electronic device due to low temperature. In still other embodiments, when the temperature is below yet another threshold, the electronic device boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0290] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of the electronic device, in a different position than display screen 194.
[0291] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0292] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The electronic device can receive button input and generate key signal inputs related to user settings and function control of the electronic device.
[0293] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0294] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0295] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device. The electronic device can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device interacts with the network through the SIM card to achieve functions such as calls and data communication. In some embodiments, the electronic device uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from it.
[0296] Optionally, in some embodiments of this application, the second electronic device may not have a mobile communication module 150.
[0297] Optionally, in some embodiments of this application, the second electronic device may determine whether it is in a sleep state via an ambient light sensor 180L.
[0298] Optionally, in some embodiments of this application, the second electronic device can determine whether it is not being worn by a proximity light sensor 180G.
[0299] Optionally, in some embodiments of this application, the second electronic device and the first electronic device establish a connection through their respective wireless communication modules 160.
[0300] Figure 13A Another exemplary schematic diagram of the software architecture of the second electronic device provided in the embodiments of this application.
[0301] like Figure 13A As shown, the software architecture of the second electronic device includes: a display driver, a sensor module 180 driver, a power management module, and a wireless communication module 160 driver.
[0302] The power management module can receive data reported by the display driver and sensor module 180 to determine whether it is in a sleep state, a screen-off state, or an unworn state, and further determine whether the second electronic device is in a hibernation stage, a light hibernation stage, or a deep hibernation stage.
[0303] After determining that it is in a sleep or deep sleep phase, the power management module can call the wireless communication module 160 to send a first notification to the first electronic device through the driver of the wireless communication module 160; and after determining that it is in a non-sleep phase, it can call the wireless communication module 160 to send a second notification to the first electronic device through the driver of the wireless communication module 160.
[0304] Specifically, after determining whether the device is in a sleep or deep sleep state, the power management module instructs the driver of the wireless communication module 160 not to send the network status to the connection manager upon receiving a network status change notification. Alternatively, the power management module can also instruct the connection manager not to broadcast the latest network status to the application on the second electronic device.
[0305] The connection manager is used to update the network status, including notifying the application on the second electronic device of the updated network status via callbacks registered by the application on the second electronic device.
[0306] Figure 13B This is an exemplary schematic diagram of the software architecture of a system including a second electronic device and a first electronic device, provided for embodiments of this application.
[0307] like Figure 13B As shown, the first electronic device and the second electronic device establish a connection.
[0308] The health and fitness application on the first electronic device can register callbacks with the connection manager of the first electronic device. After the connection manager determines the latest network status, the health and fitness application on the first electronic device can obtain the latest network status. The latest network status can be determined by parameters reported by the driver of the wireless communication module 160 and / or the driver of the mobile communication module 150.
[0309] The health and fitness application can determine whether the second electronic device is in a sleep state. The second and third sockets can be established by the health and fitness application. The health and fitness application can also be other applications or services, etc., without limitation.
[0310] After determining the latest network status, the sports and health application can send the latest network status to the second electronic device via the wireless communication module 160.
[0311] Optionally, in some embodiments of this application, the health and fitness application may not send the latest network status after determining that the second electronic device is in a sleep state, thereby avoiding waking up the second electronic device and increasing its power consumption. That is, the health and fitness application can be used to receive a first notification and / or a second notification.
[0312] After determining that the second electronic device has entered a shallow sleep phase, the power management module on the second electronic device can instruct the connection manager not to update the network status after receiving the latest network status, thereby avoiding an increase in the power consumption of the second electronic device and preventing an increase in the power consumption of the second electronic device due to the application determining to perform some operations after receiving the latest network status.
[0313] The power management module can send the first notification and / or the second notification to the first electronic device through the drive of the wireless communication module 160.
[0314] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0315] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0316] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A system, characterized in that, The system includes a first electronic device and a second electronic device, which are connected. The second electronic device accesses the internet through the first electronic device, wherein: The second electronic device is used to determine the depth of its own sleep stage, which includes at least a shallow sleep stage and a deep sleep stage; the second electronic device determines the depth of its sleep stage based on at least one of the following parameters: the duration of being unworn, the duration of being asleep, whether it receives a Do Not Disturb mode instruction from the first electronic device, and the duration of being in a screen-off state. The second electronic device is configured to, when the second electronic device is in a shallow sleep phase, after receiving a network status change notification sent by the first electronic device, store the network status change notification, and update the network status based on the stored network status change notification after entering a non-sleep phase from the shallow sleep phase; The second electronic device is further configured to send a first notification to the first electronic device before the second electronic device enters the deep sleep phase, the first notification being configured to instruct the first electronic device to prohibit the first electronic device from sending network status change notifications; The first electronic device is configured to, upon receiving the first notification and determining that the network status of the first electronic device has changed, not send the network status change notification to the second electronic device, wherein the network status change notification includes the network status of the first electronic device; The second electronic device is configured to send a second notification to the first electronic device after transitioning from the deep sleep phase to the non-sleep phase, the second notification being used to instruct the first electronic device to send the network status change notification; The first electronic device is configured to send the network status change notification to the second electronic device after receiving the second notification.
2. The system according to claim 1, characterized in that, The second electronic device sends data for internet access to the first electronic device through the first data channel; The second electronic device is further configured to: shut down the first data channel before transitioning from the non-sleep phase to the deep sleep phase.
3. The system according to claim 2, characterized in that, The first electronic device receives and forwards data sent by the second electronic device for internet access through the second data channel; The first electronic device is further configured to: close the second data channel after receiving the first notification.
4. The system according to any one of claims 1-3, characterized in that, The second electronic device is further configured to: before transitioning from the non-sleep phase to the sleep phase, configure the network status of the second electronic device to no network or network unavailable.
5. The system according to claim 4, characterized in that, The second electronic device is further configured to: acquire a first parameter and determine the state of the second electronic device as a first state based on the first parameter; The second electronic device is further configured to: determine, based on the first state, whether to transition from the deep sleep phase to the non-sleep phase or from the non-sleep phase to the deep sleep phase.
6. The system according to claim 5, characterized in that, When the second electronic device determines, based on the first state, to transition from the non-sleep phase to the deep sleep phase, the first state is either a sleep state or an unworn state.
7. The system according to claim 6, characterized in that, The second electronic device is also configured to send a network probe request to the first electronic device during the non-sleep phase; The first electronic device is further configured to determine the network detection results based on the network status of the first electronic device; The first electronic device is also used to send the network detection results to the second electronic device.
8. A method for controlling device power consumption, characterized in that, The method, applied to a second electronic device, wherein a first electronic device is connected to the second electronic device, and the second electronic device accesses the internet through the first electronic device, includes: The depth of the sleep phase of the second electronic device is determined based on at least one of the following parameters: the duration of the unworn state, the duration of the sleep state, whether a Do Not Disturb mode indication is received from the first electronic device, and the duration of the screen-off state. The sleep phase includes a deep sleep phase and a shallow sleep phase. When the second electronic device is in a non-sleep phase, after receiving a network status change notification sent by the first electronic device, it updates the network status based on the network status change notification, which includes the network status of the first electronic device. When the second electronic device is in a shallow sleep phase, after receiving a network status change notification sent by the first electronic device, it stores the network status change notification, and after entering the non-sleep phase from the shallow sleep phase, it updates the network status based on the stored network status change notification. Before the second electronic device enters deep sleep mode, it sends a first notification to the first electronic device. The first notification is used to instruct the first electronic device to prohibit it from sending network status change notifications. After the second electronic device determines that it has entered the non-sleep phase from the deep sleep phase, it sends a second notification to the first electronic device. The second notification is used to instruct the first electronic device to send network status change notifications.
9. The method according to claim 8, characterized in that, The second electronic device sends data for internet access to the first electronic device through the first data channel; The method further includes: before the second electronic device determines that it is entering the sleep phase from the non-sleep phase, the second electronic device shuts down the first data channel.
10. The method according to claim 9, characterized in that, The second electronic device shuts down the first data channel, specifically including: The second electronic device is configured with a network status of no network or network unavailable.
11. A method for controlling device power consumption, characterized in that, Applied to a first electronic device, which is connected to a second electronic device, the first electronic device provides internet access to the second electronic device. The second electronic device is used to determine the depth of its sleep stage, which includes at least a shallow sleep stage and a deep sleep stage. The second electronic device determines the depth of its sleep stage based on at least one of the following parameters: the duration of being unworn, the duration of being asleep, whether it receives a Do Not Disturb mode instruction from the first electronic device, and the duration of being in a screen-off state. The second electronic device is further configured to, when in the shallow sleep phase, after receiving a network status change notification sent by the first electronic device, store the network status change notification, and after entering a non-sleep phase from the shallow sleep phase, update the network status based on the stored network status change notification, the method comprising: After receiving the first notification from the second electronic device, the first electronic device, after determining that the network status has changed, does not send a network status change notification to the second electronic device. The network status change notification includes the changed network status of the first electronic device. The first notification is sent by the second electronic device before it changes from the non-sleep phase or the shallow sleep phase to the deep sleep phase. The first notification is used to indicate that the first electronic device is prohibited from sending network status change notifications. After receiving the second notification sent by the second electronic device, the first electronic device sends a network status change notification to the second electronic device. The second notification is sent after the second electronic device transitions from the deep sleep phase to the non-sleep phase, and is used to indicate that the first electronic device is allowed to send the network status change notification.
12. The method according to claim 11, characterized in that, The method further includes: Receive network probe requests sent by the second electronic device; The first electronic device determines the network detection result based on the network status of the second electronic device; The first electronic device sends the network detection results to the second electronic device.
13. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 8-12.
14. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 8-12.
15. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 8-12.
16. A computer program product containing instructions, characterized in that, When the instructions of the computer program product are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 8-12.
Citation Information
Patent Citations
Application method for dual operation systems, storage device and intelligent terminal
CN107491160A
Communication method and device
CN114698069A
Communication of processor state information
US20160066273A1