An RTC-based wake-up method and device, an electronic device, and a storage medium

By setting a time list in the RTC device to store multiple wake-up times, the problem that the RTC device can only store one alarm time is solved, enabling scheduled wake-up at multiple time points and improving the availability of the RTC device.

CN119690201BActive Publication Date: 2026-06-09CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
Filing Date
2024-12-03
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing RTC devices can only store one alarm time. Setting multiple alarms can cause time overwrite issues, making it impossible to schedule wake-up at multiple times and reducing the availability of RTC devices.

Method used

By setting a time list in the file system to store multiple wake-up times to be sent, and sending the wake-up times to the RTC in chronological order, multiple time-scheduled wake-up can be achieved.

Benefits of technology

Without increasing hardware costs, the availability of RTC devices has been improved, enabling scheduled wake-up at multiple time points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690201B_ABST
    Figure CN119690201B_ABST
Patent Text Reader

Abstract

This application relates to the field of vehicle technology and discloses a wake-up method, device, electronic device, and storage medium based on an Real-Time Controller (RTC). The method includes: determining a target wake-up time to be sent from a preset time list; and sending the target wake-up time to be sent to the RTC, so that the RTC wakes up the target device at the target wake-up time. This application embodiment stores the wake-up times of multiple devices in a time list and sends each wake-up time to the RTC in chronological order. Without increasing hardware costs, this enables the RTC to perform scheduled wake-up at multiple time points, improving the availability of the RTC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and specifically to a wake-up method, device, electronic device, and storage medium based on RTC. Background Technology

[0002] The Real-Time Clock (RTC) is an important module in automobiles, primarily used to provide a precise time base, ensuring that various systems within the vehicle can accurately record and synchronize time. In addition, the RTC is also suitable for setting alarms to enable functions such as scheduled charging and scheduled upgrades.

[0003] However, when setting an alarm via RTC, the RTC chip can generally only store one alarm time. Multiple settings will result in time overwrite, meaning only the most recently set alarm will take effect. For example, if a user first sets a scheduled charging time to 8:30 and then sets a scheduled upgrade time to 9:30, the 8:30 alarm will be overwritten as 9:30, and the device will only be woken up at 9:30.

[0004] Therefore, in related technologies, multiple time-point scheduled wake-up cannot be achieved solely through an RTC chip, reducing the availability of RTC devices. Summary of the Invention

[0005] In view of the above problems, this application provides an RTC-based wake-up method, apparatus, electronic device and storage medium to solve the problem of low availability of RTC devices in the prior art.

[0006] According to one aspect of this application, a method for managing DVR data is provided, the method comprising: determining a target wake-up time to be sent from a preset time list; wherein the target wake-up time to be sent is a subsequent time adjacent to the current time, and the time list includes multiple wake-up times to be sent for waking up the corresponding devices;

[0007] The target wake-up time is sent to the RTC so that the RTC wakes up the target device at the target wake-up time.

[0008] In one optional approach, before determining the target wake-up time from the preset time list, the method further includes: matching the newly added wake-up time with the wake-up times to be sent in the time list; if the matching fails, updating the newly added wake-up time to the wake-up times to be sent in the time list; if the matching succeeds, and the preset device corresponding to the successfully matched wake-up time is different from the specified device corresponding to the newly added wake-up time, updating the newly added wake-up time and the specified device to the time list.

[0009] In one optional approach, updating the newly added wake-up time to the wake-up time to be sent in the time list includes: if there is a target preset device in the time list that is the same as the specified device corresponding to the newly added wake-up time, then the wake-up time to be sent corresponding to the target preset device is updated to the newly added wake-up time; if there is no target preset device in the time list, then the newly added wake-up time is updated to the wake-up time to be sent in the time list, and the specified device corresponding to the newly added wake-up time is used as the corresponding preset device.

[0010] In one optional approach, updating the newly added wake-up time to the wake-up time to be sent in the time list includes: determining, from the time list, the preceding wake-up time to be sent and the following wake-up time to be sent adjacent to the newly added wake-up time; pointing the back pointer of the preceding wake-up time to the newly added wake-up time, and pointing the back pointer of the newly added wake-up time to the following wake-up time to be sent, wherein each back pointer is an index between its own wake-up time to be sent and its corresponding adjacent following wake-up time to be sent.

[0011] In one alternative approach, determining the target wake-up time from a preset time list includes: selecting the wake-up time in the preset time list that is greater than the current time and has the smallest time difference with the current time as the target wake-up time.

[0012] In one optional approach, determining the target wake-up time from a preset time list includes: traversing each wake-up time in the preset time list in ascending time order; if the traversed wake-up time is greater than the current time, stopping the traversal and taking the currently traversed wake-up time as the target wake-up time.

[0013] In an optional embodiment, the method further includes: if a previously sent wake-up time exceeds the current time, then the previously sent wake-up time is deleted from the initial time list to obtain the preset time list; wherein the previously sent wake-up time is a previous time adjacent to the current time.

[0014] According to another aspect of this application, an RTC-based wake-up device is provided. The wake-up device includes: a determining module, which determines a target wake-up time to be sent from a preset time list; wherein the target wake-up time to be sent is a subsequent time adjacent to the current time, and the time list includes multiple wake-up times to be sent for waking up corresponding devices; and a sending module, which sends the target wake-up time to be sent to the RTC, so that the RTC wakes up the target device at the target wake-up time to be sent.

[0015] According to one aspect of this application, an electronic device is provided, comprising: a controller; and a memory for storing one or more programs, which, when executed by the controller, perform the management method described above.

[0016] According to one aspect of this application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the above-described management method.

[0017] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned management method.

[0018] This application embodiment determines the target wake-up time to be sent from a preset time list and sends it to the RTC to realize the device wake-up function. By setting a time list to save the wake-up times of multiple devices and sending each wake-up time to the RTC in chronological order, the RTC can realize scheduled wake-up at multiple time points without increasing hardware costs, thus improving the availability of the RTC.

[0019] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0021] Figure 1 This is a flowchart illustrating an RTC-based wake-up method according to an exemplary embodiment of this application.

[0022] Figure 2 This is a schematic diagram of a time list update method illustrated in an exemplary embodiment of this application.

[0023] Figure 3This is a schematic diagram illustrating the structure of a time list as exemplarily shown in this application.

[0024] Figure 4 This is a logical diagram illustrating an example of an update time list in this application.

[0025] Figure 5 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another RTC-based wake-up method.

[0026] Figure 6 This is a flowchart illustrating another RTC-based wake-up method according to an exemplary embodiment of this application.

[0027] Figure 7 This is a schematic diagram illustrating the application scenario of the wake-up method based on RTC in this application.

[0028] Figure 8 This is a schematic diagram of the structure of a wake-up device shown in an exemplary embodiment of this application.

[0029] Figure 9 This is a schematic diagram of the structure of a computer system for an electronic device, as illustrated in an exemplary embodiment of this application. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0032] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0033] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0034] In related technologies, when setting an alarm via an RTC chip, the RTC chip can generally only store one alarm time. Multiple settings will result in time overwrite issues, meaning only the most recently set alarm will take effect. Therefore, it is not possible to achieve scheduled wake-up for multiple time points using an RTC chip alone, reducing the availability of RTC devices.

[0035] Therefore, one aspect of this application provides a wake-up method based on RTC. Please refer to [link / reference] for details. Figure 1 , Figure 1 This is a flowchart illustrating an RTC-based wake-up method according to an exemplary embodiment of this application. The method includes at least steps S110 to S120, which are described in detail below:

[0036] S110: Determine the target wake-up time from the preset time list.

[0037] The target wake-up time to be sent is the next time after the current time. The time list includes multiple wake-up times to be sent for waking up the corresponding devices.

[0038] In this application, the time list is stored in the file system to record the pre-set wake-up time of each device. The wake-up time is used to wake up the corresponding device at the specified time, thereby realizing the reservation of device functions.

[0039] The format of the wake-up time to be sent is: date-hour-minute-second, which allows for fine-grained adjustment of the device wake-up time.

[0040] In one optional embodiment, there can be multiple target wake-up times to be sent, all with the same time data but different preset devices, allowing multiple wake-up requests from different devices to exist simultaneously. To reduce the storage overhead of the time list, only one time data can be retained and associated with multiple devices to be sent as a single wake-up time.

[0041] For example, if the current time is 14-8:30:00, and the time list contains the following wake-up times to be sent: [14-7:30:00], [14-8:20:00] and [14-9:00:00], then the target wake-up time to be sent is 14-8:20:00.

[0042] S120: Send the target wake-up time to the RTC so that the RTC wakes up the target device at the target wake-up time.

[0043] After determining the target wake-up time, the target wake-up time is sent to the RTC. When the current time reaches the target wake-up time, the RTC will issue a reminder, causing the target device corresponding to the target wake-up time to start running and complete the reservation function.

[0044] This embodiment saves the wake-up times of multiple devices by setting a time list and sends each wake-up time to the RTC in chronological order. Without increasing hardware costs, the RTC can realize scheduled wake-up at multiple time points, thus improving the availability of the RTC.

[0045] In another exemplary embodiment of this application, based on the above... Figure 1 The method shown illustrates how to manage a time list, with specific steps from S210 to S230, detailed below:

[0046] S210: Match the newly added wake-up time with the wake-up times to be sent in the time list.

[0047] In this application, each device can set a wake-up time at any time and save it to a time list. When a wake-up time is received from a device, if at least one wake-up time to be sent already exists in the time list, the newly added wake-up time is matched with the wake-up time to be sent in the time list to determine whether the newly added wake-up time meets the conditions for insertion into the time list.

[0048] S220: If the match fails, the new wake-up time will be updated to the wake-up time to be sent in the time list.

[0049] If the newly added wake-up time fails to match the wake-up time to be sent in the time list, it means that there is no wake-up time to be sent in the time list that matches the time corresponding to the newly added wake-up time. In this case, the newly added wake-up time will be updated to a wake-up time to be sent in the time list.

[0050] S230: If a match is successful, and the preset device corresponding to the successful wake-up time is different from the specified device corresponding to the newly added wake-up time, then update the newly added wake-up time and the specified device to the time list.

[0051] If the newly added wake-up time successfully matches the wake-up time to be sent in the time list, it means that there is a wake-up time to be sent in the time list with the same time as the newly added wake-up time. At this time, if the preset device corresponding to the successfully matched wake-up time to be sent is different from the specified device corresponding to the newly added wake-up time, it means that different devices have reserved the same time. Then, the newly added wake-up time and its corresponding specified device will be updated to the time list to ensure that the wake-up time set for each device can be successfully applied.

[0052] In some embodiments, the time list includes not only the wake-up time to be sent, but also the wake-up device corresponding to each wake-up time. For example, client A sets a wake-up time a [15-18:00:00], and the time list contains a wake-up time b [15-18:00:00], with the corresponding preset device being client B. This indicates that both client A and client B have scheduled a wake-up task at 18:00 on the 15th. In order to ensure that both can be woken up at the corresponding time, it is necessary to update the wake-up time a and client A to the time list.

[0053] In some embodiments, the time list only includes the wake-up time to be sent. The RTC is connected to a device or system capable of simultaneously waking up multiple devices, so that the same wake-up time to be sent is sent to the RTC, thereby enabling the simultaneous wake-up of multiple devices.

[0054] For example, after the vehicle's RTC receives the wake-up time, it sends a reminder to the vehicle's system-on-chip (SOC) when the wake-up time arrives. The SOC then controls one or more corresponding devices to start, thereby realizing the wake-up function.

[0055] This embodiment provides a method for managing time lists, which manages the wake-up times of multiple devices at the software service level, solving the problem of functional mutual exclusion when different devices have wake-up needs at the same time, while reducing hardware costs.

[0056] In another exemplary embodiment of this application, the judgment condition for updating the newly added wake-up time to the wake-up time to be sent in the time list when the matching fails is described in detail. The specific steps include S310 to S320, which are described in detail below:

[0057] S310: If there is a target preset device in the time list that is the same as the specified device corresponding to the newly added wake-up time, then update the wake-up time to be sent corresponding to the target preset device to the newly added wake-up time.

[0058] If a match fails, and the time list contains a target preset device that is the same as the specified device corresponding to the newly added wake-up time, it indicates that the same device has been set to schedule a wake-up at a different time. In practical applications, this corresponds to a scenario where the user resets the wake-up time of the device. Therefore, the wake-up time to be sent corresponding to the target preset device needs to be updated to the newly added wake-up time.

[0059] For example, client C sets a new wake-up time c[15-12:00:00]. There is no wake-up time to be sent that is the same as the new wake-up time c in the time list, but there is a wake-up time to be sent x[15-11:30:00] corresponding to client C. This means that the user wants to adjust the wake-up time of client C from 11:30 on the 15th to 12:00 on the 15th. Therefore, the wake-up time to be sent x[15-11:30:00] is updated to c[15-12:00:00].

[0060] S320: If the target preset device does not exist in the time list, the newly added wake-up time will be updated to the wake-up time to be sent in the time list, and the specified device corresponding to the newly added wake-up time will be used as the corresponding preset device.

[0061] If a match fails, and there is no target preset device in the time list that is the same as the specified device corresponding to the newly added wake-up time, indicating that the newly added wake-up time is the first time the specified device has set up a scheduled wake-up, then the newly added wake-up time will be added to the time list, and its corresponding specified device will be used as the corresponding preset device.

[0062] For example, if client D sets a new wake-up time d [15-14:00:00], and there is no time in the time list that is the same as the new wake-up time d and the corresponding preset device is the wake-up time to be sent by client D, then the new wake-up time d is added to the time list and client D is recorded as its preset device.

[0063] This embodiment provides a way to determine whether a newly added wake-up time meets the conditions for insertion into the time list, specifically including two dimensions: device and time. This is to exclude the same device from repeatedly setting the same wake-up time, ensuring the uniqueness of the wake-up time to be sent. It also provides a way to modify the wake-up time of the same device, making the wake-up function more flexible.

[0064] In another exemplary embodiment of this application, it is described in detail how to update the newly added wake-up time to the wake-up time to be sent in the time list. Please refer to [link to relevant documentation] for details. Figure 2 , Figure 2 This is a schematic flowchart illustrating a time list update method according to an exemplary embodiment of this application. It includes at least steps S410 to S420, which are described in detail below:

[0065] S410: From the time list, determine the preceding and following wake-up times that are adjacent to the newly added wake-up time.

[0066] In this application, the time list is a linked list in ascending order of time. The various wake-up times to be sent are not contiguous in memory and are indexed by pointers. This linked list can be either a doubly linked list or a singly linked list; this application does not impose any restrictions on this.

[0067] When inserting a new wake-up time into the time list, the new wake-up time is first compared with multiple wake-up times to be sent in the time list to determine the preceding wake-up time that is adjacent to the new wake-up time and smaller than the new wake-up time, and the following wake-up time that is adjacent to the new wake-up time and larger than the new wake-up time, thereby determining the insertion position of the new wake-up time.

[0068] For example, see Figure 3 As shown, Figure 3 This is an exemplary schematic diagram of a time list structure, wherein the time list is a singly linked list, T1 is the first wake-up time to be sent in the time list, indexed by the head pointer Head, Te is the last wake-up time to be sent in the time list, and the pointers thereafter are null, and the time order from T1 to Te is incremented sequentially.

[0069] Assume that after comparison, the pre-set wake-up time is determined to be Tn1 and the post-set wake-up time is determined to be Tn2.

[0070] S420: Set the back pointer of the previous wake-up time to the new wake-up time, and set the back pointer of the new wake-up time to the previous wake-up time.

[0071] Each subsequent pointer is an index between its corresponding wake-up time and its adjacent subsequent wake-up time.

[0072] Combination Figure 3 As shown, the time list is a singly linked list, and the next pointer is the index of the adjacent wake-up time to be sent.

[0073] For example, see Figure 4 As shown, Figure 4 This is a schematic diagram of an update time list as exemplified in this application. Assuming the new wake-up time is Tx, logically, the back pointer of Tn1 is pointed to Tx, and the back pointer of Tx is pointed to Tn2, so that the new wake-up time can be inserted between the previous wake-up time and the next wake-up time.

[0074] In actual execution, in order to ensure that the index of Tn2 is not lost, the back pointer of Tx is usually first set to point to Tn2, and then the link between Tn1 and Tn2 is broken, so that the back pointer of Tn2 points to Tx.

[0075] This embodiment provides a way to update a time list by storing the wake-up times to be sent in the form of a linked list. When inserting or deleting elements in the time list, there is no need to move other unrelated elements, which is more flexible and convenient. Furthermore, by using pointers as indices between elements, the elements do not need to be stored in contiguous storage space, thus improving the utilization of fragmented memory.

[0076] In another exemplary embodiment of this application, based on the above... Figure 1 The method shown illustrates how to determine the target wake-up time from the time list. Specifically, it includes selecting the wake-up time in the preset time list that is greater than the current time and has the smallest time difference with the current time as the target wake-up time.

[0077] Normally, the wake-up times stored in the time list are all times after the current time. However, if the time list data in memory is lost due to an abnormal system interruption, some wake-up times may expire after the time list is downloaded again from the file system. In this case, it is necessary to select the first unexpired target wake-up time from the time list and send it to the RTC to ensure the normal execution of subsequent wake-up tasks.

[0078] For example, assuming that the wake-up times to be sent in the time list are stored out of order, when determining the target wake-up time to be sent, the difference between the current time and each wake-up time to be sent can be calculated, and the wake-up time to be sent with the smallest negative difference can be taken as the target wake-up time to be sent.

[0079] In another exemplary embodiment of this application, another method for determining the wake-up time of a target is provided, please refer to [link to relevant documentation]. Figure 5 , Figure 5 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another RTC-based wake-up method. This method, in... Figure 1 The step S110 shown includes at least S510 to S520, which are described in detail below:

[0080] S510: Iterate through the preset time list in ascending order of time to send wake-up messages.

[0081] For example, assuming the time list is an ordered linked list as described above, the wake-up time to be sent is traversed sequentially starting from the first element pointed to by the head pointer Head.

[0082] S520: If the time to be sent for wake-up is greater than the current time, stop the traversal and take the current time to be sent for wake-up as the target time to be sent for wake-up.

[0083] For example, when the first wake-up time to be sent that is greater than the current time is encountered, it means that the wake-up time to be sent that is encountered is the first wake-up time to be sent that has not expired in the time list. Therefore, the traversal stops and the wake-up time to be sent that is encountered is taken as the target wake-up time to be sent.

[0084] This embodiment provides a method for determining the target wake-up time to be sent. By filtering multiple wake-up times to be sent, it can be ensured that the wake-up time sent to the RTC is a valid wake-up time, thereby ensuring the normal execution of the wake-up task.

[0085] In another exemplary embodiment of this application, based on the above... Figure 1 The method shown includes, before determining the target wake-up time from the preset time list, the following step: if a previously sent wake-up time exceeds the current time, then the previously sent wake-up time is deleted from the initial time list to obtain the preset time list. Here, the previously sent wake-up time is the preceding time adjacent to the current time.

[0086] In this application, the historically sent wake-up time is the target wake-up time to be sent to the RTC in the previous round. Normally, the wake-up time to be sent is sent to the RTC in advance. If the historically sent wake-up time has not expired, it indicates that the wake-up task corresponding to the historically sent wake-up time has not yet been completed. Therefore, it is necessary to poll the status of the historically sent wake-up times until they exceed the current time, at which point they are removed from the initial time list, resulting in an updated time list, which is the preset time list in this application. Based on the preset time list, the target wake-up time to be sent, as mentioned above, is determined.

[0087] If the previously sent wake-up time has not exceeded the current time, that is, the previously sent wake-up time has not expired, a new wake-up time cannot be sent to the RTC, in order to avoid the previously sent wake-up time being overwritten, which would cause the corresponding wake-up task to fail to complete.

[0088] In another alternative embodiment, if the previously sent wake-up time has not expired, the previously sent wake-up time can be resent to the RTC to avoid the problem of transmission failure and the RTC failing to receive the time data.

[0089] It can be inferred that in this application, after the target wake-up time mentioned above is sent to the RTC, if the target wake-up time expires, it is also necessary to delete it from the time list and determine the target wake-up time to be sent in the next round from the updated time list.

[0090] This embodiment provides a method for managing multiple wake-up times to be sent. By storing the wake-up times to be sent in a time list, and after sending a wake-up time to be sent to the RTC and confirming that the corresponding wake-up task has been completed, the time list is updated. This avoids storing invalid data, thereby reducing memory overhead and also reducing the computational overhead of subsequently determining the target wake-up time to be sent.

[0091] See Figure 6 , Figure 6 This is a flowchart illustrating another RTC-based wake-up method according to an exemplary embodiment of this application. Detailed explanation follows:

[0092] The process involves checking if a new wake-up time exists. If so, the new wake-up time is updated to the pending wake-up time in the time list (assuming the new wake-up time meets the conditions for insertion into the time list). The target pending wake-up time is then determined from the time list and sent to the RTC. If the target pending wake-up time exceeds the current time, it is removed from the time list. This process is repeated until the time list is empty, at which point the process ends.

[0093] In another exemplary embodiment of this application, the application scenarios of the above-mentioned RTC-based wake-up methods are illustrated by way of example. Please refer to the following for details. Figure 7 , Figure 7 This is a schematic diagram illustrating an application scenario of the wake-up method based on RTC in this application. It includes client 100 (including client 101, client 102, ..., client 10n), RTCManager 200, and RTC300. The three terminals can be connected wirelessly, and this application does not limit the connection method between them.

[0094] RTCManager200 can act as the execution entity, receiving the wake-up time set by client 100, and executing the RTC-based wake-up method shown in any of the above exemplary embodiments. The following is an exemplary description:

[0095] Client 100 sends its own set wake-up time to RTCManager200. RTCManager200 receives the wake-up times from each client and maintains a time list consisting of wake-up times to be sent. Based on the relationship between the current time and each wake-up time to be sent, RTCManager200 determines the target wake-up time to be sent and sends it to RTC300 so that RTC300 wakes up the target client at the target wake-up time.

[0096] Optionally, RTCManager200 is a software service that can be designed into the vehicle's SOC, thereby enabling the efficient resolution of the mutual exclusion problem of RTC wake-up requests from different clients by utilizing the SOC's computing power and resources without increasing hardware costs.

[0097] Another aspect of this application provides an RTC-based wake-up device, such as... Figure 8 As shown, Figure 8 This is a schematic diagram illustrating the structure of a wake-up device according to an exemplary embodiment of this application. The wake-up device 800 includes:

[0098] The determining module 810 determines the target wake-up time to be sent from a preset time list; wherein the target wake-up time to be sent is a subsequent time adjacent to the current time, and the time list includes multiple wake-up times to be sent for waking up the corresponding devices;

[0099] The sending module 820 sends the target wake-up time to the RTC so that the RTC wakes up the target device at the target wake-up time.

[0100] In an alternative embodiment, the wake-up device 800 further includes:

[0101] The management module matches newly added wake-up times with wake-up times to be sent in the time list;

[0102] If the first matching module fails to match, it updates the newly added wake-up time to the wake-up time to be sent in the time list.

[0103] If the second matching module finds a successful match, and the preset device corresponding to the successfully matched wake-up time is different from the specified device corresponding to the newly added wake-up time, then the newly added wake-up time and the specified device are updated in the time list.

[0104] In an alternative approach, the first matching module further includes:

[0105] The first update unit, if there is a target preset device in the time list that is the same as the specified device corresponding to the newly added wake-up time, updates the wake-up time to be sent corresponding to the target preset device to the newly added wake-up time;

[0106] The second update unit, if the target preset device does not exist in the time list, updates the new wake-up time to the wake-up time to be sent in the time list, and uses the specified device corresponding to the new wake-up time as the corresponding preset device.

[0107] In an alternative approach, the first matching module further includes:

[0108] The filtering unit determines, from the time list, the preceding and following wake-up times adjacent to the newly added wake-up time.

[0109] The indexing unit sets the back pointer of the previous wake-up time to the new wake-up time, and sets the back pointer of the new wake-up time to the next wake-up time, wherein each back pointer is an index between its own wake-up time and the corresponding adjacent next wake-up time.

[0110] In an alternative embodiment, the determining module 810 further includes:

[0111] The first determining unit selects the wake-up time to be sent from the preset time list that is greater than the current time and has the smallest time difference with the current time as the target wake-up time to be sent.

[0112] In an alternative embodiment, the determining module 810 further includes:

[0113] The traversal unit iterates through each wake-up time to be sent in the preset time list in ascending time order;

[0114] The second determining unit stops traversing if the traversed wake-up time to be sent is greater than the current time, and takes the currently traversed wake-up time to be sent as the target wake-up time to be sent.

[0115] In an alternative embodiment, the wake-up device 800 further includes:

[0116] The polling module removes the historical wake-up time from the initial time list if the historical wake-up time exceeds the current time, thus obtaining the preset time list; wherein the historical wake-up time is the previous time adjacent to the current time.

[0117] The wake-up device of this application determines the target wake-up time to be sent from a preset time list and sends it to the RTC to realize the device wake-up function. By setting a time list to save the wake-up times of multiple devices and sending each wake-up time to the RTC in chronological order, the RTC can realize scheduled wake-up at multiple time points without increasing hardware costs, thus improving the availability of the RTC.

[0118] It should be noted that the wake-up device provided in the above embodiments and the management method provided in the foregoing embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here.

[0119] Another aspect of this application provides an electronic device, including: a controller; and a memory for storing one or more programs, which, when executed by the controller, perform the management method described above.

[0120] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer system for an electronic device, illustrating an exemplary embodiment of this application. It shows a schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application.

[0121] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0122] like Figure 9 As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 902 or programs loaded from storage portion 908 into Random Access Memory (RAM) 903. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.

[0123] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.

[0124] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this application.

[0125] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0127] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0128] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned management method. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0129] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the management methods provided in the various embodiments described above.

[0130] According to one aspect of the embodiments of this application, a computer system is also provided, including a Central Processing Unit (CPU), which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from storage into random access memory (RAM), such as performing the methods described above. Various programs and data required for system operation are also stored in the RAM. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0131] The following components are connected to the I / O interface: input components including keyboards, mice, etc.; output components including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; storage components including hard drives; and communication components including network interface cards such as LAN (Local Area Network) cards and modems. The communication components perform communication processing via networks such as the Internet. Drives are also connected to the I / O interface as needed. Removable media, such as disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on the drive as needed so that computer programs read from them can be installed into the storage components as required.

[0132] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A wake-up method based on RTC, characterized in that, The method includes: From a preset time list, a target wake-up time to be sent is determined; wherein, the target wake-up time to be sent is a subsequent time adjacent to the current time, and the time list includes multiple wake-up times to be sent for waking up the corresponding devices; the time list is a linked list in ascending order of time. The target wake-up time is sent to the RTC so that the RTC wakes up the target device at the target wake-up time. The step of determining the target wake-up time from the preset time list includes: The preset time list of wake-up times is traversed in ascending order of time. If the time to be sent for wake-up is greater than the current time, then stop traversing and take the current time to be sent for wake-up as the target time to be sent for wake-up.

2. The method as described in claim 1, characterized in that, Before determining the target wake-up time from the preset time list, the process also includes: Match the newly added wake-up time with the wake-up times to be sent in the time list; If the match fails, the newly added wake-up time will be updated to the wake-up time to be sent in the time list; If a match is successful, and the preset device corresponding to the successful wake-up time is different from the specified device corresponding to the newly added wake-up time, then the newly added wake-up time and the specified device are updated in the time list.

3. The method as described in claim 2, characterized in that, The step of updating the newly added wake-up time to the wake-up time to be sent in the time list includes: If there is a target preset device in the time list that is the same as the specified device corresponding to the newly added wake-up time, then the wake-up time to be sent corresponding to the target preset device will be updated to the newly added wake-up time. If the target preset device does not exist in the time list, the newly added wake-up time is updated to the wake-up time to be sent in the time list, and the specified device corresponding to the newly added wake-up time is used as the corresponding preset device.

4. The method as described in claim 2, characterized in that, The step of updating the newly added wake-up time to the wake-up time to be sent in the time list includes: From the time list, determine the preceding and following wake-up times that are adjacent to the newly added wake-up time; The pointers of the preceding wake-up time to be sent are set to the newly added wake-up time, and the pointers of the newly added wake-up time to be sent are set to the following wake-up time to be sent. Each pointer is an index between its own wake-up time to be sent and the corresponding adjacent wake-up time to be sent.

5. The method as described in claim 1, characterized in that, The step of determining the target wake-up time from the preset time list includes: The wake-up time to be sent, which is greater than the current time and has the smallest time difference with the current time, is selected from the preset time list.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: if the historical wake-up time has been sent before the current time, then the historical wake-up time has been sent before the current time is deleted from the initial time list to obtain the preset time list; wherein the historical wake-up time has been sent before the current time is the previous time adjacent to the current time.

7. A wake-up device based on RTC, characterized in that, The device includes: The determination module determines the target wake-up time to be sent from a preset time list; wherein, the target wake-up time to be sent is a subsequent time adjacent to the current time, and the time list includes multiple wake-up times to be sent for waking up the corresponding devices; the time list is a linked list in ascending order of time. The sending module sends the target wake-up time to the RTC, so that the RTC wakes up the target device at the target wake-up time. The determining module is specifically used for: The preset time list of wake-up times is traversed in ascending order of time. If the time to be sent for wake-up is greater than the current time, then stop traversing and take the current time to be sent for wake-up as the target time to be sent for wake-up.

8. An electronic device, characterized in that, include: Controller; A memory for storing one or more programs, which, when executed by a controller, cause the controller to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the method of any one of claims 1 to 6.