CN117348689A - Clock calibration method, electronic device, and computer-readable storage medium - Google Patents

Clock calibration method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN117348689A
CN117348689A CN202210744716.7A CN202210744716A CN117348689A CN 117348689 A CN117348689 A CN 117348689A CN 202210744716 A CN202210744716 A CN 202210744716A CN 117348689 A CN117348689 A CN 117348689A
Authority
CN
China
Prior art keywords
time
timer
timing
clock
earphone
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
CN202210744716.7A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210744716.7A priority Critical patent/CN117348689A/en
Priority to PCT/CN2023/100178 priority patent/WO2024001780A1/en
Publication of CN117348689A publication Critical patent/CN117348689A/en
Pending legal-status Critical Current

Links

Classifications

    • 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)
  • Electric Clocks (AREA)

Abstract

The present disclosure relates to the field of communications technologies, and in particular, to a clock calibration method, an electronic device, and a computer readable storage medium. The method comprises the following steps: detecting that the first electronic equipment enters a dormant state, controlling a first timer of the first electronic equipment to stop timing, and controlling a second timer of the first electronic equipment to be in a timing state; and detecting that the first electronic equipment enters the working state from the dormant state, and not acquiring time service time from the second electronic equipment, and determining the system time of the first electronic equipment based on the timing result of the second timer. According to the scheme, the accuracy of the system time moment of the electronic equipment when the electronic equipment is not connected to the main equipment can be ensured, and the endurance of the electronic equipment is not obviously influenced, so that accurate time records can be provided for the aspect of collecting health characteristic data such as heart rate and body temperature of a user or exercise data of the wearable equipment, and the use experience of the user is improved.

Description

Clock calibration method, electronic device, and computer-readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a clock calibration method, an electronic device, and a computer readable storage medium.
Background
The system time inside the electronic equipment is an important parameter for realizing various functions, the electronic equipment such as a mobile phone and the like can keep synchronous with coordinated universal time (Universal Time Coordinated, abbreviated as UTC) based on some network time synchronization technologies, the system time is accurate, and the time deviation of the electronic equipment can be limited in a minimum deviation range of 1/1000ms in the prior art. In general, low-power electronic devices such as headphones connected to electronic devices such as mobile phones by a short-range wireless communication technology such as bluetooth update accurate system time by acquiring time service time of the mobile phone after the connection to the mobile phone. Furthermore, the low-power consumption electronic equipment such as the earphone can accurately collect health characteristic data such as heart rate and body temperature of a user at a certain moment, and the data can be used for providing personalized health services for the user or supporting the connected electronic equipment such as the mobile phone to run a function application program (application, APP) of the service user, for example, sports health APP.
However, the current electronic devices such as headphones can only obtain time service time when connected with a mobile phone to update accurate system time, and in order to ensure continuous voyage in a dormant state, clock chips of the electronic devices such as headphones do not work, and the system cannot normally time. Therefore, during the time when the electronic equipment such as the earphone wakes up again but does not acquire the time of the mobile phone again, the accurate time for acquiring the health characteristic data such as the heart rate and the body temperature of the user or the exercise data cannot be recorded, so that functions of some equipment cannot be realized.
Disclosure of Invention
The embodiment of the application provides a clock calibration method, electronic equipment and a computer readable storage medium, which are used for ensuring the accuracy of system time moment when the electronic equipment is not connected to a main equipment and not obviously influencing the cruising ability of the electronic equipment by additionally arranging an auxiliary timing unit with lower power consumption to keep running during the dormancy of the electronic equipment. Furthermore, the wearable device can record health characteristic data such as heart rate and body temperature of the user or exercise data during the period of not being connected to the main device based on accurate system time, so that the use experience of the user is improved.
In a first aspect, an embodiment of the present application provides a clock calibration method, including: detecting that the first electronic equipment enters a dormant state, controlling a first timer of the first electronic equipment to stop timing, and controlling a second timer of the first electronic equipment to be in a timing state;
and detecting that the first electronic equipment enters the working state from the dormant state, and not acquiring time service time from the second electronic equipment, and determining the system time of the first electronic equipment based on the timing result of the second timer.
That is, the low power consumption electronic device (i.e., the first electronic device) such as a mobile phone can keep counting during the sleep state by the added auxiliary timer unit (i.e., the second timer), and further when the mobile phone enters the working state from the sleep state and the main device capable of providing the time service is not connected yet, the system time at this time can be calculated and determined according to the timing data of the auxiliary timer unit (i.e., the timing result of the second timer). The first electronic device may be a smart wearable device worn by a user, such as a headset, a watch, a bracelet, etc.
In a possible implementation of the first aspect, determining the system time of the first electronic device based on the timing result of the second timer includes: determining a second clock frequency of the second timer based on the first clock frequency of the first timer and a clock correction factor, wherein the clock correction factor is used to determine a degree of deviation between the timing result of the first timer and the timing result of the second timer;
the system time of the first electronic device is determined based on the starting timing time of the second timer, the clock count value of the second timer, and the second clock frequency.
That is, the auxiliary timing unit for keeping timing during the period when the low power consumption electronic device (i.e., the first electronic device) such as the mobile phone is in the sleep state can correct the clock frequency or clock period by the main timing unit (i.e., the first timer) with more accurate timing of the first electronic device, so that the timing result is more accurate. Furthermore, the first electronic device may determine the accurate system time directly based on the timing result of the auxiliary timing unit. Specific reference may be made to the descriptions related to steps 503 to 505 in embodiment 1 below, and details are not described here.
It will be appreciated that, in order to make the power consumption of the auxiliary timing unit lower, the auxiliary timing unit (i.e. the second timer) added to the first electronic device may select a passive RC oscillator or an active oscillator with lower power consumption as a clock signal source, where the timing accuracy of such timing unit may be lower, for example, the timing is slower. According to the method and the device, the clock frequency or clock period correction coefficient between the main timing unit and the auxiliary timing unit is determined, namely the clock correction coefficient is further used for converting timing data of the auxiliary timing unit into timing data under the accurate clock frequency through the accurate clock frequency or the accurate clock period of the main timing unit, so that the accurate real-time is calculated to update the system time of the first electronic device.
In a possible implementation of the first aspect, the starting timing time of the second timer is determined based on a historical timing time acquired by the first electronic device from the second electronic device.
That is, the starting time based on which the auxiliary timer unit (i.e., the second timer) added to the low power consumption electronic device (i.e., the first electronic device) such as the mobile phone continues to count in the sleep state may be a time service time obtained from the main device during the period in which the first electronic device is last connected to the main device (i.e., the second electronic device), that is, the historical time service time. For details, reference may be made to the description of step 502 in embodiment 1 below, and details are not repeated here. The first electronic device may be, for example, a headset worn by a user, the main device (i.e., the second electronic device) may be, for example, a mobile phone, and a connection between the headset and the mobile phone may be, for example, bluetooth connection or Near Field Communication (NFC), which is not limited herein.
It will be appreciated that the above-mentioned historical time may also be a time obtained during a certain connection period before the first electronic device was last connected to the main device, which is not limited herein. In order to improve timing accuracy, the auxiliary timing unit provided in the embodiment of the present application may start timing based on a time service time obtained from the master device during a period of last connection with the master device before the first electronic device enters the sleep state.
In a possible implementation of the first aspect, the clock count value of the second timer is determined by:
detecting that the first electronic equipment acquires historical time service time from the second electronic equipment, and recording a first count value of the second timer at the moment of updating the initial time service time based on the historical time service time;
the difference between the second count value and the first count value of the second timer at the current time is determined as the clock count value of the second timer.
In a possible implementation of the first aspect, the clock count value of the second timer is determined by:
detecting that the first electronic equipment acquires historical time service time from the second electronic equipment, and resetting a count value of the second timer at the time of updating the initial time based on the historical time service time;
And determining a third count value of the second timer at the current moment as a clock count value of the second timer.
That is, when the auxiliary timer unit (i.e., the second timer) added to the low power electronic device (i.e., the first electronic device) such as the mobile phone obtains the time of the time service of the main device (i.e., the second electronic device), the timing data of the time can be recorded, that is, the timing data is stored as a latch value (i.e., the first count value) as described in step 502 in embodiment 1 below. Furthermore, when determining the timing result of the auxiliary timing unit, the latch value (i.e., the first count value) corresponding to the initial timing time may be subtracted from the real-time timing data of the auxiliary timing unit, so that the calculation process is simple and efficient. It will be appreciated that the first count value may be 0 or other values, where the case where the first count value is 0 may include clearing the timing data of the auxiliary timing unit at the time when the timing time of the main device is obtained, which is not limited herein. Specific reference may be made to the descriptions of steps 502 to 503 in embodiment 1 below, and details are not repeated here.
In a possible implementation of the first aspect, determining the system time of the first electronic device based on the timing result of the second timer includes:
Calibrating the initial timing time of the first timer based on the timing result of the second timer;
the system time of the first electronic device is determined based on the calibrated starting timing time of the first timer, the clock count value of the first timer, and the first clock frequency of the first timer.
That is, the system time of the first electronic device may be updated by the main timing unit (i.e., the first timer) all the time, and when the first electronic device enters the working state from the sleep state but is not yet connected to the main device, the main timing unit of the first electronic device may first acquire the result of keeping the timing of the auxiliary timing unit (i.e., the second timer) during the period that the first electronic device is in the sleep state, that is, correct the initial timing time of the main timing unit at this time by using the timing result of the auxiliary timing unit. The timing result (i.e. the real time) obtained by the master timing unit may then be used to update the system time of the first electronic device. The accurate system time may be determined directly based on the timing results of the auxiliary timing unit. Specific reference may be made to the descriptions in steps 805 to 807 in embodiment 2 below, and no further description is given here.
In a possible implementation of the first aspect, calibrating the starting timing time of the first timer based on the timing result of the second timer includes:
Determining a second clock frequency of the second timer based on the first clock frequency of the first timer and a clock correction factor, wherein the clock correction factor is used to determine a degree of deviation between the timing result of the first timer and the timing result of the second timer;
the calibrated starting timing time of the first timer is determined based on the starting timing time of the second timer, a clock count value of the second timer at a time when the first electronic device enters the operating state from the sleep state, and the second clock frequency.
That is, the auxiliary timer unit (i.e., the second timer) for keeping the timer during the period when the low power consumption electronic device (i.e., the first electronic device) such as the mobile phone is in the sleep state may be corrected by the main timer unit (i.e., the first timer) having the first electronic device itself with more accurate timer, for example, correcting the clock frequency or clock period of the auxiliary timer unit. Furthermore, when the main timing unit of the first electronic device calibrates/updates the initial timing time based on the timing result of the auxiliary timing unit, the auxiliary timing unit may provide an accurate timing result after correcting the clock frequency or the clock period, that is, the timing result calculated according to the initial timing time of the second timer, the clock count value of the second timer when the first electronic device enters the working state from the sleep state, and the second clock frequency. For details, reference may be made to the description of step 805 in embodiment 2 below, and details are not described here.
In a possible implementation of the first aspect, the clock count value of the first timer is determined by:
recording a fourth count value of the first timer when the initial timing time of the first timer is calibrated;
the difference between the fifth count value and the fourth count value of the first timer at the current time is determined as the clock count value of the first timer.
In a possible implementation of the first aspect, the clock correction factor is determined by:
acquiring a sixth count value of the first timer and a seventh count value of the second timer within preset time, and determining a clock correction coefficient based on the ratio of the sixth count value to the seventh count value;
or acquiring a first clock period corresponding to the preset clock count value completed in the working process of the first timer and a second clock period corresponding to the preset clock count value completed in the working process of the second timer, and determining a clock correction coefficient based on the ratio of the second clock period to the first clock period.
That is, the clock deviation correction coefficient (i.e., the clock correction coefficient) between the main timer unit and the auxiliary timer unit may be determined by determining the ratio between the clock count value (i.e., the sixth count value) of the main timer unit and the clock count value (i.e., the seventh count value) of the auxiliary timer unit in the same time period; alternatively, the ratio between the clock period of the auxiliary timing unit (i.e., the second clock period) and the clock period of the main timing unit (i.e., the first clock period) may be calculated by counting the number of clock cycles that pass through the same clock count value. There is no limitation in this regard.
In a possible implementation of the first aspect, the second timer is an RTC timer, and the power consumption of the second timer is lower than the power consumption of the first timer.
That is, the power consumption corresponding to the auxiliary timing unit for keeping timing during the sleep state of the first electronic device must be lower than the power consumption of the main timing unit, and may approach zero power consumption, so that the sleep power consumption of the first electronic device may not be significantly affected.
In one possible implementation of the first aspect, the first electronic device is a smart wearable device, such as any one of a headset, a watch, a bracelet, glasses, a ring, and a necklace.
In a second aspect, embodiments of the present application provide a clock control circuit, including:
the control unit is used for controlling the first timer of the first electronic equipment to stop timing and controlling the second timer of the first electronic equipment to be in a timing state when detecting that the first electronic equipment enters the dormant state; the system time of the first electronic equipment is determined based on the timing result of the second timer when the first electronic equipment is detected to enter the working state from the dormant state and the time service time is not acquired from the second electronic equipment; the first timer is used for timing during the working state of the first electronic equipment and sending the timing result to the control unit; and the second timer is used for keeping timing during the sleep state or the working state of the first electronic equipment and sending the timing result of the sleep state of the first electronic equipment to the control unit for processing.
The control unit, i.e. the microprocessor unit of the earphone 100 as exemplified in the following detailed description, may be specifically shown in fig. 4b and described in the related description, and is not limited thereto.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; and at least two timers; wherein the one or more memories store one or more programs that, when executed by the one or more processors, cause the electronic device to perform the clock calibration method provided in the first aspect above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having instructions stored thereon, which when executed on a computer, cause the computer to perform the clock calibration method provided in the first aspect above.
Drawings
Fig. 1 is a schematic diagram of a clock information interaction scenario.
Fig. 2 is a schematic diagram of a timing scenario of the earphone 100 during a connected/dormant state.
Fig. 3 is a schematic diagram of an earphone 100 corresponding to a timing scheme.
Fig. 4a is a general structural diagram of the earphone 100.
Fig. 4b is a schematic structural diagram of an earphone 100 according to an embodiment of the present application.
Fig. 5 is a schematic flow chart of an implementation of a clock calibration method according to embodiment 1 of the present application.
Fig. 6 is a schematic diagram of a timing scenario corresponding to the clock calibration method provided in the flowchart shown in fig. 5.
Fig. 7 is a schematic diagram showing a process of recording a latch value of the earphone 100 in a connected state according to embodiment 1 of the present application.
Fig. 8 is a schematic flow chart of an implementation of a clock calibration method according to embodiment 2 of the present application.
Fig. 9 is a schematic diagram of a timing scenario corresponding to the clock calibration method provided in the flowchart shown in fig. 8.
Fig. 10 is a schematic diagram showing a process of recording a main unit latch value and a subsidiary unit latch value of the earphone 100 in a connected state according to embodiment 2 of the present application.
Fig. 11 is a schematic diagram of real-time heart rate data and real-time body temperature data acquired in one day by the earphone 100 to which the clock calibration method provided in the present application is applied.
Fig. 12 is a schematic diagram illustrating an implementation process of another clock calibration method.
Fig. 13 is a schematic structural diagram of a mobile phone 200 according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding of the present application, the following description will first explain related terms related to the embodiments of the present application.
The frequency of the operating clock, i.e. the frequency of the operating clock of the timing unit, generally refers to the count value of the counter in one time unit when the RTC timing unit is operating. The time unit may be, for example, 1 second, that is, the count value of the counter in 1 second is the operating clock frequency of the RTC timing unit when the timing unit is operated. The working clock period is the reciprocal of the working clock frequency.
Fig. 1 shows a schematic diagram of a clock information interaction scenario.
As shown in fig. 1, the scenario includes a headset 100 and a cell phone 200. The earphone 100 may be of a cassette type, a head-mounted type or a neck-mounted type, and is not limited thereto.
Taking the case of the earphone 100 in a box shape as an example, the earphone box is closed after the earphone is put in the box, so as to avoid frequent dormancy wakeup of the earphone, the earphone 100 can enter a dormancy state after the earphone box is closed for a certain preset time; the earphone box is opened to take out the earphone, and the earphone 100 is powered on to enter the working state. After the earphone 100 enters the working state, a communication connection can be established with the paired mobile phone 200, and at this time, the earphone 100 can acquire the time service time of the mobile phone 200 to update the system time of the earphone 100. It can be understood that after the earphone 100 is powered on, a Real Time Clock (RTC) chip of the earphone 100 works, and the system Time of the earphone 100 is accurate based on the obtained Time service Time.
After the headset 100 enters a sleep state, the RTC is powered down and no longer operates. However, when the earphone 100 wakes up again but does not acquire the time of the connection device such as the mobile phone 100, the system time of the earphone 100 may be cleared or the factory default time may be restored, or the time information of the RTC power-down time may be maintained.
It can be appreciated that the electronic device such as the earphone 100 in the scenario shown in fig. 1 is usually a low-power and small-volume electronic device, and can be normally operated when the user such as the mobile phone 200 is successfully connected to the device. For convenience of description, in the embodiment of the present application, a user of a type that connects the mobile phone 200 and the like with the earphone 100 and can time service to the earphone 100 mainly uses a device, which is called a master device. Unless otherwise indicated, the following descriptions related to the main device refer to the main devices used by users such as the mobile phone 200, and the descriptions related to the electronic devices refer to the low-power electronic devices such as the earphone 100.
Based on the scenario shown in fig. 1, fig. 2 shows a timing scenario diagram of the earphone 100 during a connected state/dormant state. Reference is made to fig. 2:
time T1: for example, 14:00, the user takes out the earphone from the earphone box, and the microprocessor, the RTC chip, etc. of the earphone 100 is powered on, the earphone 100 and the mobile phone 200 are connected in communication for the nth time, the earphone 100 works and enters a connection state, and at this time, the earphone 100 can acquire the time service time from the mobile phone 200 to update the accurate RTC time.
Time T2: for example 16:00, the earphone 100 is operated from time T1 to time T2, the earphone is put into the box, and the earphone 100 enters a sleep state. At this time, in order to reduce power consumption of the earphone 100 and improve cruising ability, the microprocessor, RTC chip, etc. of the earphone 100 may be powered down to stop working. At this time, the clock timing value stored in the RTC register is cleared, and the time information is lost.
Time T3: for example, 18:00, the user takes out the earphone from the earphone box again for use, the earphone 100 exits from the sleep state, the micro processing unit and the RTC chip of the earphone 100 are awakened and start to work, and the RTC timing unit restarts timing. However, at this time, since the mobile phone 200 is not connected yet, the time information determined by the RTC timing unit of the headset 100 at this time is not accurate, for example, the time information at the time T3 may be the factory default time 0:00, that is, "T3 00:00" shown in fig. 2, and in fact, the accurate time at the time T3 should be "T3' 18:00" shown in fig. 2.
Time T4: for example, 20:00, the earphone 100 establishes a communication connection with the mobile phone 200 for the n+1st time, the earphone 100 acquires the time of the mobile phone 200 again, and updates the wrong system time counted from the time T3 to the time T4 to the acquired time of the time, for example, from "T4 02:00" to "T4' 20:00" shown in fig. 2. Then, based on the acquired time service time RTC, the timing unit continues to time, and the earphone 100 recovers the accurate time information at this time.
Referring to fig. 2, the time information provided by the RTC timing unit of the headset 100 is typically inaccurate during the time period T3-T4. Therefore, in this time period, the earphone 100 cannot accurately record the association relationship between the acquired data and the time, for example, the time of acquiring the health characteristic data such as the heart rate and the body temperature cannot be accurately recorded, and when the earphone 100 is connected to the mobile phone 200 again, the heart rate data, the body temperature data and the like marked with accurate time information cannot be provided to the mobile phone 200, and the exercise health APP and other application programs operated by the mobile phone 200 are inaccurate based on the heart rate, the body temperature and other data reported by the earphone 100, and the heart rate, the body temperature and other curves displayed in the displayed health interface change with time and the like.
In order for the headset 100 to continue to operate during sleep, one possible implementation is to provide a battery backup within the headset 100. Referring to fig. 3, the earphone 100 is provided with a battery unit (battery) which supplies power to the microprocessor unit and the timer unit during the operation of the earphone 100. The specific functions of the structures of the micro-processing unit, the timing unit, the charge/discharge unit, the battery unit, and the like shown in fig. 3 will be described below, and are not described herein.
On the basis, as shown in fig. 3, an auxiliary battery unit is further provided for the earphone 100, and is used for supplying power to the timing unit during the power-down period of the earphone 100, so that the timing unit is always in an operating state. This solution can keep the timing unit of the earphone 100 accurate, and does not affect the cruising ability of the earphone 100 based on the original battery unit. However, this solution requires the addition of an auxiliary battery, which is costly, and the structure on which the additional auxiliary battery is mounted is required to support the disassembly and replacement of the auxiliary battery, which is disadvantageous in terms of the miniaturization of the earphone. In addition, because some earphones have smaller structures, in order to install the additional auxiliary battery, the structural appearance of the earphone may also need to be adjusted, and development cost is increased.
Therefore, in order to solve the problem that the system time is inaccurate during the period when the low-power-consumption electronic device such as the earphone wakes up again after dormancy but does not acquire the time service time of the main device, the embodiment of the application provides a clock calibration method which is applied to the low-power-consumption electronic device such as the earphone and the like with the main time-counting unit. According to the method, the auxiliary timing unit with lower power consumption is additionally arranged in the electronic equipment such as the earphone and the like, and the auxiliary timing unit keeps running during the dormancy period of the electronic equipment, so that the real-time can be determined based on timing data provided by the auxiliary timing unit when the electronic equipment is not connected to the main equipment, and further the electronic equipment can record health characteristic data such as heart rate and body temperature of a user or exercise data based on the determined real-time. Because the power consumption of the auxiliary timing unit is lower, the method provided by the embodiment of the application can ensure the accuracy of the system time moment when the electronic equipment is not connected to the main equipment, and meanwhile, the cruising ability of the electronic equipment is not obviously influenced.
Specifically, the electronic device may calibrate initial time information of the auxiliary timing unit and determine a clock deviation correction coefficient between the auxiliary timing unit and the main timing unit when the main device is connected to obtain the time service time. Furthermore, during the sleep period, the electronic equipment such as the earphone and the like can continue to work and time by virtue of the auxiliary timing unit, so that during the period that the electronic equipment wakes up again but is not connected with the mobile phone and the like to acquire time service, the accurate time information can be determined according to the timing data of the auxiliary timing unit and the determined correction coefficient to update the system time, and the clock calibration is realized. Furthermore, if some user's health characteristic data is collected during this period, the electronic device such as a headset may record an accurate time stamp for the collected health characteristic data.
The added auxiliary timing unit can be a low-power RTC timing unit. It will be appreciated that most RTC timing units use a crystal oscillator (abbreviated as crystal oscillator) with higher accuracy as a clock signal source, and in other implementations, the RTC timing unit may also use a passive RC oscillator as the clock signal source, which is not limited herein. In general, the timing accuracy of the RTC is greatly related to the stability of the RTC crystal oscillator, and the power consumption of the RTC chip with higher accuracy is also greater, for example, the currently configured timing unit of the electronic device such as the earphone, that is, the main timing unit is usually the RTC timing unit with higher timing accuracy but greater power consumption. The essence of the above-described determination of the clock deviation correction factor is therefore to calculate the operating clock frequency of the auxiliary timing unit from the operating clock frequency of the main timing unit, i.e. to calibrate the actual operating clock frequency of the auxiliary timing unit. In this embodiment of the present application, the auxiliary timing unit may be an RTC timing unit with lower power consumption and lower timing precision, and when the earphone enters a sleep state and the main timing unit is powered down, the auxiliary timing unit may still continuously perform timing with lower power consumption. When the earphone wakes up again, the accurate timing time can be determined according to the timing data of the auxiliary timing unit and the calibrated working clock frequency of the auxiliary timing unit, so that the aim of guaranteeing the accuracy of the earphone system time is fulfilled under the condition that the earphone endurance is not lost.
It can be understood that after the auxiliary timing unit is added, the earphone system can directly acquire timing data from the auxiliary timing unit, and calculate accurate time information as system time by combining with the correction coefficient; the earphone system can also directly acquire timing data from the main timing unit to obtain accurate time information as system time during the working period of the main timing unit, calibrate the time information of the main timing unit based on the time information obtained by calculating the timing data of the auxiliary timing unit during the power-down period of the main timing unit, and take the calibrated time information of the main timing unit as the system time. There is no limitation in this regard.
It is understood that the electronic devices to which the clock calibration method provided in the embodiments of the present application is applicable include, but are not limited to, the above-mentioned headphones, such as a real wireless stereo (True Wireless Stereo, TWS) bluetooth headphone, a neck-mounted bluetooth headphone, a head-mounted bluetooth headphone, and the like, as well as smart watches, smart bracelets, smart glasses, smart foot rings, smart necklaces, augmented reality (augmented reality, AR) devices, virtual Reality (VR) devices, and the like.
Host devices that connect to and provide time service to such electronic devices as headsets include, but are not limited to, cell phones, tablet computers, desktop computers, laptops, handheld computers, netbooks, car set devices, portable gaming devices, portable music players, reader devices, televisions with one or more processors embedded or coupled therein, or other electronic devices capable of accessing a network.
Based on the above-mentioned scenarios shown in fig. 1 and fig. 2, a specific implementation scheme of the clock calibration method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 4a shows a schematic structural diagram of an earphone 100.
As shown in fig. 4a, the basic structure of the earphone 100 includes a micro-processing unit 110, a charge and discharge unit (charger) 120, a battery unit 130, and a timing unit 140. The charge and discharge unit 120 is connected to the microprocessor unit 110 and the timer unit 140.
The micro-processing unit 110 may be, for example, a micro-control unit (Microcontroller Unit, MCU) or a single chip microcomputer, or may be a digital signal processor (Digital Signal Processor, DSP). The system time can be updated by processing the timing data of the timing unit 140, and the earphone can be controlled to switch between the sleep state and the working mode. In this embodiment of the present application, the microprocessor unit 110 may invoke the program code or the instruction set stored in the internal storage space for implementing the clock calibration method provided in the embodiment of the present application, so as to implement a process of determining accurate time information based on the timing data of the auxiliary timing unit to calibrate the system time of the earphone 100, so as to ensure that the system time of the earphone 100 is accurate. It will be appreciated that the internal memory space storing the program code or instruction set may be provided by a memory or register provided in the headset 100, without limitation.
The charging and discharging unit 120 is responsible for charging the battery unit 130 in a charged state, and is responsible for supplying power to the micro-processing unit 110, the timing unit 130 and other components. In the non-charged state, the receiving battery unit 130 discharges and is responsible for powering the microprocessor unit 110, the timing unit 130, and the like.
The timing unit 140, usually an RTC, is operative to acquire the time service time received by the earphone 100 and count the time service time, so as to provide accurate time information for the earphone 100 to update the system time. When the earphone 100 enters the sleep state, the timer unit 140 is normally powered down and no longer operates, and the system time of the earphone 100 may be stopped, or the microprocessor unit 110 may control the system time to return to the factory time.
Based on the structure shown in fig. 4a, fig. 4b shows a schematic structural diagram of the earphone 100 according to an embodiment of the present application.
As shown in fig. 4b, the timing unit 140 of the earphone 100 includes a main timing unit 141 and an auxiliary timing unit 142.
The master timing unit 141 includes an accurate clock signal source, and can directly provide accurate time information to update the system time during operation.
The accuracy of the clock signal source contained in the auxiliary timing unit 142 is lower than that of the clock signal source contained in the main timing unit 141, and the auxiliary timing unit 142 can provide more accurate time information after the clock deviation is calibrated by the main timing unit 141. The auxiliary timing unit 142 is configured to continue timing in a state where the main timing unit 141 is not operated during the sleep period of the earphone 100, and further provide accurate time information to update the system time of the earphone 100 when the earphone 100 wakes up again, so as to calibrate the system time of the earphone 100.
Based on the structure of the earphone 100 shown in fig. 4a and the structure of the timing unit 140 shown in fig. 4b, the detailed implementation procedure of the clock calibration method provided in the present application will be described in detail with reference to 2 specific embodiments.
Next, the implementation procedure of a clock calibration method for calibrating the system time by acquiring timing data from an auxiliary timing unit and calculating accurate time information by combining correction coefficients will be described with reference to the system of the earphone 100 of embodiment 1.
Example 1
In the embodiment of the present application, the system of the earphone 100 is introduced to directly acquire timing data from the auxiliary timing unit, and the accurate time information is calculated by combining with the correction coefficient to be used as the system time, so as to introduce the specific implementation process of the clock calibration method provided in the embodiment of the present application.
Fig. 5 is a schematic flow chart of an implementation of a clock calibration method according to an embodiment of the application. It will be appreciated that the main execution body of each step in the flowchart shown in fig. 5 may be the earphone 100 or the micro-processing unit 110 of the earphone 100. In other embodiments, the execution subject of each step in the flowchart shown in fig. 5 may be other low-power electronic devices having similar structures to the earphone 100, which is not limited herein.
Specifically, as shown in fig. 5, the flow includes the steps of:
501: and calculating a clock deviation correction coefficient between the main timing unit and the auxiliary timing unit.
For example, referring to the timing scenario diagram shown in fig. 6, when the user needs to use the headset 100, the user may take the headset out of the headset box, or power on the headset 100 through other forms of power-on operations, and when the bluetooth connection is established with the mobile phone 200 for the nth time at time T1 after the headset 100 is powered on, the headset 100 may be considered to be in the connected state at time T1. Wherein N is a natural number 1,2, … …, without limitation. At this time, the earphone 100 may calculate the clock deviation correction coefficient based on the timing data of the main timing unit and the timing data of the auxiliary timing unit. The clock deviation can be either a working clock frequency deviation or a working clock period deviation, and the correction coefficient obtained by corresponding calculation can be either a frequency correction coefficient or a period correction coefficient, which is not limited herein.
As an example, the calculation formula of the clock deviation correction coefficient may refer to (1) of the following formula.
Wherein Cnt is 1 Indicating that the master timing unit 141 is presetCounter count within a time period (e.g., within 1 second), cnt 2 Counter count value representing counter count value of auxiliary timer unit 142 within a preset time (e.g., within 1 second) coef The coefficient is corrected for clock skew.
Taking the clock deviation of the operating clock frequency as an example, the counter count value of the main timer unit 141 is detected to be 1000 times within 1 second, and the counter count value of the auxiliary timer unit 142 is detected to be 800 times within 1 second, which indicates that the timing of the auxiliary timer unit is slow. Based on the above formula (1), the correction coefficient of the clock skew can be calculated to be 1000/800=1.25. In the subsequent calculation, the correction coefficient may be substituted into the following formula (2), and the accurate working clock frequency of the auxiliary timing unit must be multiplied by the correction coefficient 1.25 to achieve the accuracy of the timing of the main timing unit 141.
Wherein f 1 The frequency of the working clock, f, of the master timing unit 2 To assist in accurate operation of the timing unit.
It will be appreciated that in other embodiments, the clock skew correction factor may be determined by other calculation methods, such as calculating a ratio of the duty cycle of the auxiliary clock unit 142 to the duty cycle of the main clock unit 141 corresponding to 1 second of clock timing, which is not limited herein.
502: and acquiring time service time of the connected main equipment, and storing the current timing data of the auxiliary timing unit as a latch value.
For example, referring to fig. 6, the time T2 may be the time T1 of the mobile phone 200 and any time after the time T1, where the headset 100 still operates in the connected state. That is, after the earphone 100 enters the connection state at the time T1, the time service last may be obtained from the mobile phone 200 at the time T2 ts To update the system time of the headset 100. Specifically, for example, the auxiliary timing unit 142 obtains the time service time, and the micro-processing unit 110 of the earphone 100 may obtain the auxiliary timing listElement 142 obtains the time stamp time to update the system time. Meanwhile, the micro-processing unit 110 of the earphone 100 may record timing data of the T2 time auxiliary timing unit 142, for example, an operation clock cycle count value, as a count value base on which the real-time is calculated in the subsequent execution of step 503, that is, the above-mentioned latch value.
Fig. 7 is a schematic diagram showing a process of recording a latch value in a connected state of the earphone 100 according to an embodiment of the present application.
As shown in fig. 7, the auxiliary timing unit 142 may determine the acquired time last ts Save as save_time while record save last ts Count value at this time (e.g., time T2)As the latch value. In addition, the auxiliary timer unit 142 may store the clock deviation correction coefficient correct determined in the above step 501 coef . In the embodiment of the present application, the master timing unit 141 does not need to hold the latch value or the correction coefficient.
It will be appreciated that in some embodiments, the auxiliary timing unit 142 obtains the time T2 of the time service, and the timing data on the unit may be cleared, i.e. the latch value recorded at the time T2Zero, so that when step 503 is performed subsequently, it can be directly based on the acquired time last ts And a real-time count value timer of the auxiliary timer unit 142 2 Cnt directly calculates to obtain time information. In other embodiments, the time service last may also be acquired ts At time T2 of (2), the timing data of the auxiliary timing unit 142 at the time is updated to be equal to the time last ts The corresponding specified values are not limiting herein.
503: and calculating real-time and updating system time based on the correction coefficient, the acquired time service time, the stored latch value and the real-time timing data of the auxiliary timing unit.
For example, referring to fig. 6, during the period in which the earphone 100 continues to operate in the connected state after the time T2, the micro-processing unit 110 of the earphone 100 may calculate an accurate real-time to update the system time of the earphone 100 based on the real-time timing data of the auxiliary timing unit 142. The calculation formula for calculating the real-time based on the timing data of the auxiliary timing unit may refer to the following formula (3):
Wherein real ts Representing the actual time obtained by calculation, namely real-time; last (last) ts The time service acquired in the above step 502 by the auxiliary timer unit 142 is represented; timer 2 Cnt denotes a real-time count value of the auxiliary timing unit, i.e., real-time timing data, such as a real-time duty clock cycle count value of the auxiliary timing unit 142;latching the timing data of the auxiliary timing unit recorded at the time T2 in the step 502; f (f) 1 Indicating the operating clock frequency of the master timing unit,namely +.>Representing the duty cycle of the auxiliary timing unit coef The clock skew correction factor calculated and determined in step 501 is shown.
It can be understood that the main time counting unit 141 of the earphone 100 works normally in the connected state, and the earphone 100 may also obtain the time counting data from the main time counting unit 141 to calculate the real-time, which is specifically described in embodiment 2 below and will not be repeated here.
504: the auxiliary timing unit continues timing when detecting that the system enters the sleep state.
Illustratively, referring to fig. 6, the user may load the headset into the headset box, or power off the headset 100 by other forms of power off operation, when the user does not need to use the headset 100, such as at time T3. The earphone 100 enters a sleep state at time T3, and the main timer 141 of the earphone 100 is powered down to save the system power consumption, and the auxiliary timer 142 can keep working due to lower power consumption to continue timing.
It can be appreciated that, in the implementation of the clock calibration method provided in the embodiment of the present application, in order not to increase the power consumption of the earphone 100 during the sleep period, the auxiliary timer unit 142 that keeps the timer during the sleep period may select a clock timer with lower power consumption, and the timing accuracy of the auxiliary timer unit 142 may be calibrated based on the clock deviation correction coefficient determined by calculation in step 501. In some experimental tests of the earphone 100, the auxiliary timing unit 142 is still operated in the sleep state, but the earphone 100 may last longer, for example, the earphone 100 may last for X hours when the auxiliary timing unit 142 is not applied, and may last for X (1-y%) hours after the auxiliary timing unit 142 is applied, where y is calculated based on some experimental data to be less than 5, that is, the experiment proves that the auxiliary timing unit 142 causes the earphone 100 to last for no more than 5% of the duration. It can be explained that the addition of the auxiliary timer unit 142 has less influence on the power consumption of the earphone 100.
It will be appreciated that the duration of the earphone 100 is related to the duration of the earphone 100 in the low power mode and in the sleep state, and in some embodiments, the earphone 100 may enter the low power mode to power down the main time unit in a short time when it is detected that the user is not using the earphone; the sleep state is entered again when the headset 100 detects that the user is not using the headset for a long time, powering down the processor, etc. of the system. There is no limitation in this regard.
505: and when the sleep state is detected to be exited and the time service time of the main equipment is not acquired, acquiring real-time timing data of the auxiliary timing unit, and calculating the real-time to update the system time.
As an example, referring to fig. 6, if the earphone 100 is turned on again at time T4,the earphone 100 is out of the sleep state, and the earphone 100 may not be connected to the mobile phone 200 immediately, so that the time service provided by the mobile phone 200 cannot be obtained in time. During this time, the system time of the earphone 100 can still be obtained from the auxiliary timer unit, for example, the real-time timing data timer of the auxiliary timer unit 142 is continuously obtained 2 Cnt, the real-time timing data may be, for example, a duty clock cycle count value, etc., and calculates real-time information according to the above formula (3) to update the system time of the earphone 100, thereby realizing clock calibration. That is, during the period from time T3 to time T4 shown in fig. 6, the earphone 100 can determine the system time based on the timing data of the auxiliary timing unit 142.
In some embodiments, the time information calculated according to the real-time timing data of the auxiliary timing unit 142 may also be acquired, and the timing start time of the main timing unit 141 is updated, that is, calibration of the time information of the main timing unit 141 is achieved.
506: and detecting that the system enters the connection state again, re-acquiring time service time from the connected main equipment, and updating the latch value of the auxiliary timing unit.
For example, referring to fig. 6, the headset 100 establishes a bluetooth connection with the handset 200 n+1st time at time T5, and the headset 100 enters a connected state. At this time, the earphone 100 may acquire the time service time from the mobile phone 200, update the system time of the earphone 100, and update the time information of the main timer unit 141 and the auxiliary timer unit 142 of the earphone 100 to the acquired time service time. Thus, the timing error of the auxiliary timing unit can be corrected in time, and the accuracy of the system time of the earphone 100 can be improved. At the same time, at time T5, the micro-processing unit 110 may record the current timing data of the auxiliary timing unit 142 again, such as the duty cycle count value, and determine the updated latch valueThe replacement value, which is the latch value recorded in step 502, is used as the latch value according to which the time information is calculated later. Referring to fig. 7, when the earphone 100 performs this step, the auxiliary timer unit 142 shown in fig. 7 may be at T5The latch value is updated at this time, but the time service time (i.e., the save_time shown in fig. 7) stored in the auxiliary timer unit 142 may be temporarily not updated.
It will be appreciated that referring to the description of the above step 502, the auxiliary timing unit 142 may re-acquire the time T5 of the time service, the timing data on the unit may be cleared, or the timing data of the auxiliary timing unit 142 may be updated to the time service last acquired at the time T5 ts The corresponding specified values are not limiting herein.
507: and calculating real-time and updating system time based on the correction coefficient, the re-acquired time service time, the updated latch value and the real-time timing data of the auxiliary timing unit.
For example, referring to fig. 6, during the operation of the earphone 100 in the connection state after the time T5, the real-time timing data, such as the real-time duty cycle count value, of the auxiliary timing unit 142, and the time service time acquired from the connected mobile phone 200 again in the above step 506 may be substituted into the above formula (3), and the accurate real-time is calculated to update the system time of the earphone 100.
It is understood that when the earphone 100 enters the sleep state again, the earphone 100 may repeatedly perform the steps 504 to 507, and the loop is thus repeated, which is not described herein.
It can be understood that, based on the clock calibration method provided by the embodiment of the present application, after the calibration of the system time of the earphone 100 in any working state is implemented, a data acquisition function that needs to record an accurate timestamp can be provided. For example, the user can accurately record the time stamp of acquiring the health characteristic data such as heart rate and body temperature while wearing the earphone 100 to run outdoors or while wearing the earphone 100 at night to sleep. The health characteristic data recorded with the time stamp can be used for analyzing the health characteristic change rule of the user during exercise and during sleep, for example, the exercise health APP operated by the mobile phone 200 can display the health characteristic curves of corresponding heart rate, body temperature and the like which change along with time to the user based on the health characteristic data with the accurate time stamp, so that reasonable health advice is provided for the user, and the user experience is improved.
According to the clock calibration method provided by the embodiment of the present application, based on the implementation process of steps 501 to 507 shown in fig. 5, it may be realized that the earphone 100 can have accurate time information in any mode, for example, when the main timing unit of the earphone 100 is not operated in the sleep state, the auxiliary timing unit may be used for continuing to operate and time, so that when the earphone 100 wakes up from the sleep state, the accurate time information may be calculated and determined based on the timing data of the auxiliary timing unit to calibrate the system time of the earphone 100; when the earphone 100 enters the connection state again, the system time of the earphone 100 can be synchronized with the standard time of the main equipment, the timing deviation of the auxiliary timing unit is calibrated in time, and if the earphone 100 does not acquire the time service time of the connected mobile phone 200, the earphone 100 can continue to update the system time based on the real-time calculated by the timing data of the auxiliary timing unit; if the earphone acquires the time service time of the connected mobile phone 200, the system time of the earphone 100 can be synchronized with the standard time of the main device, the timing deviation of the auxiliary timing unit can be calibrated in time, and after the time service time is acquired, the auxiliary timing unit can continue to time based on the acquired time service time, so as to provide accurate real-time for the system. In addition, the auxiliary timing unit added to the earphone 100 can use an RTC timer with very low power consumption or a passive timer, so that the original cruising ability of the earphone 100 is not affected.
In addition, according to the clock calibration method provided by the embodiment of the present application, the modification of the corresponding clock task executed by the main timing unit 141 of the earphone 100 is small, that is, some characteristic functions of the earphone 100 can be purposefully timed by adopting the auxiliary timing unit 142, for example, the above-mentioned health characteristic data acquisition function, so as to provide accurate time stamps for the characteristic functions; for other time-counting requirements of the earphone 100 without an accurate time stamp, such as functions of playing music, talking, etc., the main time-counting unit 141 may be used to count time, such as recording a music playing time length to confirm whether the user wears the earphone for a long time, etc., which is not limited herein.
It will be appreciated that in the implementation of the clock calibration method described in the flowchart shown in fig. 5, the system of the earphone 100 calculates the real-time in different modes according to the timing data obtained from the auxiliary timing unit 142. In other embodiments, the earphone 100 may also acquire the timing data from the auxiliary timing unit 142 to calculate the real-time when the main timing unit 141 is not operating (i.e., in the sleep state), and acquire the timing data from the main timing unit 141 to calculate the real-time when the main timing unit 141 is operating. In other embodiments, the earphone 100 may also acquire the timing data of the main timing unit 141 to calculate the real-time in different modes, where the timing data of the main timing unit 141 in the sleep state may be converted according to the timing data of the auxiliary timing unit 142 and the clock bias correction coefficient. There is no limitation in this regard.
As an example, another embodiment of the clock calibration method provided in the present application, that is, an embodiment in which the earphone 100 acquires the timing data from the auxiliary timing unit 142 to calculate the real-time when the main timing unit 141 is not operated and acquires the timing data from the main timing unit 141 to calculate the real-time when the main timing unit 141 is operated, is described below in conjunction with another example 2.
Example 2
It can be understood that, unlike the above embodiment 1, in implementing the clock calibration method provided in the embodiment of the present application, when the system enters the sleep state and the main timer unit 141 is not operated, the auxiliary timer unit of the earphone 100 keeps timing; when the system exits from the sleep state and the main time counting unit 141 works, the system of the earphone 100 can calculate accurate time information based on the real-time timing data of the auxiliary time counting unit 142, and the main time counting unit 141 of the earphone 100 can calibrate the initial time counting time based on the calculated accurate time information until the main time counting unit 141 acquires the time service time of the mobile phone 200 again, during which the system of the earphone 100 can calculate the real-time and update the system time through the real-time timing data of the main time counting unit 141 and the initial time counting time.
Fig. 8 is a schematic flow chart of an implementation of a clock calibration method according to an embodiment of the application. It will be appreciated that the execution subject of each step in the flow shown in fig. 8 may be the earphone 100 or the microprocessor unit 110 of the earphone 100. In other embodiments, the execution subject of each step in the flowchart shown in fig. 8 may be other low-power electronic devices having similar structures to the earphone 100, which is not limited herein.
Specifically, as shown in fig. 8, the flow includes the steps of:
801: and calculating a clock deviation correction coefficient between the main timing unit and the auxiliary timing unit.
For example, referring to the timing scenario diagram shown in fig. 9, when the user needs to use the headset 100, the user may take the headset out of the headset box, or power on the headset 100 through other power-on operations, and when the bluetooth connection is established with the mobile phone 200 for the nth time at time T1 after the headset 100 is powered on, the headset 100 may be considered to be in the connected state at time T1. Wherein N is a natural number 1,2, … …, without limitation. The process of calculating the clock skew correction factor specifically may refer to the description of step 501 in embodiment 1, which is not described herein.
802: and acquiring time service time of the connected main equipment, storing current timing data of the main timing unit as a main unit latch value, and storing current timing data of the auxiliary timing unit as an auxiliary unit latch value.
For example, referring to fig. 9, the time T2 may be any time after the time T1, and the earphone 100 still operates in the connected state at the time T2, and the master time unit 141 of the earphone 100 may obtain the time last from the connected mobile phone 200 ts The micro-processing unit 110 of the earphone 100 may acquire the time service time from the main time counting unit 141 to update the system time. Meanwhile, the micro processing unit 110 of the earphone 100 may record the timing data of the main timing unit 141 at the time T2 as a main unit latch value and the timing data of the auxiliary timing unit 142 as an auxiliary unit latch value, wherein the timing data of the main timing unit 141 and the auxiliary timing unit 142 may be, for example, a duty cycle count value.
Fig. 10 is a schematic diagram showing a process of recording a main unit latch value and a subsidiary unit latch value in a connected state of the earphone 100 according to an embodiment of the present application.
As shown in fig. 10, the main timer unit 141 and the auxiliary timer unit 142 may each time the acquired time service last ts Save as save_time while recording save last separately ts The count value of the master time unit 141 at this time (for example, time T2)As a main unit latch value, and a count value of the auxiliary timer unit 142 As a slave latch value. In addition, the auxiliary timer unit 142 may store the clock deviation correction coefficient correct determined in the above step 501 coef . In the embodiment of the present application, the master timing unit 141 does not need to hold the latch value or the correction coefficient.
It will be appreciated that in some embodiments, at time T2 when the main and auxiliary timing units 141 and 142 acquire the time of service, the timing data of the two timing units may be cleared, i.e. the main unit latch value recorded at time T2And auxiliary unit latch value +.>Zero. In other embodiments, the time service last can also be obtained at the main timing unit 141 and the auxiliary timing unit 142 ts At time T2 of (2), the timing data at the time of the main timing unit 141 and the auxiliary timing unit 142 are updated to be equal to the time last ts The corresponding specified values are not limiting herein.
803: and calculating real-time and updating system time based on the correction coefficient, the acquired time service time, the stored main unit latch value and the real-time timing data of the main timing unit.
For example, referring to fig. 9, during the period in which the earphone 100 continues to operate in the connected state after the time T2, the micro-processing unit 110 of the earphone 100 may calculate an accurate real-time based on the real-time timing data of the main timing unit 141 to update the system time of the earphone 100. The calculation formula for calculating the real time may refer to the following formula (4).
Wherein real ts1 Representing the actual time obtained by calculation, namely real-time; last (last) ts The master timing unit 141 obtains the time service time in step 802; timer 1 Cnt denotes a real-time count value of the master timing unit, i.e., real-time timing data, such as a real-time duty clock cycle count value of the master timing unit 141;latching the value for the master unit recorded at time T2 in step 802; f (f) 1 Indicating the operating clock frequency of the master time unit, < >>The clock duty cycle may be represented.
It will be understood that, unlike step 503 in embodiment 1 described above, the main timer unit 141 is normally operated when the earphone 100 is in the connected state, and the auxiliary timer unit 142 may be kept operating, but the micro-processing unit 110 of the earphone 100 may not acquire the timing data of the auxiliary timer unit 142 to calculate the real-time, but acquire the timing data from the main timer unit 141 to calculate the real-time to update the system time.
804: the auxiliary timing unit continues timing when detecting that the system enters the sleep state.
For example, referring to fig. 9, when the user does not need to use the earphone 100, for example, at time T3, the earphone 100 may be loaded into the earphone box, or the earphone 100 may be turned off by other forms of power-off operation. The earphone 100 enters a sleep state at time T3, and the main timer 141 of the earphone 100 is powered down to save the system power consumption, and the auxiliary timer 142 can keep working due to lower power consumption to continue timing.
It will be appreciated that, in order not to increase the power consumption of the earphone 100 during sleep, the auxiliary timing unit 142 may be a lower power consumption auxiliary timing unit, and the timing accuracy of the auxiliary timing unit 142 may be calibrated based on the clock bias correction coefficient determined by the calculation in step 501. In some experimental tests of the earphone 100, the auxiliary timing unit 142 is still operated in the sleep state, but the earphone 100 may last longer, for example, the earphone 100 may last for X hours when the auxiliary timing unit 142 is not applied, and may last for X (1-y%) hours after the auxiliary timing unit 142 is applied, where y is calculated based on some experimental data to be less than 5, that is, the experiment proves that the auxiliary timing unit 142 causes the earphone 100 to last for no more than 5% of the duration. It can be explained that the addition of the auxiliary timer unit 142 has less influence on the power consumption of the earphone 100.
It will be appreciated that the duration of the earphone 100 is related to the duration of the earphone 100 in the low power mode and in the sleep state, and in some embodiments, the earphone 100 may enter the low power mode to power down the main time unit in a short time when it is detected that the user is not using the earphone; the sleep state is entered again when the headset 100 detects that the user is not using the headset for a long time, powering down the processor, etc. of the system. There is no limitation in this regard.
805: and detecting that the sleep state is exited but the time service time of the main equipment is not acquired, acquiring real-time timing data of the auxiliary timing unit, and calculating time information of the real-time calibration main timing unit.
For example, referring to fig. 9, if the earphone 100 is turned on again at time T4, the earphone 100 may exit from the sleep state, and at this time, the earphone 100 may not be connected to the mobile phone 200 immediately, so that the time provided by the mobile phone 200 may not be obtained in time. At this time, the main timer unit 141 of the earphone 100 is powered up to resume operation, but the time information of the start timer may be inaccurate, so ifAccurate time information is calculated by providing the timing data through the main timing unit 141, and the initial timing time when the main timing unit 141 is restored to operation is calibrated. For example, the microprocessor unit 110 of the earphone 100 may acquire the real-time timing data timer of the auxiliary timing unit 142 2 Cnt, calculating the real-time at the time T4, and taking the calculated real-time as the starting timing time for the main timing unit 141 to start operating at the time T4. The microprocessor 110 can then acquire the real-time timing data timer of the main timing unit 141 1 Cnt, calculate real time to update system time.
It will be appreciated that the micro-processing unit 110 is based on the real-time timing data timer of the auxiliary timing unit 142 2 The formula for Cnt calculation of accurate time information can be referred to the formula (3) in embodiment 1 described above. After calibrating the time information of the main time unit 141, the micro processing unit 110 calculates the real-time timing data timer of the main time unit 141 1 For Cnt calculation, the following equation (5) may be referred to as an equation for the system time of the earphone 100.
Wherein real ts2 Timing data timer of the micro-processing unit 110 at the moment when the earphone 100 exits the sleep state according to the auxiliary timing unit 142 2 Cnt and the real time calculated by equation (3) in example 1; timer 1 Cnt is real-time timing data of the main timing unit;obtaining real from the master after the master timing unit works ts2 The master cell latch value updated at the time.
It can be understood that in the embodiment of the present application, when the main time counting unit 141 of the earphone 100 is powered on, the earphone 100 can obtain the time counting data from the main time counting unit 141 with higher time counting precision to calculate the real-time, and when the main time counting unit 141 is powered on and does not obtain the time service time of the connected mobile phone 200, the initial time counting time of the main time counting unit 141 can be calculated according to the real-time counting data of the auxiliary time counting unit 142 and substituted into the above formula (5). In this manner, the headset 100 advantageously calculates a real-time to update the system time based on more accurate real-time timing data.
806: and detecting that the system enters the connection state again, re-acquiring time service time of connecting the main equipment, and updating the main unit latch value and the auxiliary unit latch value.
For example, referring to fig. 9, the headset 100 establishes a bluetooth connection with the handset 200 n+1st time at time T5, and the headset 100 enters a connected state. At this time, the earphone 100 may acquire the time service time from the mobile phone 200, update the system time of the earphone 100, and update the time information of the main timer unit 141 and the auxiliary timer unit 142 of the earphone 100 to the acquired time service time. Thus, the timing errors of the main timing unit and the auxiliary timing unit can be corrected in time, and the accuracy of the system time of the earphone 100 can be improved.
In addition, at this time, the micro processing unit 110 may record the current timing data of the main timing unit 141 and the current timing data of the auxiliary timing unit 142 again, such as the duty cycle count value, to determine the updated main unit latch valueAnd auxiliary unit latch value +.>Wherein the updated main cell latch value +.>The real acquisition in step 805 will be replaced ts2 Main unit latch value updated at the moment +.>Updated slave unit latch valueThe replacement value, which is the slave unit latch value recorded in step 802, is used for The real time is calculated subsequently. Referring to fig. 10, when the earphone 100 performs this step, the master timing unit 141 and the auxiliary timing unit 142 shown in fig. 10 update the save_time of the corresponding latch value to be the time T5.
It will be appreciated that referring to the description of step 802 above, the main timer unit 141 and the auxiliary timer unit 142 may re-acquire the time T5 of the time service, the timing data of the two timer units may be cleared, or the timing data of the two timer units may be updated to the time service time last acquired at the time T5 ts The corresponding specified values are not limiting herein.
807: and calculating real-time and updating system time based on the correction coefficient, the reacquired time service time, the updated main unit latch value and the real-time timing data of the main timing unit.
For example, referring to fig. 9, during the operation of the earphone 100 in the connection state after the time T5, the real-time timing data, such as the real-time working clock period count value, of the master timing unit 141, and the time service time acquired from the connected mobile phone 200 again according to the above step 806 may be substituted into the above formula (4), and the accurate real-time is calculated to update the system time of the earphone 100.
It will be appreciated that when the earphone 100 enters the sleep state again, the earphone 100 may repeatedly perform the steps 804 to 807, and the loop is thus repeated, which is not described herein.
It can be understood that, based on the clock calibration method provided in the embodiment of the present application, after calibrating the system time of the earphone 100 in any working state, the earphone 100 may provide a data acquisition function that needs to record an accurate timestamp. For example, the user may accurately record a time stamp for acquiring health characteristic data such as heart rate (heart rate), body temperature (temperature) and the like while wearing the earphone 100 to run outdoors or while wearing the earphone 100 to sleep at night. The health characteristic data recorded with the time stamp can be used for analyzing the health characteristic change rule of the user during exercise and during sleep, for example, the exercise health APP operated by the mobile phone 200 can display the health characteristic curves of corresponding heart rate, body temperature and the like which change along with time to the user based on the health characteristic data with the accurate time stamp, so that reasonable health advice is provided for the user, and the user experience is improved.
According to the clock calibration method provided by the embodiment of the present application, based on the implementation process of steps 801 to 807 shown in fig. 8, it is possible to implement that the earphone 100 can have accurate time information in any mode, for example, when the main timing unit of the earphone 100 does not work in the sleep state, accurate real-time can be obtained based on the timing data of the auxiliary timing unit; in the connected state, if the earphone 100 does not acquire the time service time of the connected mobile phone 200, the earphone 100 may calibrate the initial timing time of the main timing unit 141 when starting to work based on the real-time calculated by the timing data of the auxiliary timing unit; if the earphone 100 acquires the time service time of the connected mobile phone 200, the system time of the earphone 100 can be synchronized with the standard time of the main device, the timing deviation of the auxiliary timing unit can be calibrated in time, and after the time service time is acquired, the main timing unit can continue to time based on the acquired time service time, so as to provide accurate time information for the system. In addition, the auxiliary timing unit added to the earphone 100 can use an RTC timer with very low power consumption or a passive timer, so that the original cruising ability of the earphone 100 is not affected.
Fig. 11 provides a schematic diagram of real-time heart rate data and real-time body temperature data acquired in a day by the earphone 100 to which the clock calibration method provided in the present application is applied according to an embodiment of the present application.
As shown in fig. 11, the headset 100 may, for example, collect heart rate and/or body temperature of the user at time points of 0:00, 2:00, … …, 22:00, 24:00, etc., i.e. at 2 hour intervals. A corresponding scenario may be, for example, that the user remains wearing the headset 100 for a period of time of day, which may include: the user wears the headset to make noise during 0:00 to 6:00 to go to sleep, during which the headset 100 may be in a sleep state as well as a connected state may be processed, and the headset 100 may record heart rate and/or body temperature data of the user during sleep based on accurate system time. The wearing period may further include: the user runs outdoors while wearing the headset 100 during the afternoon 16:00 to 18:00, during which the user does not need to carry the mobile phone 200, and the worn headset 100 may record an accurate time stamp for the acquired heart rate and/or body temperature data, etc. at this time, although the mobile phone 200 is not connected. There is no limitation in this regard.
Further, referring to fig. 11, based on the real-time heart rate data and the real-time body temperature data collected by the earphone 100, the health applications such as the sports health APP operated by the mobile phone 200 can draw the heart rate variation graph or the body temperature variation graph of the user in one day, so that the user can observe the health status of the user.
It can be appreciated that, in other embodiments, in order to achieve accurate timing of the system time during the period when the earphone 100 wakes up again after sleep and does not acquire the time service of the main device, the auxiliary timing unit may not be added to the earphone 100, but the auxiliary timing unit may be implemented by a timing unit of the earphone 100 itself, that is, the structure of the earphone 100 may be as shown in fig. 4 a. There is no limitation in this regard.
As an example, based on the structure of the earphone 100 shown in fig. 4a, fig. 12 shows a schematic diagram of an implementation procedure of another clock calibration method different from embodiments 1 and 2 described above.
Specifically, as shown in fig. 12, without adding an auxiliary timing unit, the earphone 100 may perform the following procedure to achieve calibration of the system time:
time T1: the earphone 100 establishes connection with the mobile phone 200 for the nth time, and the timing unit of the earphone 100 acquires the time service time of the mobile phone 200 and performs timing based on the time service time. The earphone 100 can further obtain accurate real-time according to the timing data of the timing unit.
Time T2: the earphone 100 enters a sleep state, and the timer unit of the earphone 100 is powered down to be inactive.
Time T3: the earphone 100 exits from the sleep state, the timer unit of the earphone 100 is powered on and starts to count from a preset count start time, and the earphone 100 calculates real-time and updates system time according to the count data and the count start time of the timer unit.
It can be understood that the preset timing start time may be a preset fixed time value, or may also be a time residual value corresponding to the electricity of the timing unit at the time T2, so that the real-time calculated by the earphone 100 according to the timing data and the timing start time of the timing unit is the real-time to be calibrated. Whereas the process of updating the system time by the earphone 100 according to the real time to be calibrated may be continued until the time T4.
Time T4: the earphone 100 is connected with the n+1 of the mobile phone 200, the timing unit of the earphone 100 acquires the time service time of the mobile phone 200 again, marks as real_ts, and updates the system time. At this time, the earphone 100 may calculate the time offset value time_offset according to the time real_ts and the real time of the timing unit, and correct the time stamp of each event recorded by the earphone 100 from the time T3 to the time T4.
As an example, referring to fig. 12, for example, the calculated time offset value time_offset is 18h, "T3:00" shown in fig. 12 may be corrected to "T3 '18:00," "T4 02:00" to "T4' 20:00," and the time stamp of each event recorded during the time T3 to T4 may be added with a time offset value of 18h as the corrected time stamp.
It will be appreciated that the implementation of the clock calibration method illustrated in fig. 12 may enable system time calibration during time service times that are provided by the handset 200 while operating the headset 100. However, only the system time of the earphone 100 during the time period from the current wake-up to the time when the mobile phone 200 is reconnected to obtain the time service can be calibrated, but the calibration of the system time during the wake-up period before the time when the mobile phone 200 is last obtained by the earphone 100 cannot be realized.
In contrast, the clock calibration method provided by the embodiment of the present application can accurately and stably implement the system time calibration of the earphone 100 in any mode, and because the added auxiliary timing unit can use an extremely low power consumption or a passive timer, the clock calibration method provided by the embodiment of the present application does not affect or extremely affects the cruising ability of the earphone 100.
Fig. 13 shows a schematic structural diagram of a mobile phone 200 according to an embodiment of the present application. In the implementation process of the clock calibration method provided in the embodiment of the present application, the mobile phone 200 interacts with the earphone 100 when connected with the earphone 100, and provides time service time for the earphone 100 to calibrate real-time based on which the main timing unit and the auxiliary timing unit are clocked.
As shown in fig. 13, the mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (universal serial bus, USB) interface 230, a charge management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, keys 290, a motor 291, an indicator 292, a camera 293, a display 294, a user identification module (subscriber identification module, SIM) card interface 295, and the like. The sensor modules 280 may include, among other things, pressure sensor 280A, gyroscope sensor 280B, barometric sensor 280C, magnetic sensor 280D, acceleration sensor 280E, distance sensor 280F, proximity sensor 280G, fingerprint sensor 280H, temperature sensor 280J, touch sensor 280K, ambient light sensor 280L, and the like.
It should be understood that the structure illustrated in the embodiment of the present invention is not limited to the specific embodiment of the mobile phone 200. In other embodiments of the present application, the cell phone 200 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the processor 210 may include one or more interfaces, such as a universal serial bus (universal serial bus, USB) interface 230, or the like.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present invention is only illustrative, and is not limited to the structure of the mobile phone 200. In other embodiments of the present application, the mobile phone 200 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 240 is configured to receive a charge input from a charger. The power management module 241 is used for connecting the battery 242, and the charge management module 240 and the processor 210.
The wireless communication function of the mobile phone 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 200 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 200. The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied to the handset 200. For example, the mobile phone 200 and the earphone 100 may be connected through bluetooth.
In some embodiments, the antenna 1 of the handset 200 is coupled to the mobile communication module 250 and the antenna 2 is coupled to the wireless communication module 260 so that the handset 200 can communicate with a network and other devices via wireless communication technology and can be based on network time synchronization technology to enable maintaining synchronization with coordinated Universal Time (UTC). The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The cell phone 200 implements display functions through a GPU, a display 294, an application processor, and the like.
The mobile phone 200 may implement a photographing function through an ISP, a camera 293, a video codec, a GPU, a display 294, an application processor, and the like.
The external memory interface 220 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the cell phone 200. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 221 may be used to store computer executable program code that includes instructions. The internal memory 221 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the handset 200, etc. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 210 performs various functional applications and data processing of the mobile phone 200 by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
The handset 200 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, an application processor, and the like. Such as talking, music playing, recording, etc.
Keys 290 include a power on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be a touch key. The handset 200 may receive key inputs, generating key signal inputs related to user settings and function control of the handset 200.
The motor 291 may generate vibration cues, which may be used for incoming call vibration cues, as well as for touch vibration feedback.
The indicator 292 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message indicating a missed call, a notification, etc.
The SIM card interface 295 is for interfacing with a SIM card. The SIM card may be inserted into the SIM card interface 295 or removed from the SIM card interface 295 to allow contact and separation from the handset 200. The SIM card interface 295 may also be compatible with external memory cards. The mobile phone 200 interacts with the network through the SIM card to realize the functions of communication, data communication and the like. In some embodiments, handset 200 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the handset 200 and cannot be separated from the handset 200.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one example implementation or technique disclosed in accordance with embodiments of the present application. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment.
The disclosure of the embodiments of the present application also relates to an operating device for executing the text. The apparatus may be specially constructed for the required purposes, or it may comprise a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, magnetic-optical disks, read-only memories (ROMs), random Access Memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, application Specific Integrated Circuits (ASICs), or any type of media suitable for storing electronic instructions, and each may be coupled to a computer system bus. Furthermore, the computers referred to in the specification may include a single processor or may be architectures employing multiple processors for increased computing power.
Additionally, the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the disclosed subject matter. Accordingly, the present application example disclosure is intended to be illustrative, but not limiting, of the scope of the concepts discussed herein.

Claims (15)

1. A method of clock calibration, comprising:
detecting that a first electronic device enters a dormant state, controlling a first timer of the first electronic device to stop timing, and controlling a second timer of the first electronic device to be in a timing state;
and detecting that the first electronic equipment enters a working state from a dormant state, and not acquiring time service time from the second electronic equipment, and determining the system time of the first electronic equipment based on the timing result of the second timer.
2. The method of claim 1, wherein the determining the system time of the first electronic device based on the timing result of the second timer comprises:
determining a second clock frequency of the second timer based on a first clock frequency of the first timer and a clock correction factor, wherein the clock correction factor is used to determine a degree of deviation between a count result of the first timer and a count result of the second timer;
A system time of the first electronic device is determined based on a start timing time of the second timer, a clock count value of the second timer, and the second clock frequency.
3. The method of claim 2, wherein the starting timing time of the second timer is determined based on a historical timing time acquired by the first electronic device from a second electronic device.
4. A method according to claim 3, wherein the clock count value of the second timer is determined by:
detecting that the first electronic device acquires the historical time service time from the second electronic device, and recording a first count value of the second timer at the moment of updating the initial timing time based on the historical time service time;
and determining the difference value between the second count value of the second timer at the current moment and the first count value as the clock count value of the second timer.
5. A method according to claim 3, wherein the clock count value of the second timer is determined by:
detecting that the first electronic device acquires the historical time service time from the second electronic device, and resetting a count value of the second timer when the initial time service time is updated based on the historical time service time;
And determining a third count value of the second timer at the current moment as a clock count value of the second timer.
6. The method of claim 1, wherein the determining the system time of the first electronic device based on the timing result of the second timer comprises:
calibrating the initial timing time of the first timer based on the timing result of the second timer;
a system time of the first electronic device is determined based on the calibrated starting timing time of the first timer, the clock count value of the first timer, and the first clock frequency of the first timer.
7. The method of claim 6, wherein calibrating the starting timing time of the first timer based on the timing result of the second timer comprises:
determining a second clock frequency of the second timer based on a first clock frequency of the first timer and a clock correction factor, wherein the clock correction factor is used to determine a degree of deviation between a count result of the first timer and a count result of the second timer;
and determining the calibrated starting timing time of the first timer based on the starting timing time of the second timer, the clock count value of the second timer at the moment when the first electronic device enters the working state from the dormant state, and the second clock frequency.
8. The method of claim 7, wherein the clock count value of the first timer is determined by:
recording a fourth count value of the first timer when the initial timing time of the first timer is calibrated;
and determining the difference value between the fifth count value and the fourth count value of the first timer at the current moment as the clock count value of the first timer.
9. The method according to any one of claims 2 to 5, 7 or 8, wherein the clock correction factor is determined by:
acquiring a sixth count value of the first timer and a seventh count value of the second timer within preset time, and determining the clock correction coefficient based on the ratio of the sixth count value to the seventh count value; or,
and acquiring a first clock period corresponding to a preset clock count value completed in the working process of the first timer and a second clock period corresponding to the preset clock count value completed in the working process of the second timer, and determining the clock correction coefficient based on the ratio of the second clock period to the first clock period.
10. The method according to any of claims 2 to 9, wherein the second timer is an RTC timer, the second timer having a lower power consumption than the first timer.
11. The method of any of claims 2 to 9, wherein the first electronic device is a smart wearable device.
12. The method of claim 11, wherein the first electronic device is any one of a headset, a watch, a bracelet, glasses, a ring, a necklace.
13. A clock control circuit, comprising:
the control unit is used for controlling the first timer of the first electronic equipment to stop timing and controlling the second timer of the first electronic equipment to be in a timing state when detecting that the first electronic equipment enters the dormant state; the system time of the first electronic equipment is determined based on the timing result of the second timer when the first electronic equipment is detected to enter the working state from the dormant state and the time service time is not acquired from the second electronic equipment; the method comprises the steps of,
the first timer is used for timing during the working state of the first electronic equipment and sending the timing result to the control unit;
And the second timer is used for keeping timing during the sleep state or the working state of the first electronic equipment and sending the timing result of the sleep state of the first electronic equipment to the control unit for processing.
14. An electronic device, comprising: one or more processors; one or more memories; and at least two timers; wherein,
the one or more memories stores one or more programs that, when executed by the one or more processors, cause the electronic device to perform the clock calibration method of any of claims 1-12.
15. A computer readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the clock calibration method of any of claims 1 to 12.
CN202210744716.7A 2022-06-27 2022-06-27 Clock calibration method, electronic device, and computer-readable storage medium Pending CN117348689A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210744716.7A CN117348689A (en) 2022-06-27 2022-06-27 Clock calibration method, electronic device, and computer-readable storage medium
PCT/CN2023/100178 WO2024001780A1 (en) 2022-06-27 2023-06-14 Clock calibration method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210744716.7A CN117348689A (en) 2022-06-27 2022-06-27 Clock calibration method, electronic device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN117348689A true CN117348689A (en) 2024-01-05

Family

ID=89363679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210744716.7A Pending CN117348689A (en) 2022-06-27 2022-06-27 Clock calibration method, electronic device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN117348689A (en)
WO (1) WO2024001780A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872172B (en) * 2009-04-22 2012-05-30 凌通科技股份有限公司 Sleep mode power saving method, keyboard control circuit and triangular scanning keyboard
US9749962B1 (en) * 2016-06-23 2017-08-29 Qualcomm Incorporated System and method for closed loop multimode radio system sleep clock frequency compensation
CN112486311B (en) * 2020-12-08 2023-07-14 南昌华勤电子科技有限公司 Low-power consumption control method and system of embedded system and storage medium
CN112462846A (en) * 2020-12-14 2021-03-09 深圳市晨北科技有限公司 Clock correction method, clock correction device, computer equipment and storage medium
CN114499732B (en) * 2022-02-09 2023-11-17 中央广播电视总台 Clock calibration method, clock calibration device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
WO2024001780A1 (en) 2024-01-04

Similar Documents

Publication Publication Date Title
CN112712803B (en) Voice awakening method and electronic equipment
CN110609645B (en) Control method based on vertical synchronization signal and electronic equipment
CN113242079B (en) Terminal based on satellite broadband data communication
EP1970725A1 (en) A positioning device and a method of operating therof
US20090219205A1 (en) Apparatus and methods for maintaining a reliable time clock on a mobile computing device supporting satellite based position determination capability
US10120345B2 (en) Electronic timepiece, electronic device, update information transmission device, and update information transmission program
CN201379112Y (en) Wireless electronic communication multimedia helmet
CN112671080B (en) Charging method and device
CN104917581A (en) System time correction method and device, terminal and router
KR20150025609A (en) Apparatas and method for measuring a charge of location in the way of low power in an electronic device
CN114448015B (en) Temperature compensation method and device, terminal equipment and readable storage medium
CN213585795U (en) Dual-mode NTP timer based on GPS/CDMA
CN117348689A (en) Clock calibration method, electronic device, and computer-readable storage medium
CN113242081A (en) Intelligent terminal based on satellite communication
US11550269B2 (en) Electronic timepiece, information update control method and storage medium
CN201341167Y (en) Wireless electronic communication multimedia spectacles
CN205384454U (en) Intelligence analog -type quartz crystal watch time calibration system
CN116679900B (en) Audio service processing method, firmware loading method and related devices
AU2007354784B2 (en) A hearing aid adapted for issuing a notification and a method for issuing a notification
CN113242080A (en) Core module based on satellite communication
CN113316756A (en) Method, device and system for controlling operation of smart watch
JP2008503750A (en) Current time update method, current time update method using device, current time update method implementation memory
JP2009021671A (en) Cellular phone
CN113612884A (en) Method for implementing shutdown alarm clock, electronic device and computer readable storage medium
JP2005167618A (en) Radio portable terminal with time correcting function

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