Alarm clock implementation method, device, electronic device and storage medium
By optimizing alarm clock reminders by switching system status in electronic devices, the problem of high power consumption of traditional alarm clocks is solved, achieving long battery life and rich user experience.
Patent Information
- Application Number
- CN202110160561.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-05
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-02-05
AI Technical Summary
The alarm clock implementation of traditional electronic devices consumes a lot of power and cannot meet long-term battery life requirements.
By setting the alarm information in the electronic device, the operating status is switched from the first system with high power consumption to the second system with low power consumption until the alarm reminder time, and then switched back to the first system for reminder, combined with turning on the screen. Statistics of duration and alarm delay duration to optimize system status.
It effectively extends the battery life of electronic devices, meets the needs of long-term use, and provides a rich alarm clock interface and user-friendly interactive experience.
Smart Images

Figure CN114879833B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an alarm clock implementation method, device, electronic device and storage medium. Background Art
[0002] With the development of computer technology, electronic devices are widely used in people's daily lives, including but not limited to watches, bracelets, glasses and clothing. The advent of the electronic device era means the extension of human intelligence. Through these electronic devices, people can better perceive external and personal information, process information more efficiently with the assistance of computers, networks and even other people, and achieve more seamless communication. For example, by using electronic devices to realize the alarm function and receive reminder notifications from the alarm clock, people can better grasp time and improve their quality of life.
[0003] However, in traditional technology, the alarm clock implementation of electronic devices has the problem of power consumption and cannot meet the requirements of long-term battery life. Summary of the invention
[0004] The present application provides an alarm clock implementation method, device, electronic device and storage medium, which can meet the long-term battery life requirements.
[0005] An alarm clock implementation method is applied to an electronic device, the electronic device comprising a first processor and a second processor, the first processor being used to run a first system, the second processor being used to run a second system, the power consumption of the electronic device running the first system being higher than the power consumption of running the second system, the method comprising:
[0006] Acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system;
[0007] Switching the operating state of the electronic device from the first system to the second system;
[0008] When the system time reaches the reminder time corresponding to the alarm information, switching the operating state of the electronic device from the second system to the first system;
[0009] An alarm is provided when the first system is in operation.
[0010] In one embodiment, switching the operating state of the electronic device from the first system to the second system includes:
[0011] After obtaining the alarm information, counting the screen-on time of the electronic device;
[0012] When the screen-on time is greater than or equal to a preset screen-on time threshold, the electronic device is controlled to turn off the screen, and the operating state of the electronic device is switched from the first system to the second system.
[0013] In one embodiment, after the alarm is set in the running state of the first system, the method further includes:
[0014] When no user shutdown operation is detected, switching the operation state of the electronic device from the first system to the second system, and counting the alarm delay time;
[0015] When the alarm delay time is greater than or equal to a preset alarm delay time threshold, switching the operating state of the electronic device from the second system to the first system;
[0016] The alarm is again reminded while the first system is in operation.
[0017] In one embodiment, the method further comprises:
[0018] When the electronic device is in an operating state of the second system, receiving third-party data sent by a third-party electronic device;
[0019] Based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, and an alarm is set in the operating state of the first system.
[0020] In one embodiment, the third-party data is an alarm reminder instruction sent by the third-party electronic device to the electronic device when the third-party electronic device performs an alarm reminder; and switching the operating state of the electronic device from the second system to the first system based on the third-party data includes:
[0021] When the alarm reminder instruction is received, the operating state of the electronic device is directly switched from the second system to the first system.
[0022] In one embodiment, the third-party data is third-party alarm information sent by the third-party electronic device to the electronic device before the alarm reminder is issued; and switching the operating state of the electronic device from the second system to the first system based on the third-party data includes:
[0023] When the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system.
[0024] In one embodiment, the first processor is a central processing unit (CPU), the second processor is a microprocessor (MCU), the first system is an Android system, and the second system is a real-time operating system (RTOS).
[0025] An alarm clock implementation device is applied to an electronic device, the electronic device comprising a first processor and a second processor, the first processor is used to run a first system, the second processor is used to run a second system, the power consumption of the electronic device running the first system is higher than the power consumption of running the second system, the device comprising:
[0026] An acquisition module, used for acquiring alarm information; the alarm information is set when the electronic device is in the running state of the first system;
[0027] a switching module, configured to switch the operating state of the electronic device from the first system to the second system; and when the system time reaches the reminder time corresponding to the alarm information, switch the operating state of the electronic device from the second system to the first system;
[0028] The reminder module is used to set an alarm reminder when the first system is in operation.
[0029] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0030] Acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system;
[0031] Switching the operating state of the electronic device from the first system to the second system;
[0032] When the system time reaches the reminder time corresponding to the alarm information, switching the operating state of the electronic device from the second system to the first system;
[0033] An alarm is provided when the first system is in operation.
[0034] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0035] Acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system;
[0036] Switching the operating state of the electronic device from the first system to the second system;
[0037] When the system time reaches the reminder time corresponding to the alarm information, switching the operating state of the electronic device from the second system to the first system;
[0038] An alarm is provided when the first system is in operation.
[0039] The above-mentioned alarm clock implementation method, device, electronic device and storage medium are obtained by obtaining alarm clock information; the alarm clock information is set when the electronic device is in the running state of the first system; the running state of the electronic device is switched from the first system to the second system; the power consumption of the first system is higher than the power consumption of the second system; when the system time reaches the reminder time corresponding to the alarm clock information, the running state of the electronic device is switched from the second system to the first system; and the alarm clock reminder is performed in the running state of the first system. In this way, by setting the alarm clock information and performing the alarm clock reminder when the electronic device is in the running state of the first system, when the system time does not reach the reminder time corresponding to the alarm clock information, the running state of the electronic device is flexibly switched from the first system to the second system, thereby meeting the long-term battery life requirements of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An application scenario diagram of an alarm clock implementation method in an embodiment;
[0041] Figure 2 A schematic diagram of a flow chart of a method for implementing an alarm clock in one embodiment;
[0042] Figure 3 A schematic diagram of system switching of an electronic device in one embodiment;
[0043] Figure 4 A schematic flow chart of a method for implementing an alarm clock in another embodiment;
[0044] Figure 5 It is a structural block diagram of an alarm clock implementation device in one embodiment;
[0045] Figure 6 It is a structural block diagram of an alarm clock implementation device in another embodiment;
[0046] Figure 7 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first processor may be referred to as a second processor, a first system may be referred to as a second system, and similarly, a second processor may be referred to as a first processor, and a second system may be referred to as a first system. Both the first processor and the second processor are processors, but they are not the same processor, and both the first system and the second system are systems, but they are not the same system.
[0049] Figure 1 FIG. 1 is a schematic diagram of a hardware framework of an electronic device in an embodiment. Figure 1 As shown, the electronic device 102 includes a first processor 1021 and a second processor 1022. The application environment includes a terminal 102 and a server 104. The first processor 110 and the second processor 120 are both microprocessors, wherein the first processor 1021 is a core processor. The first processor 1021 and the second processor 1022 may be microprocessors configured accordingly according to actual applications, and the first processor 1021 and the second processor 1022 are not limited here. The first processor 1021 and the second processor 1022 may respectively run different operating systems, and the power consumption of the electronic device 102 running the first system 1021a is higher than the power consumption of running the second system 1022b. For example, the first processor 1021 may be a CPU (Central Process Unit) processor, and the corresponding first system 1021a may be an Android system; the second processor 1022 may be an MCU (Microcontroller Unit) processor; and the corresponding second system 1022b may be an RTOS (Real Time Operating System) system. Among them, the electronic device may be, but is not limited to, a smart phone, a personal computer, a wearable device, etc. Those skilled in the art will understand that Figure 1 The hardware framework diagram shown in the figure is merely a diagram related to the present application scheme and does not constitute a limitation on the electronic device of the present application scheme.
[0050] The electronic device 102 obtains the alarm information; the alarm information is set when the electronic device 102 is in the running state of the first system 1021a. The running state of the electronic device 102 is switched from the first system 1021a to the second system 1022b. When the system time reaches the reminder time corresponding to the alarm information, the electronic device 102 switches the running state of the electronic device 102 from the second system 1022b to the first system 1021a. The electronic device 102 performs an alarm reminder in the running state of the first system 1021a. When the system time does not reach the reminder time corresponding to the alarm information, the running state of the electronic device 102 is switched from the first system to the second system to meet the long-term battery life requirement of the electronic device.
[0051] In one embodiment, Figure 2 As shown, a method for realizing an alarm clock is provided, and the method is applied to Figure 1 Taking the electronic device 102 in the example as an example, the method includes the following steps:
[0052] Step 202, obtaining alarm information; the alarm information is set when the electronic device is in the running state of the first system.
[0053] Among them, the alarm information is information carrying the reminder time, and the alarm information may specifically include the alarm name and the reminder time. Optionally, the alarm information may also include at least one of the number of reminders, reminder type, ringtone information, alarm intensity, alarm background, etc. The number of reminders can be set as needed. The reminder type may specifically include at least one of a vibration reminder or a ringing reminder. The alarm background may be an image, an animation, or a text. The number of reminders, reminder types, ringtone information, alarm intensity, alarm background, etc. in different alarm information may be different or the same. Optionally, at least one of the corresponding number of reminders, reminder types, ringtone information, alarm intensity, and alarm background may be configured according to the alarm name. For example, if the alarm name is an emergency alarm, the number of reminders configured may be one, and the reminder type may be a ringing reminder; if the alarm name is a lazy alarm, the number of reminders configured may be two or more, and the reminder type may be a vibration reminder. If the alarm name is a gentle alarm, the ringtone corresponding to the ringtone information is a quiet type of music, and the alarm intensity may be a low volume / small vibration mode. The alarm name is Active Alarm, and the ringtone corresponding to the ringtone information is fast-paced music. The alarm intensity can be high volume / high vibration mode. The alarm name is Wake-up Alarm, and the configured alarm background can be a background image of the rising sun in the morning; the alarm name is Sleep Alarm, and the configured alarm background can be a night starry sky image, etc.
[0054] Specifically, an alarm clock application is installed in the electronic device. The electronic device can start the alarm clock application, and when the electronic device is in the running state of the first system, the electronic device can display the alarm clock interface. The user can set the alarm clock information according to the actual situation based on the alarm clock interface. The electronic device can obtain the alarm clock information set by the user based on the alarm clock interface.
[0055] Step 204: switch the operating state of the electronic device from the first system to the second system.
[0056] Specifically, after the electronic device obtains the alarm information, if no other touch screen operations of the user are detected, the electronic device can control the screen to turn off and wait for the system time to reach the reminder time corresponding to the alarm information. Before the system time reaches the reminder time corresponding to the alarm information, the electronic device can switch its operating state from the first system to the second system. When the operating state of the electronic device is switched from the first system to the second system, the first system can enter the sleep state, and at this time, the electronic device also enters the power saving mode.
[0057] In one embodiment, the processing performance of the first processor is better than the processing performance of the second processor. Thus, when the first processor runs the first system, the display effect of the alarm interface of the electronic device is better than the display effect of the alarm interface of the electronic device when the second processor runs the second system. By setting alarm information and making alarm reminders when the electronic device is in the running state of the first system, a richer alarm interface is provided.
[0058] In one embodiment, the first processor is a CPU (Central Process Unit), the second processor is an MCU (Microcontroller Unit), the first system is an Android system, and the second system is an RTOS (Real Time Operating System). The electronic device can switch the operating state of the electronic device from the Android system to the RTOS system.
[0059] Step 206: When the system time reaches the reminder time corresponding to the alarm information, the operation state of the electronic device is switched from the second system to the first system.
[0060] The system time is the time set inside the electronic device system.
[0061] Specifically, after the operation state of the electronic device is switched from the first system to the second system, the electronic device can count the system time through the second system. The electronic device can monitor the system time in real time, and when the system time reaches the reminder time corresponding to the alarm information, the electronic device can switch the operation state of the electronic device from the second system to the first system. It can be understood that the electronic device can wake up the first system in a dormant state.
[0062] Step 208: Setting an alarm while the first system is in operation.
[0063] Specifically, after the electronic device switches its operating state from the second system to the first system, the electronic device can display an alarm interface in the operating state of the first system and provide an alarm reminder on the alarm interface. The alarm reminder can be at least one of a vibration reminder and a ringing reminder.
[0064] In one embodiment, the first system may be an Android system, which has a rich UI (User Interface) interface library. The electronic device may customize a corresponding alarm animation scene based on the UI interface library of the Android system, and set an alarm and provide an alarm reminder in the customized alarm animation scene.
[0065] It should be noted that the first system in this application has a dormant mechanism, that is, there is a wake-up state and a dormant state. The first system switches to the second system, which means that the hybrid mode state is the state when the electronic device runs the first system and the second system at the same time. At the beginning, the first system and the second system are in operation at the same time, but the second system processes very little content, such as sending and receiving some simple commands, and the core tasks are all processed by the first system. If the first system enters the dormant state, the first system will no longer be able to process tasks, but the second system has been running. From the morphological point of view, it is considered that this is the first system switching to the second system. Among them, the first system and the second system can also communicate. The second system switches to the first system, and the second system is responsible for processing some simple tasks, but cannot process some urgent core tasks, such as alarm devices and alarm reminder tasks. At this time, it is necessary to wake up the first system and let the first system handle these core tasks. In this way, from the perspective of system morphology, the user can see the first system, and this scenario is the second system switching to the first system.
[0066] Furthermore, it can be understood that the mutual switching between the first system and the second system can be reflected at the UI level. In the hybrid mode, the user cannot see the interface of the electronic device. At this time, it is considered that the second system is dominating the electronic device, that is, at this time, the first system switches to the second system, and only the second system is processing the task. Similarly, if the user can see the normal UI interface and can operate the interface smoothly, at this time, the first system is dominating the electronic device, that is, the second system has switched to the first system.
[0067] In the above alarm clock implementation method, the alarm clock information is obtained; the alarm clock information is set when the electronic device is in the running state of the first system; the running state of the electronic device is switched from the first system to the second system; the power consumption of the first system is higher than the power consumption of the second system; when the system time reaches the reminder time corresponding to the alarm clock information, the running state of the electronic device is switched from the second system to the first system; and the alarm clock reminder is performed in the running state of the first system. In this way, by setting the alarm clock information and performing the alarm clock reminder when the electronic device is in the running state of the first system, when the system time does not reach the reminder time corresponding to the alarm clock information, the running state of the electronic device is flexibly switched from the first system to the second system, thereby meeting the long-term battery life requirements of the electronic device. In addition, the alarm clock reminder is performed in the running state of the first system, which also enriches the display content of the alarm clock, making the intelligent scene of the electronic device more friendly.
[0068] In one embodiment, step 204, which is the step of switching the operating state of the electronic device from the first system to the second system, specifically includes: after obtaining the alarm information, counting the screen-on time of the electronic device; when the screen-on time is greater than or equal to a preset screen-on time threshold, controlling the electronic device to turn off the screen, and switching the operating state of the electronic device from the first system to the second system.
[0069] Specifically, after the electronic device obtains the alarm information, the screen of the electronic device is still in the screen-on state for a short period of time, and the electronic device can count the screen-on time of the electronic device and compare the screen-on time with a preset screen-on time threshold. When the screen-on time is greater than or equal to the preset screen-on time threshold, the electronic device can control the electronic device to turn off the screen and switch the operating state of the electronic device from the first system to the second system.
[0070] In the above embodiment, by counting the screen-on time of the electronic device, and controlling the electronic device to turn off the screen when the screen-on time is greater than or equal to the preset screen-on time threshold, the screen-on time of the electronic device is shortened as much as possible while meeting the user's needs, so as to save the power consumption of the electronic device. By switching the operating state of the electronic device from the first system to the second system in a timely manner, the power consumption of the electronic device can be further saved.
[0071] In one embodiment, step 204, which is the step of switching the operating state of the electronic device from the first system to the second system, specifically includes: after obtaining the alarm information, when a lock screen operation or a screen off operation is detected, controlling the electronic device to turn off the screen, and switching the operating state of the electronic device from the first system to the second system.
[0072] Specifically, when the electronic device detects a screen lock operation or screen turn-off operation generated by a user triggering a power button, the electronic device is controlled to turn off the screen, and the operating state of the electronic device is switched from the first system to the second system.
[0073] In the above embodiment, by detecting a screen lock operation or a screen off operation, controlling the electronic device to turn off the screen, and switching the operating state of the electronic device from the first system to the second system, the power consumption of the electronic device can be saved.
[0074] In one embodiment, after step 208, that is, after the step of performing an alarm reminder in the running state of the first system, the alarm implementation method specifically further includes: when no user shutdown operation is detected, switching the running state of the electronic device from the first system to the second system, and counting the alarm delay duration; when the alarm delay duration is greater than or equal to a preset alarm delay duration threshold, switching the running state of the electronic device from the second system to the first system; and performing another alarm reminder in the running state of the first system.
[0075] Specifically, when the electronic device is giving an alarm reminder, the user can perform a user closing operation through the alarm interface of the electronic device to turn off the alarm. The electronic device can detect the user closing operation performed by the user through the alarm interface of the electronic device. In the case where the user closing operation is not detected, for example, the user is not aware of the ringing or vibration reminder of the alarm, and the user fails to turn off the alarm, at this time, the electronic device can switch the operating state of the electronic device from the first system to the second system, and count the alarm delay duration. The electronic device can compare the alarm delay duration with a preset alarm delay duration threshold. In the case where the alarm delay duration is greater than or equal to the preset alarm delay duration threshold, the electronic device can switch the operating state of the electronic device from the second system to the first system, and perform another alarm reminder in the operating state of the first system.
[0076] For example, the user previously set the alarm to 12 o'clock, the preset alarm delay threshold is 5 minutes, the user did not turn off the alarm at 12 o'clock, and the electronic device did not detect the user's turn-off operation at 12 o'clock. At this time, the electronic device can switch the operation state of the electronic device from the first system to the second system, and count the alarm delay time. When the alarm delay time is greater than or equal to 5 minutes, that is, at 12:05, the electronic device can switch the operation state of the electronic device from the second system to the first system, and issue another alarm reminder in the operation state of the first system.
[0077] In the above embodiment, by switching the operation state of the electronic device from the first system to the second system when no user shutdown operation is detected, the electronic device is prevented from being in the operation state of the first system for a long time, thereby further saving the power consumption of the electronic device. By switching the operation state of the electronic device from the second system to the first system when the alarm delay time is greater than or equal to the preset alarm delay time threshold, an excellent user interaction interface is provided. By re-alarming in the operation state of the first system, the user is prevented from missing the alarm reminder.
[0078] In one embodiment, the above-mentioned alarm implementation method specifically also includes: when the electronic device is in the operating state of the second system, receiving third-party data sent by a third-party electronic device; based on the third-party data, switching the operating state of the electronic device from the second system to the first system, and issuing an alarm reminder in the operating state of the first system.
[0079] Specifically, the electronic device can be connected to a third-party electronic device for communication. The third-party electronic device can be a smart phone, a tablet computer, a personal digital assistant, etc. The third-party electronic device can generate third-party data and send the third-party data to the electronic device in the running state of the second system. The third-party data can be data related to the alarm clock. The electronic device can receive the third-party data sent by the third-party electronic device in the running state of the second system. Based on the third-party data, the electronic device can switch the running state of the electronic device from the second system to the first system, and set an alarm reminder in the running state of the first system.
[0080] In one embodiment, the electronic device can be connected to the third-party electronic device for communication, which can be a wireless connection or a wired connection. The wireless connection can be a Bluetooth connection or a wifi connection. The wired connection can be a USB (Universal Serial Bus) connection.
[0081] In the above embodiment, by receiving third-party data sent by a third-party electronic device, the operating state of the electronic device is switched from the second system to the first system based on the third-party data, and an alarm reminder is given in the operating state of the first system, thereby achieving low-power linkage between the electronic device and the third-party electronic device, making the smart scene application of the electronic device more extensive.
[0082] In one embodiment, the third-party data is an alarm reminder instruction sent by the third-party electronic device to the electronic device when the alarm reminder is performed; based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, including: when the alarm reminder instruction is received, the operating state of the electronic device is directly switched from the second system to the first system.
[0083] Specifically, since the alarm reminder instruction is sent by a third-party electronic device to the electronic device when the alarm reminder is made, when the electronic device receives the alarm reminder instruction, the electronic device also needs to immediately make an alarm reminder. At this time, the electronic device can directly switch the operating state of the electronic device from the second system to the first system, so that the alarm reminder can be made when the electronic device calls up the alarm interface, providing an interface with strong interactive performance, enriching the amount of information in the interface interaction, and providing a friendly user interface interaction.
[0084] In one embodiment, the third-party electronic device may specifically be a mobile phone, and the electronic device may specifically be a smart watch. The smart watch may be connected to the mobile phone for communication, that is, to realize low-power linkage between the smart watch and the mobile phone. When the mobile phone is performing an alarm reminder, it may generate an alarm reminder instruction and send the alarm reminder instruction to the smart watch. The smart watch may receive the alarm reminder instruction sent by the mobile phone, and when the smart watch receives the alarm reminder instruction, it may directly switch the operation state of the smart watch from the second system to the first system. Through the linkage between the mobile phone and the smart watch, the mobile phone and the smart watch may simultaneously perform an alarm reminder, so that when the user's mobile phone is not around, or the user does not hear the alarm reminder of the mobile phone, the user's smart watch may also perform an alarm reminder to prevent the user from missing the alarm.
[0085] In the above embodiment, by directly switching the operating state of the electronic device from the second system to the first system when receiving an alarm reminder instruction, an interface with strong interactive performance is provided, and the amount of information in the interface interaction is enriched.
[0086] In one embodiment, the third-party data is third-party alarm information sent by the third-party electronic device to the electronic device before the alarm reminder; based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, including: when the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system.
[0087] Specifically, since the third-party alarm information is sent to the electronic device by the third-party electronic device before the alarm reminder is made, when the electronic device receives the third-party alarm information, the system time of the alarm has not yet reached the reminder time corresponding to the third-party alarm information. At this time, the electronic device can store the received third-party alarm information and monitor the system time of the alarm in real time. When the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system, so that the alarm reminder is made when the alarm interface of the electronic device is called up, providing excellent user interface interaction.
[0088] In the above embodiment, when the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system. In this way, while ensuring smooth alarm reminders, an excellent user interaction experience is also provided.
[0089] In one embodiment, Figure 3 As shown, the electronic device has three working modes, high-performance mode, balanced mode and RS mode. The seamless switching of the Android system and the RTOS system of the present application, i.e., dual-core switching, is implemented in the balanced mode of the electronic device. The electronic device can wake up the Android system when obtaining alarm information and making alarm reminders, and switch from the Android system to the RTOS system before the system time reaches the reminder time corresponding to the alarm information. Through the flexible switching of the Android system and the RTOS system, the electronic device can simultaneously meet the long-term battery life requirements and excellent interface interaction requirements, thereby making the intelligent scene of the electronic device more friendly.
[0090] In one embodiment, Figure 4 As shown, when the electronic device is started, the electronic device can obtain the alarm information in the running state of the Android system and wait to switch to the running state of the RTOS system. The electronic device can wait for the alarm reminder in the running state of the RTOS system. When the system time reaches the reminder time corresponding to the alarm information, the electronic device can wake up the Android system, and pop up the alarm page in the running state of the Android system, and ring or vibrate to remind.
[0091] It should be understood that although Figure 2 The steps are shown in order, but they are not necessarily executed in order. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0092] In one embodiment, Figure 5 As shown, an alarm clock implementation device 500 is provided, comprising: an acquisition module 501, a switching module 502 and a reminder module 503, wherein:
[0093] The acquisition module 501 is used to acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system.
[0094] The switching module 502 is used to switch the operation state of the electronic device from the first system to the second system; when the system time reaches the reminder time corresponding to the alarm information, the operation state of the electronic device is switched from the second system to the first system.
[0095] The reminder module 503 is used to set an alarm reminder when the first system is in operation.
[0096] In one embodiment, the switching module 502 is also used to count the screen-on time of the electronic device after obtaining the alarm information; when the screen-on time is greater than or equal to a preset screen-on time threshold, control the electronic device to turn off the screen and switch the operating state of the electronic device from the first system to the second system.
[0097] In one embodiment, the switching module 502 is also used to switch the operating state of the electronic device from the first system to the second system and count the alarm delay duration when no user shutdown operation is detected; when the alarm delay duration is greater than or equal to a preset alarm delay duration threshold, switch the operating state of the electronic device from the second system to the first system; and set the alarm again in the operating state of the first system.
[0098] In one embodiment, the switching module 502 is also used to control the electronic device to turn off the screen after the alarm information is acquired and to switch the operating state of the electronic device from the first system to the second system when a screen lock operation or a screen turn off operation is detected.
[0099] In one embodiment, the first processor is a central processing unit (CPU), the second processor is a microprocessor (MCU), the first system is an Android system, and the second system is a real-time operating system (RTOS).
[0100] refer to Figure 6 In one embodiment, the alarm clock implementation device 500 further includes: a receiving module 504, wherein:
[0101] The receiving module 504 is used to receive third-party data sent by a third-party electronic device when the electronic device is in the operating state of the second system; based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, and an alarm is set in the operating state of the first system.
[0102] In one embodiment, the third-party data is an alarm reminder instruction sent by the third-party electronic device to the electronic device when the alarm reminder is set; the receiving module 504 is also used to directly switch the operating state of the electronic device from the second system to the first system when the alarm reminder instruction is received.
[0103] In one embodiment, the third-party data is third-party alarm information sent by the third-party electronic device to the electronic device before the alarm reminder; the receiving module 504 is also used to switch the operating state of the electronic device from the second system to the first system when the system time reaches the reminder time corresponding to the third-party alarm information.
[0104] The above-mentioned alarm clock realization device obtains alarm clock information; the alarm clock information is set when the electronic device is in the running state of the first system; the running state of the electronic device is switched from the first system to the second system; the power consumption of the first system is higher than the power consumption of the second system; when the system time reaches the reminder time corresponding to the alarm clock information, the running state of the electronic device is switched from the second system to the first system; and the alarm clock reminder is performed in the running state of the first system. In this way, by setting the alarm clock information and performing the alarm clock reminder when the electronic device is in the running state of the first system, when the system time does not reach the reminder time corresponding to the alarm clock information, the running state of the electronic device is flexibly switched from the first system to the second system, thereby meeting the long-term battery life requirement of the electronic device.
[0105] For the specific definition of the alarm clock implementation device, please refer to the definition of the alarm clock implementation method above, which will not be repeated here. Each module in the above-mentioned alarm clock implementation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0106] In one embodiment, an electronic device is provided, whose internal structure diagram can be as follows: Figure 7As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an alarm clock implementation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0107] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0109] Acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system;
[0110] Switching the operation state of the electronic device from the first system to the second system;
[0111] When the system time reaches the reminder time corresponding to the alarm information, switching the operation state of the electronic device from the second system to the first system;
[0112] An alarm is triggered when the first system is in operation.
[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0114] After obtaining the alarm information, count the screen-on time of the electronic device;
[0115] When the screen-on time is greater than or equal to a preset screen-on time threshold, the electronic device is controlled to turn off the screen, and the operating state of the electronic device is switched from the first system to the second system.
[0116] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0117] When no user shutdown operation is detected, the operation state of the electronic device is switched from the first system to the second system, and the alarm delay time is counted;
[0118] When the alarm delay time is greater than or equal to a preset alarm delay time threshold, switching the operation state of the electronic device from the second system to the first system;
[0119] The alarm is reminded again when the first system is in operation.
[0120] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0121] When the electronic device is in an operating state of the second system, receiving third-party data sent by a third-party electronic device;
[0122] Based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, and an alarm is set in the operating state of the first system.
[0123] In one embodiment, the third-party data is an alarm reminder instruction sent by the third-party electronic device to the electronic device when the third-party electronic device performs an alarm reminder; when the processor executes the computer program, the following steps are also implemented:
[0124] When an alarm reminder instruction is received, the operating state of the electronic device is directly switched from the second system to the first system.
[0125] In one embodiment, the third-party data is third-party alarm information sent by the third-party electronic device to the electronic device before the alarm reminder is issued; when the processor executes the computer program, the following steps are also implemented:
[0126] When the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system.
[0127] In one embodiment, the first processor is a central processing unit (CPU), the second processor is a microprocessor (MCU), the first system is an Android system, and the second system is a real-time operating system (RTOS).
[0128] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0129] Acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system;
[0130] Switching the operation state of the electronic device from the first system to the second system;
[0131] When the system time reaches the reminder time corresponding to the alarm information, switching the operation state of the electronic device from the second system to the first system;
[0132] An alarm is triggered when the first system is in operation.
[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0134] After obtaining the alarm information, count the screen-on time of the electronic device;
[0135] When the screen-on time is greater than or equal to a preset screen-on time threshold, the electronic device is controlled to turn off the screen, and the operating state of the electronic device is switched from the first system to the second system.
[0136] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0137] When no user shutdown operation is detected, the operation state of the electronic device is switched from the first system to the second system, and the alarm delay time is counted;
[0138] When the alarm delay time is greater than or equal to a preset alarm delay time threshold, switching the operation state of the electronic device from the second system to the first system;
[0139] The alarm is reminded again when the first system is in operation.
[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0141] When the electronic device is in an operating state of the second system, receiving third-party data sent by a third-party electronic device;
[0142] Based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, and an alarm is set in the operating state of the first system.
[0143] In one embodiment, the third-party data is an alarm reminder instruction sent by the third-party electronic device to the electronic device when the alarm reminder is performed; when the computer program is executed by the processor, the following steps are also implemented:
[0144] When an alarm reminder instruction is received, the operating state of the electronic device is directly switched from the second system to the first system.
[0145] In one embodiment, the third-party data is third-party alarm information sent by the third-party electronic device to the electronic device before the alarm reminder is issued; when the computer program is executed by the processor, the following steps are also implemented:
[0146] When the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system.
[0147] In one embodiment, the first processor is a central processing unit (CPU), the second processor is a microprocessor (MCU), the first system is an Android system, and the second system is a real-time operating system (RTOS).
[0148] A computer program product comprising instructions, when the computer program product is run on a computer, causes the computer to execute an alarm clock implementation method.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0150] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for realizing an alarm clock, characterized in that: Applied to an electronic device, the electronic device comprises a first processor and a second processor, the first processor is used to run a first system, the second processor is used to run a second system, the power consumption of the electronic device running the first system is higher than the power consumption of running the second system, and the processing performance of the first processor is better than the processing performance of the second processor, the method comprises: Acquire alarm information; the alarm information is set when the electronic device is in the running state of the first system; Switching the operation state of the electronic device from the first system to the second system, so that the first system enters a dormant state; When the system time reaches the reminder time corresponding to the alarm information, switching the operating state of the electronic device from the second system to the first system; An alarm is provided when the first system is in operation.
2. The method according to claim 1, characterized in that: The switching the operating state of the electronic device from the first system to the second system includes: After obtaining the alarm information, counting the screen-on time of the electronic device; When the screen-on time is greater than or equal to a preset screen-on time threshold, the electronic device is controlled to turn off the screen, and the operating state of the electronic device is switched from the first system to the second system.
3. The method according to claim 1, characterized in that After the alarm is set in the running state of the first system, the method further includes: When no user shutdown operation is detected, switching the operation state of the electronic device from the first system to the second system, and counting the alarm delay time; When the alarm delay time is greater than or equal to a preset alarm delay time threshold, switching the operating state of the electronic device from the second system to the first system; The alarm is again reminded while the first system is in operation.
4. The method according to claim 1, characterized in that: The method further comprises: When the electronic device is in an operating state of the second system, receiving third-party data sent by a third-party electronic device; Based on the third-party data, the operating state of the electronic device is switched from the second system to the first system, and an alarm is set in the operating state of the first system.
5. The method according to claim 4, characterized in that The third-party data is an alarm reminder instruction sent by the third-party electronic device to the electronic device when the third-party electronic device performs an alarm reminder; and switching the operation state of the electronic device from the second system to the first system based on the third-party data includes: When the alarm reminder instruction is received, the operating state of the electronic device is directly switched from the second system to the first system.
6. The method according to claim 4, characterized in that The third-party data is third-party alarm information sent by the third-party electronic device to the electronic device before the alarm is triggered; and switching the operation state of the electronic device from the second system to the first system based on the third-party data includes: When the system time reaches the reminder time corresponding to the third-party alarm information, the operating state of the electronic device is switched from the second system to the first system.
7. The method according to any one of claims 1 to 6, characterized in that The first processor is a central processing unit (CPU), the second processor is a microprocessor (MCU), the first system is an Android system, and the second system is a real-time operating system (RTOS).
8. The method according to claim 1, characterized in that: The switching the operating state of the electronic device from the first system to the second system includes: After the alarm information is acquired, when a screen lock operation or a screen turn-off operation is detected, the electronic device is controlled to turn off the screen, and the operating state of the electronic device is switched from the first system to the second system.
9. The method according to claim 1, characterized in that: The switching from the first system to the second system is implemented in a hybrid mode state, and the hybrid mode state is a state when the electronic device runs the first system and the second system at the same time.
10. An alarm clock implementation device, characterized in that: Applied to an electronic device, the electronic device comprises a first processor and a second processor, the first processor is used to run a first system, the second processor is used to run a second system, the power consumption of the electronic device running the first system is higher than the power consumption of running the second system, and the processing performance of the first processor is better than the processing performance of the second processor, the device comprises: An acquisition module, used for acquiring alarm information; the alarm information is set when the electronic device is in the running state of the first system; a switching module, configured to switch the operation state of the electronic device from the first system to the second system, and the first system enters a dormant state; when the system time reaches the reminder time corresponding to the alarm information, the operation state of the electronic device is switched from the second system to the first system; The reminder module is used to set an alarm reminder when the first system is in operation.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Smart wearable device control method and smart wearable device
CN106802551A
Application method for dual operation systems, storage device and intelligent terminal
CN107491160A
