Time synchronization method, electronic device, chip and readable storage medium
Patent Information
- Application Number
- CN202210181978.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-02-25
AI Technical Summary
然而在无线蓝牙耳机放入耳机盒子的时间过长的情况下,无线蓝牙耳机会进入节电模式,丢失作为基准的实际时间信息,进而导致无线蓝牙耳机所记录的时刻不准确
Smart Images

Figure CN116744162B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a time synchronization method, electronic device, chip, and readable storage medium. Background Technology
[0002] With the technological advancements in smart terminal devices, their functions are becoming increasingly diverse. For example, wireless Bluetooth headphones can not only play audio but also measure body temperature.
[0003] When measuring body temperature using wireless Bluetooth earbuds, it's usually necessary to record the time of measurement. However, due to cost considerations, wireless Bluetooth earbuds typically don't have a real-time clock (RTC) chip, meaning they cannot determine the actual time themselves. Generally, wireless Bluetooth earbuds can synchronize their time with a mobile phone via an app. The earbuds obtain the actual time information from the phone and use that as a reference to start timing, resulting in the recorded time. However, if the earbuds are placed in the charging case for an extended period, they enter power-saving mode, losing the reference time information and leading to inaccurate recordings. To record an accurate time, the app must be reopened for time synchronization.
[0004] Therefore, improving the convenience of time synchronization for smart terminal devices has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a time synchronization method, electronic device, chip, and readable storage medium, which improves the convenience of time synchronization for smart terminal devices.
[0006] In a first aspect, a time synchronization method is provided, applied to a time synchronization system. The time synchronization system includes a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device do not include a real-time clock (RTC) chip. The method includes: when the first electronic device is in a first state, the first electronic device receives first time information sent by the second electronic device, the first time information being obtained based on actual time information; the first electronic device starts a first timer based on the first time information, the first timer being a timer in the first electronic device; when the first electronic device is in a second state, it acquires second time information of the first timer, the second time information being time information obtained based on the count of the first timer; and the first electronic device sends third time information to the second electronic device, the third time information being time information obtained based on the first time information and the second time information.
[0007] The first electronic device and the second electronic device can be wearable devices.
[0008] For example, the first electronic device may be the charging case of a TWS earphone assembly, and the second electronic device may be the earphone itself.
[0009] For example, the first electronic device may be a charging device for a smartwatch, and the second electronic device may be a smartwatch.
[0010] For ease of understanding, this application embodiment uses the example of the first electronic device being the earphone case in a TWS earphone assembly and the second electronic device being the earphone in a TWS earphone assembly.
[0011] In the embodiments of this application, when the earphone charging case detects that an earphone has entered the charging case, the charging case receives first time information sent by the earphone. Based on the first time information, the charging case starts a first timer. When the charging case detects that the earphone has left the charging case, it obtains second time information from the timer and sends third time information to the earphone. The first time information is obtained based on actual time information, the second time information is obtained based on the timer's count, and the third time information is obtained based on both the first and second time information. This allows the charging case to continue timing based on the first time information to obtain the third time information even if the earphone loses its actual time information (as a reference time). Furthermore, when the earphone needs to obtain the actual time, it can use the third time information obtained by continuing timing based on the first time information to obtain the current actual time, without the earphone needing to establish a connection with the terminal device and use an application on the terminal device to obtain the current time information, thus improving the convenience of obtaining time information for the earphone.
[0012] In one embodiment, obtaining the second time information of the first timer includes: obtaining a first count value of the first timer at a first moment, where the first moment is the moment when the first electronic device receives the first time information sent by the second electronic device; obtaining a second count value of the first timer at a second moment, where the second moment is the moment when the first electronic device is in a second state; and obtaining the second time information based on the difference between the first count value and the second count value.
[0013] It should be understood that the first electronic device can refer to the earphone case, and the second electronic device can refer to the earphone. The second state can refer to the state where the earphone is detected leaving the earphone case. That is, in this embodiment, obtaining the second time information of the first timer includes: obtaining the first count value of the first timer at a first moment, where the first moment is the moment when the earphone case receives the first time information sent by the earphone; obtaining the second count value of the first timer at a second moment, where the second moment is the moment when the earphone case detects that the earphone has left the earphone case; and obtaining the second time information based on the difference between the first count value and the second count value.
[0014] In the embodiments of this application, the second time information is obtained through a first count value and a second count value. The first count value is the count value of the first timer at the moment the first timer receives the first time information in the earphone compartment, and the second count value is the count value of the first timer at the moment the earphones are detected leaving the earphone compartment. In other words, the second time information obtained by the earphone compartment can be simply obtained by reading the count value of the first timer, improving the convenience of obtaining the second time information.
[0015] In one embodiment, the method further includes: a second electronic device receiving actual time information sent by a third electronic device, the third electronic device including an RTC.
[0016] It should be understood that the second electronic device can refer to headphones, and the third electronic device can refer to a terminal device. Terminal devices can refer to mobile phones, tablets, laptops, PDAs, wearable devices, etc.
[0017] In this embodiment, the earphone receives actual time information sent by a terminal device, which includes an RTC.
[0018] In the embodiments of this application, the earphone receives actual time information sent by a terminal device including an RTC, and obtains first time information based on the actual time information, so that the obtained first time information can be easily obtained through the terminal device, thereby improving the convenience of obtaining the first time information.
[0019] In one embodiment, the method further includes: a second electronic device obtaining a body temperature measurement result based on third time information, the body temperature measurement result including body temperature information and the measurement time corresponding to the body temperature information.
[0020] In one embodiment, the second electronic device obtains the body temperature measurement result based on the third time information, including: the second electronic device acquiring the third count value of the second timer at the third moment, where the second timer is a timer in the second electronic device, and the third moment refers to the moment when the second electronic device receives the third time information; the second electronic device acquiring the fourth count value of the second timer at the fourth moment, where the fourth moment refers to the moment when the second electronic device performs body temperature measurement, and the fourth moment is the moment obtained by adding a first duration to the moment indicated by the third time information, where the first duration refers to the duration corresponding to the difference between the fourth count value and the third count value; and the second electronic device using the body temperature information obtained from the body temperature measurement at the fourth moment and the fourth moment as the body temperature measurement result.
[0021] In the embodiments of this application, after the earphone receives the third time information sent by the earphone compartment, it can obtain the body temperature measurement result, including body temperature information and the measurement time corresponding to the body temperature information, based on the third time information. Then, it can generate a body temperature measurement curve based on the body temperature measurement result. Since the body temperature measurement result is obtained based on the third time information, which is obtained by adding the count of the first timer and the duration of each tick to the actual time information as a reference, the measurement time corresponding to the body temperature information is the actual time. Thus, the body temperature measurement result is obtained based on the actual time. In other words, the measurement time corresponding to the body temperature information in the body temperature measurement result displayed to the user is the actual time, making it more convenient for the user to read the body temperature measurement result and improving the user experience.
[0022] In one embodiment, the first electronic device is an earphone compartment, and the second electronic device is an earphone.
[0023] In one embodiment, the first state refers to the state in which the earphones are detected to have entered the earphone case, and the second state refers to the state in which the earphones are detected to have left the earphone case.
[0024] Secondly, a time synchronization method is provided, applied to a first electronic device in a time synchronization system. The time synchronization system includes a first electronic device and a second electronic device, neither of which includes a real-time clock (RTC) chip. The method includes: when the first electronic device is detected to be in a first state, receiving first time information sent by the second electronic device, the first time information being obtained based on actual time information; starting a first timer based on the first time information, the first timer referring to a timer in the first electronic device; when the first electronic device is detected to be in a second state, acquiring second time information of the first timer, the second time information being time information obtained based on the timer's count; and sending third time information to the second electronic device, the third time information being time information obtained based on the first and second time information.
[0025] It should be understood that the first electronic device can refer to the earphone case, and the second electronic device can refer to the earphones. The first state can refer to the state where the earphones are detected entering the earphone case, and the second state can refer to the state where the earphones are detected leaving the earphone case.
[0026] In one embodiment, the first electronic device is an earphone case, and the second electronic device is an earphone. When the first electronic device is detected to be in a first state, receiving first time information sent by the second electronic device includes: receiving first time information sent by the earphone when the earphone is detected to be entering the earphone case; when the first electronic device is detected to be in a second state, obtaining second time information of the first timer includes: obtaining second time information when the earphone is detected to be leaving the earphone case.
[0027] In one embodiment, obtaining the second time information of the first timer includes: obtaining a first count value of the first timer at a first moment, where the first moment is the moment when the first electronic device receives the first time information sent by the second electronic device; obtaining a second count value of the first timer at a second moment, where the second moment is the moment when the first electronic device is in a second state; and obtaining the second time information based on the difference between the first count value and the second count value.
[0028] The above embodiments are similar in implementation method and beneficial effect to the embodiments in the first aspect above, and will not be repeated here.
[0029] Thirdly, a time synchronization method is provided, applied to a second electronic device in a time synchronization system, the time synchronization system including a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device do not include an RTC, the method comprising:
[0030] When the first electronic device detects that it is in the first state, it sends first time information to the first electronic device, which is obtained based on actual time information; it receives third time information sent by the first electronic device, which is based on the first time information and the second time information, and the second time information is time information obtained based on the count of the timer in the first electronic device.
[0031] It should be understood that the first electronic device can refer to the earphone case, and the second electronic device can refer to the earphones. The first state can refer to the state where the earphones are detected entering the earphone case, and the second state can refer to the state where the earphones are detected leaving the earphone case.
[0032] In one embodiment, the method further includes: obtaining a body temperature measurement result based on third time information; the body temperature measurement result includes body temperature information and the measurement time corresponding to the body temperature information.
[0033] In the embodiments of this application, after the earphone receives the third time information sent by the earphone compartment, it can obtain the body temperature measurement result, including body temperature information and the measurement time corresponding to the body temperature information, based on the third time information. Then, it can generate a body temperature measurement curve based on the body temperature measurement result. Since the body temperature measurement result is obtained based on the third time information, which is obtained by adding the count of the first timer and the duration of each tick to the actual time information as a reference, the measurement time corresponding to the body temperature information is the actual time. Thus, the body temperature measurement result is obtained based on the actual time. In other words, the measurement time corresponding to the body temperature information in the body temperature measurement result displayed to the user is the actual time, making it more convenient for the user to read the body temperature measurement result and improving the user experience.
[0034] In one embodiment, obtaining the body temperature measurement result based on the third time information includes: acquiring a third count value of a second timer at a third time, wherein the second timer is a timer in a second electronic device, and the third time refers to the moment when the second electronic device receives the third time information; acquiring a fourth count value of the second timer at a fourth time, wherein the fourth time refers to the moment when the second electronic device performs body temperature measurement, and the fourth time is the moment obtained by adding a first duration to the moment indicated by the third time information, wherein the first duration refers to the duration corresponding to the difference between the fourth count value and the third count value; and using the body temperature information obtained by performing body temperature measurement at the fourth time and the fourth time as the body temperature measurement result.
[0035] The above embodiments are similar in implementation method and beneficial effect to the embodiments in the first aspect above, and will not be repeated here.
[0036] Fourthly, a time synchronization device is provided, including a unit for performing any of the methods in the second aspect. The device may be a terminal device or a chip within a terminal device. The device may include an input unit and a processing unit.
[0037] When the device is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may also include a memory for storing computer program code, which, when the processor executes the computer program code stored in the memory, causes the terminal device to perform any of the methods in the second aspect.
[0038] When the device is a chip within a terminal device, the processing unit can be an internal processing unit of the chip, and the input unit can be an output interface, pin, or circuit, etc.; the chip may also include a memory, which can be an internal memory of the chip (e.g., registers, cache, etc.) or an external memory (e.g., read-only memory, random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, the chip performs any of the methods in the second aspect.
[0039] In one possible implementation, the memory stores computer program code; the processor executes the computer program code stored in the memory. When the computer program code stored in the memory is executed, the processor performs the following: when the first electronic device is detected to be in a first state, it receives first time information sent by the second electronic device, the first time information being obtained based on actual time information; it starts a first timer based on the first time information, the first timer referring to a timer in the first electronic device; when the first electronic device is detected to be in a second state, it acquires second time information of the first timer, the second time information being time information obtained based on the timer's count; and it sends third time information to the second electronic device, the third time information being time information obtained based on the first and second time information.
[0040] Fifthly, a time synchronization device is provided, including a unit for performing any of the methods in the third aspect. The device may be a terminal device or a chip within a terminal device. The device may include an input unit and a processing unit.
[0041] When the device is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may also include a memory for storing computer program code, which, when the processor executes the computer program code stored in the memory, causes the terminal device to perform any of the methods in the third aspect.
[0042] When the device is a chip within a terminal device, the processing unit can be an internal processing unit of the chip, and the input unit can be an output interface, pin, or circuit, etc.; the chip may also include memory, which can be memory within the chip (e.g., registers, cache, etc.) or memory located outside the chip (e.g., read-only memory, random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, it causes the chip to execute any of the methods in the third aspect.
[0043] In one possible implementation, the memory is used to store computer program code; the processor executes the computer program code stored in the memory, and when the computer program code stored in the memory is executed, the processor is used to perform: when the first electronic device detects that the first electronic device is in a first state, sending first time information to the first electronic device, the first time information being obtained based on actual time information; receiving third time information sent by the first electronic device, the third time information being based on the first time information and the second time information, the second time information being time information obtained based on the count of the timer in the first electronic device.
[0044] In a sixth aspect, a terminal device is provided, the terminal device including a processor, the processor being configured to couple with a memory, read instructions from the memory, and cause the electronic device to execute the method provided in the second aspect according to the instructions.
[0045] In a seventh aspect, a terminal device is provided, the terminal device including a processor, the processor being configured to couple with a memory, read instructions from the memory, and cause the electronic device to execute the method provided in the third aspect according to the instructions.
[0046] Eighthly, a computer-readable storage medium is provided, which stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method provided in the second aspect.
[0047] In a ninth aspect, a computer-readable storage medium is provided, which stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method provided in the third aspect.
[0048] In a tenth aspect, a chip is provided, the chip including a processor for coupling with a memory and executing a computer program in the memory to perform the method provided in the second aspect.
[0049] In the eleventh aspect, a chip is provided, the chip including a processor for coupling with a memory and executing a computer program in the memory to perform the method provided in the third aspect.
[0050] In a twelfth aspect, a computer program product containing instructions is provided, which, when run on an electronic device, causes the electronic device to perform the method provided in the second aspect.
[0051] In a thirteenth aspect, a computer program product containing instructions is provided, which, when run on an electronic device, causes the electronic device to perform the method provided in the third aspect. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the existing technology for measuring body temperature via headphones;
[0053] Figure 2 This is a schematic diagram of a normal body temperature curve;
[0054] Figure 3 This is a schematic diagram of an abnormal body temperature curve.
[0055] Figure 4 This is a schematic diagram illustrating an application scenario of the time synchronization method in one embodiment of this application;
[0056] Figure 5This is a software structure block diagram of an electronic device in one embodiment of this application;
[0057] Figure 6 This is a flowchart illustrating a time synchronization method in one embodiment of this application;
[0058] Figure 7 This is a flowchart illustrating a time synchronization method in one embodiment of this application;
[0059] Figure 8 This is a flowchart illustrating a time synchronization method in one embodiment of this application;
[0060] Figure 9 This is a schematic diagram of the time synchronization device in one embodiment of this application;
[0061] Figure 10 This is a schematic diagram of an electronic device in one embodiment of this application. Detailed Implementation
[0062] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0063] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.
[0064] Currently, with the development of smart terminal technology, smart terminal devices are realizing more and more functions. For example, TWS earbuds can not only play audio content, but also measure human body temperature. During the body temperature measurement process, the measurement time is usually recorded, and a body temperature curve is generated based on the temperature measurement result and the corresponding measurement time. TWS earbuds usually do not have an RTC (Real-Time Clock), so the earbuds themselves cannot determine the actual time. After a communication connection is established between the TWS earbuds and the mobile phone, an application installed on the mobile phone can be used to obtain the actual time information sent by the mobile phone, and a timer can be started based on this actual time information to obtain the actual time. This process is called time synchronization.
[0065] In one possible scenario, TWS earbuds may lose the actual time information used as a reference, leading to time errors. For example, as shown... Figure 1 As shown, at time T0, the phone and TWS earbuds synchronize their time. At this time, when the TWS earbuds measure body temperature, they can use the time synchronized from the phone as the base time to start timing, and determine the corresponding temperature measurement time based on the time obtained from the timing. For example, as... Figure 2 As shown, each body temperature value corresponds to a measurement time. At time T1, the user finishes using the TWS earbuds and places them in the charging case. If the TWS earbuds remain in the charging case for an extended period, for example, more than 3 hours, they will enter transport mode to conserve battery power. When the TWS earbuds enter transport mode, the reference time synchronized from the phone will be lost. Continuing as... Figure 1 As shown, if the interval between time T2 and time T1 is too long, the TWS earbuds enter transport mode. At time T2, when the user removes the TWS earbuds from the charging case and takes their temperature, the recorded temperature measurement time is incorrect due to the loss of the reference time, resulting in errors such as... Figure 3 The curve shown.
[0066] To facilitate understanding, the relevant terms and concepts that may be involved in the embodiments of this application will be introduced below.
[0067] (1) Real-time Clock (RTC)
[0068] RTC stands for Integrated Circuit, commonly known as a clock chip. Real-time clock chips are among the most widely used consumer electronics products in daily life. They provide people with accurate real-time time or provide electronic systems with a precise time reference. Currently, most real-time clock chips use high-precision crystal oscillators as their clock source.
[0069] (2) True Wireless Stereo (TWS)
[0070] TWS technology refers to a technology where a mobile phone connects to a main speaker, which then wirelessly connects to a secondary speaker via Bluetooth, achieving true wireless separation of the left and right Bluetooth channels. When the secondary speaker is not connected, the main speaker reverts to mono sound quality. When TWS technology is applied to Bluetooth headphones, it results in TWS Bluetooth headphones. It should be noted that the headphones mentioned in this application embodiment may or may not be TWS headphones.
[0071] (3) Transportation Mode
[0072] Transportation mode typically refers to the lowest quiescent current state of an electronic device. When an electronic device is in transportation mode, it usually means that the battery connection has been disconnected to reduce battery power loss. At the same time, the timer in the electronic device may also stop working when the battery connection is disconnected, resulting in discontinuous counting by the timer and thus timer timing errors.
[0073] The time synchronization method provided in this application can be applied to a time synchronization system, which includes a first electronic device and a second electronic device. Optionally, the first electronic device and the second electronic device can be wearable devices.
[0074] In one embodiment, the first electronic device may be the earphone case of a TWS earphone assembly, and the second electronic device may be the earphone itself.
[0075] In one embodiment, the first electronic device may be a charging device for a smartwatch, and the second electronic device may be a smartwatch.
[0076] The application scenarios of the embodiments of this application will be briefly described below.
[0077] With the development of smart terminal technology, headphones can perform other functions besides playing audio content, such as measuring body temperature. For example,... Figure 4 As shown, the user inserts the earphones into their ears, and the earphones use an integrated temperature sensor to measure the user's body temperature. The earphones record the detected temperature and the corresponding detection time, and send the detected temperature and the corresponding detection time to the mobile phone. The mobile phone generates a body temperature curve and displays it to the user.
[0078] It should be understood that the above are illustrative examples of application scenarios and do not limit the application scenarios of this application in any way.
[0079] The following is combined Figures 5 to 8 The time synchronization method provided in the embodiments of this application will be described in detail.
[0080] It should be understood that the time synchronization method provided in this application embodiment can be applied to an earphone assembly consisting of earphones and an earphone charging case. Here, earphones typically refer to TWS earphones, which require the charging case for charging. The earphone charging case typically refers to the charging housing for TWS earphones. The earphones and charging case can be integrated with an embedded operating system to implement simple control functions, such as controlling the charging case to charge the earphones. In one example, the embedded operating system could be a LiteOS system.
[0081] Typically, a layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.
[0082] In one example, the system software layered architecture diagram of TWS earbuds and their corresponding charging case can be as follows: Figure 5 As shown, it includes the application layer, framework layer, and kernel layer.
[0083] The application layer can include a series of application packages. For example, the application layer may include a box event module, a state management module, and an application interaction module.
[0084] The Box Events module is used to handle events detected by the box, such as the earphone entering or leaving the box.
[0085] The application interaction module is used to handle user-level interaction events as well as interaction events between the headset and other devices, such as mobile phones.
[0086] The framework layer includes modules such as device management, storage management, and application management.
[0087] The kernel layer is the layer between hardware and software. For example, the kernel layer includes timers and serial communication modules.
[0088] A timer is used to simulate a clock for timing.
[0089] The serial communication module is used for serial communication between the earphone and the earphone compartment. For example, the serial communication module can be used for event communication and time information transmission.
[0090] It should be noted that the software framework layer of any electronic device mentioned in the embodiments of this application may include, for example: Figure 5 The software framework shown may have more or fewer layers, and each layer may include, for example, Figure 5 The number of modules shown can be more or less.
[0091] When the Hall sensor on the charging case detects that the earbuds have been inserted into the charging case, such as Figure 6 As shown, the application management module in the framework layer detects that the earphones have entered the charging case and sends a message indicating that the earphones have entered the charging case to the box event module in the application layer. Based on the received message, the box time module initiates an earphone insertion event and sends a request to the serial communication module in the kernel layer to obtain first-time information. This request is then sent to the earphones via the serial communication module. Upon receiving the request, the earphones' serial communication module retrieves the first-time information from the application interaction module in the earphones' application layer. Finally, the earphones' serial communication module sends the first-time information to the serial communication module in the charging case.
[0092] The first-time information can be generated by the application interaction module in the application layer of the headset based on the count sent by the timer module.
[0093] For example, the serial communication module in the kernel layer of the headset receives the actual time information sent by the terminal device and sends it to the application interaction module. The application interaction module then starts a timer to begin counting. When the serial communication module in the headset receives a request to obtain the first time information, it sends the request to the application interaction module. At this time, the application interaction module obtains the count determined after the timer starts and the actual time information sent by the terminal device to generate the first time information, and sends the first time information to the serial communication module. The serial communication module in the headset then sends the first time information to the serial communication module in the headphone charging case.
[0094] When the earphone charging case receives the first time information from the serial port module, it starts a timer to count. When the earphone charging case detects that the earphone has left the charging case, the device management module sends a message to the box event module instructing the earphone to leave the charging case. Upon receiving the message that the earphone has left the charging case, the box event module sends a request to the timer module to obtain the third time information. The timer module obtains the second time information based on the timer's count, and then obtains the third time information based on the first and second time information. The timer module sends the third time information to the serial communication module, and then sends the third time information to the earphone through the serial communication module.
[0095] It should be understood that the application interaction module in the headphones can read the count value stored in the timer, and then obtain the first time information based on the actual time information and the count value.
[0096] In one example, the flowchart of the time synchronization method provided in this application embodiment can be as follows: Figure 7 As shown, this method is applied to a time synchronization system, which can refer to an earphone assembly, including a charging case and earphones. It should be understood that the charging case and earphones typically do not contain a real-time clock (RTC) chip. The method includes:
[0097] S101. When the earphone charging case detects that the earphone has been inserted into the charging case, the charging case receives the first time information sent by the earphone. The first time information is obtained based on the actual time information.
[0098] The actual time information in the earphones can be obtained from a terminal device including an RTC (Real Time Control Unit). Optionally, the earphones receive actual time information sent by a terminal device (a third electronic device), which includes an RTC chip.
[0099] It should be understood that the first-time information is obtained based on the actual time information and can be used to indicate the actual time. That is to say, the first-time information can be the actual time of the current moment; or it can be time information obtained by acquiring a reference time and timing it using the earphone's timer based on that reference time; the embodiments of this application do not limit this.
[0100] Terminal devices can refer to mobile phones, tablets, laptops, PDAs, wearable devices, etc.
[0101] For example, the first-time information could be the actual time information sent by the receiving terminal device in real time.
[0102] For example, the first time information can be the actual time information sent by the mobile phone to the earphone when a communication connection is established between the earphone and the mobile phone (the aforementioned terminal device). After receiving the actual time information, the earphone uses this actual time information as a reference to start a timer in the earphone and performs timing based on the actual time information to obtain the first time information. The obtained first time information includes the actual time information as the reference and the number of timer counts accumulated on top of the reference.
[0103] It should be understood that the timer in the embodiments of this application is typically a software timer, which is a timer simulated by software based on the system tick clock interrupt. Generally, the software timer uses a tick as the basic timing unit, and triggers a user-defined callback function after a set tick clock count value. The timing accuracy is related to the period of the system tick clock. The software timer is a system resource; a contiguous block of memory is allocated during module initialization, and it uses one of the system's queues and one task resource.
[0104] In other words, the timer typically counts at preset intervals, for example, once every 10ms. Therefore, by adding the count count to the actual time information (which serves as a reference) and multiplying it by 10ms, we can obtain the actual time information at the current moment.
[0105] In the embodiments of this application, the earphone receives actual time information sent by a terminal device including an RTC, and obtains first time information based on the actual time information, so that the obtained first time information can be easily obtained through the terminal device, thereby improving the convenience of obtaining the first time information.
[0106] S102, The earphone case starts the first timer based on the first time information.
[0107] When the earphone case receives the first time information sent by the earphone, it can start a timer in the kernel layer based on the first time information to keep track of the time.
[0108] S103. When the earphone case detects that the earphone has left the earphone case, it obtains the second time information of the first timer. The second time information is the time information obtained based on the count of the first timer. The first timer refers to the timer on the earphone case.
[0109] As described above, the timer uses a tick as its basic unit of measurement. This means that the timer has a corresponding tick count value at each moment. Since the duration of each tick is the same, time can be determined by multiplying the tick's duration by its count value. The second time information can be obtained from the tick count value.
[0110] Optionally, one possible implementation of S103 "obtain the second time information of the timer" is as follows: Figure 8 As shown, it includes:
[0111] S103A: The earphone compartment obtains the first count value of the timer at the first moment, where the first moment is the moment when the earphone compartment receives the first time information sent by the earphone.
[0112] Each moment in the timer corresponds to a count of one tick. The count value corresponding to the moment when the earphone case receives the first time information sent by the earphone is the first count value.
[0113] S103B: Obtain the second count value of the timer at the second moment, which is the moment when the headphone compartment detects that the headphones have left the headphone compartment.
[0114] S103C. Obtain the second time information based on the difference between the first count value and the second count value.
[0115] After obtaining the first count value and the second count value, the difference between the second count value and the first count value can be used as the count of the timer. Then, the product of the count and the timer interval duration is accumulated on the first time information to obtain the second time information.
[0116] In the embodiments of this application, the second time information is obtained through a first count value and a second count value. The first count value is the count value of the timer at the moment the earphone compartment receives the first time information, and the second count value is the count value of the timer at the moment the earphone compartment detects that the earphone has left the earphone compartment. That is to say, the second time information obtained by the earphone compartment can be simply obtained by reading the timer's count value, improving the convenience of obtaining the second time information.
[0117] S104. The earphone case sends third time information to the earphone. The third time information is the time information obtained based on the first time information and the second time information.
[0118] After obtaining the second time information, the earphone case can obtain the third time information based on the first and second time information.
[0119] For example, the first time information can be the actual time information sent by the receiving terminal device in real time, and the second time information is the time information obtained based on the count of the timer in the earphone case. Correspondingly, the third time information is obtained by adding the product of the count of the first timer in the second time information and the duration of each tick to the first time information as a reference.
[0120] For example, the first time information is the product of the earphone's timer count and 10ms added to the actual time information. The second time information is the time information obtained based on the count of the timer in the earphone case. Correspondingly, the third time information refers to the time information obtained by adding the product of the earphone's timer count and the duration of each tick to the actual time information as a baseline, and then adding the product of the earphone case's timer count and the duration of each tick.
[0121] It should be understood that the duration of each tick of the timer in the earphone can be the same as or different from the duration of each tick of the timer in the earphone case, and this application embodiment does not impose any restrictions on this.
[0122] When the headphone charging case receives the third time information, it sends the third time information to the headphones via the kernel-level serial communication module. The headphones' kernel-level serial communication module receives this third time information.
[0123] In the embodiments of this application, when the earphone charging case detects that an earphone has entered the charging case, the charging case receives first time information sent by the earphone. Based on the first time information, the charging case starts a first timer. When the charging case detects that the earphone has left the charging case, it obtains second time information from the first timer and sends third time information to the earphone. The first time information is obtained based on actual time information, the second time information is obtained based on the countdown of the first timer, and the third time information is obtained based on both the first and second time information. This allows the charging case to retrieve the first time information (obtained from the earphone based on the actual time) from the earphone and continue timing to obtain the third time information, even if the earphone loses its actual time information (used as a reference time). This enables the earphone to obtain the current actual time when it needs to access the actual time, without requiring the earphone to establish a connection with the terminal device and use an application on the terminal device to obtain the current time information, thus improving the convenience of obtaining time information for the earphone.
[0124] After receiving the third-time information, the earphone can also determine the time of body temperature detection based on the third-time information.
[0125] Optionally, the headphones obtain the body temperature measurement result based on the third time information. The body temperature measurement result includes the body temperature information and the measurement time corresponding to the body temperature information.
[0126] When the earphone receives the third time information (third moment), it starts a timer (second timer) and records the count value of the second timer at the third moment (third count value). When the earphone performs body temperature detection (fourth moment), it records the count value of the second timer at the fourth moment (fourth count value) and the body temperature information obtained from the temperature detection. For example, the body temperature information could be 36.8℃.
[0127] It should be understood that the fourth moment can be one moment or multiple moments, and the embodiments of this application do not limit this.
[0128] For example, if a user takes a temperature measurement after removing the earphones from the charging case, then the fourth moment refers to the moment of that temperature measurement.
[0129] For example, if a user takes their temperature five times after removing the earphones from the charging case, then the fourth moment could refer to the moment of the five temperature measurements.
[0130] It should be understood that before synchronizing with the phone's time, the earphones do not know the actual time corresponding to the fourth moment. At this time, the earphones can use the third time information sent by the earphone case to obtain the actual time corresponding to the fourth moment. The third time information is obtained by adding the product of the count of the first timer and the duration of each tick to the first time information used as a reference. Based on the third time information, the duration is obtained by adding the product of the difference between the third and fourth count values and the duration of each tick. This allows the actual duration corresponding to the fourth moment to be determined.
[0131] For example, the actual time information indicates 8:00 AM on January 15, 2022. The second time information indicates a count of 600,000, with each tick lasting 10ms. The third time information includes the actual time information of 8:00 AM on January 15, 2022 as a baseline, and the count value of the first timer, 600,000. After receiving the third time information, the headset continues to acquire the third count value of 180,000 and the fourth count value of 210,000. The headset then accumulates 600,000 * 10ms based on the actual time information indicating 8:00 AM on January 15, 2022, and then accumulates (210,000 - 180,000) * 10ms to obtain the actual time corresponding to the fourth time, which is 10:30 AM on January 15, 2022.
[0132] In the embodiments of this application, after the earphone receives the third time information sent by the earphone compartment, it can obtain the body temperature measurement result, including body temperature information and the measurement time corresponding to the body temperature information, based on the third time information. Then, it can generate a body temperature measurement curve based on the body temperature measurement result. Since the body temperature measurement result is obtained based on the third time information, which is obtained by adding the count of the first timer and the duration of each tick to the actual time information as a reference, the measurement time corresponding to the body temperature information is the actual time. Thus, the body temperature measurement result is obtained based on the actual time. In other words, the measurement time corresponding to the body temperature information in the body temperature measurement result displayed to the user is the actual time, making it more convenient for the user to read the body temperature measurement result and improving the user experience.
[0133] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0134] It is understood that, in order to achieve the above functions, the earphones and the charging case each contain hardware and / or software modules corresponding to the execution of each function. Based on the algorithmic steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0135] This application embodiment can divide an electronic device into functional modules based on the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one module. It should be noted that the module division in this application embodiment is illustrative and represents only one logical functional division; other division methods may be used in actual implementation. It should also be noted that the module names in this application embodiment are illustrative, and the names of the modules are not limited in actual implementation.
[0136] Figure 9 This is a schematic diagram of a time synchronization device provided in an embodiment of this application.
[0137] It should be understood that the time synchronization device 600 can perform... Figures 5 to 8 The time synchronization method shown; the time synchronization device 600 is applied to the first electronic device in the time synchronization system, the time synchronization system includes the first electronic device and the second electronic device, the first electronic device and the second electronic device do not include the actual time chip RTC, the time synchronization device 600 includes: acquisition unit 610 and processing unit 620.
[0138] In one example, the acquisition unit 610 is used to receive first time information sent by the second electronic device when the first electronic device is detected to be in a first state. The first time information is obtained based on actual time information.
[0139] Processing unit 620 is used to start a first timer based on the first time information, wherein the first timer refers to the timer in the first electronic device;
[0140] The acquisition unit 610 is used to acquire second time information of the first timer when the first electronic device is detected to be in the second state. The second time information is time information obtained based on the count of the timer.
[0141] The processing unit 620 is used to send third time information to the second electronic device, the third time information being time information obtained based on the first time information and the second time information.
[0142] In one example, the first electronic device is the earphone case, and the second electronic device is the earphone.
[0143] The acquisition unit 610 is used to receive the first-time information sent by the earphones when it is detected that the earphones have entered the earphone case;
[0144] The acquisition unit 610 is used to acquire second time information when it detects that the earphone has left the earphone case.
[0145] In one example, the processing unit 620 is used to obtain a first count value of the first timer at a first moment, the first moment being the moment when the first electronic device receives the first time information sent by the second electronic device; obtain a second count value of the first timer at a second moment, the second moment being the moment when the first electronic device is in a second state; and obtain the second time information based on the difference between the first count value and the second count value.
[0146] In one example, time synchronization device 600 is applied to a second electronic device in a time synchronization system. The time synchronization system includes a first electronic device and a second electronic device, neither of which includes an actual time chip (RTC).
[0147] The processing unit 620 is used to send first time information to the first electronic device when the first electronic device detects that the first electronic device is in a first state. The first time information is obtained based on actual time information.
[0148] The acquisition unit 610 is used to receive third time information sent by the first electronic device. The third time information is based on the first time information and the second time information. The second time information is time information obtained based on the count of the timer in the first electronic device.
[0149] In one example, the processing unit 620 is also used to obtain the body temperature measurement result based on the third time information; the body temperature measurement result includes body temperature information and the measurement time corresponding to the body temperature information.
[0150] In one example, the processing unit 620 is specifically used to obtain the third count value of the second timer at the third moment, where the second timer is a timer in the second electronic device, and the third moment refers to the moment when the second electronic device receives the third time information; to obtain the fourth count value of the second timer at the fourth moment, where the fourth moment refers to the moment when the second electronic device performs body temperature measurement, and the fourth moment is the moment obtained by adding a first duration to the moment indicated by the third time information, where the first duration refers to the duration corresponding to the difference between the fourth count value and the third count value; and to use the body temperature information obtained by performing body temperature measurement at the fourth moment and the fourth moment as the body temperature measurement result.
[0151] The time synchronization device provided in this embodiment is used to execute the time synchronization method of the above embodiment. The technical principle and technical effect are similar, and will not be described again here.
[0152] It should be noted that the aforementioned time synchronization device 600 is embodied in the form of a functional unit. The term "unit" here can be implemented in software and / or hardware, without specific limitations.
[0153] For example, a "unit" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.
[0154] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0155] Figure 10 A schematic diagram of the structure of an electronic device provided in this application is shown. Figure 10 The dashed lines indicate that the unit or module is optional. The electronic device 700 can be used to implement the time synchronization method described in the above method embodiments.
[0156] Electronic device 700 includes one or more processors 701, which support the implementation of the time synchronization method in the method embodiments of electronic device 700. Processor 701 can be a general-purpose processor or a special-purpose processor. For example, processor 701 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.
[0157] The processor 701 can be used to control the electronic device 700, execute software programs, and process data from the software programs. The electronic device 700 may also include a communication unit 705 for inputting (receiving) and outputting (transmitting) signals.
[0158] For example, electronic device 700 may be a chip, communication unit 705 may be the input and / or output circuit of the chip, or communication unit 705 may be the communication interface of the chip, and the chip may be a component of terminal device or other electronic device.
[0159] For example, electronic device 700 can be a terminal device, communication unit 705 can be the transceiver of the terminal device, or communication unit 705 can be the transceiver circuit of the terminal device.
[0160] The electronic device 700 may include one or more memories 702, which store a program 704. The program 704 can be executed by the processor 701 to generate instructions 703, causing the processor 701 to execute the time synchronization method described in the above method embodiments according to the instructions 703.
[0161] Optionally, the memory 702 may also store data. Optionally, the processor 701 may also read the data stored in the memory 702, which may be stored at the same memory address as the program 704, or the data may be stored at a different memory address than the program 704.
[0162] The processor 701 and memory 702 can be configured separately or integrated together; for example, integrated on the system on chip (SOC) of the terminal device.
[0163] For example, the memory 702 can be used to store the relevant program 704 of the time synchronization method provided in the embodiments of this application, and the processor 701 can be used to call the relevant program 704 of the time synchronization method stored in the memory 702 when performing image restoration on the terminal device, and execute the time synchronization method of the embodiments of this application; including: when the first electronic device is detected to be in a first state, receiving first time information sent by the second electronic device, the first time information being obtained based on actual time information; starting a first timer based on the first time information, the first timer referring to a timer in the first electronic device; when the first electronic device is detected to be in a second state, obtaining second time information of the first timer, the second time information being time information obtained based on the count of the timer; and sending third time information to the second electronic device, the third time information being time information obtained based on the first time information and the second time information.
[0164] For example, the memory 702 can be used to store the relevant program 704 of the time synchronization method provided in the embodiments of this application, and the processor 701 can be used to call the relevant program 704 of the time synchronization method stored in the memory 702 when performing image restoration on the terminal device, and execute the time synchronization method of the embodiments of this application; including: when the first electronic device detects that the first electronic device is in a first state, sending first time information to the first electronic device, the first time information being obtained based on actual time information; receiving third time information sent by the first electronic device, the third time information being based on the first time information and the second time information, the second time information being time information obtained based on the count of the timer in the first electronic device.
[0165] This application also provides a computer program product that, when executed by processor 701, implements the time synchronization method described in any of the method embodiments of this application.
[0166] The computer program product can be stored in memory 702, for example, program 704. Program 704 is finally converted into an executable object file that can be executed by processor 701 after processing such as preprocessing, compilation, assembly and linking.
[0167] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the time synchronization method described in any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.
[0168] The computer-readable storage medium is, for example, memory 702. Memory 702 can be volatile memory or non-volatile memory, or memory 702 can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0169] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0170] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0171] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0172] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0173] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0174] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0175] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0176] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A time synchronization method, characterized in that, An application is made in a time synchronization system, the time synchronization system including a first electronic device and a second electronic device, the first electronic device and the second electronic device excluding a real-time clock (RTC) chip, the first electronic device including an earphone case, the second electronic device including earphones, the operating system of the earphone case being LiteOS, the operating system of the earphones being LiteOS, the method including: When the earphone case detects that the earphone has entered the earphone case, the earphone case receives first time information sent by the earphone, the first time information being obtained from a terminal device including a real-time chip (RTC); The earphone case starts a first timer based on the first time information. The first timer is a timer in the earphone case and is a timer simulated by software based on the system Tick clock interrupt. When the earphone case detects that the earphone has left the earphone case, it acquires the second time information of the first timer, which is the time information obtained based on the count of the first timer. The earphone compartment sends third time information to the earphone, the third time information being time information obtained based on the first time information and the second time information; The earphones obtain body temperature measurement results based on the third time information, and the body temperature measurement results include body temperature information and the measurement time corresponding to the body temperature information.
2. The method according to claim 1, characterized in that, The step of obtaining the second time information of the first timer includes: Obtain the first count value of the first timer at a first moment, where the first moment is the moment when the first electronic device receives the first time information sent by the second electronic device; Obtain the second count value of the first timer at a second time point, where the second time point is the moment when the first electronic device is in the second state; The second time information is obtained based on the difference between the first count value and the second count value.
3. The method according to claim 1 or 2, characterized in that, The method further includes: The second electronic device receives the actual time information sent by the third electronic device, which includes the RTC.
4. The method according to claim 1 or 2, characterized in that, The earphones obtain body temperature measurement results based on the third time information, including: The earphone acquires the third count value of the second timer at the third moment, where the second timer is a timer in the second electronic device, and the third moment refers to the moment when the second electronic device receives the third time information; The earphone acquires the fourth count value of the second timer at the fourth moment, the fourth moment being the moment when the earphone performs body temperature measurement, the fourth moment being the moment indicated by the third time information plus a first duration, the first duration being the duration corresponding to the difference between the fourth count value and the third count value; The earphones will use the body temperature information obtained from the body temperature measurement at the fourth time and the fourth time as the body temperature measurement result.
5. A time synchronization method, characterized in that, A first electronic device is applied to a time synchronization system, the time synchronization system including the first electronic device and a second electronic device, the first electronic device and the second electronic device excluding a real-time clock (RTC) chip, the first electronic device including an earphone case, the second electronic device including earphones, the operating system of the earphone case being LiteOS, the operating system of the earphones being LiteOS, the method including: When the earphone is detected to have entered the earphone compartment, the system receives first time information sent by the earphone, which is obtained from a terminal device including a real-time clock (RTC) chip. The first timer is started based on the first time information. The first timer is a timer in the earphone compartment. The first timer is a timer simulated by software based on the system Tick clock interrupt. When the earphone is detected to have left the earphone case, the second time information of the first timer is obtained, which is the time information obtained based on the count of the first timer. A third time information is sent to the earphone, which is time information obtained based on the first time information and the second time information, so that the earphone can obtain a body temperature measurement result based on the third time information. The body temperature measurement result includes body temperature information and the measurement time corresponding to the body temperature information.
6. The method according to claim 5, characterized in that, The step of obtaining the second time information of the first timer includes: Obtain the first count value of the first timer at a first moment, where the first moment is the moment when the first electronic device receives the first time information sent by the second electronic device; Obtain the second count value of the first timer at a second time point, where the second time point is the moment when the first electronic device is in the second state; The second time information is obtained based on the difference between the first count value and the second count value.
7. A time synchronization method, characterized in that, A second electronic device is applied in a time synchronization system, the time synchronization system including a first electronic device and a second electronic device, the first electronic device and the second electronic device excluding an RTC, the first electronic device including an earphone case, the second electronic device including earphones, the operating system of the earphone case being LiteOS, the operating system of the earphones being LiteOS, the method including: When the earphone compartment detects that the earphone has entered the earphone compartment, it sends first time information to the earphone compartment. The first time information is obtained from a terminal device including a real time chip (RTC). The device receives third time information sent by the earphone compartment. The third time information is based on the first time information and the second time information, and the second time information is time information obtained based on the count of the timer in the earphone compartment.
8. The method according to claim 7, characterized in that, The method further includes: The body temperature measurement result is obtained based on the third time information; the body temperature measurement result includes body temperature information and the measurement time corresponding to the body temperature information.
9. The method according to claim 8, characterized in that, The step of obtaining the body temperature measurement result based on the third time information includes: Obtain the third count value of the second timer at the third moment, where the second timer is a timer in the earphone, and the third moment refers to the moment when the earphone receives the third time information; Obtain the fourth count value of the second timer at the fourth moment, where the fourth moment refers to the moment when the earphone performs body temperature measurement. The fourth moment is the moment obtained by adding a first duration to the moment indicated by the third time information, where the first duration refers to the duration corresponding to the difference between the fourth count value and the third count value. The body temperature information obtained from the body temperature measurement at the fourth time and the fourth time are taken as the body temperature measurement result.
10. A time synchronization device, characterized in that, The time synchronization device includes a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory, causing the time synchronization device to perform the method of claim 5 or 6.
11. A time synchronization device, characterized in that, The time synchronization device includes a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory, causing the time synchronization device to perform the method of any one of claims 7 to 9.
12. An electronic device, characterized in that, The electronic device includes a processor configured to be coupled to a memory, read instructions from the memory, and cause the electronic device to perform the method as described in claim 5 or 6 according to the instructions.
13. An electronic device, characterized in that, The electronic device includes a processor configured to be coupled to a memory, read instructions from the memory, and cause the electronic device to perform the method as described in any one of claims 7 to 9 according to the instructions.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 5 to 7.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 7 to 9.
16. A chip, characterized in that, The chip includes a processor for coupling with a memory and executing a computer program in the memory to perform the method as described in claim 5 or 6.
17. A chip, characterized in that, The chip includes a processor for coupling with a memory and executing a computer program in the memory to perform the method as described in any one of claims 7 to 9.
Citation Information
Patent Citations
Inter-equipment synchronization method and device
CN111385866A
Multi-sensor data synchronization method and device thereof
CN111983948A