Power consumption optimization method and device, user equipment and machine readable storage medium

By optimizing the self-organizing network strategy based on device status, disabling unnecessary functions, and adjusting the heartbeat frequency, the high power consumption problem in self-organizing networks was solved, and the user experience was improved.

CN121968259APending Publication Date: 2026-05-01BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-10-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Frequent broadcast scanning by electronic devices in ad hoc networks leads to high power consumption and affects user experience.

Method used

Determine power consumption optimization strategies based on device status, disable unnecessary functions such as WLAN broadcasting and scanning, adjust heartbeat packet transmission frequency, promptly start and stop ad hoc network services, and use low-power controllers to identify trusted relationships.

Benefits of technology

By specifically optimizing the power consumption of electronic devices, unnecessary power consumption can be reduced, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968259A_ABST
    Figure CN121968259A_ABST
Patent Text Reader

Abstract

The invention provides a power consumption optimization method and device, user equipment and a machine readable storage medium. According to one embodiment of the invention, the method comprises the following steps: in response to the access of the electronic equipment to an ad hoc network, obtaining the equipment state of the electronic equipment; determining a power consumption optimization strategy corresponding to the equipment state according to the equipment state; and performing power consumption optimization processing on the electronic equipment based on the power consumption optimization strategy. According to the invention, the power consumption of the electronic equipment can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of ad hoc network technology, and in particular to a power consumption optimization method, apparatus, user equipment, and machine-readable storage medium. Background Technology

[0002] Ad hoc networks (ANRs) are a network architecture in which devices can automatically discover and connect to each other without central control or management. This technology is commonly used in wireless networks, allowing devices to flexibly form and reorganize in dynamic environments to achieve data communication. Ad hoc networks are adaptive, scalable, and fault-tolerant, and are widely used in scenarios such as the Internet of Things (IoT), mobile networks, and disaster recovery.

[0003] In current technology, electronic devices are typically capable of providing self-organizing network services. Based on this, in order to provide users with seamless and zero-wait service, electronic devices usually automatically start the self-organizing network service after power-on and frequently perform broadcast scans to update the self-organizing network topology information. This results in high power consumption for the electronic device and affects the user experience. Summary of the Invention

[0004] This disclosure provides a power consumption optimization method, the method comprising:

[0005] In response to an electronic device accessing an ad hoc network, the device status of the electronic device is obtained;

[0006] Based on the device state, determine the power consumption optimization strategy corresponding to the device state;

[0007] Based on the power consumption optimization strategy, the electronic device is subjected to power consumption optimization processing.

[0008] Optionally, the device state includes a screen-off state; the power consumption optimization strategies corresponding to the device state include:

[0009] When the electronic device is in a screen-off state, all auxiliary functions except for the BLE broadcast function are turned off.

[0010] Optional, other accessibility features include at least one of the features shown below:

[0011] The scanning function, WLAN broadcast function, and WLAN scanning function are related to the BLE broadcast function.

[0012] Optionally, the broadcast data of the BLE broadcast includes the IP address of the electronic device;

[0013] The method further includes:

[0014] The IP address of the electronic device is encapsulated in broadcast data and broadcast using BLE, so that the peer device receiving the broadcast data can identify whether the electronic device and the peer device are located in the same local area network based on the IP address, and if it is determined that the electronic device and the peer device are located in the same local area network, it requests to establish a connection with the electronic device.

[0015] Optionally, before determining the power consumption optimization strategy corresponding to the device state based on the device state, the method further includes:

[0016] Identify the peer device that has established a long connection with the electronic device in the self-organizing network, and obtain the device status of the peer device;

[0017] The power consumption optimization strategies corresponding to the device state include:

[0018] The frequency at which the electronic device sends heartbeat packets is adjusted based on the device status of the electronic device and the device status of the peer device; wherein the heartbeat packets are used to maintain the long connection.

[0019] Optionally, the device status also includes a screen-on state;

[0020] Adjusting the heartbeat packet transmission frequency of the electronic device based on the device status of the electronic device and the device status of the peer device includes:

[0021] When both the device status of the electronic device and the device status of the peer device are in a screen-off state, adjust the sending frequency of the heartbeat packets by the electronic device to a first frequency; or,

[0022] When the electronic device is in a screen-off state and the peer device is in a screen-on state; or when the electronic device is in a screen-on state and the peer device is in a screen-off state, the sending frequency of the heartbeat packets by the electronic device is adjusted to a second frequency; the second frequency is higher than the first frequency; or...

[0023] When both the device status of the electronic device and the device status of the peer device are in the on state, the sending frequency of the heartbeat packets by the electronic device is adjusted to a third frequency; the third frequency is higher than the second frequency.

[0024] Optionally, before obtaining the device status of the electronic device in response to it accessing the ad hoc network, the method further includes:

[0025] Determine whether the electronic device triggered a target service within a preset time period; wherein, the target service includes services that communicate through the ad hoc network;

[0026] If the electronic device does not trigger the target service within a preset time period, the self-organizing network service of the electronic device will be disabled.

[0027] Optionally, before obtaining the device status of the electronic device in response to it accessing the ad hoc network, the method further includes:

[0028] In response to receiving a device list pushed from the cloud, the system queries the device list for peer devices that have established a trusted relationship with the electronic device, based on the login user information corresponding to the electronic device; wherein, the device list is pushed by the cloud when device information uploaded by a new electronic device is added to the device list; and a trusted relationship exists between the new electronic device and the electronic device.

[0029] In response to the number of peer devices exceeding a preset threshold, the self-organizing network broadcast function is activated.

[0030] Optionally, enable the self-organizing network broadcast function, including:

[0031] Obtain the login user information corresponding to the electronic device;

[0032] Based on a hash algorithm, a digest of the logged-in user information is calculated and encapsulated in broadcast data for broadcasting. This allows the low-power controller on the peer device receiving the broadcast data to identify whether a trusted relationship has been established with the electronic device based on the digest. If a trusted relationship is established, the main controller on the peer device requests a connection from the electronic device.

[0033] This disclosure also provides a power consumption optimization device, the device comprising:

[0034] The acquisition unit is used to acquire the device status of the electronic device in response to the electronic device accessing the ad hoc network.

[0035] The determining unit is configured to determine a power consumption optimization strategy corresponding to the device state based on the device state.

[0036] The processing unit is used to perform power optimization processing on the electronic device based on the power optimization strategy.

[0037] This disclosure also provides a user equipment, including a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus;

[0038] The memory stores machine-readable instructions, and the processor executes the power optimization method by calling the machine-readable instructions.

[0039] This disclosure also provides a machine-readable storage medium storing machine-readable instructions, which, when called and executed by a processor, implement the power optimization method.

[0040] The technical solution provided in this disclosure can include at least the following beneficial effects:

[0041] Through the above embodiments, an electronic device can, in response to accessing an ad hoc network, obtain its device status; determine a power consumption optimization strategy corresponding to the device status; and perform power consumption optimization processing on the electronic device based on the power consumption optimization strategy. Therefore, when an electronic device is accessing an ad hoc network, targeted power consumption optimization processing can be performed on the electronic device based on its device status, thereby saving power consumption and improving the user experience. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0043] Figure 1 This is a system architecture diagram illustrating a power optimization method according to an exemplary embodiment.

[0044] Figure 2 This is a flowchart illustrating a power consumption optimization method according to an exemplary embodiment.

[0045] Figure 3 This is a scenario diagram illustrating a power consumption optimization method according to an exemplary embodiment.

[0046] Figure 4 This is a block diagram illustrating a power optimization device according to an exemplary embodiment.

[0047] Figure 5 This is a hardware structure diagram of a user equipment containing a power optimization device, according to an exemplary embodiment. Detailed Implementation

[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure.

[0049] It should be noted that in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described in this disclosure. In some other embodiments, the methods may include more or fewer steps than those described in this disclosure.

[0050] The power consumption optimization method provided in this disclosure is described below through specific embodiments and application scenarios. This method optimizes the power consumption of an electronic device based on its device state and a corresponding power consumption optimization strategy.

[0051] In implementation, the device status of the electronic device can be obtained in response to the electronic device accessing the ad hoc network;

[0052] Based on the device state, determine the power consumption optimization strategy corresponding to the device state;

[0053] Based on the power consumption optimization strategy, the electronic device is subjected to power consumption optimization processing.

[0054] Through the above embodiments, an electronic device can, in response to accessing an ad hoc network, obtain its device status; determine a power consumption optimization strategy corresponding to the device status; and perform power consumption optimization processing on the electronic device based on the power consumption optimization strategy. Therefore, when an electronic device is accessing an ad hoc network, targeted power consumption optimization processing can be performed on the electronic device based on its device status, thereby saving power consumption and improving the user experience.

[0055] The present disclosure will now be described through specific embodiments and in conjunction with specific application scenarios.

[0056] Please see Figure 1 , Figure 1 This is a system architecture diagram illustrating a power optimization method according to an exemplary embodiment. Figure 1 As shown, the self-organizing network can consist of multiple electronic devices. The specific types of these electronic devices can be set according to actual needs, and this disclosure does not limit them. For example, the multiple electronic devices may include smartphones, laptops, tablets, smart TVs, etc.

[0057] The method involves an electronic device (exemplarily a smartwatch) responding to accessing an ad hoc network by obtaining the device status of the electronic device; determining a power optimization strategy corresponding to the device status based on the device status; and performing power optimization processing on the electronic device based on the power optimization strategy.

[0058] The device status can include a screen-off state; the power consumption optimization strategy corresponding to the device status can include: when the electronic device is in a screen-off state, disabling other auxiliary functions except for the BLE broadcast function.

[0059] Other auxiliary functions include at least one of the following: scanning function related to BLE broadcasting function, WLAN broadcasting function, and WLAN scanning function.

[0060] The broadcast data of BLE broadcast can include the IP address of the electronic device; the electronic device can also encapsulate the IP address of the electronic device in the broadcast data for BLE broadcast, so that the peer device receiving the broadcast data can identify whether the electronic device and the peer device are located in the same local area network based on the IP address, and if it is determined that the electronic device and the peer device are located in the same local area network, request to establish a connection with the electronic device.

[0061] In this context, before determining the power consumption optimization strategy corresponding to the device status based on the device status, the electronic device can identify the peer device that has established a long connection with the electronic device in the self-organizing network and obtain the device status of the peer device.

[0062] Power consumption optimization strategies corresponding to device status may include: adjusting the sending frequency of heartbeat packets by the electronic device based on the device status of the electronic device and the device status of the peer device; wherein, the heartbeat packets are used to maintain a long connection.

[0063] The device status may also include screen-on status; the electronic device may adjust the frequency of sending heartbeat packets to a first frequency when both the electronic device's status and the remote device's status are screen-off; or...

[0064] The electronic device can adjust its heartbeat packet transmission frequency to a second frequency when its screen is off and the other device's screen is on; or when its screen is on and the other device's screen is off; the second frequency is higher than the first frequency.

[0065] The electronic device can adjust the frequency of sending heartbeat packets to a third frequency when both the device status of the electronic device and the device status of the peer device are on; the third frequency is higher than the second frequency.

[0066] The electronic device can determine whether it has triggered a target service within a preset time period before the device status is obtained after the electronic device has accessed the ad hoc network. The target service includes communication services through the ad hoc network. If the electronic device has not triggered the target service within the preset time period, the ad hoc network service of the electronic device is disabled.

[0067] Specifically, before an electronic device accesses the ad hoc network and its device status is obtained, it can, upon receiving a device list pushed from the cloud, query the list of peer devices with whom it has established a trusted relationship, based on the login user information corresponding to the electronic device. The device list is pushed by the cloud when new electronic devices upload device information and add it to the list. There must be a trusted relationship between the new electronic devices and the existing electronic devices. If the number of peer devices exceeds a preset threshold, the ad hoc network broadcast function is activated.

[0068] The electronic device can obtain the login user information corresponding to the electronic device; based on the hash algorithm, it calculates the digest information corresponding to the login user information, and encapsulates the digest information in the broadcast data for broadcasting, so that the low-power controller on the receiving end device can identify whether a trusted relationship has been established with the electronic device based on the digest information, and if it is determined that a trusted relationship has been established, the main controller on the end device requests the electronic device to establish a connection.

[0069] Please see Figure 2 , Figure 2 This is a flowchart illustrating a power consumption optimization method according to an exemplary embodiment.

[0070] like Figure 2 As shown, the above-mentioned electronic device can perform the following steps:

[0071] Step 202: In response to the electronic device accessing the ad hoc network, obtain the device status of the electronic device.

[0072] Electronic devices can connect to ad hoc networks for communication. When an electronic device is connected to an ad hoc network, its device status can be obtained, and power optimization strategies can be implemented based on that status.

[0073] The specific details regarding the device status can be set according to actual needs, and this disclosure does not impose any limitations on this.

[0074] For example, the device state can include screen off state and screen on state.

[0075] It should be noted that since the power consumption of electronic devices maintaining a long connection after connecting to a self-organizing network is relatively high, preset restrictions can be used to control the activation of self-organizing network services by electronic devices when the restrictions are met.

[0076] The specific details of this restriction can be set according to actual needs, and this disclosure does not limit it.

[0077] In one embodiment shown, before obtaining the device status of the electronic device in response to the electronic device accessing the ad hoc network, the electronic device can determine whether the electronic device has triggered a target service within a preset time period; wherein, the target service includes services that communicate through the ad hoc network; if the electronic device has not triggered the target service within the preset time period, the ad hoc network service of the electronic device is disabled.

[0078] The target service can refer to a service that requires communication via a self-organizing network. The specific content of the target service can be set according to actual needs, and this disclosure does not limit it.

[0079] For example, target services may include cross-device pasting, screen mirroring, and file sharing.

[0080] Electronic devices can determine whether a target service has been triggered within a preset time period by listening to whether the interface used to process the target service is called.

[0081] For example, if an electronic device detects that the interface used to process the target service is called within a preset time period, it can be determined that the target service has been triggered within that preset time period, and the self-organizing network service of the electronic device can be enabled; if the electronic device does not detect that the interface used to process the target service is called within a preset time period, it can be determined that the target service has not been triggered within that preset time period, and the self-organizing network service of the electronic device can be disabled.

[0082] In this way, the self-organizing network service of electronic devices can be dynamically started and stopped, thereby avoiding the power consumption waste caused by the self-organizing network service when it is not needed.

[0083] In one embodiment shown, before obtaining the device status of an electronic device after it has accessed the ad hoc network, the electronic device may, in response to receiving a device list pushed by the cloud, query the device list for peer devices with whom it has established a trusted relationship, based on the login user information corresponding to the electronic device; wherein, the device list is pushed by the cloud when device information uploaded by a new electronic device is added to the device list; a trusted relationship exists between the new electronic device and the existing electronic device; and in response to the number of peer devices exceeding a preset threshold, the ad hoc network broadcast function is activated.

[0084] When a user logs into a new electronic device, the new electronic device can upload the user's login information to the cloud. The cloud can receive the user's login information and add it to the device list. The device list stores user login information uploaded within a preset valid time period, which can be used to determine the trust relationship between electronic devices.

[0085] To promptly detect new electronic devices preparing to join the ad hoc network, the cloud can, upon receiving device information uploaded by a new electronic device, determine which electronic devices have a trusted relationship with the new device based on the user login information stored in the device list, and can push the new device list to that device. When the electronic device receives the device list pushed by the cloud, it indicates the presence of a new electronic device preparing to join the ad hoc network. In this case, the electronic device can query the device list for peer devices with whom it has established a trusted relationship, based on its corresponding login user information. If the number of peer devices exceeds a preset threshold, the ad hoc network broadcast function is activated so that it can be scanned and connected to by the new electronic device.

[0086] The trusted relationship can refer to the consistency of login user information when logging into multiple electronic devices, or it can refer to the fact that the login user information when logging into multiple electronic devices belongs to the member information of a trusted group, or it can refer to other forms of trusted relationship. This disclosure does not limit it in this regard.

[0087] The specific details of the preset threshold can be set according to actual needs, and this disclosure does not limit them.

[0088] For example, see Figure 3 , Figure 3 This is a scenario diagram illustrating a power consumption optimization method according to an exemplary embodiment. For example... Figure 3 As shown, when user A logs into the device, electronic device A can upload user login information_3 corresponding to user A to the cloud. The cloud can receive the user login information and add it to the device list. The device list can include user login information_3, as well as user login information_1 corresponding to electronic device B and user login information_2 corresponding to electronic device C. The cloud can determine that electronic device B and electronic device A have a trusted relationship based on the device list. Therefore, the cloud can push the device list to electronic device A and electronic device B. In response to receiving the device list, electronic device B can query the device list for peer devices that have established a trusted relationship with electronic device B, including electronic device A, based on user login information_2 corresponding to electronic device B. The preset threshold can be 0. Therefore, if the number of peer devices is greater than the preset threshold, electronic device B can start the self-organizing network broadcast function so that it can be scanned by electronic device A and a connection can be established.

[0089] In this way, electronic devices can not only detect new electronic devices that are about to join the ad hoc network in a timely manner, but also avoid the invalid activation of the ad hoc network broadcast function, thereby saving power consumption.

[0090] It should be noted that the cloud can delete the login user information corresponding to the electronic device stored in the device list when it detects that a user has logged out of the electronic device; it can also delete the login user information corresponding to the electronic device stored in the device list when it detects that the activity level of the electronic device is lower than a preset threshold; it can also delete abnormal login user information stored in the device list under other preset conditions, and this disclosure does not limit this.

[0091] In one embodiment shown, the method of activating the self-organizing network broadcast function may specifically include obtaining login user information corresponding to the electronic device; calculating digest information corresponding to the login user information based on a hash algorithm, and encapsulating the digest information in broadcast data for broadcasting, so that the low-power controller on the receiving end device can identify whether a trusted relationship has been established with the electronic device based on the digest information, and if it is determined that a trusted relationship has been established, the main controller on the end device requests the electronic device to establish a connection.

[0092] To further save power consumption, when the self-organizing network broadcast function needs to be activated, the login user information corresponding to the electronic device can be broadcast in the broadcast data. This allows the peer device to receive the broadcast data and, based on its low-power controller, identify whether a trusted relationship has been established with the electronic device. If a trusted relationship is established, the peer device can send a notification to the main controller on the peer device, so that the main controller can request the electronic device to establish a connection.

[0093] Due to the limited performance of low-power controllers, in order to improve the recognition accuracy of low-power controllers, electronic devices can obtain login user information corresponding to themselves, and calculate summary information corresponding to the login user information based on a hash algorithm. The summary information is then encapsulated in broadcast data and broadcast. The low-power controller on the other end device can then identify the device based on this summary information.

[0094] By delegating the preprocessing of broadcast data to a low-power controller, the power consumption required by electronic devices during the self-organizing network construction process can be further reduced.

[0095] Step 204: Determine the power consumption optimization strategy corresponding to the device state based on the device state.

[0096] Electronic devices exist in different device states, and each of these different device states can correspond to different power consumption optimization strategies, thereby enabling targeted optimization.

[0097] Step 206: Based on the power consumption optimization strategy, perform power consumption optimization processing on the electronic device.

[0098] For example, if a power optimization strategy corresponding to the device state of an electronic device is determined, the power optimization process of the electronic device can be performed based on the power optimization strategy.

[0099] In one embodiment shown, the device state includes a screen-off state; the power consumption optimization strategy corresponding to the device state may include: when the electronic device is in a screen-off state, disabling all auxiliary functions except for the BLE (Bluetooth Low Energy) broadcast function.

[0100] Bluetooth Broadcast (BLE) is a wireless communication technology designed for short-range data transmission with lower power consumption. It is typically used in IoT devices, wearables, and smart home products, supporting fast connection and efficient data exchange while extending device battery life. BLE broadcast functionality refers to the ability to broadcast via Bluetooth broadcast channels.

[0101] In this disclosure, the BLE broadcast function can be used to broadcast broadcast data related to electronic devices and ad hoc networks.

[0102] Since electronic devices do not need to handle target services that communicate via ad hoc networks when the screen is off, auxiliary functions other than BLE broadcasting can be turned off to save power while ensuring that they can be scanned by other electronic devices.

[0103] The specific details of this auxiliary function can be set according to actual needs, and this disclosure does not limit it.

[0104] In one embodiment shown, other auxiliary functions may include at least one of the following functions: scanning function related to BLE broadcasting function, WLAN (Wireless Local Area Network) broadcasting function, and WLAN scanning function.

[0105] The scanning function related to the BLE broadcast function can refer to the function of scanning via Bluetooth scanning channels. In this disclosure, the scanning function can be used to receive broadcast data related to ad hoc networks broadcast by peer devices.

[0106] WLAN is a network technology that allows devices to connect and communicate wirelessly within a local area (such as a home, office, or campus). It is typically based on the IEEE 802.11 standard and uses radio waves for data transmission, enabling users to access network resources, the internet, and other devices without a physical connection. WLAN broadcasting refers to the ability to broadcast over a local area network (LAN) channel. WLAN scanning refers to the ability to scan within a LAN channel.

[0107] In this disclosure, the WLAN broadcast function can broadcast broadcast data related to the ad hoc network from electronic devices. The WLAN scanning function can be used to receive broadcast data related to the ad hoc network from peer devices.

[0108] Since WLAN scanning and broadcasting functions consume a lot of power, they can be turned off when the electronic device is in a screen-off state to save power.

[0109] It should be noted that this auxiliary function may also include other functions for broadcasting or scanning, which are not limited in this disclosure.

[0110] In one embodiment shown, the broadcast data of BLE broadcast may include the IP address of the electronic device; based on this, the electronic device may encapsulate the IP address of the electronic device in the broadcast data for BLE broadcast, so that the peer device receiving the broadcast data can identify whether the electronic device and the peer device are located on the same local area network based on the IP address, and if it is determined that the electronic device and the peer device are located on the same local area network, request to establish a connection with the electronic device.

[0111] The IP (Internet Protocol Address) is a unique identifier used to identify each device on a network. In this disclosure, the IP address can be used to identify whether an electronic device and its peer device are located on the same local area network.

[0112] In this case, when the electronic device and the peer device are on the same local area network (LAN), the electronic device can usually establish a successful connection with the peer device. When the electronic device and the peer device are not on the same LAN, the electronic device usually fails to establish a connection with the peer device. Therefore, in order to avoid the power waste caused by the failed connection establishment process, it is possible to identify in advance whether the electronic device and the peer device are on the same LAN based on their IP addresses, so that if it is determined that the electronic device and the peer device are on the same LAN, a connection request can be made to the electronic device.

[0113] For example, electronic device A can encapsulate its IP address in broadcast data and broadcast it via BLE. The peer device B can receive the broadcast data and, based on the IP address in the broadcast data, identify whether electronic device A and peer device B are on the same local area network. If it is determined that electronic device A and peer device B are on the same local area network, it can request to establish a connection with electronic device A.

[0114] In this way, power consumption waste caused by failed connection establishment processes can be avoided.

[0115] It should be noted that electronic devices can also encrypt and encapsulate the IP address in broadcast data to improve the security of data transmission, but this disclosure does not limit this.

[0116] It's important to note that when an electronic device is in a screen-off state, it may disconnect from the peer device because it doesn't need to process any business. In this case, the electronic device can enable BLE broadcasting, allowing the peer device to scan and obtain its broadcast data. The key used to encrypt and decrypt the IP address can be exchanged between the electronic and peer devices during the initial connection establishment. When re-establishing a connection, the electronic device may be connected to a different local area network (LAN). In this case, the electronic device can encrypt the IP address and encapsulate it in the broadcast data for BLE broadcasting. The peer device can decrypt the broadcast data and obtain the IP address to determine if the electronic device is connected to the same LAN as the peer device. If the LANs are identical, the peer device can re-request a connection from the electronic device.

[0117] In one embodiment shown, before determining a power optimization strategy corresponding to the device state based on the device state, the electronic device can identify a peer device with which it has established a long-term connection in the ad hoc network and obtain the device state of the peer device. Based on this, the power optimization strategy corresponding to the device state may include: adjusting the transmission frequency of heartbeat packets sent by the electronic device according to the device state of the electronic device and the device state of the peer device; wherein the heartbeat packets are used to maintain the long-term connection.

[0118] Heartbeat packets are small data packets used in network communication. They are sent periodically to maintain the active state of a connection and are an important mechanism in network communication, playing a role in maintaining connections, monitoring status, optimizing resources, and improving system stability. By properly configuring the frequency and content of heartbeat packets, system performance and reliability can be effectively improved.

[0119] When a long-term connection is established between an electronic device and a peer device, the electronic device can adjust the frequency of heartbeat packets sent to maintain the long-term connection based on the device status of both the electronic device and the peer device, in order to save power consumption.

[0120] For example, in an ad hoc network, electronic device A can establish a long connection with peer device B. Electronic device A can obtain the device status of peer device B and adjust the sending frequency of heartbeat packets based on the device status of electronic device A and peer device B.

[0121] This method allows for power savings even when a long-term connection is established between the electronic device and the peer device.

[0122] In one embodiment shown, the device state may further include a screen-on state; the electronic device may adjust the transmission frequency of the heartbeat packets to a first frequency when both the device state of the electronic device and the device state of the peer device are in a screen-off state; or...

[0123] When the electronic device is in a screen-off state and the remote device is in a screen-on state; or when the electronic device is in a screen-on state and the remote device is in a screen-off state, adjust the frequency at which the electronic device sends heartbeat packets to a second frequency; the second frequency is higher than the first frequency; or...

[0124] When both the electronic device and the peer device are in the on state, adjust the frequency at which the electronic device sends heartbeat packets to the third frequency; the third frequency is higher than the second frequency.

[0125] When both the electronic device and the peer device are in a screen-off state, it indicates that neither the electronic device nor the peer device needs to handle services communicated via the ad hoc network. Therefore, the sending frequency of the heartbeat packets by the electronic device can be adjusted to the first frequency.

[0126] For example, if both electronic device A and the peer device B are in a screen-off state, the sending frequency of heartbeat packets between electronic device A and peer device B can be adjusted to the first frequency.

[0127] When the device status of the electronic device is off and the device status of the peer device is on, it indicates that the electronic device does not need to handle services through ad hoc network communication, but the peer device may need to handle services through ad hoc network communication. Therefore, the sending frequency of the heartbeat packets of the electronic device can be adjusted to the second frequency.

[0128] For example, if electronic device A is in a screen-off state and the other device B is in a screen-on state, the sending frequency of heartbeat packets between electronic device A and the other device B can be adjusted to the second frequency.

[0129] When the device status of the electronic device is on and the device status of the peer device is off, it indicates that the peer device does not need to handle services through ad hoc network communication, but the electronic device may need to handle services through ad hoc network communication. Therefore, the sending frequency of the heartbeat packets of the electronic device can be adjusted to the second frequency.

[0130] For example, if electronic device A is in a screen-on state and the other device B is in a screen-off state, the sending frequency of heartbeat packets between electronic device A and the other device B can be adjusted to the second frequency.

[0131] If both the electronic device and the peer device are in the on state, it indicates that both the electronic device and the peer device may need to handle services that communicate via the ad hoc network. Therefore, the sending frequency of the heartbeat packets by the electronic device can be adjusted to the third frequency.

[0132] For example, if both electronic device A and the peer device B are in the on state, the sending frequency of heartbeat packets between electronic device A and peer device B can be adjusted to the third frequency.

[0133] Among them, the third frequency can be higher than the second frequency, and the second frequency can be higher than the first frequency.

[0134] The specific value of the first frequency can be set according to actual needs, and this disclosure does not limit it.

[0135] The specific value of the second frequency can be set according to actual needs, and this disclosure does not limit it.

[0136] The specific value of the third frequency can be set according to actual needs, and this disclosure does not limit it.

[0137] In this way, the frequency of sending heartbeat packets can be dynamically adjusted based on the device status of the electronic device with the established long-term connection and the peer device, thereby improving the flexibility of power consumption optimization.

[0138] In addition, corresponding to the aforementioned embodiments of the power consumption optimization method, this disclosure also provides embodiments of a power consumption optimization apparatus. See [link to documentation]. Figure 4 The device includes:

[0139] The acquisition unit 402 is used to acquire the device status of the electronic device in response to the electronic device accessing the ad hoc network;

[0140] The determining unit 404 is used to determine a power consumption optimization strategy corresponding to the device state based on the device state.

[0141] The processing unit 406 is used to perform power optimization processing on the electronic device based on the power optimization strategy.

[0142] In this embodiment, the device state may include a screen-off state; the power consumption optimization strategy corresponding to the device state may include:

[0143] When the electronic device is in a screen-off state, turn off all auxiliary functions except for BLE broadcasting.

[0144] In this embodiment, other auxiliary functions may include at least one of the functions shown below:

[0145] Scanning functions related to BLE broadcasting, WLAN broadcasting, and WLAN scanning.

[0146] In this embodiment, the broadcast data of BLE broadcast may include the IP address of the electronic device;

[0147] The above-mentioned device may further include a broadcasting unit for:

[0148] The IP address of the electronic device is encapsulated in the broadcast data and broadcast via BLE. This allows the receiving device to identify whether the electronic device and the peer device are on the same local area network based on the IP address. If the electronic device and the peer device are on the same local area network, the receiving device will request to establish a connection with the electronic device.

[0149] In this embodiment, the determining unit 404 can also be used for:

[0150] Before determining the power consumption optimization strategy corresponding to the device status based on the device status, identify the peer devices that have established long-term connections with electronic devices in the ad hoc network and obtain the device status of the peer devices.

[0151] Power consumption optimization strategies corresponding to device states may include:

[0152] The frequency at which the electronic device sends heartbeat packets is adjusted based on the device status of the electronic device and the device status of the peer device; the heartbeat packets are used to maintain a long-term connection.

[0153] In this embodiment, the device status may also include a screen-on state;

[0154] Power consumption optimization strategies corresponding to device states may include:

[0155] When both the electronic device and the peer device are in a screen-off state, adjust the frequency at which the electronic device sends heartbeat packets to the first frequency; or,

[0156] When the electronic device is in a screen-off state and the remote device is in a screen-on state; or when the electronic device is in a screen-on state and the remote device is in a screen-off state, adjust the frequency at which the electronic device sends heartbeat packets to a second frequency; the second frequency is higher than the first frequency; or...

[0157] When both the electronic device and the peer device are in the on state, adjust the frequency at which the electronic device sends heartbeat packets to the third frequency; the third frequency is higher than the second frequency.

[0158] In this embodiment, the determining unit 404 can also be used for:

[0159] Before responding to an electronic device accessing the ad hoc network and obtaining the device status of the electronic device, it is determined whether the electronic device has triggered a target service within a preset time period; wherein, the target service includes services that communicate through the ad hoc network;

[0160] If the electronic device does not trigger the target service within the preset time period, the self-organizing network service of the electronic device will be disabled.

[0161] In this embodiment, the above-mentioned device may further include a query unit, used for:

[0162] Before obtaining the device status of an electronic device after it has accessed the self-organizing network, in response to receiving the device list pushed by the cloud, the system queries the device list for peer devices that have established a trusted relationship with the electronic device, based on the login user information corresponding to the electronic device. The device list is pushed by the cloud when the device information uploaded by the new electronic device is added to the device list. There is a trusted relationship between the new electronic devices.

[0163] When the number of peer devices exceeds a preset threshold, the self-organizing network broadcast function is activated.

[0164] In this embodiment, the query unit described above can be specifically used for:

[0165] Retrieve the login user information corresponding to the electronic device;

[0166] Based on a hash algorithm, a digest of the user's information is calculated and encapsulated in broadcast data for broadcast. This digest is then broadcast to the low-power controller on the receiving device. The controller identifies whether a trusted relationship has been established between the device and the electronic device based on the digest. If a trusted relationship is established, the main controller on the receiving device requests a connection from the electronic device.

[0167] The specific implementation process of the functions and roles of each module in the device is detailed in the implementation process of the corresponding steps in the method, and will not be repeated here.

[0168] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0169] The systems, devices, or modules described in the embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0170] Embodiments of this disclosure also provide a user equipment, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method described in any of the above embodiments.

[0171] Figure 5 This is a block diagram illustrating a user device according to an exemplary embodiment. For example, user device 500 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0172] Reference Figure 5 User equipment 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.

[0173] Processing component 502 typically controls the overall operation of user equipment 500, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.

[0174] Memory 504 is configured to store various types of data to support operation on user equipment 500. Examples of this data include instructions for any application or method operating on user equipment 500, contact data, phonebook data, messages, pictures, videos, etc. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0175] Power supply component 506 provides power to various components of user equipment 500. Power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to user equipment 500.

[0176] Multimedia component 508 includes a screen that provides an output interface between the user equipment 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When the user equipment 500 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0177] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when user equipment 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.

[0178] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0179] Sensor assembly 514 includes one or more sensors for providing status assessments of various aspects of user equipment 500. For example, sensor assembly 514 may detect the on / off state of user equipment 500, the relative positioning of components such as the display and keypad of user equipment 500, changes in position of user equipment 500 or a component of user equipment 500, the presence or absence of user contact with user equipment 500, orientation or acceleration / deceleration of user equipment 500, and temperature changes of user equipment 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0180] Communication component 516 is configured to facilitate wired or wireless communication between user equipment 500 and other devices. User equipment 500 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0181] In an exemplary embodiment, the user equipment 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described in any of the above embodiments.

[0182] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, which can be executed by a processor 520 of a user equipment 500 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0183] Embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0184] Embodiments of this disclosure also provide a computer program product configured to perform the wireless charging foreign object detection method described in any of the above embodiments.

[0185] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0186] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

[0187] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.

Claims

1. A power consumption optimization method, characterized in that, The method includes: In response to an electronic device accessing an ad hoc network, the device status of the electronic device is obtained; Based on the device state, determine the power consumption optimization strategy corresponding to the device state; Based on the power consumption optimization strategy, the electronic device is subjected to power consumption optimization processing.

2. The method according to claim 1, characterized in that, The device state includes a screen-off state; the power consumption optimization strategies corresponding to the device state include: When the electronic device is in a screen-off state, all auxiliary functions except for the BLE broadcast function are turned off.

3. The method according to claim 2, characterized in that, Other accessibility features include at least one of the features shown below: The scanning function, WLAN broadcast function, and WLAN scanning function are related to the BLE broadcast function.

4. The method according to claim 2, characterized in that, The broadcast data of the BLE broadcast includes the IP address of the electronic device; The method further includes: The IP address of the electronic device is encapsulated in broadcast data and broadcast using BLE, so that the peer device receiving the broadcast data can identify whether the electronic device and the peer device are located in the same local area network based on the IP address, and if it is determined that the electronic device and the peer device are located in the same local area network, it requests to establish a connection with the electronic device.

5. The method according to claim 1, characterized in that, Before determining the power consumption optimization strategy corresponding to the device state based on the device state, the method further includes: Identify the peer device that has established a long connection with the electronic device in the self-organizing network, and obtain the device status of the peer device; The power consumption optimization strategies corresponding to the device state include: The frequency at which the electronic device sends heartbeat packets is adjusted based on the device status of the electronic device and the device status of the peer device; wherein the heartbeat packets are used to maintain the long connection.

6. The method according to claim 5, characterized in that, The device status also includes screen on status; Adjusting the heartbeat packet transmission frequency of the electronic device based on the device status of the electronic device and the device status of the peer device includes: When both the device status of the electronic device and the device status of the peer device are in a screen-off state, adjust the sending frequency of the heartbeat packets by the electronic device to a first frequency; or, When the electronic device is in a screen-off state and the peer device is in a screen-on state; or when the electronic device is in a screen-on state and the peer device is in a screen-off state, the sending frequency of the heartbeat packets by the electronic device is adjusted to a second frequency; the second frequency is higher than the first frequency; or... When both the device status of the electronic device and the device status of the peer device are in the on state, the sending frequency of the heartbeat packets by the electronic device is adjusted to a third frequency; the third frequency is higher than the second frequency.

7. The method according to claim 1, characterized in that, Before obtaining the device status of an electronic device in response to it accessing the ad hoc network, the method further includes: Determine whether the electronic device triggered a target service within a preset time period; wherein, the target service includes services that communicate through the ad hoc network; If the electronic device does not trigger the target service within a preset time period, the self-organizing network service of the electronic device will be disabled.

8. The method according to claim 1, characterized in that, Before obtaining the device status of an electronic device in response to it accessing the ad hoc network, the method further includes: In response to receiving a device list pushed from the cloud, the system queries the device list for peer devices that have established a trusted relationship with the electronic device, based on the login user information corresponding to the electronic device; wherein, the device list is pushed by the cloud when device information uploaded by a new electronic device is added to the device list; and a trusted relationship exists between the new electronic device and the electronic device. In response to the number of peer devices exceeding a preset threshold, the self-organizing network broadcast function is activated.

9. The method according to claim 8, characterized in that, Enable the self-organizing network broadcast function, including: Obtain the login user information corresponding to the electronic device; Based on a hash algorithm, a digest of the logged-in user information is calculated and encapsulated in broadcast data for broadcasting. This allows the low-power controller on the peer device receiving the broadcast data to identify whether a trusted relationship has been established with the electronic device based on the digest. If a trusted relationship is established, the main controller on the peer device requests a connection from the electronic device.

10. A power consumption optimization device, characterized in that, The device includes: The acquisition unit is used to acquire the device status of the electronic device in response to the electronic device accessing the ad hoc network. The determining unit is configured to determine a power consumption optimization strategy corresponding to the device state based on the device state. The processing unit is used to perform power optimization processing on the electronic device based on the power optimization strategy.

11. A user equipment, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is used to implement the method according to any one of claims 1 to 9.

12. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-readable instructions, which, when invoked and executed by a processor, implement the method described in any one of claims 1 to 9.