Low-power-consumption management method and device of electric equipment, storage medium and electronic device

By obtaining the current power of the electrically used equipment and determining the expected operating time, the equipment is controlled to enter the low-power mode, solving the problem of low-availability of low-voltage equipment, extending the device's usage time and battery life, and improving the user experience.

CN119512348AInactive Publication Date: 2025-02-25QINGDAO HAIER TECH +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411594099.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Low-power electrical equipment has the problem of low equipment availability, and the prior art has not effectively solved it.

Method used

By obtaining the current power of the power used by the power-using equipment when running the business thread, the estimated running time of the business thread is determined, and the equipment is controlled to enter the low-power mode according to the operation flag.

Benefits of technology

Without sacrificing user experience, it extends the usage time of electrical equipment, effectively extends battery life, reduces power waste, and improves the practicality of the equipment and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512348A_ABST
    Figure CN119512348A_ABST
Patent Text Reader

Abstract

The invention discloses a low-power-consumption management method and device of electric equipment, a storage medium and an electronic device, and relates to the technical field of smart home, the low-power-consumption management method of the electric equipment comprises the steps that the current electric quantity of the electric equipment when a service thread is operated is acquired, and the current electric quantity is smaller than the initial electric quantity of the electric equipment when the electric equipment is started; determining the predicted operation time of the service thread according to the current electric quantity, and updating the current operation time of the service thread to the predicted operation time; the operation mark generated when the service thread operates according to the predicted operation time is obtained, and the electric equipment is controlled to enter a low-power-consumption mode according to the operation mark, and by adopting the technical scheme, the technical problem that the availability of the electric equipment with low electric quantity is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a method, device, storage medium and electronic device for low power consumption management of electrical equipment. Background Art

[0002] In modern society, highly electronic electrical devices have become an indispensable part of our daily life and work. However, a common challenge faced by these electrical devices is the rapid consumption of battery power. In the fast-paced life, people often fail to charge their devices in time due to being busy or other reasons. They often realize that the battery is low when they need to use it, and have to charge it urgently, which increases the time cost of using electrical devices and may also miss important messages, causing interference to work and life. Existing methods focus on shutting down high-power consumption applications to quickly reduce device energy consumption. Although this method prolongs battery life, it ignores the user interaction experience. For example, the device screen may suddenly turn off, the network connection may suddenly disconnect, or even the application may exit, interrupting the user's normal use of the device.

[0003] Therefore, in the related art, there is a technical problem of low equipment availability for low-power electrical equipment.

[0004] In the related art, no effective solution has been proposed for the technical problem of low availability of low-power electrical equipment. Summary of the invention

[0005] The embodiments of the present application provide a low-power consumption management method, device, storage medium and electronic device for electric equipment, so as to at least solve the technical problem of low equipment availability for low-power electric equipment in the related art.

[0006] According to one embodiment of the embodiments of the present application, a low-power consumption management method for an electric device is provided, including: obtaining a current power level of the electric device when running a service thread, wherein the current power level is less than an initial power level of the electric device when it is powered on; determining an estimated running time of the service thread based on the current power level, and updating the current running time of the service thread to the estimated running time; obtaining a running flag generated when the service thread runs according to the estimated running time, and controlling the electric device to enter a low-power consumption mode based on the running flag.

[0007] In an exemplary embodiment, obtaining the current power of an electric device when running a business thread includes: obtaining the thread running state of the business thread from the operation log of the electric device, wherein the thread running state includes at least one of the following: running, sleeping; determining that a target business thread whose thread running state is running; and obtaining the current power of the electric device when running the target business thread when determining that the business type of the target business thread belongs to a preset business type, wherein the preset business type includes at least one of the following: call service, image acquisition service, network data transmission service, serial port data processing service.

[0008] In an exemplary embodiment, the estimated running time of the business thread is determined based on the current power level, including: when it is determined that the current power level is lower than the power threshold required for the business thread to run, obtaining the thread running time corresponding to the power level to which the current power level belongs, and determining the estimated running time based on the thread running time; when it is determined that the current power level is higher than the power threshold of the business thread, controlling the running of the business thread according to the current running time of the business thread.

[0009] In an exemplary embodiment, after updating the current running time of the business thread to the expected running time, the method further includes: monitoring the business thread running according to the expected running time to obtain the actual running time of the business thread; when it is determined that the actual running time is greater than the expected running time, controlling the business thread to interrupt its operation according to an interrupt instruction to cause the electrical device to enter a low power consumption mode.

[0010] In an exemplary embodiment, the method further includes: before the power-consuming device enters the low power consumption mode, saving the thread running state of the business thread and the current running time of the business thread; after the power-consuming device enters the low power consumption mode, if it is monitored that the running flag is not empty, determining that the business thread is awakened, and controlling the power-consuming device to exit the low power consumption mode; and redetermining the expected running time of the business thread based on the thread running state of the business thread and the current running time of the business thread.

[0011] In an exemplary embodiment, determining the estimated running time of the business thread based on the current power level includes: inputting the current power level and the thread running state of the business thread into a time prediction model, and obtaining the estimated running time output by the time prediction model; wherein the time prediction model is a linear regression model trained with a first historical power level and a historical thread running state as input samples and a second historical power level as an output sample.

[0012] In an exemplary embodiment, obtaining a running flag generated when the business thread runs according to the expected running time includes: obtaining the running flag generated when the business thread runs according to the expected running time once every preset period; controlling the power-consuming device to enter a low power consumption mode according to the running flag includes: when determining that the running flag is cleared, running the sleep thread of the power-consuming device to control the power-consuming device to enter a low power consumption mode.

[0013] According to another aspect of the embodiments of the present application, there is also provided a low power consumption management device for an electric device, comprising: an acquisition module, for acquiring the current power of the electric device when running a service thread, wherein the current power is less than the initial power of the electric device when it is powered on; an update module, for determining the estimated running time of the service thread according to the current power, and updating the current running time of the service thread to the estimated running time; a control module, for acquiring a running flag generated when the service thread runs according to the estimated running time, and controlling the electric device to enter a low power consumption mode according to the running flag. According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned low power consumption management method for electric devices when running.

[0014] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the low power consumption management method of the electrical equipment through the computer program.

[0015] In an embodiment of the present application, by obtaining the current power of the power-consuming device when running a service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on; determining the expected running time of the service thread according to the current power, and updating the current running time of the service thread to the expected running time; obtaining the running flag generated when the service thread runs according to the expected running time, and controlling the power-consuming device to enter a low power consumption mode according to the running flag; adopting the above technical solution, without sacrificing the user experience, the problem of excessive battery consumption of the power-consuming device is optimized, and the basic functions of the device can continue to be used when the power is low or extremely low, which, on the one hand, prolongs the use time of the power-consuming device, effectively prolongs the battery life, and reduces power waste; on the other hand, improves the practicality of the power-consuming device, is more user-friendly, and improves user satisfaction and the quality of life of the user. Therefore, the present application solves the technical problem of low device availability for low-power power-consuming devices, thereby improving the device availability of low-power power-consuming devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] Figure 1 It is a hardware environment diagram of a low power consumption management method for electric equipment according to an embodiment of the present application;

[0019] Figure 2 is a flow chart of a low power consumption management method for an electric device according to an embodiment of the present application;

[0020] Figure 3 is a flowchart of power management for different business processes according to an embodiment of the present application;

[0021] Figure 4 It is a structural block diagram of a low power consumption management device for electric equipment according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, device or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, equipment or equipment.

[0024] According to one aspect of an embodiment of the present application, a low power consumption management method for an electric device is provided. The low power consumption management method for an electric device is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the low power consumption management method for the electric device can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0025] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0026] In this embodiment, a low power consumption management method for electric devices is provided, which is applied to the above terminal devices. Figure 2 : is a flowchart of a low power consumption management method for an electric device according to an embodiment of the present application, and the process includes the following steps:

[0027] Step S202, obtaining the current power of the power-consuming device when running the service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on;

[0028] It should be noted that when the electrical equipment is turned on, the corresponding threads will be initialized for different functions, such as doorbell call thread, video recording and photography thread, network data processing thread, serial port data processing thread, http data processing thread, sleep thread, etc.

[0029] Step S204, determining the estimated running time of the service thread according to the current power, and updating the current running time of the service thread to the estimated running time;

[0030] Step S206: obtaining an operation flag generated when the service thread runs according to the estimated running time, and controlling the power-consuming device to enter a low power consumption mode according to the operation flag.

[0031] Through the above steps, by obtaining the current power of the power-consuming device when running the business thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on; determining the expected running time of the business thread according to the current power, and updating the current running time of the business thread to the expected running time; obtaining the running flag generated when the business thread runs according to the expected running time, and controlling the power-consuming device to enter the low power consumption mode according to the running flag; adopting the above technical solution, without sacrificing the user experience, the problem of excessive battery consumption of the power-consuming device is optimized, and the basic functions of the device can continue to be used when the power is low or extremely low, which, on the one hand, prolongs the use time of the power-consuming device, effectively prolongs the battery life, and reduces power waste; on the other hand, improves the practicality of the power-consuming device, is more user-friendly, and improves user satisfaction and user quality of life. Therefore, the present application solves the technical problem of low device availability for low-power power-consuming devices, thereby improving the device availability of low-power power-consuming devices.

[0032] For example, if the electrical device is a smart door lock, when the battery power of the smart door lock is low, in order to prevent excessive battery consumption, the doorbell call service thread can be dynamically adjusted to adjust the doorbell call time (i.e., running time), thereby achieving low power consumption management of the smart door lock and improving the practicality of the electrical device.

[0033] In this embodiment, as shown in Table 1, when the power of the smart door lock is 100%, the doorbell call time can be set to 60 seconds to ensure that the user will not miss any doorbell calls, and even if the person outside the door continues to ring the bell, the system will not immediately run out of power. Assuming that the power drops to 30%, if the doorbell call time is still maintained at 60 seconds, then if the user does not respond in time, the doorbell function will consume a lot of remaining power, which may affect other more important functions, such as the opening and closing of the lock. Therefore, the smart door lock will calculate a doorbell call time that matches the power level (30%) according to the current power level, such as shortening it to 20 seconds. In this way, even if the person outside the door continues to ring the bell, the system can maintain the basic availability of the doorbell function while reducing power consumption, ensuring that the power will not be completely exhausted. This embodiment dynamically shortens the doorbell call time according to the amount of remaining power to achieve a balance between power consumption and functional availability. The user can still receive notifications of doorbell calls when the battery is low, while reducing unnecessary consumption of battery power and maintaining the operating time of the smart door lock until the user is able to charge or replace the battery, providing the user with a longer device usage time while ensuring the availability of basic functions under limited power conditions, thereby improving the user experience.

[0034] Table 1 Running schedule of different business threads

[0035]

[0036] In an exemplary embodiment, the implementation process of obtaining the current power of the power-consuming device when running a business thread in step S202 specifically includes: obtaining the thread running state of the business thread from the operation log of the power-consuming device, wherein the thread running state includes at least one of the following: running, sleeping; determining that the target business thread whose thread running state is running; and when determining that the business type of the target business thread belongs to a preset business type, obtaining the current power of the power-consuming device when running the target business thread, wherein the preset business type includes at least one of the following: call service, image acquisition service, network data transmission service, serial port data processing service.

[0037] Among them, the service threads corresponding to the preset service types may include, for example, a call thread corresponding to a call service (such as a doorbell call thread), a video recording and photographing thread corresponding to an image acquisition service, and a serial port data processing thread corresponding to a serial port data processing service.

[0038] The network data transmission service includes uploading and sending of network data, and the threads corresponding to the network data transmission service include a network data sending thread and a communication data uploading thread.

[0039] In an exemplary embodiment, determining the expected running time of the business thread based on the current power level can be specifically achieved through the following steps: when it is determined that the current power level is lower than the power threshold required for the business thread to run, obtaining the thread running time corresponding to the power level to which the current power level belongs, and determining the expected running time based on the thread running time; when it is determined that the current power level is higher than the power threshold of the business thread, controlling the running of the business thread according to the current running time of the business thread.

[0040] Optionally, the estimated running time is determined according to the thread running time, and the corresponding maximum duration is calculated according to the current power level. It can be understood that the call duration is directly determined as the estimated running time. For example, if the current power is 70%, the call duration is set to 45 seconds, then the estimated running time is 45 seconds.

[0041] Alternatively, the call duration may be used as a reference benchmark, a time range may be generated based on the call duration and the reserved time, and the time within this time range may be determined as the estimated operating time, wherein the minimum value of the time range is set to the difference between the call duration and the reserved time, and the maximum value of the time range is set to the call duration, thereby improving the credibility of the call duration.

[0042] In an exemplary embodiment, after the current running time of the business thread is updated to the expected running time, the business thread running according to the expected running time can be further monitored to obtain the actual running time of the business thread; when it is determined that the actual running time is greater than the expected running time, the business thread is controlled to interrupt its operation according to an interrupt instruction to cause the electrical device to enter a low power consumption mode.

[0043] Optionally, after the power-consuming device enters the low power consumption mode, the power-consuming device is awakened by a wake-up source such as a serial port, a button, Wi-Fi, a timer, etc. After the power-consuming device is awakened, the sleep thread can be called to monitor the running flag every 1 second, and if it is determined that the running flag is empty, it enters sleep.

[0044] In an exemplary embodiment, further, before the power-consuming device enters the low power consumption mode, the thread running state of the business thread and the current running time of the business thread are saved; after the power-consuming device enters the low power consumption mode, if it is monitored that the running flag is not empty, it is determined that the business thread is awakened, and the power-consuming device is controlled to exit the low power consumption mode; the estimated running time of the business thread is re-determined according to the thread running state of the business thread and the current running time of the business thread.

[0045] The current running time, for example, represents the call duration required by the calling thread, or the acquisition duration of the image acquisition thread.

[0046] It can be understood that this embodiment can improve the user's operation continuity of the electrical device in a low power consumption state by saving the thread running state of the business thread and the current running time of the business thread before the electrical device enters the low power consumption mode, thereby improving the practicality of the electrical device and improving the user's usage experience.

[0047] Optionally, the estimated running time of the business thread is re-determined based on the thread running status of the business thread and the current running time of the business thread. In essence, the current power of the electrical device is determined based on the thread running status, and then the estimated running time is determined using the current power and the current running time of the business thread. For determining the current power of the electrical device based on the thread running status, refer to the above process and will not be repeated here.

[0048] In an exemplary embodiment, the specific process of determining the estimated running time of the business thread based on the current power in step S204 may include: inputting the current power and the thread running status of the business thread into a time prediction model, and obtaining the estimated running time output by the time prediction model; wherein the time prediction model is a linear regression model trained with the first historical power and the historical thread running status as input samples and the second historical power as output samples.

[0049] It should be noted that this embodiment indicates that the power-consuming device operates normally without being charged. The first historical power is higher than the second historical power, and the linear regression model is used to predict the relationship between the historical thread running state and power consumption.

[0050] Furthermore, in this embodiment, the running frequency and environmental factors of the current thread can be input into the trained model to predict how the battery power will change in the next period of time. Then, based on the prediction results, the power consumption device can dynamically adjust the power threshold. If the power is predicted to drop too fast, the power consumption of some non-critical functions can be reduced in advance, such as shortening the doorbell call time, reducing the network check frequency, etc., to ensure that key functions (such as unlocking) are available for a longer period of time.

[0051] In an exemplary embodiment, the process of obtaining the running flag generated when the business thread runs according to the expected running time in step S206 can be understood as obtaining the running flag generated when the business thread runs according to the expected running time once every preset period; at this time, the process of controlling the power-consuming device to enter the low power consumption mode according to the running flag may include: when it is determined that the running flag is cleared, running the sleep thread of the power-consuming device to control the power-consuming device to enter the low power consumption mode.

[0052] Optionally, in one embodiment, the current battery status can also be fed back to the user through low-battery warnings, etc., to remind the user of possible functional changes or suggest charging to avoid sudden functional limitations or device shutdown.

[0053] In order to better understand the process of the low power consumption management method of the above-mentioned electrical equipment, the implementation method process of the low power consumption management of the above-mentioned electrical equipment is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0054] In this embodiment, a low power consumption management method for an electric device is provided, which comprises the following steps:

[0055] Step S1: Turn on the device and initialize each thread.

[0056] Step S2: Calculate the running time of different business threads according to the power value. For example, based on the needs of doorbell calls, photo recording, network data, serial port data, communication data processing, etc., as the battery power continues to decrease, calculate a running time that matches the current power, set the corresponding running mark as a busy mark, and clear the mark after processing the specific business.

[0057] Step S3: The sleep thread checks the running marks of communication data, serial port, network, doorbell, video, etc. every 1 second. If the running marks are not busy marks and have been cleared, the power-consuming device will enter sleep.

[0058] Step S4: After receiving the wake-up message, the system will be awakened and the sleep detection will be repeated. If the system has entered sleep mode, the system can be awakened by a wake-up source such as a serial port, a button, wifi, or a timer. After awakening, the corresponding data will continue to be processed according to the above steps.

[0059] It should be noted that, for steps S2 to S4, the execution order is not fixed and they can also be performed in parallel.

[0060] This embodiment can adjust the power consumption of the device according to the battery power, extend the service life of the device, and thus improve the low power consumption management efficiency of the power-consuming device.

[0061] Specifically, for the above step S2, if Figure 3 As shown, the following processing steps are further included:

[0062] Step S2-1: For the doorbell call thread, wait for the doorbell call request normally and obtain the device power. When the electronic device has sufficient power, an overtime call can be made to prevent the user from missing the doorbell call.

[0063] When the battery is low, to avoid excessive power consumption, a doorbell call time that matches the battery will be calculated, thereby reducing power consumption and extending the device usage time. Then the doorbell call will start, and during the doorbell call, the doorbell busy mark will be set, and the doorbell mark will be cleared after the doorbell call ends.

[0064] Step S2-2: For image acquisition threads such as photo taking and video recording, when the electronic device has sufficient power, a short video of 15 seconds will be shot in order to capture more information.

[0065] As the battery power decreases, a recording time that matches the power will be calculated. By shortening the photo and video recording time, the device power consumption is reduced.

[0066] During the photo-taking process, set the busy record mark, wait for the end of the video recording, and clear the video record mark.

[0067] Step S2-3: For the network data processing thread. Considering that if the business data processing enters low power consumption too quickly, it will bring an unfriendly user experience to customers, if there is network data to be sent, the sending time will be delayed to wait for the next network data. As the battery power decreases, a waiting time matching the power will be calculated. By shortening the time, the power consumption of the device is reduced. During the network data processing process, the network data busy flag is set, and the network data flag is cleared after waiting for the data processing to end.

[0068] Step S2-4: For the serial port data processing thread, in order to quickly respond to the communication response of the lock body module and avoid problems such as device freezing caused by rapid sleep loss of data, it will wait for a period of time after receiving the serial port data. As the battery power decreases, a waiting time that matches the power will be calculated. By shortening the time, the power consumption of the device is reduced. During the serial port data processing process, the serial port busy flag is set, and the serial port flag is cleared after waiting for the data processing to end.

[0069] Step S2-5: For the communication data processing thread of the communication protocol such as http, it takes a certain upload time to upload data to the cloud. As the battery power decreases, an http processing time that matches the power will be calculated. By shortening the time, the power consumption of the device is reduced. During the http data processing process, the http busy flag is set, and the http flag is cleared after waiting for the http to end.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software device, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0071] Figure 4 is a structural block diagram of a low power consumption management device for electric equipment according to an embodiment of the present application; Figure 4 As shown, including:

[0072] An acquisition module 42 is used to acquire the current power of the power-consuming device when it runs the service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on;

[0073] An updating module 44, configured to determine an estimated running time of the service thread according to the current power level, and update the current running time of the service thread to the estimated running time;

[0074] The control module 46 is used to obtain an operation flag generated when the service thread runs according to the estimated running time, and control the power-consuming device to enter a low power consumption mode according to the operation flag.

[0075] Through the above-mentioned device, by obtaining the current power of the power-consuming device when running the service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on; determining the expected running time of the service thread according to the current power, and updating the current running time of the service thread to the expected running time; obtaining the running flag generated when the service thread runs according to the expected running time, and controlling the power-consuming device to enter the low power consumption mode according to the running flag; adopting the above-mentioned technical scheme, without sacrificing the user experience, the problem of excessive battery consumption of the power-consuming device is optimized, and the basic functions of the device can continue to be used when the power is low or extremely low, which, on the one hand, prolongs the use time of the power-consuming device, effectively prolongs the battery life, and reduces power waste; on the other hand, improves the practicality of the power-consuming device, is more user-friendly, and improves user satisfaction and user quality of life. Therefore, the present application solves the technical problem of low device availability for low-power power-consuming devices, thereby improving the device availability of low-power power-consuming devices.

[0076] In an exemplary embodiment, the acquisition module is also used to: obtain the thread running state of the business thread from the operation log of the power-consuming device, wherein the thread running state includes at least one of the following: running, sleeping; determine that the target business thread whose thread running state is running; and when it is determined that the business type of the target business thread belongs to a preset business type, obtain the current power of the power-consuming device when running the target business thread, wherein the preset business type includes at least one of the following: call service, image acquisition service, network data transmission service, serial port data processing service.

[0077] In an exemplary embodiment, the update module is also used to: when it is determined that the current power level is lower than the power threshold required for the business thread to run, obtain the thread running time corresponding to the power level to which the current power level belongs, and determine the expected running time based on the thread running time; when it is determined that the current power level is higher than the power threshold of the business thread, control the operation of the business thread according to the current running time of the business thread.

[0078] In an exemplary embodiment, the update module is also used to: after updating the current running time of the business thread to the expected running time, further monitor the business thread running according to the expected running time to obtain the actual running time of the business thread; when it is determined that the actual running time is greater than the expected running time, control the business thread to interrupt its operation according to an interrupt instruction, so that the power-consuming device enters a low power consumption mode.

[0079] In an exemplary embodiment, further, the low power consumption management device of the power-consuming device also includes: a determination module, which is used to save the thread running state of the business thread and the current running time of the business thread before the power-consuming device enters the low power consumption mode; after the power-consuming device enters the low power consumption mode, if it is monitored that the running flag is not empty, determine that the business thread is awakened, and control the power-consuming device to exit the low power consumption mode; and redetermine the expected running time of the business thread according to the thread running state of the business thread and the current running time of the business thread.

[0080] In an exemplary embodiment, the update module is also used to: input the current power and the thread running status of the business thread into a time prediction model, and obtain the estimated running time output by the time prediction model; wherein the time prediction model is a linear regression model trained with the first historical power and the historical thread running status as input samples and the second historical power as output samples.

[0081] In an exemplary embodiment, the control module is also used to: obtain the running flag generated when the business thread runs according to the expected running time once every preset period; and when it is determined that the running flag is cleared, run the sleep thread of the power-consuming device to control the power-consuming device to enter a low power consumption mode.

[0082] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0083] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0084] S1, obtaining the current power of the power-consuming device when running a service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on;

[0085] S2, determining the estimated running time of the service thread according to the current power, and updating the current running time of the service thread to the estimated running time;

[0086] S3, obtaining a running flag generated when the service thread runs according to the estimated running time, and controlling the power-consuming device to enter a low power consumption mode according to the running flag.

[0087] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0088] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0089] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0090] S1, obtaining the current power of the power-consuming device when running a service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on;

[0091] S2, determining the estimated running time of the service thread according to the current power, and updating the current running time of the service thread to the estimated running time;

[0092] S3, obtaining a running flag generated when the service thread runs according to the estimated running time, and controlling the power-consuming device to enter a low power consumption mode according to the running flag.

[0093] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0094] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0095] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0096] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A low power consumption management method for electrical equipment, characterized in that: include: Obtaining the current power of the power-consuming device when it runs the service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on; Determine the estimated running time of the service thread according to the current power level, and update the current running time of the service thread to the estimated running time; An operation flag generated when the service thread runs according to the estimated running time is obtained, and the power-consuming device is controlled to enter a low power consumption mode according to the operation flag.

2. The low power consumption management method of electric equipment according to claim 1, characterized in that: Get the current power of the power-consuming device when it runs the business thread, including: Acquire the thread running state of the service thread from the running log of the power-consuming device, wherein the thread running state includes at least one of the following: running, sleeping; Determine that the target business thread whose thread running state is running; When it is determined that the business type of the target business thread belongs to a preset business type, the current power consumption of the power-consuming device when running the target business thread is obtained, wherein the preset business type includes at least one of the following: call service, image acquisition service, network data transmission service, and serial port data processing service.

3. The low power consumption management method of electric equipment according to claim 1, characterized in that: Determining the estimated running time of the service thread according to the current power includes: When it is determined that the current power is lower than the power threshold required for the business thread to run, obtaining the thread running time corresponding to the power level to which the current power belongs, and determining the estimated running time according to the thread running time; When it is determined that the current power level is higher than the power threshold of the service thread, the service thread is controlled to run according to the current running time of the service thread.

4. The low power consumption management method of electric equipment according to claim 1, characterized in that: After updating the current running time of the service thread to the estimated running time, the method further includes: Monitoring the service thread running according to the estimated running time to obtain the actual running time of the service thread; When it is determined that the actual running time is greater than the estimated running time, the service thread is controlled to interrupt operation according to the interrupt instruction, so that the power-consuming device enters a low power consumption mode.

5. The low power consumption management method for electric equipment according to any one of claims 1 to 4, characterized in that: The method further comprises: Before the power-consuming device enters the low power consumption mode, saving the thread running state of the service thread and the current running time of the service thread; After the electric device enters the low power consumption mode, if it is monitored that the running flag is not empty, determining that the service thread is awakened, and controlling the electric device to exit the low power consumption mode; The estimated running time of the service thread is re-determined according to the thread running state of the service thread and the current running time of the service thread.

6. The low power consumption management method of electric equipment according to claim 1, characterized in that: Determining the estimated running time of the service thread according to the current power includes: Inputting the current power and the thread running state of the service thread into a time prediction model, and obtaining the estimated running time output by the time prediction model; The time prediction model is a linear regression model trained with the first historical power and the historical thread running status as input samples and the second historical power as output samples.

7. The low power consumption management method of electric equipment according to claim 1, characterized in that: Obtaining a running flag generated when the service thread runs according to the estimated running time includes: Obtaining once every preset period a running flag generated when the service thread runs according to the estimated running time; Controlling the electric device to enter a low power consumption mode according to the running flag includes: when it is determined that the running flag is cleared, running a sleep thread of the electric device to control the electric device to enter a low power consumption mode.

8. A low power consumption management device for electric equipment, characterized in that: include: An acquisition module, used to acquire the current power of the power-consuming device when it runs a service thread, wherein the current power is less than the initial power of the power-consuming device when it is turned on; An updating module, configured to determine an estimated running time of the service thread according to the current power level, and update the current running time of the service thread to the estimated running time; The control module is used to obtain the operation flag generated when the service thread runs according to the estimated operation time, and control the power-consuming device to enter the low power consumption mode according to the operation flag.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Dynamic triggering method of reserved electric quantity and wearable equipment

    CN111741163A

  • Door lock operation power consumption adjusting method and device, electronic equipment and storage medium

    CN113947827A

  • Control method and device of new energy camera equipment and storage medium

    CN114039398A

  • Method and device for predicting power supply quantity of power storage equipment and computer readable medium

    CN114154781A

  • Control method of intelligent door lock and intelligent door lock

    CN118629109A