CN115080200A - Time calibration method and device, wearable device and storage medium - Google Patents

Time calibration method and device, wearable device and storage medium Download PDF

Info

Publication number
CN115080200A
CN115080200A CN202110729096.5A CN202110729096A CN115080200A CN 115080200 A CN115080200 A CN 115080200A CN 202110729096 A CN202110729096 A CN 202110729096A CN 115080200 A CN115080200 A CN 115080200A
Authority
CN
China
Prior art keywords
time
processor
wearable device
operating
time corresponding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110729096.5A
Other languages
Chinese (zh)
Inventor
张冠群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115080200A publication Critical patent/CN115080200A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Electric Clocks (AREA)

Abstract

The application discloses a time calibration method, a device, a wearable device and a storage medium, wherein the time calibration method is applied to the wearable device, the wearable device comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the method comprises the following steps: detecting a system switch event when an operating system of the wearable device is the second system; and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor. The method can calibrate the time of the dormant system according to the time corresponding to the running processor, and improves the time accuracy of the wearable device.

Description

Time calibration method and device, wearable device and storage medium
Technical Field
The present application relates to the field of wearable device technologies, and in particular, to a time calibration method and apparatus, a wearable device, and a storage medium.
Background
With rapid progress of the technology level and the living standard, wearable devices (such as smart watches, smart bracelets, and the like) are widely used and have more and more functions, and the wearable devices become one of the necessary devices in daily life of people. At present, the time on the wearable device can be used for the user to know time information and also can be used for realizing functions such as sleep monitoring and motion monitoring, and therefore the time on the wearable device is particularly important. The time of the wearable device is traditionally calibrated after the wearable device is connected with an external device, but the accuracy of the method is to be improved.
Disclosure of Invention
In view of the foregoing problems, the present application provides a time calibration method, an apparatus, a wearable device, and a storage medium.
In a first aspect, an embodiment of the present application provides a time calibration method, which is applied to a wearable device, where the wearable device includes a first processor and a second processor, where the first processor is configured to operate a first system, and the second processor is configured to operate a second system, and the method includes: detecting a system switch event when an operating system of the wearable device is the second system; and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
In a second aspect, an embodiment of the present application provides a time calibration apparatus, which is applied to a wearable device, where the wearable device includes a first processor and a second processor, where the first processor is configured to operate a first system, and the second processor is configured to operate a second system, and the apparatus includes: the wearable device comprises an event detection module and a calibration module, wherein the event detection module is used for detecting a system switching event when an operating system of the wearable device is the second system; the calibration module is used for responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
In a third aspect, an embodiment of the present application provides a wearable device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the time calibration method provided in the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the time calibration method provided in the first aspect.
According to the scheme, the wearable device comprises a first processor and a second processor, wherein the first processor is used for operating a first system, and the second processor is used for operating a second system. When the operating system of the wearable device is the second system, the system switching event is detected, the system switching event is responded, the operating system of the wearable device is switched from the second system to the first system, and the system time of the first system is calibrated according to the time corresponding to the second processor, so that the time of the dormant system is calibrated according to the time corresponding to the running processor when the system is switched, and the time accuracy of the wearable device is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 shows a flow chart of a method of time calibration according to an embodiment of the application.
FIG. 2 shows a flow diagram of a method of time calibration according to another embodiment of the present application.
Fig. 3 is a timing diagram illustrating a time calibration method according to another embodiment of the present application.
FIG. 4 shows a flow chart of a method of time calibration according to yet another embodiment of the present application.
FIG. 5 shows a flow chart of a method of time calibration according to yet another embodiment of the present application.
FIG. 6 shows a flow chart of a method of time calibration according to yet another embodiment of the present application.
FIG. 7 shows a block diagram of a time alignment apparatus according to an embodiment of the present application.
Fig. 8 is a block diagram of a wearable device for performing a time calibration method according to an embodiment of the present application.
Fig. 9 is a memory unit for storing or carrying program codes for implementing the time calibration method according to the embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
At present, wearable devices (such as smart watches, smart bracelets and the like) are popular in the market, and the smart watches, the smart bracelets and the like realize multifunctional wearable devices through a built-in intelligent system, a smart phone system and a network, and have the functions of receiving and calling, sending and receiving short messages, photographing and the like. Because the functions are complete and the carrying is very easy, the multifunctional portable electric toothbrush is widely favored by consumers.
Wearable equipment not only can be used for the user to carry out daily time and look over, can also be used to functions such as motion monitoring, sleep monitoring, health monitoring, and these functions need rely on time information. Therefore, for wearable devices, its time information will be especially important. At present, for the calibration of the time of the wearable device, the smart watch is mainly connected with the external device, then the external device synchronizes the time of the smart watch with the wearable device, and the wearable device performs time calibration according to the time information of the external device. For example, after the smart watch and the mobile phone are connected in a pairing manner, the mobile phone can transmit time to the smart watch through a bluetooth channel established between the smart watch and the mobile phone, and the time is transmitted to the smart watch at variable time in the connection process to be corrected. However, in such a manner, the wearable device relies on an external device to calibrate the time, which is prone to cause the problem of inaccurate time, and thus affects the normal use of the wearable device.
In view of the above problems, the inventor provides a time calibration method, a time calibration device, a wearable device, and a storage medium provided in the embodiments of the present application, which can calibrate the time of a sleeping system according to the time of an operating system when the system is switched, and improve the time accuracy of the wearable device. . The specific time calibration method is described in detail in the following examples.
The following description is directed to an application environment applicable to the time calibration method provided in the embodiments of the present application.
In this embodiment, the operating system of the wearable device may include a first system and a second system. Operating systems rely on processors to perform operations. The first system and the second system are respectively operated in different processors. For example, a wearable device includes a first processor to run a first system and a second processor to run a second system.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a time calibration method according to an embodiment of the present application. In a specific embodiment, the time calibration method is applied to the wearable device. The specific process of this embodiment will be described below by taking the wearable device as an example, and it is understood that the wearable device applied in this embodiment may be a bracelet, a watch, and the like, which is not limited herein. As will be described in detail with respect to the flow shown in fig. 1, the time calibration method may specifically include the following steps:
step S110: detecting a system switch event when an operating system of the wearable device is the second system.
In this embodiment of the application, since the operating system of the wearable device includes the first system and the second system, the operating system currently used by the wearable device may be the first system or the second system, which is not limited herein. When the operating system currently used by the wearable device is the first system, the second system may be in a sleep state, and when the operating system currently used by the wearable device is the second system, the first system may be in the sleep state or in an off state, which is not limited herein.
In some embodiments, the first system may be a primary system of the wearable device and the second system is a secondary system of the wearable device; alternatively, the first system may be a secondary system of the wearable device, and the second system may be a primary system of the wearable device. The main system can be an intelligent system, the sub-system can be a non-intelligent system, and the non-intelligent system can be used for displaying simple interfaces such as a dial plate, so that the power consumption can be smaller in the state of operating the sub-system. Optionally, one of the first processor and the second processor may be a Central Processing Unit (CPU), the other processor may be a Micro Control Unit (MCU), the main system may be run by the CPU, and the sub-system may be run by the MCU.
In this embodiment, it may be detected whether an operating system currently used by the wearable device is the first system or the second system, where when it is detected that the operating system currently used by the wearable device is the second system, it may be detected whether a system handover event occurs, that is, an event of switching to the first system, so that when the system handover occurs, a time of the second system is calibrated. It can be understood that, when the second system is running, the first system is in a sleep or off state, so that the running of the Real Time Clock (RTC) of the processor running the first system is affected, which causes a problem in the system Time of the first system, so that the Time of the second system can be calibrated when a system switch occurs.
In some embodiments, the system switch event may be a user-initiated trigger, for example, a user inputs a system switch command into the wearable device; the wearable device may also be triggered and generated when corresponding adjustment is met, for example, the second system is a secondary system, and the second system operates under a breath screen condition, and then a system switching event may be triggered and generated when the screen is on, so as to switch to the primary system, and for example, the second system is the primary system, and the first system operates under the breath screen condition, and then a system switching event may be triggered and generated when the screen is on, so as to switch to the first system. Of course, the specific scenario and manner of generating the system switching event may not be limited.
Step S120: and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
In this embodiment of the application, when a system switching event is detected, the operating system of the wearable device may be switched from the second system to the first system in response to the system switching event, that is, the wearable device operates the first system. When the system is switched, because the first system does not operate before, the system time determined according to the RTC time of the first processor after the first system operates may be wrong, the second system is in an operating state, the RTC of the second processor corresponding to the second system keeps operating all the time, and the RTC corresponding to the second processor is relatively accurate, the system time of the first system can be calibrated according to the time corresponding to the second processor.
In some embodiments, the time corresponding to the second processor may include: RTC time of the second processor, or system time of the second system. It is understood that when the processor runs the system, the system time is synchronized with the RTC time of the processor, and then when the second system is in the running state, the system time of the second system is synchronized with the RTC time of the second processor, so that the system time of the first system can be calibrated according to any one of the system time of the second system and the RTC time of the second processor. Of course, after switching to operate the first system and calibrating the system time of the first system according to the time corresponding to the second processor, the RTC time of the first system is also synchronized with the calibrated system time of the first system.
In some embodiments, the second processor may be an MCU, the first processor may be a CPU, the second system may be a system running a simple program (a non-intelligent system), and the first system may be a system running a complex program (an intelligent system). Generally, the timing accuracy of the RTC of the MCU is higher than that of the RTC of the CPU, so that the corresponding time of the second processor is more accurate under the condition of operating the second system; when the second system is switched to the first system, due to the fact that the functions of time display, motion monitoring, sleep monitoring and the like need to be carried out according to the system time when the first system is operated, at the moment, the system time of the first system can be updated according to the time corresponding to the second processor, and therefore the time accuracy and the normal operation state of the wearable device are guaranteed.
In some embodiments, when switching from the second system to the first system, the second processor may send its corresponding time to the second processor, so that the first processor may calibrate the system time of the first system according to the received time corresponding to the second processor.
According to the time calibration method provided by the embodiment of the application, when the operating system of the wearable device is the second system, the system switching event is detected, the system switching event is responded, the operating system of the wearable device is switched from the second system to the first system, and the system time of the first system is calibrated according to the time corresponding to the second processor, so that the time of the dormant system is calibrated according to the time corresponding to the running processor when the system is switched, and the time accuracy of the wearable device is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a time calibration method according to another embodiment of the present application. The time calibration method is applied to the wearable device, and will be described in detail with respect to the flow shown in fig. 2, and the time calibration method may specifically include the following steps:
step S210: detecting a system switch event when an operating system of the wearable device is the second system.
In the embodiment of the present application, step S210 may refer to the contents of the foregoing embodiments, which are not described herein again.
Step S220: and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and adding the time corresponding to the second processor to a target message.
In this embodiment, when the wearable device runs the second system, and when the system is detected, and the operating system of the wearable device is switched from the second system to the first system in response to a system switching event, the wearable device may add the system time of the second system to the target message. The target message is a communication message which needs to be sent to the first system by the second system, so that the first system can calibrate the system time according to the time carried in the target message.
In some embodiments, the target message may be a system handover message when performing a system handover, the system handover message may be used to instruct the first system to operate and complete the system handover, and the first system may calibrate the system time according to the time carried in the system handover message received during the system handover. Of course, the target message may also be other messages communicated between the second system and the first system, for example, the target message may be power consumption statistics of the second system, an operation time length of the second system, content information to be displayed when the first system operates, and the like.
Step S230: and sending the target message to the first system to instruct the first system to calibrate the system time of the first system according to the time corresponding to the second processor in the target message.
In this embodiment of the present application, after the second system obtains the target message, the second system may send the target message to the first system, so that the first system may calibrate the system time of the first system according to the time corresponding to the second processor in the target message.
In some embodiments, when the target message is a system handover message for system handover, after adding the time corresponding to the second processor to the system handover message, the wearable device may send the system handover message to the second system, so that the first system operates, complete the system handover, and calibrate the system time of the first system according to the time corresponding to the second processor in the system handover message. Specifically, the system switching message may be sent to the first processor by the second processor, and the first processor operates the first system after receiving the system switching message, and calibrates the system time of the first system according to the time corresponding to the second processor in the system switching message while completing the system switching.
In some embodiments, calibrating the system time of the first system according to the time corresponding to the second processor may include: and if the system time of the first system is different from the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor. It can be understood that, when a system switch occurs, the system time of the system which is not in operation is calibrated by using the time corresponding to the second processor of the currently operating system as a standard, so that the system time of the first system can be calibrated when the system time of the first system is different from the time corresponding to the second processor. Optionally, if the system time of the first system is different from the time corresponding to the second processor, the system time of the first system may be updated to the time corresponding to the second processor.
Optionally, if the system time of the first system is different from the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor may include: if the system time of the first system is later than the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor; and if the system time of the first system is earlier than the time corresponding to the second processor and the time difference between the system time of the first system and the time corresponding to the second processor is greater than a set threshold, updating the system time of the first system to the time corresponding to the second processor.
In this embodiment, when the system time of the first system is longer than the time corresponding to the second processor, for example, the system time of the first system is 10: 00, the system time of the second system and the RTC time of the second processor are 11: 00, the system time of the first system may be updated to the RTC time of the second processor or the system time of the second system. If the system time of the first system is earlier than the time corresponding to the second processor, the time difference between the two can be determined, and if the time difference is greater than the set threshold, the system time of the first system is updated to the time corresponding to the second processor, for example, the set threshold is 1 second, and if the system time of the first system is 10 o ' clock and the system time of the second system and the RTC time of the second processor are 9 o ' clock, 59 minutes and 58 seconds, the time difference between the system time of the first system and the time corresponding to the second processor is 2 seconds and is greater than the set threshold (1 second), and at this time, the system time of the first system is updated to 9 o ' clock, 59 minutes and 58 seconds.
In some embodiments, the communication protocol between the first processor and the second processor may employ a protobuf protocol, and the above system switch message may be locked by classId and messageId.
For example, referring to fig. 3, the time synchronization management unit of the first processor may register message monitoring, when a system handover event is detected, the second processor sends a system handover message (carrying a time corresponding to the second processor) to the message management unit of the first processor, the message management unit sends the system handover message to the time synchronization management unit, and the time synchronization management unit may obtain a time corresponding to the second processor carried in the system handover message, and then calibrate the system time of the first system according to the time corresponding to the second processor.
In some embodiments, the second processor may be an MCU, the first processor may be a CPU, the second system may be a system running a simple program (a non-intelligent system), and the first system may be a system running a complex program (an intelligent system). Usually, the accuracy of the RTC of the MCU is higher than that of the RTC of the CPU, and therefore, the time corresponding to the second processor is accurate when the second system is running. In some scenes, after the wearable device is turned off the screen for a certain time, the first processor is in a dormant state and enters a mode of the second processor, namely the first system is switched to the second system, so that the power consumption is saved; when a corresponding operation (for example, a screen is turned on or some applications are opened) is detected, the mode of the first processor is entered, that is, the second system is switched to the first system, because the accuracy of the RTC of the MCU is higher than that of the RTC of the CPU, the time corresponding to the second processor can be used as a parameter to be put into the system switching message, and the first processor monitors the system switching message and calibrates the system time of the first system according to the time corresponding to the second processor in the system switching message when the system switching message is monitored. Specifically, when the time corresponding to the second processor in the system switching message is legal and meets a specified condition, the system time of the first system may be updated to the time corresponding to the second processor. Wherein, time legal means that the time is not later than a specified time, for example, not later than 1/1970; the specified conditions mean: if the system time of the first system is later than the time corresponding to the second processor, or the system time of the first system is earlier than the time corresponding to the second processor, and the time difference between the system time of the first system and the time corresponding to the second processor is greater than the set threshold.
According to the time calibration method provided by the embodiment of the application, when the operating system of the wearable device is the second system, a system switching event is detected, the system switching event is responded, the operating system of the wearable device is switched from the second system to the first system, the time corresponding to the second processor is added into the target message, and then the system switching message is sent to the first system to indicate the first system to calibrate the system time of the first system according to the time corresponding to the second processor, so that the time of the dormant system is calibrated according to the time corresponding to the running processor when the system is switched, and the time accuracy of the wearable device is improved.
Referring to fig. 4, fig. 4 is a schematic flow chart illustrating a time calibration method according to another embodiment of the present application. The time calibration method is applied to the wearable device, and the wearable device comprises a first processor and a second processor, wherein the first processor is used for operating a first system, the second processor is used for operating a second system, the first processor is a central processing unit, and the second processor is a micro control unit. As will be described in detail with respect to the flow shown in fig. 4, the time calibration method may specifically include the following steps:
step S310: detecting a system switch event when an operating system of the wearable device is the second system.
Step S320: and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
In the embodiment of the present application, step S310 and step S320 may refer to the contents of the foregoing embodiments, and are not described herein again.
Step S330: when the operating system of the wearable device is the first system and the wearable device is connected with other terminals, calibrating the system time of the first system according to the time information of the other terminals.
In this embodiment, when the first processor is a central processing unit and the second processor is a micro control unit, the second system may be a system (non-intelligent system) for running a simple program, and the first system may be a system (intelligent system) for running a complex program. When the operating system of the wearable device is the second system, the second processor operating the second system is an MCU, and the MCU cannot update the system time of the wearable device according to external data; when the operating system of the wearable device is the first system, the CPU runs the first system, and at this time, the CPU can acquire time from the outside to calibrate the system time.
In this embodiment, when the operating system of the wearable device is the first system, if the wearable device is connected to another terminal, the system time of the first system may be calibrated according to the time information of the other terminal.
In some embodiments, in the process that the wearable device can be in pairing connection with other terminals, the first processor can acquire time information of the wearable device from the other terminals and then calibrate the system time of the first system according to the time information of the other terminals; the wearable device may also acquire time information from other terminals when reconnecting with the other terminals, and then calibrate the system time of the first system according to the time information of the other terminals.
Optionally, the system time of the first system may be updated to the time of the other terminal when the system time of the first system is later than the time of the other terminal, or the system time of the first system is earlier than the time of the other terminal, and a time difference between the system time of the first system and the time of the other terminal is greater than a first threshold.
Step S340: and when the wearable device is disconnected from the other terminals, calibrating the system time of the first system according to the network time.
In this embodiment of the application, when the wearable device runs the first system by using the first processor, if the wearable device is disconnected from other terminals, the network time may also be acquired, and the system time of the first system is calibrated. Optionally, the system time of the first system may be updated to the time of the other terminal when the system time of the first system is later than the acquired network time, or the system time of the first system is earlier than the acquired network time, and a time difference between the system time of the first system and the acquired network time is greater than a second threshold.
In some embodiments, in the case that the wearable device runs the first system by using the first processor, the network time may be immediately acquired to calibrate the system time of the first system when the wearable device is disconnected from other terminals; after the wearable device is disconnected from other terminals, the network time can be immediately acquired to calibrate the system time of the first system when the network where the wearable device is located changes, and synchronization of the network time is realized.
In some embodiments, in a case where the wearable device operates the first system by using the first processor and is disconnected from other terminals, the wearable device may also acquire the network time through the network at preset time intervals, and then calibrate the system time of the first system. The specific value of the preset time interval may not be limited, and may be, for example, 5 minutes, 10 minutes, 30 minutes, 60 minutes, or the like.
Step S350: when the operating system of the wearable device is the first system and the system time of the first system is updated, calibrating the system time of the second system according to the system time of the first system.
In this embodiment of the application, when the operating system of the wearable device is the first operating system, that is, when the CPU runs the first operating system, calibration of the system time of the first operating system is performed according to the external time, and if the system time of the first operating system is updated at this time, calibration of the system time of the second system may be performed according to the system time of the first system, so as to ensure that the system time of the second system is also synchronized with the external time.
In some embodiments, when the wearable device is turned on for the first time or brought back to factory, the first processor runs the first system, and since the RTCs of the first processor and the second processor are not running after the wearable device is powered off, at this time, the system times of the first system and the second system are inaccurate, the first processor may acquire time from the outside and set the time as the system time of the first system, or set the system time of the first system according to a user operation. Also, the system time and time zone of the first system may be synchronized to the second system to keep the system time of the two systems consistent.
Optionally, when the wearable device is started up to perform communication initialization each time, the wearable device may acquire the network time to calibrate the system time of the first system, and may also calibrate the system time of the second system according to the system time of the first system when the system time of the first system is updated. Thereby ensuring that the system time of the first system and the second system is synchronized with the network time.
In some embodiments, the wearable device may detect, each time the screen is turned on, a time interval in which the system time of the second system is last calibrated when the first system is operated by the first processor, and may calibrate the system time of the second system according to the system time of the first system if the time interval exceeds a preset time interval.
According to the time calibration method provided by the embodiment of the application, the system time of the wearable device is calibrated by acquiring the time from the external terminal, the system time of the wearable device is calibrated by acquiring the time from the network, and the system time of the first system and the system time of the second system are mutually calibrated, so that the system time of the first system or the system time of the second system of the wearable device can be calibrated from a plurality of time sources while the system time of the first system or the system time of the second system of the wearable device is kept synchronous, and the time accuracy of the wearable device is improved.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a time calibration method according to still another embodiment of the present application. The time calibration method is applied to the wearable device, the average power consumption of the first processor for operating the first system is higher than the average power consumption of the second processor for operating the second system, and the wearable device further comprises a touch screen. As will be described in detail with respect to the flow shown in fig. 5, the time calibration method may specifically include the following steps:
step S410: when the operating system of the wearable device is the first system, detecting state information of the touch screen, wherein the state information comprises a screen-on state and a screen-off state.
In the embodiment of the present application, the average power consumption of the first processor for operating the first system is higher than the average power consumption of the second processor for operating the second system, that is, under the same operating environment, the power consumption of the wearable device caused by the operation of the first system is higher than the power consumption of the wearable device caused by the operation of the second system. Optionally, the second processor may be an MCU, the first processor may be a CPU, the second system may be a system (non-intelligent system) running a simple program, and the first system may be a system (intelligent system) running a complex program. The average power consumption can be obtained according to the counted power consumption when the wearable device runs the first system by using the first processor and runs the second system by using the second processor; the average power consumption can also be stored in the wearable device after the average power consumption is tested in advance by a manufacturer before the wearable device leaves a factory.
In this embodiment, the state information of the touch screen includes a screen-on state and a screen-off state, that is, whether the touch screen is in the screen-on state or the screen-off state can be detected.
In some embodiments, the brightness of the touch screen of the wearable device may be detected and obtained, and the obtained brightness of the touch screen is compared with a preset brightness to determine whether the brightness of the touch screen is greater than the preset brightness, specifically, the wearable device may preset and store the preset brightness as a brightness value to be compared, the first preset brightness may be configured when the wearable device leaves the factory, may be set according to a preference and a requirement of a user when in use, and may also be set by the wearable device according to an attribute or an environment, for example, the preset brightness may be set according to a remaining power of the wearable device, and the preset brightness when the remaining power is higher may be set to be greater than the preset brightness when the remaining power is lower, and the like. When the brightness of the touch screen is greater than the preset brightness, it can be determined that the touch screen is in a bright screen state, and when the brightness of the touch screen is not greater than the preset brightness, it can be determined that the touch screen is in a screen resting state.
Step S420: when the state information is detected to be switched from the bright screen state to the dark screen state, switching the operating system of the wearable device from the first system to the second system.
In this embodiment, when it is detected that the state information is switched from the bright screen state to the dark screen state, for example, when it is detected that the brightness of the touch screen is switched from greater than the preset brightness to not greater than the preset brightness, the operating system of the wearable device may be switched from the first system to the second system, so that the operating system of the wearable device may be always in the second system with smaller rated power consumption in the process of the wearable device being turned off, so as to reduce the power consumption of the wearable device.
In some embodiments, after switching the operating system of the wearable device from the first system to the second system, state information of a touch screen of the wearable device may be detected, and when the state information of the touch screen is detected to be switched from a screen-on state to a screen-on state, the operating system of the wearable device may be switched from the second system to the first system.
In some embodiments, when the wearable device runs the first system, it may also be detected that the screen-on state is switched to the screen-off state, and after the duration of the screen-off state reaches a specified duration, the operating system of the wearable device is switched from the first system to the second system.
Step S430: detecting a system switch event when the operating system of the wearable device is the second system.
Step S440: and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
In the embodiment of the present application, step S430 and step S440 may refer to the contents of the foregoing embodiments, and are not described herein again.
The time calibration method provided by the embodiment of the application can calibrate the system time of the dormant system according to the time corresponding to the running processor when the system is switched, and improves the time accuracy of the wearable device. In addition, under the condition of a first system with high average power consumption during operation, when the touch screen is detected to be changed from a bright screen state to a screen-off state, the second system with low average power consumption during operation is switched to, and the power consumption of the wearable device is saved.
Referring to fig. 6, fig. 6 is a schematic flowchart illustrating a time calibration method according to yet another embodiment of the present application. The time calibration method is applied to the wearable device, and the rated power consumption of the first system is higher than that of the second system. As will be described in detail with respect to the flow shown in fig. 6, the time calibration method may specifically include the following steps:
step S510: and when the operating system of the wearable device is the first system, acquiring the current residual electric quantity of the wearable device.
In this embodiment, the current remaining power of the wearable device may be detected in real time in a background of the wearable device, or the current remaining power of the wearable device may be detected at intervals of a predetermined time (e.g., 5 minutes), or the current remaining power of the wearable device may be obtained by performing image recognition on a display interface of the wearable device, and a specific current remaining power obtaining manner is not limited herein.
In some embodiments, the frequency of detection of the current remaining power for the wearable device may be determined according to an application run by the wearable device. The detection frequency of the wearable device running the application program of the first preset type is higher than the detection frequency of the wearable device running the application program of the second preset type, wherein the power consumption of the application program of the first preset type is higher than the power consumption of the application program of the second preset type, for example, the application program of the first preset type may be a video application, a game application, and the like, and the application program of the second preset type may be a browser application, a chat application, and the like.
Step S520: when the current remaining power is less than a preset power, switching an operating system of the wearable device from the first system to the second system.
In some embodiments, the wearable device may be preset and store a preset power amount, and the preset power amount is used as a criterion for determining a current remaining power amount of the wearable device. Therefore, in this embodiment, when the current remaining power of the wearable device is obtained, the operating system of the wearable device may be switched from the first system to the second system, so that when the remaining power of the wearable device is low, the operating system of the wearable device may be always in the second system with smaller rated power consumption, so as to reduce the power consumption of the wearable device.
In some embodiments, after the operating system of the wearable device is switched from the first system to the second system, a current remaining power of the wearable device may be detected, and when it is detected that the current remaining power of the touch screen is not less than a preset power or the wearable device starts to be charged, the operating system of the wearable device may be switched from the second system to the first system.
In some embodiments, the wearable device may also switch the operating system of the wearable device from the first system to the second system to save power consumption of the wearable device when a duration of user operation of the wearable device is not detected to be greater than a preset duration. For example, when the wearable device is not operated for a long time, the second system can be operated, and the second system is used for operating simple programs such as a dial plate, so as to meet the viewing requirements of the user on daily information.
Step S530: detecting a system switch event when an operating system of the wearable device is the second system.
Step S540: and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
In the embodiment of the present application, step S530 and step S540 may refer to the contents of the foregoing embodiments, and are not described herein again.
The time calibration method provided by the embodiment of the application can calibrate the time of the dormant system according to the time corresponding to the running processor when the system is switched, and the time accuracy of the wearable device is improved. In addition, under the condition of a first system with high average power consumption during operation, when the fact that the residual electric quantity of the wearable device is smaller than the preset electric quantity is detected, a second system with low average power consumption during operation is switched to, and the power consumption of the wearable device is saved.
Referring to fig. 7, a block diagram of a time alignment apparatus 400 according to an embodiment of the present disclosure is shown. The time calibration apparatus 400 is a wearable device including a first processor and a second processor, wherein the first processor is used for operating a first system, and the second processor is used for operating a second system. The time alignment apparatus 400 includes: an event detection module 410, and a calibration module 420. Wherein the event detection module 410 is configured to detect a system switch event when the operating system of the wearable device is the second system; the calibration module 420 is configured to switch the operating system of the wearable device from the second system to the first system in response to the system switching event, and calibrate the system time of the first system according to the time corresponding to the second processor.
In some embodiments, the time corresponding to the second processor comprises: a real time clock, RTC, of the second processor, or a system time of the second system.
In some embodiments, the calibration module 420 may be specifically configured to: responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and adding the time corresponding to the second processor to a target message; and sending the target message to the second system to instruct the second system to calibrate the system time of the first system according to the time corresponding to the second processor in the target message.
In some embodiments, the calibrating module 420 calibrates the system time of the first system according to the time corresponding to the second processor, and may include: and if the system time of the first system is different from the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor.
Optionally, when the system time of the first system differs from the time corresponding to the second processor, the calibrating module 420 updates the system time of the first system to the time corresponding to the second processor, which may include: if the system time of the first system is later than the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor; and if the system time of the first system is earlier than the time corresponding to the second processor and the time difference between the system time of the first system and the time corresponding to the second processor is greater than a set threshold, updating the system time of the first system to the time corresponding to the second processor.
In some embodiments, the first processor is a central processor and the second processor is a micro-control unit. The calibration module 420 may be further configured to calibrate the system time of the first system according to the time information of the other terminal when the operating system of the wearable device is the first system and the wearable device is connected to the other terminal.
Optionally, the time calibration module may be further configured to: and when the wearable device is disconnected from the other terminals, calibrating the system time of the first system according to the network time.
In some embodiments, the first processor is a central processor and the second processor is a micro-control unit. The calibration module 420 may also be used to: when the operating system of the wearable device is the first system and the system time of the first system is updated, calibrating the system time of the second system according to the system time of the first system.
In some embodiments, the average power consumption of the first processor running the first system is higher than the average power consumption of the second processor running the second system, the wearable device further comprising a touchscreen. The time calibration apparatus 400 may further include: the device comprises a screen detection module and a first switching module. The screen detection module is used for detecting the state information of the touch screen when the operating system of the wearable device is the first system, wherein the state information comprises a screen-on state and a screen-off state; the first switching module is used for switching the operating system of the wearable device from the first system to the second system when the state information is detected to be switched from the bright screen state to the information screen state.
In some embodiments, the average power consumption of the first processor to run the first system is higher than the average power consumption of the second processor to run the second system. The time calibration apparatus 400 may further include: electric quantity detection module and second switch module. The electric quantity detection module is used for acquiring the current residual electric quantity of the wearable equipment when the operating system of the wearable equipment is the first system; the second switching module is used for switching the operating system of the wearable device from the first system to the second system when the current remaining power is less than a preset power.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
In summary, the wearable device includes a first processor and a second processor, where the first processor is configured to operate a first system and the second processor is configured to operate a second system. When the operating system of the wearable device is the second system, the system switching event is detected, the system switching event is responded, the operating system of the wearable device is switched from the second system to the first system, and the system time of the first system is calibrated according to the time corresponding to the second processor, so that the time of the dormant system is calibrated according to the time corresponding to the running processor when the system is switched, and the time accuracy of the wearable device is improved.
Please refer to fig. 8, which shows a block diagram of a wearable device according to an embodiment of the present disclosure. The wearable device 100 may be a smart watch, a smart bracelet, or other wearable device capable of running an application. The wearable device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts throughout the wearable device 100 using various interfaces and wires, and performs various functions of the wearable device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a micro control Unit (), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the wearable device 100 in use (such as phone books, audio-video data, chat log data), and the like.
Referring to fig. 9, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. A time calibration method is applied to a wearable device, wherein the wearable device comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the method comprises the following steps:
detecting a system switch event when an operating system of the wearable device is the second system;
and responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
2. The method of claim 1, wherein the time for the second processor comprises: a real time clock, RTC, of the second processor, or a system time of the second system.
3. The method of claim 1, wherein the switching the operating system of the wearable device from the second system to the first system in response to the system switching event, and calibrating the system time of the first system according to the time corresponding to the second processor comprises:
responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and adding the time corresponding to the second processor to a target message;
and sending the target message to the first system to instruct the first system to calibrate the system time of the first system according to the time corresponding to the second processor in the target message.
4. The method of claim 1, wherein calibrating the system time of the first system according to the time corresponding to the second processor comprises:
and if the system time of the first system is different from the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor.
5. The method of claim 4, wherein updating the system time of the first system to the time corresponding to the second processor if the system time of the first system is different from the time corresponding to the second processor comprises:
if the system time of the first system is later than the time corresponding to the second processor, updating the system time of the first system to the time corresponding to the second processor;
and if the system time of the first system is earlier than the time corresponding to the second processor and the time difference between the system time of the first system and the time corresponding to the second processor is greater than a set threshold, updating the system time of the first system to the time corresponding to the second processor.
6. The method of claim 1, wherein the first processor is a central processor and the second processor is a micro-control unit, the method further comprising:
when the operating system of the wearable device is the first system and the wearable device is connected with other terminals, calibrating the system time of the first system according to the time information of the other terminals.
7. The method of claim 6, wherein after calibrating the system time of the first system according to the time information of the other terminal when the operating system of the wearable device is the first system and the wearable device is connected with the other terminal, the method further comprises:
and when the wearable device is disconnected from the other terminals, calibrating the system time of the first system according to the network time.
8. The method of claim 1, wherein the first processor is a central processor and the second processor is a micro-control unit, the method further comprising:
when the operating system of the wearable device is the first system and the system time of the first system is updated, calibrating the system time of the second system according to the system time of the first system.
9. The method of any of claims 1-8, wherein an average power consumption of the first processor to run the first system is higher than an average power consumption of the second processor to run the second system, wherein the wearable device further comprises a touch screen, and wherein the method further comprises:
when the operating system of the wearable device is the first system, detecting state information of the touch screen, wherein the state information comprises a screen-on state and a screen-off state;
when the state information is detected to be switched from the bright screen state to the dark screen state, switching the operating system of the wearable device from the first system to the second system.
10. The method of any of claims 1-8, wherein an average power consumption of the first processor to run the first system is higher than an average power consumption of the second processor to run the second system, the method further comprising:
when the operating system of the wearable device is the first system, acquiring the current residual electric quantity of the wearable device;
when the current residual capacity is smaller than a preset capacity, switching an operating system of the wearable device from the first system to the second system.
11. A time calibration device applied to a wearable device, wherein the wearable device comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the device comprises: an event detection module and a calibration module, wherein,
the event detection module is used for detecting a system switching event when the operating system of the wearable device is the second system;
the calibration module is used for responding to the system switching event, switching the operating system of the wearable device from the second system to the first system, and calibrating the system time of the first system according to the time corresponding to the second processor.
12. A wearable device, comprising:
a plurality of processors including at least a first processor for operating a first system and a second processor for operating a second system;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor, the one or more programs configured to perform the method of any of claims 1-10.
13. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 10.
CN202110729096.5A 2021-03-15 2021-06-29 Time calibration method and device, wearable device and storage medium Pending CN115080200A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110275860 2021-03-15
CN2021102758606 2021-03-15

Publications (1)

Publication Number Publication Date
CN115080200A true CN115080200A (en) 2022-09-20

Family

ID=83246270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110729096.5A Pending CN115080200A (en) 2021-03-15 2021-06-29 Time calibration method and device, wearable device and storage medium

Country Status (1)

Country Link
CN (1) CN115080200A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101754469A (en) * 2008-12-18 2010-06-23 展讯通信(上海)有限公司 Dual-mode terminal and different system clock synchronizing method thereof
US20110300859A1 (en) * 2010-06-07 2011-12-08 Kyocera Corporation Wireless terminal apparatus and method of controlling the same
CN110061797A (en) * 2019-05-29 2019-07-26 海尔优家智能科技(北京)有限公司 Method for synchronizing time, device, storage medium and computer equipment
CN110463249A (en) * 2019-06-14 2019-11-15 北京小米移动软件有限公司 Connect method and device, communication equipment and the storage medium of configuration
CN110569008A (en) * 2019-08-29 2019-12-13 Oppo广东移动通信有限公司 screen data processing method and device and electronic equipment
CN112462846A (en) * 2020-12-14 2021-03-09 深圳市晨北科技有限公司 Clock correction method, clock correction device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101754469A (en) * 2008-12-18 2010-06-23 展讯通信(上海)有限公司 Dual-mode terminal and different system clock synchronizing method thereof
US20110300859A1 (en) * 2010-06-07 2011-12-08 Kyocera Corporation Wireless terminal apparatus and method of controlling the same
CN110061797A (en) * 2019-05-29 2019-07-26 海尔优家智能科技(北京)有限公司 Method for synchronizing time, device, storage medium and computer equipment
CN110463249A (en) * 2019-06-14 2019-11-15 北京小米移动软件有限公司 Connect method and device, communication equipment and the storage medium of configuration
CN110569008A (en) * 2019-08-29 2019-12-13 Oppo广东移动通信有限公司 screen data processing method and device and electronic equipment
CN112462846A (en) * 2020-12-14 2021-03-09 深圳市晨北科技有限公司 Clock correction method, clock correction device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10952146B2 (en) Method for dynamically adjusting energy-saving grade of terminal, non-transitory computer-readable storage medium, and terminal
CN110417859B (en) Equipment control method, device, system, intelligent gateway and storage medium
CN111866433B (en) Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium
CN104601203B (en) A kind of low-power consumption bluetooth equipment dynamically adjusts the method and device of Connecting quantity
WO2021115007A1 (en) Network switching method and electronic device
CN106951054B (en) Application control method and device and mobile terminal
CN106776385A (en) A kind of transmission method of daily record log information, device and terminal
CN104917581A (en) System time correction method and device, terminal and router
CN110569008B (en) Screen data processing method and device and electronic equipment
US20170041881A1 (en) Method for controlling content transmission and electronic device for supporting the same
CN108235075B (en) Video quality grade matching method, computer readable storage medium and terminal
CN114175748B (en) Communication frequency adjusting method, device, electronic equipment and storage medium
KR20150086932A (en) Method for processing data and an electronic device thereof
CN109753262B (en) Frame display processing method and device, terminal equipment and storage medium
CN115622177A (en) Charging method, mobile terminal and storage medium
CN110543333B (en) Sleep processing method and device for processor, mobile terminal and storage medium
CN106713572B (en) Data reporting control method, device and terminal
CN108200636B (en) Navigation information display method and terminal
CN114158018A (en) Data transmission method and device, Bluetooth slave device and Bluetooth master device
CN106791090B (en) Mobile terminal restart control method and device and mobile terminal
CN115080200A (en) Time calibration method and device, wearable device and storage medium
WO2020038157A1 (en) Nan-based intelligent management method and related product
CN114442346B (en) Method and device for calculating ghost of display panel, storage medium and terminal equipment
KR20130040350A (en) Device and method for controlling screen brightness in wireless terminal
CN106936996B (en) Method, device and terminal for sending shutdown broadcast

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination