A method and system for regulating power consumption of an electronic device
By setting a low-power module in the main chip, querying the application layer network requirements, and switching the communication chip to a low-power state when no response is received, the problem of short battery life of portable devices is solved, achieving reduced power consumption and extended battery life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2026-03-17
AI Technical Summary
The high power consumption of communication chips in portable devices leads to short battery life, and existing methods for improving communication chips or increasing battery capacity have limitations and user experience issues.
By setting a low-power module in the main chip, the network connection requirement is requested from the application layer. If no response is received, the communication chip is switched to a low-power state, reducing the power consumption of message interaction and state switching.
It extends the battery life of portable devices, reduces the power consumption of communication chips, maintains basic connectivity functions, and improves the user experience.
Smart Images

Figure CN115696527B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of reducing the power consumption of electronic devices, and more specifically, the embodiments of the present invention relate to a method and system for regulating the power consumption of electronic devices. Background Technology
[0002] This section is intended to provide background or context for embodiments of the invention set forth in the claims. The description herein may include concepts that may be explored, but not necessarily concepts that have been previously conceived or explored. Therefore, unless otherwise stated, what is described in this section is not prior art for the purposes of this application's specification and claims, and is not acknowledged as prior art simply by virtue of its inclusion in this section.
[0003] For portable devices with communication capabilities, battery life is an important parameter. For example, when a dictionary pen's communication chip (such as a Wi-Fi chip) connects to an access point (AP) hotspot, the system network communication increases the dictionary pen's power consumption, thus shortening the device's battery life.
[0004] In existing technologies, the following methods are commonly used to address the problem of short battery life in portable devices:
[0005] First, improve the communication chip itself to reduce its power consumption.
[0006] Second, increase battery capacity to provide more energy supply.
[0007] Third, power consumption is reduced by intermittently supplying power to the communication chip.
[0008] However, it is difficult to improve the communication chip itself, and it is not suitable for using existing chips.
[0009] Increasing battery capacity leads to a larger portable device size due to the increased space occupied by the battery, which negatively impacts the user experience.
[0010] Intermittent power supply to the communication chip to reduce power consumption has the following problems: First, frequent message exchanges occur during power state switching, resulting in additional power consumption. Second, intermittent power supply is not suitable for scenarios where the communication chip needs to continuously perform some functions, such as scenarios where the communication chip needs to maintain basic connection functions. Summary of the Invention
[0011] Therefore, there is a great need for an improved method to regulate the power consumption of electronic devices in order to improve their battery life.
[0012] In this context, embodiments of the present invention aim to provide a method and system for adjusting the power consumption of an electronic device including a communication chip 22 and a main chip 21, reducing power consumption and improving the battery life of the electronic device during the switching of power consumption states by adjusting the communication chip 22.
[0013] In a first aspect of the present invention, a method for adjusting the power consumption of an electronic device is provided. The electronic device includes a communication chip and a main chip, the communication chip and the main chip being connected via a network communication interface layer. A low-power module is configured in the main chip to perform the following method, including: sending an inquiry message to an application layer in the main chip to inquire whether an application in the application layer has a network connection requirement S1; and in response to not receiving a corresponding response message within a first preset period after sending the inquiry message, sending a command to the network communication interface layer to instruct the network communication interface layer to stop sending network connection requests to the communication chip S2.
[0014] In one embodiment of the present invention, the method for adjusting the power consumption of an electronic device further includes: determining the sending time of the next query message in response to receiving a corresponding response message within a first preset period after sending the query message; or, determining the sending time of the next query message based on a second preset period and the corresponding response message received within the first preset period after sending the query message; or, determining the sending time of the next query message based on the second preset period.
[0015] In another embodiment of the invention, the second preset period is set to any value between 25 and 35 seconds, preferably 30 seconds.
[0016] In another embodiment of the present invention, each sent query message includes an identifier code, and the response message includes at least the identifier code of the corresponding query message and the application identifier code of the response message.
[0017] In another embodiment of the invention, the response message includes network duration information required by the application.
[0018] In another embodiment of the present invention, the method for adjusting the power consumption of an electronic device further includes: determining the time for sending the next query message based on the network duration information in the received response message and the sending time of the corresponding query message.
[0019] In another embodiment of the present invention, an application in the application layer of the main chip that has a network connection requirement responds to the received query message and returns a response message corresponding to the query message.
[0020] In another embodiment of the invention, the first preset period is set to any value between 2 and 5 seconds.
[0021] In yet another embodiment of the invention, the query message is sent in the form of a broadcast.
[0022] In another embodiment of the present invention, the low-power module is disposed in the HAL layer of the main chip.
[0023] In another embodiment of the present invention, the communication chip is a Wi-Fi chip. In this embodiment, the communication chip is a chip equipped with an energy-saving mode under the MAC80211 protocol.
[0024] In a second aspect of the present invention, a system for adjusting the power consumption of an electronic device is provided. The electronic device includes a communication chip 22 and a main chip 21. The communication chip 22 and the main chip 21 are connected through a network communication interface layer 33. The system includes a low-power module disposed on the HAL layer 32 of the main chip 21. The low-power module is connected to the application layer 31 and the network communication interface layer 33, respectively. The low-power module is used to send an inquiry message to the application layer 31. In response to not receiving a corresponding response message within a first preset period after sending the inquiry message, the low-power module sends a command to the network communication interface layer 33 to instruct the network communication interface layer 33 to stop sending network connection requests to the communication chip 22.
[0025] According to one embodiment of the present invention, the system for adjusting the power consumption of an electronic device further includes an application in the application layer 31 of the main chip 21, wherein the application having network connection requirements responds to the received query message and returns a response message corresponding to the query message.
[0026] In this embodiment of the invention, if no corresponding response message is received within a first preset period for each query message, the communication chip directly enters a low-power state without requiring additional information to trigger it, thus reducing the power consumption of the trigger condition for the communication chip to enter a low-power state. Furthermore, when applications in the application layer receive a query message, only those applications with network connection requirements respond; other applications do not need to respond. This reduces the number of messages sent by applications during this process, reducing the power consumption required to trigger the communication chip to not enter a low-power state, and increasing battery life based on existing batteries. This embodiment of the invention can reduce the power consumption of both the trigger condition for entering a low-power state and the trigger condition for not entering a low-power state, while maintaining the basic connectivity of the communication chip. Attached Figure Description
[0027] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0028] Figure 1 A block diagram schematically illustrates an exemplary computing system 100 suitable for implementing embodiments of the present invention;
[0029] Figure 2 A hardware block diagram of an application in a portable device according to an embodiment of the present invention is shown schematically.
[0030] Figure 3 A schematic diagram illustrating the system architecture hierarchy of an electronic device according to an embodiment of the present invention is shown.
[0031] Figure 4 A schematic flowchart illustrating a method for adjusting the power consumption of an electronic device according to an embodiment of the present invention is shown.
[0032] Figure 5 A schematic diagram illustrating the message interaction of a method for adjusting the power consumption of an electronic device according to an embodiment of the present invention is shown.
[0033] Figure 6 The diagram illustrates a message interaction in a method for adjusting the power consumption of an electronic device according to an embodiment of the present invention, in which a response message is returned within a first preset period.
[0034] Figure 7 A schematic flowchart illustrating the method for regulating the power consumption of an electronic device according to the present invention is shown in an electronic device. Detailed Implementation
[0035] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0036] Figure 1 A block diagram of an exemplary computing system 100 suitable for implementing embodiments of the present invention is shown. For example... Figure 1As shown, the computing system 100 may include: a central processing unit (CPU) 101, random access memory (RAM) 102, read-only memory (ROM) 103, a system bus 104, a hard disk controller 105, a keyboard controller 106, a serial interface controller 107, a parallel interface controller 108, a display controller 109, a hard disk 110, a keyboard 111, a serial external device 112, a parallel external device 113, and a display 114. Among these devices, the CPU 101, RAM 102, ROM 103, hard disk controller 105, keyboard controller 106, serial controller 107, parallel controller 108, and display controller 109 are coupled to the system bus 104. The hard disk 110 is coupled to the hard disk controller 105, the keyboard 111 is coupled to the keyboard controller 106, the serial external device 112 is coupled to the serial interface controller 107, the parallel external device 113 is coupled to the parallel interface controller 108, and the display 114 is coupled to the display controller 109. It should be understood that... Figure 1 The structural block diagrams described are for illustrative purposes only and are not intended to limit the scope of the invention. In some cases, certain devices may be added or removed depending on the specific circumstances.
[0037] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented as entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0038] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (not exhaustive) of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0039] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0040] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0041] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0042] Embodiments of the present invention will now be described with reference to flowchart illustrations and block diagrams of apparatus (or systems) according to embodiments of the invention. It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine that, when executed by the computer or other programmable data processing apparatus, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0043] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction apparatus that implements the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0044] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable apparatus can provide a process for implementing the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0045] The number of any elements in the accompanying figures is for illustrative purposes only and not for limitation, and any naming is for distinction only and has no limiting meaning.
[0046] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments. Invention Overview
[0048] The inventors have discovered that the power consumption of the communication chip in portable devices has a significant impact on the battery life. Therefore, the inventors have considered reducing the power consumption of the communication chip to extend the battery life.
[0049] Changing the power consumption state of a communication chip is one effective way to regulate and manage the power consumption of electronic devices. Communication chips typically have two states: a low-power state (e.g., the low-power states defined by the MAC80211 protocol) and a normal-power state (e.g., when providing network services to applications). Switching between the low-power and normal-power states of the communication chip according to the operating status of the electronic device can reduce the device's power consumption.
[0050] The inventors have discovered that by improving the triggering conditions for state switching during the switching process between low-power and normal-power states of a communication chip, the power consumption caused by message transmission can be reduced, which is also a method to further improve battery life.
[0051] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below.
[0052] Application Scenarios Overview
[0053] First refer to Figure 2 It illustrates a hardware block diagram of an embodiment of the present invention that can be applied to a portable electronic device, such as... Figure 2As shown, such portable devices possess both their own functions and the ability to communicate with the outside world. They typically have at least a main chip 21 (including a CPU and DDR memory) that performs the main software functions and a communication chip 22 that performs the communication functions. For example, devices such as dictionary pens and headphones have an external communication chip for network communication connectivity, in addition to the main chip. In dictionary pens, the communication chip, such as a Wi-Fi chip, increases power consumption when connected to a wireless access point (AP), leading to a shorter battery life. Embodiments of this invention are used in such portable electronic devices to reduce power consumption and extend battery life.
[0054] Exemplary methods
[0055] The following is combined Figure 2 Application scenarios, refer to Figure 3 , Figure 4 and Figure 5 This description outlines a method for reducing power consumption in a communication chip according to exemplary embodiments of the present invention. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of the invention, and the embodiments of the invention are not limited in any way. Rather, the embodiments of the invention can be applied to any applicable scenario.
[0056] Figure 3 The system architecture hierarchy of an electronic device according to an embodiment of the present invention is shown. For example... Figure 3 As shown, the system architecture of electronic devices typically includes an application layer 31, a HAL (Hadware Abstract Layer) layer 32, a network interface layer 33, and a hardware layer 34.
[0057] The application layer 31 contains multiple applications, such as Youdao Dictionary APP and Youdao Cloud Notes APP, which are directly presented to users through the interface of electronic devices for user operation.
[0058] HAL layer 32, also known as the Hardware Abstraction Layer, is an interface layer located between the operating system kernel and the hardware circuitry. Its purpose is to abstract the hardware, hiding the hardware interface details of a specific platform and providing the operating system with a virtual hardware platform, making it hardware-independent and portable across multiple platforms. The HAL layer can include various functional modules, such as GPS, Vibrator, Wi-Fi, Copybit, Audio, and Camera modules. In this embodiment, a low-power module is provided in the main chip to regulate the power consumption of the electronic device. The low-power module can be located anywhere in the main chip. In some implementations, considering the aforementioned characteristics of the HAL layer, it is preferable to place the low-power module in HAL layer 32. The low-power module located in HAL layer 32 is connected to application layer 31 and network communication interface layer 33, respectively.
[0059] The network interface layer 33 provides interfaces for connection and communication. In some implementations, a network communication interface is provided for communication between the main chip and the communication chip.
[0060] Hardware layer 34 includes the main chip's own hardware and external hardware, such as a communication chip, which can be considered "hardware one". Communication between the communication chip and the main chip is achieved through the network communication interface in network interface layer 33.
[0061] Figure 4 A schematic flowchart illustrating a method for adjusting the power consumption of an electronic device according to an embodiment of the present invention is shown. This method can, for example, be... Figure 3 It is executed by a low-power module. For clarity, Figure 5 A message interaction diagram illustrating a method for adjusting the power consumption of an electronic device according to an embodiment of the present invention is shown below. Figure 4 and Figure 5 Describe it.
[0062] In the main chip 21, the low-power module is configured to execute the following method, such as... Figure 4 As shown, in step S1, the low-power module sends an inquiry message to the application layer 31 in the main chip 21 to inquire whether the application in the application layer 31 has a network connection requirement.
[0063] like Figure 4 As shown, in step S2, in response to not receiving a corresponding response message within a first preset period after sending the query message, the low-power module sends a command to the network communication interface layer 33 to instruct the network communication interface layer 33 to stop sending network connection requests to the communication chip 22.
[0064] The first preset period is a limited time frame used by the low-power module to determine whether to switch the power state of the communication chip 22 during the power state switching process. It is used to determine within this time frame whether there are triggering conditions for switching the power state of the communication chip 22. The first preset period can be adjusted as needed. The communication chip itself also needs time to switch its power state. In this embodiment, the first preset period can be set based on the time taken for the communication chip 22 to switch its power state, thereby matching the time when the application in the application layer 31 sends an inquiry message to the communication chip 22 to enter the low-power state.
[0065] When the low-power module sends an inquiry message, it starts timing. If no response message is received after the timing exceeds a first preset period, the low-power module can perform the operation of putting the communication chip 22 into a low-power state. That is, the triggering condition for the low-power module to put the communication chip 22 into a low-power state does not require the transmission of any response message; it only needs to satisfy the condition that no response message is received within the first preset period. Compared to technical solutions that require triggering the power state switching of the communication chip 22 based on the receipt of a certain message, this triggering mode of the present invention reduces the power consumption caused by message interaction.
[0066] The scheme adopted for switching the power consumption state of the communication chip is as follows: the low-power module sends a command to the network communication interface layer 33 to instruct the network communication interface layer 33 to stop sending network connection requests to the communication chip 22. The communication chip defined in this embodiment of the invention can be configured to have the following characteristic: when no network connection request is received for a period of time, it enters a low-power state. The command sent to the network communication interface layer 33 is a conventional command, which will not be described in detail in this invention.
[0067] Because the state switching of the communication chip 22 in the electronic device must be real-time to meet the user's usage scenarios, it is necessary to frequently send query messages to continuously re-determine the power consumption state of the communication chip 22.
[0068] In some implementations, when determining the time interval between sending two consecutive query messages, the time for sending the next query message can be determined in response to the corresponding response message received within a first preset period after sending the query message. That is, the time for sending the next query message is adjusted promptly based on the response message to match the application's requirements.
[0069] In other implementations, the time to send the next query message can be determined based on the second preset period and the corresponding response message received within the first preset period after the query message is sent; that is, both factors are considered: the response message and the preset second preset period.
[0070] The second preset period refers to the pre-set time interval between sending two query messages, which can be flexibly adjusted as needed.
[0071] By referencing response messages and the second preset period, the needs of the application and other elements in the system can be comprehensively matched.
[0072] In some implementations, the time for sending the next query message can be determined solely based on a second preset period. This method maintains a constant query message sending interval, ensuring the stability of executing various instructions.
[0073] The second preset period can be set to any value between 25 and 35 seconds. Preferably, the second preset period is set to any one of 25, 30, and 35 seconds. When applied to portable devices, setting the second preset period to 25-35 seconds conforms to the user's operating habits and can improve the user experience.
[0074] In some implementations, the query message may include an identifier, meaning each query message can contain a different identifier. The response message, on the other hand, includes at least the identifier of the corresponding query message and the application identifier of the response message. The identifier in the query message can be, for example, a UUID (Universally Unique Identifier), used to uniquely identify or distinguish query messages sent at different times.
[0075] The response message contains an identifier for the corresponding query message, which the low-power module uses to determine whether the time interval between the two messages falls within a first preset period. The application identifier in the response message identifies the application that sent the response message; an application identifier such as an APPID can be used to identify the application.
[0076] Optionally or additionally, the response message may also include network duration information required by the application. This network duration information is sent by the application, indicating the duration for which the network service it is using or needs to use requires. Based on this, in some embodiments of the present invention, the time for the next query message to be sent can be determined based on the network duration information in the received response message and the sending time of the corresponding query message. This allows for timely switching of the power consumption state of the communication chip when the application does not require a network connection.
[0077] Figure 6 The illustration shows a message interaction diagram in a method for adjusting the power consumption of an electronic device according to an embodiment of the present invention, in which a response message is returned within a first preset period.
[0078] like Figure 6As shown, among the multiple applications included in application layer 31, only those applications with network connection requirements respond to the query message and return a corresponding response message. When an application in application layer 31 receives a query message, it first determines its own status to ascertain its network connection requirements. If the application is currently establishing a network connection or has a network connection requirement, it will return a response message. In this case, the low-power module does not need to send commands to the network communication interface layer and can proceed with the normal processing.
[0079] That is, receiving a response message within the first preset period is the basis for the low-power module not to send a command. In some embodiments of the present invention, since the response message is only sent by applications with network connection requirements, other applications do not need to send it, thereby reducing the number of messages sent by the application layer 31 during this process and reducing the power consumption caused by message interaction.
[0080] In some embodiments of the present invention, the first preset period can be set to any value between 2 and 5 seconds, or to either 2 or 3 seconds. Typically, the power consumption state switching of a communication chip takes approximately 2-3 seconds. In some embodiments of the present invention, 2 or 3 seconds can be set as the time interval for determining whether to switch to a low-power state, so that the first preset period can be consistent with the state switching time of the communication chip.
[0081] In some embodiments of the present invention, the query message may be sent in a broadcast manner. By sending the query message in a broadcast manner, different applications can make appropriate responses according to their needs.
[0082] In some implementations of this invention, the communication chip is a Wi-Fi chip. Taking the Wi-Fi chip in a dictionary pen as an example: after the dictionary pen's Wi-Fi chip connects to an access point (AP), a low-power module is set up in the HAL layer. When no corresponding response message is returned for the sent query message, the low-power module instructs the dictionary pen's system network communication interface layer to stop sending application layer network requests to the Wi-Fi chip. At this time, the power consumption of the dictionary pen's Wi-Fi chip drops to less than 200µA, which is used to maintain the heartbeat connection between the dictionary pen's Wi-Fi chip and the AP. When the HAL layer sends an query message and receives a response, the dictionary pen's Wi-Fi exits the low-power mode. The dictionary pen's system network communication interface layer sends an application layer network request. At this time, the power consumption of the dictionary pen's Wi-Fi chip needs an additional 70mA. After the network request is completed, the Wi-Fi will re-enter the low-power mode to save power.
[0083] For example, if the dictionary pen has a battery capacity of 1000mWh and consumes 250mA when making network requests, the battery life of the dictionary pen can be increased from 4h to 5.5h after using the technical solution of this invention.
[0084] Figure 7A flowchart illustrating the method for regulating the power consumption of an electronic device according to the present invention is shown.
[0085] like Figure 7 As shown, in some embodiments of the present invention, the second preset period is set to 30 seconds as an example. The electronic device is started and proceeds to step 71: Start. Then it proceeds to step 72: Sleep for 30 seconds. After waiting for the 30-second sleep period, it proceeds to step 73: The low-power module in the electronic device broadcasts an inquiry message "Does the application layer make a network request?" to the application layer. Then it proceeds to step 74, where it determines whether a response has been received within the first predetermined period. If a response is received, it returns to step 72, waits another 30 seconds, and broadcasts the inquiry message again. If no response is received within the first predetermined period, it proceeds to step 75, controlling the Wi-Fi chip to enter a low-power state. Then it proceeds to step 76, waits another 30 seconds, proceeds to step 77, controlling the Wi-Fi chip to exit the low-power state, and then returns to step 73 to broadcast the inquiry message again.
[0086] Exemplary device
[0087] Depending on the application scenario, the power consumption adjustment method of this invention can be applied to different electronic devices, including but not limited to small robots, printers, scanners, tablet computers, smart terminals, PC devices, IoT terminals, mobile terminals, mobile phones, dashcams, navigators, sensors, cameras, camcorders, projectors, watches, headphones, dictionary pens, mobile storage, wearable devices, visual terminals, autonomous driving terminals, vehicles, home appliances, and / or medical devices.
[0088] In this embodiment of the invention, the trigger condition for the low-power module to switch the communication chip's state is set as follows: if no response message is received within a certain period, the communication chip will switch to a low-power state. This simplifies the switching condition, reduces the communication messages required to switch the communication chip to a low-power state, and reduces power consumption. Furthermore, only applications with network connection requirements send response messages, reducing the number of response messages and further reducing the communication messages required for state switching, thus reducing power consumption and extending the battery life of electronic devices. By setting the first preset period to be close to the state switching time of the communication chip, the frequency of sending query messages and the frequency of state switching itself can be coordinated. By setting the second preset period to approximately 30 seconds, it conforms to user operating habits and improves the user experience.
[0089] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowchart may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0090] The use of the verbs "including" and "contains" and their inflections in the application documents does not preclude the existence of elements or steps other than those described in the application documents. The article "a" or "one" preceding an element does not preclude the existence of multiple such elements.
[0091] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.
[0092] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with relevant laws and regulations and do not violate public order and good morals.
Claims
1. A method for regulating power consumption of an electronic device, the electronic device comprising a communication chip and a main chip, the communication chip being connected with the main chip through a network communication interface layer, the communication chip being a wifi chip, characterized in that, A low-power module is arranged in a HAL layer of the main chip to perform the following method, comprising, sending an inquiry message to an application layer in the main chip to inquire whether an application in the application layer has a network connection requirement (S1); and sending a command to the network communication interface layer to instruct the network communication interface layer to stop sending a network connection request to the communication chip (S2) in response to no corresponding response message being received within a first preset period after the inquiry message is sent, the first preset period being set to any value in a range of 2 to 5 seconds.
2. The method of claim 1, wherein, Further comprising: determining a sending time of a next inquiry message in response to the corresponding response message being received within the first preset period after the inquiry message is sent; or, determining the sending time of the next inquiry message according to a second preset period and the corresponding response message being received within the first preset period after the inquiry message is sent; or, determining the sending time of the next inquiry message according to the second preset period.
3. The method of claim 2, wherein, The second preset period is set to any value in a range of 25 to 35 seconds.
4. The method of claim 1, wherein, The inquiry message sent each time includes an identification code, The response message includes at least the identification code of the corresponding inquiry message and an application identification code of the response message.
5. The method for adjusting power consumption of electronic equipment according to claim 4, wherein The response message includes network duration information required by the application.
6. The method of claim 5, wherein, Further comprising: judging a time of sending a next inquiry message according to the network duration information in the received response message and the sending time of the corresponding inquiry message.
7. The method of claim 1, wherein, Further comprising: The application in the application layer of the main chip that has the network connection requirement returns a response message corresponding to the inquiry message in response to the received inquiry message.
8. The method of claim 1 to 7, wherein, The inquiry message is sent in the form of a broadcast.
9. A system for adjusting power consumption of electronic equipment, the electronic equipment including a communication chip (22) and a main chip (21), the communication chip (22) being connected to the main chip (21) through a network communication interface layer (33), the communication chip being a wifi chip, and the system being characterized by comprising a low-power module arranged in a HAL layer (32) of the main chip (21), The low-power module is arranged in the HAL layer (32) of the main chip (21), The low-power module is connected to an application layer (31) and the network communication interface layer (33) respectively; The low-power module is used to send an inquiry message to the application layer (31) and send a command to the network communication interface layer (33) to instruct the network communication interface layer (33) to stop sending a network connection request to the communication chip (22) in response to no corresponding response message being received within a first preset period after the inquiry message is sent; An application in the application layer (31) arranged in the main chip (21) returns a response message corresponding to the inquiry message in response to the received inquiry message, the application having a network connection requirement.
Citation Information
Patent Citations
Method and device for playing television programs
CN110419226A
Mesh network communication method and device, electronic equipment and storage medium
CN113811018A