Clock synchronization method, device and system and storage medium
By acquiring and analyzing physiological signals to determine the action and triggering time, clock synchronization between the first electronic device and the second electronic device is achieved, solving the problem of insufficient clock synchronization accuracy in the prior art, and improving synchronization accuracy to meet high-precision needs.
Patent Information
- Application Number
- CN202411718118.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is difficult to achieve high accuracy in clock synchronization of multimodal data, especially in digital signal processing in the medical and health field, where insufficient clock synchronization accuracy cannot meet high accuracy requirements.
By obtaining the physiological signal of the target user, determining its corresponding action and triggering time, and sending this information to the worn second electronic device to achieve clock synchronization between the first electronic device and the second electronic device.
The clock synchronization accuracy between the first electronic device and the second electronic device is improved, and reliable clock synchronization services can be provided in scenarios such as the medical and health field with high precision requirements.
Smart Images

Figure CN119727980A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of clock synchronization, and more specifically, to a clock synchronization method, a first electronic device, a second electronic device, a clock synchronization system, and a readable storage medium. Background Art
[0002] With the current trend of technological development, chronic disease health management with wearable devices has become a consensus, and the collection of health data has evolved from a single device to multiple wearable devices, and from a single point on the human body to multiple collection points. The synchronization of multimodal data helps improve the accuracy of health management, but the clock synchronization of multimodal data is always a big problem.
[0003] Existing solutions usually use mobile phone links to achieve clock synchronization of multiple wearable devices, with an accuracy of tens or even hundreds of milliseconds, which cannot meet the requirements of digital signal processing in the medical and health field. For example, the duration of the third heart sound is 40ms. If you want to find the characteristics of heart sounds and electrocardiograms at this moment at the same time, you need an accuracy of <1ms to make sense, so high-precision clock synchronization is very important. Summary of the invention
[0004] An object of the embodiments of the present disclosure is to provide a clock synchronization method, device, system and readable storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a clock synchronization method is provided, which is applied to a first electronic device, and the method includes:
[0006] Acquire a first physiological signal of a target user;
[0007] Determining a first action corresponding to the first physiological signal and a first triggering time of the first physiological signal;
[0008] The first action and the first trigger time are sent to a second electronic device worn by the target user, so that the second electronic device performs clock synchronization with the first electronic device according to the first action and the first trigger time.
[0009] Optionally, the method further includes:
[0010] Detect whether a synchronization clock event occurs;
[0011] When the occurrence of the synchronous clock event is detected, sending a clock synchronization request to the second electronic device;
[0012] In case of receiving the first confirmation message returned by the second electronic device according to the clock synchronization request, the step of acquiring the first physiological signal of the target user is performed.
[0013] Optionally, determining a first action corresponding to the first physiological signal and a first trigger time of the first physiological signal includes:
[0014] In the case where it is monitored that the signal amplitude of the first physiological signal exceeds a set first threshold, determining a first timestamp when the signal amplitude of the first physiological signal exceeds the first threshold as the first trigger time;
[0015] intercepting a first signal segment of the first physiological signal according to the first trigger time and set duration;
[0016] The first action is determined based on the first signal segment.
[0017] Optionally, determining the first action according to the first signal segment includes:
[0018] Acquire a first signal feature of the first signal segment;
[0019] Based on a pre-trained classification model, an action corresponding to the first signal feature is determined as the first action.
[0020] According to a second aspect of the present disclosure, a clock synchronization method is provided, which is applied to a second electronic device, and the method includes:
[0021] Acquire a second physiological signal of the target user;
[0022] Determining a second action corresponding to the second physiological signal and a second triggering time of the second action;
[0023] Receiving a first action and a first trigger time sent by a first electronic device worn by the target user; wherein the first action and the first trigger time are determined according to a first physiological signal of the target user acquired by the first electronic device;
[0024] According to the first action, the second action, the first trigger time, and the second trigger time, the second electronic device is controlled to perform clock synchronization with the first electronic device.
[0025] Optionally, determining a second action corresponding to the second physiological signal and a second triggering time of the second action includes:
[0026] In the case where it is monitored that the signal amplitude of the second physiological signal exceeds a set second threshold, determining a second timestamp at which the signal amplitude of the second physiological signal exceeds the second threshold as the second trigger time;
[0027] intercepting a second signal segment in the second physiological signal according to the second trigger time and set duration;
[0028] The second action is determined based on the second signal segment.
[0029] Optionally, controlling the second electronic device to perform clock synchronization with the first electronic device according to the first action, the second action, the first trigger time, and the second trigger time includes:
[0030] determining whether the first action matches the second action,
[0031] In a case where the first action matches the second action, determining a first time difference between the first trigger time and the second trigger time;
[0032] The second electronic device is controlled to perform clock synchronization with the first electronic device according to the first time difference.
[0033] Optionally, the method further includes:
[0034] Acquire a third timestamp of receiving the first action and the first triggering time;
[0035] determining a second time difference between the third timestamp and the second trigger time;
[0036] When the second time difference is less than or equal to a set third threshold, the step of controlling the second electronic device to perform clock synchronization with the first electronic device is performed.
[0037] Optionally, the method further includes:
[0038] Detect whether a deletion event occurs;
[0039] When the deletion event occurs, the second action and the second trigger time are deleted.
[0040] Optionally, the method further includes:
[0041] receiving a clock synchronization request sent by the first electronic device when a synchronization clock event occurs;
[0042] A first confirmation message is returned to the first electronic device according to the clock synchronization request, and the step of acquiring the second physiological signal of the target user is performed.
[0043] Optionally, after controlling the second electronic device to perform clock synchronization with the first electronic device, the method further includes:
[0044] Sending a second confirmation message to the first electronic device, so that the first electronic device stops acquiring the first physiological signal;
[0045] Stop acquiring the second physiological signal.
[0046] According to a third aspect of the present disclosure, a first electronic device is provided, comprising a first processor and a first memory, wherein the first memory is used to store a first computer program, and the first processor is used to execute the method described in the first aspect of the present disclosure under the control of the first computer program.
[0047] According to a fourth aspect of the present disclosure, a second electronic device is provided, comprising a second processor and a second memory, wherein the second memory is used to store a second computer program, and the second processor is used to execute the method described in the second aspect of the present disclosure under the control of the second computer program.
[0048] According to a fifth aspect of the present disclosure, a clock synchronization system is provided, comprising a first electronic device as described in the third aspect of the present disclosure, and a second electronic device as described in the fourth aspect of the present disclosure, wherein a communication connection is established between the first electronic device and the second electronic device.
[0049] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect or the second aspect of the present disclosure is implemented.
[0050] Through this embodiment, the second electronic device is controlled to perform clock synchronization with the first electronic device according to the physiological signal, so that the clock synchronization accuracy between the first electronic device and the second electronic device can be improved.
[0051] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0053] Figure 1 is a block diagram showing a hardware configuration of a clock synchronization system that can implement an embodiment of the present disclosure;
[0054] Figure 2 is a communication schematic diagram of a clock synchronization system according to an embodiment of the present disclosure;
[0055] Figure 3 is a communication schematic diagram of a clock synchronization system according to another embodiment of the present disclosure;
[0056] Figure 4 is a flowchart of a clock synchronization method according to a first embodiment of the present disclosure;
[0057] Figure 5 is a flowchart of a clock synchronization method according to a second embodiment of the present disclosure;
[0058] Figure 6 is a flowchart of a clock synchronization method according to a third embodiment of the present disclosure;
[0059] Figure 7 is a block diagram of a first electronic device according to an embodiment of the present disclosure;
[0060] Figure 8 is a block diagram of a second electronic device according to an embodiment of the present disclosure;
[0061] Fig. 9 is a block diagram of a clock synchronization system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0062] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0063] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0064] Technologies, methods and equipment known to persons of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods and equipment should be considered part of the specification.
[0065] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0066] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0067] <Hardware Configuration>
[0068] Figure 1 is a block diagram showing a hardware configuration of a clock synchronization system that can implement an embodiment of the present disclosure.
[0069] like Figure 1As shown, the clock synchronization system 1000 may include a first electronic device 1100 and at least one second electronic device 1200 , and each second electronic device 1200 may be communicatively connected with the first electronic device 1100 .
[0070] In this embodiment, if Figure 2 As shown, the second electronic device 1200 may be in direct communication with the first electronic device 1100. Figure 3 As shown, the second electronic device 1200 may also communicate with the first electronic device 1100 via another electronic device 2000 .
[0071] In this embodiment, the first electronic device 1100 and the second electronic device 1200 may be connected to each other by communication via Bluetooth, WiFi, or the like.
[0072] In this embodiment, the first electronic device 1100 and the second electronic device 1200 may be wearable devices such as headphones, watches, glasses, etc.
[0073] like Figure 1 As shown, the first electronic device 1100 may include a processor 1110, a memory 1120, an interface device 1130, a communication device 1140, a display device 1150, an input device 1160, a speaker 1270, a microphone 1280, and the like. The processor 1110 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1120 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1130 may include, for example, a USB interface, an earphone interface, and the like. The communication device 1140 may, for example, be capable of wired or wireless communication. The display device 1150 may be, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1160 may include, for example, a touch screen, a keyboard, and the like. The user may input / output voice information through the speaker 1170 and the microphone 1180.
[0074] The second electronic device 1200 may include a processor 1210, a memory 1220, an interface device 1230, a communication device 1240, a display device 1250, an input device 1260, a speaker 1270, a microphone 1280, and the like. The processor 1210 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1220 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1230 may include, for example, a USB interface, an earphone interface, and the like. The communication device 1240 may, for example, be capable of wired or wireless communication. The display device 1250 may be, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1260 may include, for example, a touch screen, a keyboard, and the like. The user may input / output voice information through the speaker 1270 and the microphone 1280.
[0075] Figure 1 The illustrated clock synchronization system 1000 is illustrative only and is in no way intended to limit the invention, its application, or uses.
[0076] In an embodiment of the present invention, the memory 1120 of the first electronic device 1100 is used to store instructions, and the instructions are used to control the processor 1110 to operate to execute any one of the clock synchronization methods for the first electronic device provided in the embodiment of the present invention. The memory 1220 of the second electronic device 1200 is used to store instructions, and the instructions are used to control the processor 1210 to operate to execute any one of the clock synchronization methods for the second electronic device provided in the embodiment of the present invention.
[0077] It should be understood by those skilled in the art that although Figure 1 In the figure, multiple devices are shown for the first electronic device 1100 and the second electronic device 1200, but the present invention may only involve some of the devices, for example, the first electronic device 1100 only involves the processor 1110 and the memory 1120, or the second electronic device 1200 only involves the processor 1210 and the memory 1220, etc. A technician may design instructions according to the scheme disclosed in the present invention. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.
[0078] <First method embodiment>
[0079] The present disclosure provides a clock synchronization method, which can be implemented by a first electronic device. The first electronic device can be the first electronic device 1100 in the above-mentioned embodiment.
[0080] Figure 4 The figure is a flowchart of a clock synchronization method according to an embodiment of the present disclosure.
[0081] like Figure 4 As shown, the method includes steps S4100 to S4300 as shown below:
[0082] Step S4100: acquiring a first physiological signal of a target user.
[0083] The first physiological signal in this embodiment can be any human characteristic electrical signal such as human nerve electrical signal, skin electrical signal, muscle electrical signal, electrocardiographic signal, and brain electrical signal. The first physiological signal is a physiological signal of the target user's human body at the first electronic device.
[0084] In this embodiment, the first electronic device is worn on the body of the target user to obtain the first physiological signal of the target user.
[0085] In one embodiment of the present disclosure, before executing step S4100, the method may further include: detecting whether a synchronization clock event occurs; in the case of detecting that a synchronization clock event occurs, sending a clock synchronization request to a second electronic device; in the case of receiving a first confirmation message returned by the second electronic device based on the clock synchronization request, executing steps S4100 to S4300 of this embodiment.
[0086] In this embodiment, the synchronous clock event may include at least one of the following: reaching a set time, receiving a synchronous clock instruction, and receiving a synchronous clock operation.
[0087] In the embodiment where the synchronization clock event includes reaching a set time, the set time may be determined based on a synchronization period pre-set by the user according to actual needs, for example, the synchronization period may be 1 hour, 1 day, 1 week, etc. Alternatively, the set time may also be pre-set according to actual needs, for example, the set time may be 9 o'clock every day.
[0088] In an embodiment where the clock synchronization event includes receiving a clock synchronization instruction, the clock synchronization instruction may be sent from a mobile phone, computer, tablet computer or other electronic device to the first electronic device, or may be a voice instruction input by a target user.
[0089] In an embodiment where the synchronous clock event includes receiving a synchronous clock operation, the synchronous clock operation may be pre-set based on an application scenario or specific needs. For example, the synchronous clock operation may be an operation in which the target user clicks a corresponding button in the first electronic device, or the target user performs a corresponding gesture.
[0090] When the second electronic device receives the clock synchronization request, it may return a first confirmation message to the first electronic device if the clock synchronization condition is met.
[0091] Furthermore, the second electronic device may confirm that it meets the clock synchronization condition when it is powered on; or, the second electronic device may confirm that it meets the clock synchronization condition when it receives a clock synchronization request; or, the second electronic device may confirm that it meets the clock synchronization condition when it is idle.
[0092] When the first electronic device receives the first confirmation message, it enters the waiting process. When the second electronic device sends the first confirmation message to the first electronic device, it enters the waiting process.
[0093] In the waiting process, the first electronic device executes step S4100 of this embodiment to obtain the first physiological signal of the target user, and the second electronic device also obtains the second physiological signal of the target user, wherein the second physiological signal is a physiological signal of the target user's body at the second electronic device.
[0094] Step S4200, determining a first action corresponding to a first physiological signal and a first triggering time of the first physiological signal.
[0095] When the brain directs the hand to move, the brain sends out neural electrical signals, which are transmitted to the hand through the central nervous system and peripheral nerves, causing changes in muscle electrical signals and generating movements. By performing digital signal processing on the first physiological signal, fixed gestures or intentions can be extracted and analyzed.
[0096] In one embodiment of the present disclosure, determining a first action corresponding to a first physiological signal and a first trigger time of the first physiological signal includes: when it is monitored that the signal amplitude of the first physiological signal exceeds a set first threshold, determining a first timestamp at which the signal amplitude of the first physiological signal exceeds the first threshold as a first trigger time; intercepting a first signal segment in the first physiological signal according to the first trigger time and the set duration; and determining a first action according to the first signal segment.
[0097] In this embodiment, when the signal amplitude of the first physiological signal does not exceed the first threshold, it can be determined that the target user is in a stationary state and has not performed an action. When the signal amplitude of the first physiological signal exceeds the first threshold, it can be determined that the target user has performed an action. Therefore, in order to reduce the interference of the action recognition of the first physiological signal when the target user has not performed an action, the signal segment corresponding to the target user performing an action in the first physiological signal can be extracted to perform action recognition.
[0098] In this embodiment, when the signal amplitude of the first physiological signal exceeds the first threshold, the target interrupt may be triggered, and the timestamp of receiving the target interrupt, that is, the first timestamp, is used as the first trigger time.
[0099] When the target interrupt is received, a signal segment of a set duration is intercepted from the first physiological signal starting from the first timestamp, which is the first signal segment. The set duration may be set in advance according to the application scenario or specific requirements. For example, the set duration may be 1 second.
[0100] In one embodiment of the present disclosure, determining a first action according to a first signal segment includes: acquiring a first signal feature of the first signal segment; and determining an action corresponding to the first signal feature as the first action based on a pre-trained classification model.
[0101] In this embodiment, the first signal segment may be filtered first, and then analyzed to obtain the first signal feature.
[0102] Specifically, a low-pass or band-pass filter may be used to filter out useless information in the first signal segment, so as to make the obtained action recognition result more accurate.
[0103] Furthermore, the time domain and frequency domain information in the first signal segment may be extracted as the first signal feature by using wavelet transform, fast Fourier transform or the like.
[0104] Furthermore, the first signal feature may be input into a classification model to obtain a score for each set action corresponding to the first physiological signal. The set action with the largest score may be taken as the first action; or the set action with a score greater than or equal to the corresponding score threshold may be taken as the first action. If the score corresponding to each action is less than the corresponding score threshold, it may be determined that the target user has not performed the set action, and step S4300 is not performed, and steps S4100 to S4200 are continued.
[0105] In this embodiment, the set action may be pre-set according to the application scenario. For example, the set action may include raising a hand, a victory gesture, a thumbs-up gesture, etc.
[0106] Step S4300: sending the first action and the first trigger time to the second electronic device worn by the target user, so that the second electronic device performs clock synchronization with the first electronic device according to the first action and the first trigger time.
[0107] In this embodiment, the first electronic device may send the first action and the first trigger time to the second electronic device worn by the target user through a communication connection with the second electronic device. Specifically, the first electronic device may directly send the first action and the first trigger time to the second electronic device worn by the target user, or may send the first action and the first trigger time to the second electronic device worn by the target user through other transfer devices (such as mobile phones, computers, tablet computers, etc.).
[0108] In this embodiment, the identifier of each set action may be preset, and then determining the first action may be determining the identifier corresponding to the first action. Correspondingly, the identifier of the first action and the corresponding first trigger time may be sent to the second electronic device.
[0109] In this embodiment, when the first action and the corresponding first trigger time are identified, the first action and the first trigger time can be sent to the second electronic device worn by the target user.
[0110] During the waiting process, the second electronic device obtains the second physiological signal of the target user, determines the second action corresponding to the second physiological signal, and the second trigger time of the second physiological signal; when the first action and the first trigger time are received, the second electronic device can be controlled to synchronize the clock with the first electronic device according to the first action, the second action, the first trigger time and the second trigger time.
[0111] Specifically, the second electronic device may obtain a second physiological signal of the target user when entering a waiting process; determine a second action corresponding to the second physiological signal, and a second trigger time of the second action; receive a first action and a first trigger time sent by a first electronic device worn by the target user; and control the second electronic device to synchronize its clock with the first electronic device according to the first action, the second action, the first trigger time and the second trigger time.
[0112] The second physiological signal in this embodiment can be any human characteristic electrical signal such as human nerve electrical signal, skin electrical signal, muscle electrical signal, electrocardiographic signal, and brain electrical signal. The second physiological signal is a physiological signal of the target user's human body at the second electronic device.
[0113] In this embodiment, the second electronic device is worn on the body of the target user to obtain the second physiological signal of the target user.
[0114] In this embodiment, the first electronic device and the second electronic device are worn on the body of the same target user.
[0115] In this embodiment, the second action corresponding to the second physiological signal and the second trigger time of the second physiological signal can be determined by referring to the step S4200 of this embodiment for determining the first action corresponding to the first physiological signal and the first trigger time of the first physiological signal, which will not be repeated here.
[0116] In one embodiment of the present disclosure, according to a first action, a second action, a first trigger time, and a second trigger time, a second electronic device is controlled to perform clock synchronization with a first electronic device, including: determining whether the first action matches the second action, and when the first action matches the second action, determining a first time difference between the first trigger time and the second trigger time; and according to the first time difference, controlling the second electronic device to perform clock synchronization with the first electronic device.
[0117] In this embodiment, the second electronic device may traverse all second actions cached locally in sequence according to the corresponding second trigger time and match them with the first action. Specifically, the second actions may be traversed in order from the latest to the earliest second trigger time, that is, the last second action is traversed first.
[0118] Furthermore, if the second action currently traversed is the same as the first action, it is determined that the second action matches the first action. Specifically, it may be determined that the first action matches the second action when the identifier of the second action is the same as the identifier of the first action.
[0119] Furthermore, if none of the second actions cached by the second electronic device matches the first action, then step S5400 is continued after waiting for another set time. The other set time may be set in advance according to the application scenario or specific requirements. For example, the other set time may be 50 milliseconds.
[0120] When the first action matches the second action, the first time difference between the first trigger time corresponding to the first action and the second trigger time corresponding to the second action may be determined. For example, when the first trigger time corresponding to the first action is T1 and the second trigger time corresponding to the second action matching the first action is T2, the first time difference may be determined to be ΔT1=T1-T2.
[0121] In this embodiment, the clock synchronization of the second electronic device and the first electronic device is controlled according to the first time difference, and the sum of the current time of the second electronic device and the first time difference can be determined as a fourth timestamp, and the fourth timestamp is written into the clock of the second electronic device, so that the clock of the second electronic device is synchronized with that of the first electronic device.
[0122] Through this embodiment, when the first action matches the second action, the clock synchronization accuracy between the first electronic device and the second electronic device can be improved by controlling the second electronic device to synchronize its clock with the first electronic device according to the first time difference between the first trigger time and the second trigger time.
[0123] In one embodiment of the present disclosure, the method also includes: obtaining a third timestamp of receiving the first action and the first trigger time; determining a second time difference between the third timestamp and the second trigger time; and when the second time difference is less than or equal to a set third threshold, executing the step of controlling the second electronic device to perform clock synchronization with the first electronic device.
[0124] In this embodiment, the third threshold may be pre-set according to an application scenario or specific requirements, and represents the maximum value of the network delay between two electronic devices that require time synchronization. For example, the third threshold may be 100 milliseconds.
[0125] In this embodiment, when the third timestamp is T3 and the second trigger time corresponding to the second action matching the first action is T2, the second time difference can be determined to be ΔT2=T3-T2.
[0126] If the second time difference is greater than the third threshold, it can be considered that the network delay between the first electronic device and the second electronic device is too large, the second action and the corresponding second trigger time are invalid, and the clock synchronization of the second electronic device and the first electronic device is not controlled based on the second action and the corresponding second trigger time.
[0127] Since the propagation speed of physiological signals is the speed of light, the neural transmission distance between the detection position corresponding to the first electronic device and the detection position corresponding to the second electronic device on the target user's body is less than 2 meters. Therefore, the time difference between the first electronic device and the second electronic device in receiving the physiological signal triggered by the same action is less than 10ns. Therefore, by synchronizing the clocks of the first electronic device and the second electronic device according to the physiological signal, the clock synchronization accuracy between the first electronic device and the second electronic device can be improved.
[0128] Through this embodiment, the second electronic device is controlled to perform clock synchronization with the first electronic device according to the physiological signal, so that the clock synchronization accuracy between the first electronic device and the second electronic device can be improved.
[0129] <Second method embodiment>
[0130] The present disclosure provides a clock synchronization method, which can be implemented by a second electronic device. The second electronic device can be the second electronic device 1200 in the above embodiment.
[0131] Figure 5 The figure is a flowchart of a clock synchronization method according to an embodiment of the present disclosure.
[0132] like Figure 5 As shown, the method includes steps S5100 to S5400 as shown below:
[0133] Step S5100: Acquire a second physiological signal of the target user.
[0134] The second physiological signal in this embodiment can be any human characteristic electrical signal such as human nerve electrical signal, skin electrical signal, muscle electrical signal, electrocardiographic signal, and brain electrical signal. The second physiological signal is a physiological signal of the target user's human body at the second electronic device.
[0135] In this embodiment, the second electronic device is worn on the body of the target user to obtain the second physiological signal of the target user.
[0136] In this embodiment, the first electronic device and the second electronic device are worn on the body of the same target user.
[0137] In one embodiment of the present disclosure, before executing step S5100, the method may further include: receiving a clock synchronization request sent by the first electronic device when a synchronization clock event is detected; returning a first confirmation message to the first electronic device according to the clock synchronization request, and executing the step of obtaining a second physiological signal of the target user.
[0138] When the second electronic device receives the clock synchronization request, it may return a first confirmation message to the first electronic device if the clock synchronization condition is met.
[0139] Furthermore, the second electronic device may confirm that it meets the clock synchronization condition when it is powered on; or, the second electronic device may confirm that it meets the clock synchronization condition when it receives a clock synchronization request; or, the second electronic device may confirm that it meets the clock synchronization condition when it is idle.
[0140] In this embodiment, the second electronic device may enter the waiting process when sending the first confirmation message to the first electronic device. When the second electronic device enters the waiting process, it executes steps S5100 to S5400 of this embodiment.
[0141] Step S5200, determining a second action corresponding to the second physiological signal and a second triggering time of the second action.
[0142] When the brain directs the hand to move, the brain sends out neural electrical signals, which are transmitted to the hand through the central nervous system and peripheral nerves, causing changes in muscle electrical signals and generating movements. By performing digital signal processing on the second physiological signal, fixed gestures or intentions can be extracted and analyzed.
[0143] In one embodiment of the present disclosure, determining a second action corresponding to a second physiological signal and a second trigger time of the second physiological signal includes: when it is monitored that the signal amplitude of the second physiological signal exceeds a set second threshold, determining a second timestamp at which the signal amplitude of the second physiological signal exceeds the second threshold as the second trigger time; intercepting a second signal segment in the second physiological signal according to the second trigger time and the set duration; and determining a second action according to the second signal segment.
[0144] In this embodiment, when the signal amplitude of the second physiological signal does not exceed the second threshold, it can be determined that the target user is in a stationary state and has not performed an action. When the signal amplitude of the second physiological signal exceeds the second threshold, it can be determined that the target user has performed an action. Therefore, in order to reduce the interference of the second physiological signal in action recognition when the target user has not performed an action, the signal segment corresponding to the target user performing an action in the second physiological signal can be extracted for action recognition.
[0145] In this embodiment, when the signal amplitude of the second physiological signal exceeds the second threshold, the target interrupt may be triggered, and the timestamp of receiving the target interrupt is the second timestamp, which serves as the second trigger time.
[0146] When the target interrupt is received, a signal segment of a set duration is intercepted from the second physiological signal starting from the second timestamp, which is the second signal segment. The set duration may be set in advance according to an application scenario or specific requirements. For example, the set duration may be 1 second.
[0147] In one embodiment of the present disclosure, determining a second action according to a second signal segment includes: acquiring a second signal feature of the second signal segment; and determining an action corresponding to the second signal feature as the second action based on a pre-trained classification model.
[0148] In this embodiment, the second signal segment may be first filtered and then analyzed to obtain the second signal feature.
[0149] Specifically, a low-pass or band-pass filter may be used to filter out useless information in the second signal segment, so as to make the obtained action recognition result more accurate.
[0150] Furthermore, the time domain and frequency domain information in the second signal segment may be extracted as the second signal feature by using wavelet transform, fast Fourier transform or the like.
[0151] Furthermore, the second signal feature may be input into the classification model to obtain the score of each set action corresponding to the second physiological signal. The set action with the largest score may be used as the second action; or the set action with a score greater than or equal to the corresponding score threshold may be used as the second action. If the score corresponding to each action is less than the corresponding score threshold, it can be determined that the target user has not performed the set action, and steps S5100 to S5200 are continued.
[0152] In this embodiment, the set action may be pre-set according to the application scenario. For example, the set action may include raising a hand, a victory gesture, a thumbs-up gesture, etc.
[0153] In one embodiment of the present disclosure, when the second action and the corresponding second trigger time are obtained, the second action and the corresponding second trigger time may be recorded.
[0154] In this embodiment, an identifier of each set action may be preset, and then determining the second action may be determining the identifier corresponding to the second action.
[0155] Step S5300, receiving a first action and a first trigger time sent by a first electronic device worn by a target user; wherein the first action and the first trigger time are determined according to a first physiological signal of the target user acquired by the first electronic device.
[0156] In this embodiment, the step of the first electronic device determining and sending the first action and the first trigger time may specifically refer to step S4200 and step S4300 in the aforementioned embodiment, which will not be described in detail here.
[0157] In this embodiment, the execution order of step S5300 and step S5200 is not limited. Step S5200 may be executed first and then step S5300, or step S5300 may be executed first and then step S5200, or step S5200 and step S5300 may be executed simultaneously.
[0158] Step S5400: Control the second electronic device to perform clock synchronization with the first electronic device according to the first action, the second action, the first trigger time, and the second trigger time.
[0159] In this embodiment, controlling the second electronic device to perform clock synchronization with the first electronic device may be to set the clock of the second electronic device so that the clock of the second electronic device is synchronized with the clock of the first electronic device.
[0160] Since the propagation speed of physiological signals is the speed of light, the neural transmission distance between the detection position corresponding to the first electronic device and the detection position corresponding to the second electronic device on the target user's body is less than 2 meters. Therefore, the time difference between the first electronic device and the second electronic device in receiving the physiological signal triggered by the same action is less than 10ns. Therefore, by synchronizing the clocks of the first electronic device and the second electronic device according to the physiological signal, the clock synchronization accuracy between the first electronic device and the second electronic device can be improved.
[0161] In one embodiment of the present disclosure, according to a first action, a second action, a first trigger time, and a second trigger time, a second electronic device is controlled to perform clock synchronization with a first electronic device, including: determining whether the first action matches the second action, and when the first action matches the second action, determining a first time difference between the first trigger time and the second trigger time; and according to the first time difference, controlling the second electronic device to perform clock synchronization with the first electronic device.
[0162] In this embodiment, the second electronic device may traverse all second actions cached locally in sequence according to the corresponding second trigger time and match them with the first action. Specifically, the second actions may be traversed in order from the latest to the earliest second trigger time, that is, the last second action is traversed first.
[0163] Furthermore, if the second action currently traversed is the same as the first action, it is determined that the second action matches the first action. Specifically, it may be determined that the first action matches the second action when the identifier of the second action is the same as the identifier of the first action.
[0164] Furthermore, if none of the second actions cached by the second electronic device matches the first action, then step S5400 is continued after waiting for another set time. The other set time may be set in advance according to the application scenario or specific requirements. For example, the other set time may be 50 milliseconds.
[0165] When the first action matches the second action, the first time difference between the first trigger time corresponding to the first action and the second trigger time corresponding to the second action may be determined. For example, when the first trigger time corresponding to the first action is T1 and the second trigger time corresponding to the second action matching the first action is T2, the first time difference may be determined to be ΔT1=T1-T2.
[0166] In this embodiment, the clock synchronization of the second electronic device and the first electronic device is controlled according to the first time difference, and the sum of the current time of the second electronic device and the first time difference can be determined as a fourth timestamp, and the fourth timestamp is written into the clock of the second electronic device, so that the clock of the second electronic device is synchronized with that of the first electronic device.
[0167] Through this embodiment, when the first action matches the second action, the clock synchronization accuracy between the first electronic device and the second electronic device can be improved by controlling the second electronic device to synchronize its clock with the first electronic device according to the first time difference between the first trigger time and the second trigger time.
[0168] In one embodiment of the present disclosure, the method also includes: obtaining a third timestamp of receiving the first action and the first trigger time; determining a second time difference between the third timestamp and the second trigger time; and when the second time difference is less than or equal to a set third threshold, executing the step of controlling the second electronic device to perform clock synchronization with the first electronic device.
[0169] In this embodiment, the third threshold may be pre-set according to an application scenario or specific requirements, and represents the maximum value of the network delay between two electronic devices that require time synchronization. For example, the third threshold may be 100 milliseconds.
[0170] In this embodiment, when the third timestamp is T3 and the second trigger time corresponding to the second action matching the first action is T2, the second time difference can be determined to be ΔT2=T3-T2.
[0171] If the second time difference is greater than the third threshold, it can be considered that the network delay between the first electronic device and the second electronic device is too large, the second action and the corresponding second trigger time are invalid, and the clock synchronization of the second electronic device and the first electronic device is not controlled based on the second action and the corresponding second trigger time.
[0172] In one embodiment of the present disclosure, the method further includes: detecting whether a deletion event occurs; and deleting the second action and the second trigger time when the deletion event occurs.
[0173] In this embodiment, the deletion event may include at least one of the following: the third time difference between the current event and the second trigger time is greater than or equal to the set fourth threshold; the second time difference is greater than the third threshold.
[0174] In the embodiment where the deletion event includes the third time difference between the current event and the second trigger time being greater than or equal to the fourth threshold, the fourth threshold may be pre-set according to the application scenario or specific requirements. For example, the fourth threshold may be 1 day, 1 hour, etc.
[0175] In an embodiment where the deletion event includes a second time difference greater than a third threshold, the second time difference is a time difference between a third timestamp of receiving the first action and the first trigger time and the second trigger time.
[0176] This embodiment deletes the second action and the second trigger time when a deletion event occurs, and can delete the second action and the corresponding second trigger time that cannot be used to control the clock synchronization of the second electronic device with the first electronic device, thereby speeding up the time synchronization speed.
[0177] In one embodiment of the present disclosure, after executing step S5400, the method may further include: sending a second confirmation message to the first electronic device to cause the first electronic device to stop acquiring the first physiological signal; and stop acquiring the second physiological signal.
[0178] In this embodiment, when the second electronic device sends the second confirmation message to the first electronic device, the second electronic device exits the waiting process, no longer obtains the second physiological signal, and stops executing steps S5100 to S5400 of this embodiment. Correspondingly, when the first electronic device receives the second confirmation message, the first electronic device also exits the waiting process, no longer obtains the first physiological signal, and stops executing steps S4100 to S4300 of this embodiment.
[0179] Through this embodiment, after the first electronic device and the second electronic device are time synchronized, the acquisition of the physiological signal is stopped, so that the power consumption of the first electronic device and the second electronic device can be reduced.
[0180] <Third Method Embodiment>
[0181] The present disclosure provides a clock synchronization method, which can be implemented by a first electronic device and a second electronic device. The first electronic device can be the first electronic device 1100 in the aforementioned embodiment, and the second electronic device can be the second electronic device 1200 in the aforementioned embodiment.
[0182] Figure 6 The figure is a flowchart of a clock synchronization method according to an embodiment of the present disclosure.
[0183] like Figure 6 As shown, the method includes the following steps:
[0184] Step S6101: The first electronic device detects whether a synchronous clock event occurs.
[0185] Step S6102: When the first electronic device detects that a synchronous clock event occurs, the first electronic device sends a clock synchronization request to the second electronic device.
[0186] Step S6201: The second electronic device returns a first confirmation message.
[0187] Step S6103: The first electronic device obtains a first physiological signal of the target user.
[0188] Step S6104: the first electronic device determines a first action corresponding to the first physiological signal and a first triggering time of the first physiological signal.
[0189] Step S6105: The first electronic device sends the first action and the first trigger time to the second electronic device worn by the target user.
[0190] Step S6202: The second electronic device obtains a second physiological signal of the target user.
[0191] Step S6203: The second electronic device determines a second action corresponding to the second physiological signal and a second triggering time of the second action.
[0192] Step S6204: The second electronic device controls the second electronic device to perform clock synchronization with the first electronic device according to the first action, the second action, the first trigger time, and the second trigger time.
[0193] Step S6205: The second electronic device sends a second confirmation message to the first electronic device.
[0194] Step S6206: The second electronic device stops acquiring the second physiological signal.
[0195] Step S6106: the first electronic device stops acquiring the first physiological signal.
[0196] <First Electronic Equipment Embodiment>
[0197] This embodiment provides a first electronic device, such as Figure 7 As shown, the first electronic device 7000 may include a first processor 7100 and a first memory 7200, the first memory 7200 is used to store a first computer program, and the first processor 7100 is used to execute the method steps performed by the first electronic device as in any embodiment of the present disclosure under the control of the first computer program.
[0198] <Second Electronic Equipment Embodiment>
[0199] This embodiment provides a second electronic device, such as Figure 8 As shown, the second electronic device 8000 may include a second processor 8100 and a second memory 8200, the second memory 8200 is used to store a second computer program, and the second processor 8100 is used to execute the method steps performed by the second electronic device as in any embodiment of the present disclosure under the control of the second computer program.
[0200] <System Embodiment>
[0201] This embodiment also provides a clock synchronization system 9000, such as Fig. 9As shown, the clock synchronization system 9000 may include the first electronic device 7000 and the second electronic device 8000 of the aforementioned embodiment.
[0202] <Readable Storage Medium Embodiment>
[0203] This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method described in any method embodiment of the present disclosure is executed.
[0204] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0205] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0206] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0207] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0208] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0209] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0210] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0211] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0212] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A clock synchronization method, characterized in that: Applied to a first electronic device, the method includes: Acquire a first physiological signal of a target user; Determining a first action corresponding to the first physiological signal and a first triggering time of the first physiological signal; The first action and the first trigger time are sent to a second electronic device worn by the target user, so that the second electronic device performs clock synchronization with the first electronic device according to the first action and the first trigger time.
2. The method according to claim 1, characterized in that The method further comprises: Detect whether a synchronization clock event occurs; When the occurrence of the synchronous clock event is detected, sending a clock synchronization request to the second electronic device; In case of receiving the first confirmation message returned by the second electronic device according to the clock synchronization request, the step of acquiring the first physiological signal of the target user is performed.
3. The method according to claim 1, characterized in that The determining a first action corresponding to the first physiological signal and a first trigger time of the first physiological signal includes: In the case where it is monitored that the signal amplitude of the first physiological signal exceeds a set first threshold, determining a first timestamp when the signal amplitude of the first physiological signal exceeds the first threshold as the first trigger time; intercepting a first signal segment of the first physiological signal according to the first trigger time and set duration; The first action is determined based on the first signal segment.
4. The method according to claim 3, characterized in that The determining the first action according to the first signal segment comprises: Acquire a first signal feature of the first signal segment; Based on a pre-trained classification model, an action corresponding to the first signal feature is determined as the first action.
5. A clock synchronization method, characterized in that: Applied to a second electronic device, the method includes: Acquire a second physiological signal of the target user; Determining a second action corresponding to the second physiological signal and a second triggering time of the second action; Receiving a first action and a first trigger time sent by a first electronic device worn by the target user; wherein the first action and the first trigger time are determined according to a first physiological signal of the target user acquired by the first electronic device; According to the first action, the second action, the first trigger time, and the second trigger time, the second electronic device is controlled to perform clock synchronization with the first electronic device.
6. The method according to claim 5, characterized in that The determining a second action corresponding to the second physiological signal and a second triggering time of the second action includes: In the case where it is monitored that the signal amplitude of the second physiological signal exceeds a set second threshold, determining a second timestamp at which the signal amplitude of the second physiological signal exceeds the second threshold as the second trigger time; intercepting a second signal segment in the second physiological signal according to the second trigger time and set duration; The second action is determined based on the second signal segment.
7. The method according to claim 5, characterized in that The controlling the second electronic device to perform clock synchronization with the first electronic device according to the first action, the second action, the first trigger time, and the second trigger time includes: determining whether the first action matches the second action, In a case where the first action matches the second action, determining a first time difference between the first trigger time and the second trigger time; The second electronic device is controlled to perform clock synchronization with the first electronic device according to the first time difference.
8. The method according to claim 5, characterized in that The method further comprises: Acquire a third timestamp of receiving the first action and the first triggering time; determining a second time difference between the third timestamp and the second trigger time; When the second time difference is less than or equal to a set third threshold, the step of controlling the second electronic device to perform clock synchronization with the first electronic device is performed.
9. The method according to claim 5, characterized in that The method further comprises: Detect whether a deletion event occurs; When the deletion event occurs, the second action and the second trigger time are deleted.
10. The method according to claim 5, characterized in that The method further comprises: receiving a clock synchronization request sent by the first electronic device when a synchronization clock event occurs; A first confirmation message is returned to the first electronic device according to the clock synchronization request, and the step of acquiring the second physiological signal of the target user is performed.
11. The method according to claim 5, characterized in that After controlling the second electronic device to perform clock synchronization with the first electronic device, the method further includes: Sending a second confirmation message to the first electronic device, so that the first electronic device stops acquiring the first physiological signal; Stop acquiring the second physiological signal.
12. A first electronic device, characterized in that: The method comprises a first processor and a first memory, wherein the first memory is used to store a first computer program, and the first processor is used to execute the method according to any one of claims 1 to 4 under the control of the first computer program.
13. A second electronic device, characterized in that: The method comprises a second processor and a second memory, wherein the second memory is used to store a second computer program, and the second processor is used to execute the method according to any one of claims 5 to 11 under the control of the second computer program.
14. A clock synchronization system, characterized in that: The device comprises a first electronic device as claimed in claim 12 and a second electronic device as claimed in claim 13, wherein a communication connection is established between the first electronic device and the second electronic device.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 11 when executed by a processor.
Citation Information
Cited By
Data acquisition method, intelligent wearable device, control device and data acquisition system
CN121606268A
Clock synchronization method and system, and devices and storage medium
WO2026113241A1