Sleep wakeup method, system and device, storage medium and product
By monitoring the status of the power module and generating a wake-up signal based on the preset wake-up time, the problem that the sleep wake-up method in the prior art needs to be triggered by external conditions is solved, and the efficiency of sleep wake-up test is improved.
Patent Information
- Application Number
- CN202411821949.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, all sleep wake-up methods require external conditions to trigger, reducing the efficiency of sleep wake-up test.
By monitoring the status of the power module, if a sleep state is detected, a wake-up countdown is performed based on the preset wake-up time, a wake-up signal is generated and sent to the power control module to control the power on.
It realizes automatic wake-up of the power supply without external conditions triggering, improving the efficiency of sleep wake-up test.
Smart Images

Figure CN119576424A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a sleep-wakeup method, system, device, storage medium and product. Background Art
[0002] The testing work related to domestically produced portable terminals is particularly important. Through testing, errors and defects in the product can be discovered, ensuring that the product meets the expected quality standards before it is launched on the market, and ensuring that the product's software and hardware can provide a good user experience. Among them, the essential tests include sleep wake-up tests.
[0003] In the related technology, there are already automatic sleep methods, and there are many ways to trigger wake-up, such as network wake-up, power button, keyboard tapping, and mouse moving. However, the wake-up methods in the related technology all require external conditions to trigger, which reduces the efficiency of sleep wake-up testing. Summary of the invention
[0004] The main purpose of the present application is to provide a sleep wake-up method, which aims to solve the technical problem that the wake-up methods in the related technologies all require external conditions to trigger, thereby reducing the efficiency of the sleep wake-up test.
[0005] To achieve the above purpose, the present application proposes a sleep awakening method, which includes:
[0006] Monitor the state of the power module. If the power module is detected to be in a sleep state, perform a wake-up countdown based on a preset wake-up time to obtain a remaining wake-up time, wherein the preset wake-up time is obtained by the sleep function module via the communication function module.
[0007] A wake-up signal is generated based on the remaining wake-up time, and the wake-up signal is sent to a power control module, so that the power control module controls the power to be turned on based on the wake-up signal.
[0008] In one embodiment, the state of the power module is monitored, and if it is detected that the state of the power module is in a sleep state, a wake-up countdown is performed based on a preset wake-up time, and the step of obtaining the remaining wake-up time further includes:
[0009] Acquire the first power quantity of the power module in the sleep state;
[0010] The step of generating a wake-up signal based on the remaining wake-up time, and sending the wake-up signal to the power control module so that the power control module controls the power on based on the wake-up signal includes:
[0011] The state of the power module is monitored, and if it is monitored that the state of the power module is an awake state, the power quantity of the second power supply of the power module in the awake state is obtained;
[0012] A power health status is determined based on the first power supply level and the second power supply level.
[0013] In one embodiment, the step of generating a wake-up signal based on the remaining wake-up time includes:
[0014] The remaining wake-up time is judged, and if it is judged that the remaining wake-up time is equal to a preset value, a wake-up signal is generated.
[0015] In addition, to achieve the above purpose, the present application also proposes a sleep awakening method, the method comprising:
[0016] Determining configuration parameters based on a preset configuration file, wherein the configuration parameters include a preset sleep time;
[0017] Based on the preset sleep time, a sleep countdown is performed to obtain the remaining sleep time;
[0018] A sleep signal is generated based on the remaining sleep time, and the sleep signal is sent to a power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0019] In one embodiment, the configuration parameters include a preset wake-up time and a sleep number, and the step of generating a sleep signal based on the remaining sleep time and sending the sleep signal to the power control module so that the power control module controls the power off based on the sleep signal includes:
[0020] The remaining sleep time is judged, and if it is judged that the remaining sleep time is equal to a preset threshold, the preset wake-up time is sent to the communication function module, so that the communication function module sends the preset wake-up time to the wake-up function module;
[0021] Until the preset wake-up time is sent, the sleep signal is sent to the power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0022] In one embodiment, the step of determining the remaining sleep time, if it is determined that the remaining sleep time is equal to a preset threshold, comprises:
[0023] Updating the sleep times;
[0024] Based on the updated number of sleep times, the configuration parameters of the preset configuration file are updated to obtain the updated preset configuration file.
[0025] In addition, to achieve the above purpose, the present application also proposes a sleep awakening system, the sleep awakening system comprising:
[0026] A wake-up function module is used to monitor the state of the power module. If the state of the power module is detected to be a sleep state, a wake-up countdown is performed based on a preset wake-up time to obtain a remaining wake-up time; a wake-up signal is generated based on the remaining wake-up time, and the wake-up signal is sent to the power control module, so that the power control module controls the power on based on the wake-up signal, wherein the preset wake-up time is obtained by the sleep function module via the communication function module;
[0027] A sleep function module is used to determine configuration parameters based on a preset configuration file, wherein the configuration parameters include a preset sleep time; based on the preset sleep time, a sleep countdown is performed to obtain a remaining sleep time; based on the remaining sleep time, a sleep signal is generated, and the sleep signal is sent to a power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0028] In addition, to achieve the above objectives, the present application also proposes a sleep wake-up device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the sleep wake-up method described above.
[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the sleep wake-up method described above are implemented.
[0030] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the sleep wake-up method as described above are implemented.
[0031] One or more technical solutions proposed in this application have at least the following technical effects:
[0032] Compared with the related art, there is an automatic sleep method, and there are many ways to trigger wake-up, such as network wake-up, power button, keyboard tapping and mouse moving, but the wake-up methods in the related art all need to be triggered by external conditions, which reduces the efficiency of the sleep wake-up test. In comparison, the present application monitors the state of the power module. If the state of the power module is detected to be in the sleep state, a wake-up countdown is performed based on a preset wake-up time to obtain a remaining wake-up time; based on the remaining wake-up time, a wake-up signal is generated, and the wake-up signal is sent to the power control module, so that the power control module controls the power on based on the wake-up signal, wherein the preset wake-up time is obtained by the sleep function module via the communication function module. It can be understood that after the wake-up function module detects that the power state is in the sleep state, the present application performs a wake-up countdown based on the preset wake-up time, and generates a wake-up signal sent to the power control module according to the remaining wake-up time obtained, so that the power control module controls the power on based on the wake-up signal, which can avoid the problem that the wake-up methods in the related art all need to be triggered by external conditions, which reduces the efficiency of the sleep wake-up test. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] 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.
[0034] 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.
[0035] Figure 1 A flowchart of the sleep-wake-up method embodiment 1 of the present application is provided;
[0036] Figure 2 This is a module flow chart of the sleep wake-up method of this application;
[0037] Figure 3 This is a wake-up flow chart of the sleep wake-up method of this application;
[0038] Figure 4 A flowchart of the second embodiment of the sleep-wake-up method of the present application is provided;
[0039] Figure 5 A sleep flow chart of the sleep wake-up method of this application;
[0040] Figure 6 This is a schematic diagram of the module structure of the sleep wake-up system according to an embodiment of the present application;
[0041] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the sleep wake-up method in the embodiment of the present application.
[0042] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0044] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0045] The main solution of the embodiment of the present application is: to monitor the status of the power module, and if the status of the power module is monitored to be a sleep state, then based on the preset wake-up time, a wake-up countdown is performed to obtain the remaining wake-up time, wherein the preset wake-up time is obtained by the sleep function module via the communication function module; based on the remaining wake-up time, a wake-up signal is generated, and the wake-up signal is sent to the power control module, so that the power control module controls the power to be turned on based on the wake-up signal.
[0046] In the related technology, there are already automatic sleep methods, and there are many ways to trigger wake-up, such as network wake-up, power button, keyboard tapping, and mouse moving. However, the wake-up methods in the related technology all require external conditions to trigger, which reduces the efficiency of sleep wake-up testing.
[0047] After the wake-up function module detects that the power state is in the sleep state, the present application performs a wake-up countdown based on a preset wake-up time, and generates a wake-up signal sent to the power control module according to the obtained remaining wake-up time, so that the power control module controls the power on based on the wake-up signal. This can avoid the problem that the wake-up methods in related technologies all require external conditions to trigger, thereby reducing the efficiency of sleep wake-up tests.
[0048] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the sleep wake-up device as an example to illustrate this embodiment and the following embodiments.
[0049] Based on this, the embodiment of the present application provides a sleep awakening method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the sleep-wakeup method of the present application.
[0050] In this embodiment, refer to Figure 2 , Figure 2 A module flow chart is provided, and the sleep awakening method includes steps S100 to S200:
[0051] Step S100, monitoring the state of the power module, if the state of the power module is monitored to be in a sleep state, performing a wake-up countdown based on a preset wake-up time to obtain a remaining wake-up time, wherein the preset wake-up time is obtained by the sleep function module via the communication function module;
[0052] It should be noted that the execution subject of this embodiment is a sleep wake-up device. The sleep wake-up device is a terminal device that needs to be woken up from sleep. The sleep wake-up device is provided with a power module, a sleep function module, a communication function module and a wake-up function module. The wake-up function module is an embedded program that runs in the embedded controller of the mainboard, and the program can detect the power status of the current terminal device.
[0053] It is understandable that the sleep state is a low-power state. In the low-power state, most components of the terminal device will be turned off or enter a low-power mode to save energy. The wake-up function module of the sleep wake-up device detects the state of the power module. If it detects that the power state of the power module is in the sleep state, it will count down based on the preset wake-up time sent by the sleep function module via the communication function module to obtain the remaining wake-up time. Figure 3 , Figure 3 A wake-up flow chart is provided.
[0054] In particular, the wake-up function module of the sleep-wake-up device will judge the preset wake-up time before counting down. If the preset wake-up time is greater than 0, the countdown process will be carried out. Before each countdown at the preset wake-up time, there will be a one-second delay before proceeding with the subsequent process. The delay step realizes the accurate countdown function and ensures that the system is in a stable state at each time point.
[0055] Step S200: generating a wake-up signal based on the remaining wake-up time, and sending the wake-up signal to a power control module, so that the power control module controls the power to be turned on based on the wake-up signal.
[0056] It should be noted that the power control module can control the state of the power module. The wake-up function module of the sleep wake-up device will generate a wake-up signal based on the remaining wake-up time obtained, and send the generated wake-up signal to the power control module that can control the state of the power module. The power control module will respond to the wake-up signal and generate a signal of pressing the switch power button to the power module, and the power module will respond to the analog signal to enter the wake-up state.
[0057] In a feasible implementation, the state of the power module is monitored. If the state of the power module is monitored to be in a sleep state, a wake-up countdown is performed based on a preset wake-up time, and the step of obtaining the remaining wake-up time further includes:
[0058] Acquire the first power quantity of the power module in the sleep state;
[0059] It is understandable that the first power supply level is the power supply level in the sleep state before waking up. The wake-up function module of the sleep-wake-up device detects and obtains the first power supply level in the sleep state before waking up.
[0060] In a feasible implementation manner, the remaining time is judged, and if it is judged that the remaining time is equal to a preset value, a wake-up signal is sent so that the power control module controls the power on based on the wake-up signal, and then the step includes:
[0061] The state of the power module is monitored, and if it is monitored that the state of the power module is an awake state, the power quantity of the second power supply of the power module in the awake state is obtained;
[0062] It should be noted that the second power supply quantity is the battery quantity detected after the terminal device is switched from a sleep state to an awake state. When the wake-up function module of the sleep-awakening device detects that the state of the power module is an awake state, it will obtain the second power supply quantity detected after the terminal device is switched from a sleep state to an awake state.
[0063] A power health status is determined based on the first power supply level and the second power supply level.
[0064] It is understandable that the wake-up function module of the sleep-wake-up device will compare the difference between the two groups of power values corresponding to the first power supply and the second power supply. If the difference is significant (for example, the power after wake-up is much lower than the power in the sleep state, taking into account factors such as natural discharge), it may indicate that there is a problem with the power supply, such as battery aging, decreased charging efficiency, etc. On the contrary, if the difference is within a reasonable range, it means that the power module is working normally and the battery is in good health.
[0065] In particular, considering the application scenario of the sleep-wakeup test of the terminal device before leaving the factory, the difference between the two groups of power values corresponding to the first power supply power and the second power supply power should be as small as possible.
[0066] In a feasible implementation manner, the step of generating a wake-up signal based on the remaining wake-up time includes:
[0067] The remaining wake-up time is judged, and if it is judged that the remaining wake-up time is equal to a preset value, a wake-up signal is generated.
[0068] It should be noted that the preset value is 0. The wake-up function module of the sleep wake-up device will determine the remaining wake-up time, and if it is determined that the remaining wake-up time is 0, it will generate a wake-up signal in response to the determination result.
[0069] In this embodiment, the sleep wake-up device realizes automated testing of the sleep wake-up test through the internally arranged power module, sleep function module, communication function module and wake-up function module. No human intervention is required. The sleep wake-up device automatically performs sleep wake-up test, saving a lot of manpower, material resources and time costs.
[0070] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 The sleep awakening method further includes steps A100 to A300:
[0071] Step A100, determining configuration parameters based on a preset configuration file, wherein the configuration parameters include a preset sleep time;
[0072] It should be noted that the preset configuration file is set in the sleep function module. The sleep function module is a background program running under the operating system. The program is responsible for managing all parameters in this automatic sleep and wake-up solution, such as the preset sleep time SysRunTime (i.e., how long it takes for the system to enter the sleep state after waking up), the preset wake-up time AutoOpenTime (i.e., how long it takes for the embedded program to automatically wake up the system after detecting the sleep state) and the number of sleep times AutoCount (i.e., the number of automatic sleep wake-ups). These parameters are all saved in the configuration file.
[0073] It is understandable that the sleep function module of the sleep-wake device will read the parameters in the configuration file when it is running, and then obtain the preset sleep time, the preset wake-up time and the number of sleep times.
[0074] Step A200, based on the preset sleep time, count down the sleep time to obtain the remaining sleep time;
[0075] It should be noted that after obtaining the preset sleep time, the sleep function module of the sleep wake-up device will perform a sleep countdown based on the preset sleep time to obtain the remaining sleep time after each countdown operation.
[0076] Specifically, the sleep function module of the sleep-wake-up device will use the preset sleep time as the countdown duration, and subtract one from the countdown duration every second. After each subtraction operation, the sleep function module will obtain a new remaining sleep time, and judge the remaining sleep time obtained after each subtraction operation to determine whether the current remaining sleep time meets the preset threshold. If so, stop the countdown operation and proceed to the subsequent sleep steps.
[0077] Step A300: Generate a sleep signal based on the remaining sleep time, and send the sleep signal to a power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0078] It is understandable that the sleep function module of the sleep wake-up device generates a sleep signal after each countdown operation, and sends the sleep signal to the power control module. After receiving the sleep signal, the power control module controls the power to turn off and enter the sleep state based on the sleep signal. Figure 5 , Figure 5 A sleep flow chart is provided.
[0079] In particular, after generating a sleep signal, the sleep function module of the sleep wake-up device will call the communication function module, which is arranged at the driver layer of the CPU of the sleep wake-up device and communicates with the automatic wake-up module arranged in the embedded controller through the LPC bus.
[0080] Furthermore, the automatic wake-up module is an embedded program, and the embedded program runs in the mainboard embedded controller.
[0081] In a feasible implementation manner, based on the remaining sleep time, a sleep signal is generated, and the sleep signal is sent to a power control module, so that the power control module controls the power supply to be turned off based on the sleep signal, including the following steps:
[0082] The remaining sleep time is judged, and if it is judged that the remaining sleep time is equal to a preset threshold, the preset wake-up time is sent to the communication function module, so that the communication function module sends the preset wake-up time to the wake-up function module;
[0083] It should be noted that the sleep function module of the sleep-wake-up device will judge the remaining sleep time obtained after each countdown operation. If it is judged that the remaining sleep time is greater than 0, the countdown operation will continue; if it is judged that the remaining sleep time is equal to 0, the countdown operation will be stopped, and the preset wake-up time will be sent to the communication function module. After obtaining the preset wake-up time, the communication function module sends the preset wake-up time to the wake-up function module through the LPC bus connected to the embedded controller, so that the wake-up function module can perform subsequent operations based on the preset wake-up time.
[0084] Specifically, when the sleep-wake device is started, the operating system of the sleep-wake device will load the corresponding driver programs, which are responsible for initializing communication with the embedded controller. Once the communication path is established, the CPU's background program can send commands to the embedded controller through the API provided by the operating system or by directly operating the hardware registers. After receiving the command, the embedded controller will perform the corresponding operation according to the command and return the result or status information to the CPU. The CPU's background program can effectively communicate with the embedded controller, thereby achieving precise control and management of various system characteristics.
[0085] Furthermore, the embedded controller can also actively report the occurrence of certain events to the CPU, such as the temperature exceeding a preset threshold and the battery being low. This is usually achieved through an interrupt mechanism, that is, when a certain condition is met, the embedded controller will trigger an interrupt signal, and the CPU will call the corresponding handler after receiving the interrupt signal.
[0086] Until the preset wake-up time is sent, the sleep signal is sent to the power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0087] It is understandable that the sleep function module of the sleep wake-up device will send the sleep signal to the power control module only after the preset wake-up time is sent, so that the power control module controls the power to be turned off and enter the sleep state based on the sleep signal.
[0088] In particular, considering that the wake-up function module can only perform subsequent steps after receiving the preset wake-up time, the communication between the sleep function module and the communication function module adopts a single-threaded mode.
[0089] In a feasible implementation manner, the remaining sleep time is judged, and if it is judged that the remaining sleep time is equal to a preset threshold, the following steps are included:
[0090] Updating the sleep times;
[0091] It should be noted that the sleep times are the times of executing the sleep instruction. After the sleep function module of the sleep wake-up device stops the countdown operation, it will update the sleep times obtained according to the preset configuration file.
[0092] Based on the updated number of sleep times, the configuration parameters of the preset configuration file are updated to obtain the updated preset configuration file.
[0093] It is understandable that after obtaining the updated sleep times, the sleep function module of the sleep-wake-up device will update the updated sleep times to the preset configuration file, so as to facilitate monitoring of the sleep-wake-up times information based on the preset configuration file.
[0094] In this embodiment, the sleep wake-up device triggers the overall sleep wake-up process through the sleep function module, reads the parameters in the configuration file through the sleep function module, and performs sleep wake-up based on the parameters. No external conditions are required to trigger, thereby improving the efficiency of sleep wake-up.
[0095] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the sleep wake-up method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0096] This application also provides a sleep wake-up system, please refer to Figure 6 , the sleep awakening system comprises:
[0097] The wake-up function module 10 is used to monitor the state of the power module. If the state of the power module is detected to be in the sleep state, a wake-up countdown is performed based on a preset wake-up time to obtain a remaining wake-up time; a wake-up signal is generated based on the remaining wake-up time, and the wake-up signal is sent to the power control module, so that the power control module controls the power supply to be turned on based on the wake-up signal, wherein the preset wake-up time is obtained by the sleep function module via the communication function module;
[0098] The sleep function module 20 is used to determine configuration parameters based on a preset configuration file, wherein the configuration parameters include a preset sleep time; based on the preset sleep time, a sleep countdown is performed to obtain a remaining sleep time; based on the remaining sleep time, a sleep signal is generated, and the sleep signal is sent to the power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0099] Optionally, the wake-up function module includes:
[0100] The status detection submodule is used to obtain the first power supply level of the power module in the sleep state; monitor the status of the power module, and if the power module is detected to be in the awake state, obtain the second power supply level of the power module in the awake state; and determine the power health status based on the first power supply level and the second power supply level.
[0101] The wake-up judgment submodule is used to judge the remaining wake-up time, and if it is judged that the remaining wake-up time is equal to a preset value, a wake-up signal is generated.
[0102] Optionally, the sleep function module includes:
[0103] The sleep judgment submodule is used to judge the remaining sleep time. If it is judged that the remaining sleep time is equal to a preset threshold, the preset wake-up time is sent to the communication function module, so that the communication function module sends the preset wake-up time to the wake-up function module; until the preset wake-up time is sent, the sleep signal is sent to the power control module, so that the power control module controls the power to be turned off based on the sleep signal.
[0104] The updating submodule is used to update the sleep times; based on the updated sleep times, update the configuration parameters of the preset configuration file to obtain the updated preset configuration file.
[0105] The sleep awakening system provided by the present application adopts the sleep awakening method in the above embodiment to solve the technical problem of sleep awakening. Compared with the prior art, the beneficial effects of the sleep awakening system provided by the present application are the same as the beneficial effects of the sleep awakening method provided by the above embodiment, and other technical features of the sleep awakening system are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0106] The present application provides a sleep wake-up device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the sleep wake-up method in the above-mentioned embodiment 1.
[0107] Reference below Figure 7, which shows a schematic diagram of the structure of a sleep wake-up device suitable for implementing the embodiment of the present application. The sleep wake-up device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, tablet computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The sleep-wake-up device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0108] like Figure 7 As shown, the sleep wake-up device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the sleep wake-up device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the sleep wake-up device to communicate with other devices wirelessly or by wire to exchange data. Although the sleep wake-up device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0109] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0110] The sleep awakening device provided by the present application adopts the sleep awakening method in the above embodiment to solve the technical problem of sleep awakening. Compared with the prior art, the beneficial effects of the sleep awakening device provided by the present application are the same as the beneficial effects of the sleep awakening method provided by the above embodiment, and the other technical features in the sleep awakening device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0111] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0112] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0113] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the sleep awakening method in the above-mentioned embodiment.
[0114] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0115] The computer-readable storage medium may be included in the sleep-wake-up device; or may exist independently without being assembled into the sleep-wake-up device.
[0116] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the sleep wake-up device, the sleep wake-up device: monitors the state of the power module, and if it is detected that the state of the power module is a sleep state, then based on the preset wake-up time, performs a wake-up countdown to obtain the remaining wake-up time, wherein the preset wake-up time is obtained by the sleep function module via the communication function module; based on the remaining wake-up time, generates a wake-up signal, and sends the wake-up signal to the power control module, so that the power control module controls the power to be turned on based on the wake-up signal.
[0117] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0119] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0120] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned sleep wake-up method, and can solve the technical problem of sleep wake-up. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the sleep wake-up method provided in the above-mentioned embodiment, and will not be repeated here.
[0121] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the sleep-wakeup method as described above are implemented.
[0122] The computer program product provided by the present application can solve the technical problem of sleep awakening. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the sleep awakening method provided by the above embodiment, which will not be repeated here.
[0123] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A sleep awakening method, characterized in that: Applied to the wake-up function module, the sleep wake-up method includes: Monitor the state of the power module. If the power module is detected to be in a sleep state, perform a wake-up countdown based on a preset wake-up time to obtain a remaining wake-up time, wherein the preset wake-up time is obtained by the sleep function module via the communication function module. A wake-up signal is generated based on the remaining wake-up time, and the wake-up signal is sent to a power control module, so that the power control module controls the power to be turned on based on the wake-up signal.
2. The sleep awakening method according to claim 1, characterized in that: The step of monitoring the state of the power module and, if it is detected that the state of the power module is in a sleep state, performing a wake-up countdown based on a preset wake-up time to obtain the remaining wake-up time also includes: Acquire the first power quantity of the power module in the sleep state; The step of generating a wake-up signal based on the remaining wake-up time, and sending the wake-up signal to the power control module so that the power control module controls the power on based on the wake-up signal includes: The state of the power module is monitored, and if it is monitored that the state of the power module is an awake state, the power quantity of the second power supply of the power module in the awake state is obtained; A power health status is determined based on the first power supply level and the second power supply level.
3. The sleep awakening method according to claim 1, characterized in that: The step of generating a wake-up signal based on the remaining wake-up time comprises: The remaining wake-up time is judged, and if it is judged that the remaining wake-up time is equal to a preset value, a wake-up signal is generated.
4. A sleep awakening method, characterized in that: Applied to the sleep function module, the sleep awakening method includes: Determining configuration parameters based on a preset configuration file, wherein the configuration parameters include a preset sleep time; Based on the preset sleep time, a sleep countdown is performed to obtain the remaining sleep time; A sleep signal is generated based on the remaining sleep time, and the sleep signal is sent to a power control module, so that the power control module controls the power to be turned off based on the sleep signal.
5. The sleep awakening method according to claim 4, characterized in that: The configuration parameters include a preset wake-up time and a sleep number, and the steps of generating a sleep signal based on the remaining sleep time and sending the sleep signal to the power control module so that the power control module controls the power supply to be turned off based on the sleep signal include: The remaining sleep time is judged, and if it is judged that the remaining sleep time is equal to a preset threshold, the preset wake-up time is sent to the communication function module, so that the communication function module sends the preset wake-up time to the wake-up function module; Until the preset wake-up time is sent, the sleep signal is sent to the power control module, so that the power control module controls the power to be turned off based on the sleep signal.
6. The sleep awakening method according to claim 5, characterized in that: The step of judging the remaining sleep time, if it is judged that the remaining sleep time is equal to a preset threshold, comprises: Updating the sleep times; Based on the updated number of sleep times, the configuration parameters of the preset configuration file are updated to obtain the updated preset configuration file.
7. A sleep awakening system, characterized in that: The system comprises: A wake-up function module is used to monitor the state of the power module. If the state of the power module is detected to be a sleep state, a wake-up countdown is performed based on a preset wake-up time to obtain a remaining wake-up time; a wake-up signal is generated based on the remaining wake-up time, and the wake-up signal is sent to the power control module, so that the power control module controls the power on based on the wake-up signal, wherein the preset wake-up time is obtained by the sleep function module via the communication function module; A sleep function module is used to determine configuration parameters based on a preset configuration file, wherein the configuration parameters include a preset sleep time; based on the preset sleep time, a sleep countdown is performed to obtain a remaining sleep time; based on the remaining sleep time, a sleep signal is generated, and the sleep signal is sent to a power control module, so that the power control module controls the power to be turned off based on the sleep signal.
8. A sleep awakening device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the sleep-awakening method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the sleep awakening method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the sleep-awakening method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Real-time clock awakening method, device and equipment based on embedded controller and medium
CN120803539A