Clock synchronization method, device and system, electronic equipment, chip and medium
By receiving and broadcasting clock synchronization messages, the problem of Bluetooth communication connection occupies a lot of resources in the prior art is solved, and efficient clock synchronization of multiple devices is achieved.
Patent Information
- Application Number
- CN202411524544.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-07-25
AI Technical Summary
In the existing clock synchronization method, the Bluetooth communication connection between the master device and the slave device needs to be maintained in real time, resulting in a large amount of Bluetooth air interface resources, limiting the number of slave devices and clock synchronization efficiency.
By receiving the start clock broadcast command of the master device, the master Bluetooth clock information is determined, and the clock synchronization message is broadcasted to the slave device. The message contains the source reference clock information and the master Bluetooth clock information. There is no need to maintain the Bluetooth communication connection between the master device and the slave device, and multiple slave devices are supported.
Improves the utilization rate of Bluetooth air interface resources and clock synchronization efficiency, allowing multiple slave devices to perform synchronization processing.
Smart Images

Figure CN120379014A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technologies, and in particular, to a clock synchronization method, apparatus, system, electronic device, chip, and medium. Background Art
[0002] Currently, the main clock synchronization method is that the master device sends clock synchronization-related information to the slave device through a Bluetooth communication connection. Among them, the Bluetooth communication connection between the master device and the slave device needs to be maintained and processed in real time, thus occupying a large amount of Bluetooth air interface resources. As a result, the master device can only perform clock synchronization processing on a limited number of slave devices, reducing the utilization rate of Bluetooth air interface resources and reducing the clock synchronization efficiency. Summary of the Invention
[0003] The present disclosure provides a clock synchronization method, apparatus, system, electronic device, chip, and medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a clock synchronization method is provided. The method includes: receiving a start clock broadcast instruction from a master device; the start clock broadcast instruction includes source reference clock information; determining the master Bluetooth clock information when receiving the start clock broadcast instruction; broadcasting a clock synchronization message to a slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
[0005] In an embodiment of the present disclosure, after determining the master Bluetooth clock information when receiving the start clock broadcast instruction, the method further includes: determining first delay information between the sending and receiving of the start clock broadcast instruction; adjusting the master Bluetooth clock information according to the first delay information.
[0006] In an embodiment of the present disclosure, the number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the master device identifier corresponding to the master device is further included in the clock synchronization message, and is used to indicate the source of the clock synchronization message.
[0007] In an embodiment of the present disclosure, notification event configuration information is further included in the clock synchronization message; the method further includes: determining a notification event and a notification time point corresponding to the notification event according to the notification event configuration information; sending the notification event to an upper-layer application in the master device at the notification time point.
[0008] In an embodiment of the present disclosure, the notification event configuration information includes at least one of the following: configuration information of a control type notification event and configuration information of a time code signal type notification event.
[0009] In one embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system.
[0010] According to a second aspect of the embodiments of the present disclosure, there is also provided a clock synchronization method, the method comprising: receiving a clock synchronization message broadcast by a master Bluetooth system in a master device; the clock synchronization message including source reference clock information and master Bluetooth clock information of the master Bluetooth system; determining slave Bluetooth clock information when receiving the clock synchronization message; and performing clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
[0011] In one embodiment of the present disclosure, after determining the slave Bluetooth clock information when receiving the clock synchronization message, the method further comprises: determining second delay information between the sending and receiving of the clock synchronization message; and adjusting the slave Bluetooth clock information according to the second delay information.
[0012] In one embodiment of the present disclosure, the number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the clock synchronization message further includes: a master device identifier corresponding to the master device; before determining the slave Bluetooth clock information when receiving the clock synchronization message, the method further comprises: ignoring the clock synchronization message when there is no corresponding relationship between the master device corresponding to the master device identifier in the clock synchronization message and the slave device to which the device itself belongs.
[0013] In one embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of control type notification events; the method further comprises: determining a control type notification event and a notification time point corresponding to the control type notification event according to the configuration information of the control type notification events; and sending the control type notification event to an upper layer application in the slave device to which the device itself belongs at the notification time point.
[0014] In one embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of time code signal type notification events; the method further comprises: determining a sending requirement for a time code signal type notification event according to the configuration information of the time code signal type notification events; determining a time code signal type notification event and a notification time point corresponding to the time code signal type notification event according to the configuration information of the time code signal type notification events or the time code signal requirements of the upper layer application in the slave device to which the device itself belongs; and sending the time code signal type notification event to the upper layer application at the notification time point.
[0015] In an embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system.
[0016] According to the third aspect of the embodiments of the present disclosure, there is also provided a clock synchronization device, which includes: a receiving module, configured to receive a start clock broadcast instruction of a master device; the start clock broadcast instruction includes source reference clock information; a first determination module, configured to determine the master Bluetooth clock information when receiving the start clock broadcast instruction; a broadcast module, configured to broadcast a clock synchronization message to a slave Bluetooth system in a slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
[0017] In an embodiment of the present disclosure, the device further includes: a second determination module and an adjustment processing module; the second determination module is configured to determine first delay information between the sending and receiving of the start clock broadcast instruction; the adjustment processing module is configured to perform adjustment processing on the master Bluetooth clock information according to the first delay information.
[0018] In an embodiment of the present disclosure, the number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the master device identifier corresponding to the master device is further included in the clock synchronization message, and is used to indicate the source of the clock synchronization message.
[0019] In an embodiment of the present disclosure, notification event configuration information is further included in the clock synchronization message; the device further includes: a third determination module and a sending module; the third determination module is configured to determine a notification event and a notification time point corresponding to the notification event according to the notification event configuration information; the sending module is configured to send the notification event to an upper-layer application in the master device at the notification time point.
[0020] In an embodiment of the present disclosure, the notification event configuration information includes at least one of the following: configuration information of a control type notification event and configuration information of a time code signal type notification event.
[0021] In an embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system.
[0022] According to a fourth aspect of the embodiments of the present disclosure, there is also provided a clock synchronization device, which includes: a receiving module configured to receive a clock synchronization message broadcast by a master Bluetooth system in a master device; the clock synchronization message includes source reference clock information and master Bluetooth clock information of the master Bluetooth system; a first determination module configured to determine slave Bluetooth clock information when receiving the clock synchronization message; and a synchronization processing module configured to perform clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
[0023] In an embodiment of the present disclosure, the device further includes: a second determination module and an adjustment processing module; the second determination module is configured to determine second delay information between the sending and receiving of the clock synchronization message; and the adjustment processing module is configured to perform adjustment processing on the slave Bluetooth clock information according to the second delay information.
[0024] In an embodiment of the present disclosure, the number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the clock synchronization message further includes: a master device identifier corresponding to the master device; the device further includes: an ignoring processing module configured to ignore the clock synchronization message when there is no corresponding relationship between the master device corresponding to the master device identifier in the clock synchronization message and the slave device to which it belongs.
[0025] In an embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of control type notification events; the device further includes: a third determination module and a first sending module; the third determination module is configured to determine a control type notification event and a notification time point corresponding to the control type notification event according to the configuration information of the control type notification event; and the first sending module is configured to send the control type notification event to an upper layer application in the slave device to which it belongs at the notification time point.
[0026] In an embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of time code signal type notification events; the device further includes: a fourth determination module, a fifth determination module, and a second sending module; the fourth determination module is configured to determine a sending requirement for a time code signal type notification event according to the configuration information of the time code signal type notification event; the fifth determination module is configured to determine a time code signal type notification event and a notification time point corresponding to the time code signal type notification event according to the configuration information of the time code signal type notification event or the time code signal requirements of an upper layer application in the slave device to which it belongs; and the second sending module is configured to send the time code signal type notification event to the upper layer application at the notification time point.
[0027] In one embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system.
[0028] According to the fifth aspect of the embodiments of the present disclosure, there is also provided a clock synchronization system, including: a master Bluetooth system in the master device and a slave Bluetooth system in the slave device; the master Bluetooth system is communicatively connected to the slave Bluetooth system; the master Bluetooth system executes the clock synchronization method described in the first aspect embodiment above; the slave Bluetooth system executes the clock synchronization method described in the second aspect embodiment above.
[0029] According to the sixth aspect of the embodiments of the present disclosure, there is also provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to: implement the steps of the clock synchronization method described above.
[0030] According to the seventh aspect of the embodiments of the present disclosure, there is also provided a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor, enabling the processor to execute the clock synchronization method described above.
[0031] According to the eighth aspect of the embodiments of the present disclosure, there is also provided a chip, including one or more interface circuits and one or more processors; the interface circuit is used to receive a signal, the signal includes computer instructions, when the processor executes the computer instructions, enabling the chip to execute the clock synchronization method described above.
[0032] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0033] By receiving the start clock broadcast instruction of the master device; the start clock broadcast instruction includes source reference clock information; determining the master Bluetooth clock information when receiving the start clock broadcast instruction; broadcasting a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes source reference clock information and master Bluetooth clock information, for instructing the slave Bluetooth system to perform clock synchronization processing; wherein, it is not necessary to maintain the Bluetooth communication connection between the master device and the slave device; and one broadcast of the clock synchronization message can enable multiple slave devices to perform clock synchronization processing, without limiting the number of slave devices; occupying less Bluetooth air interface resources, improving the utilization rate of Bluetooth air interface resources, and improving the clock synchronization efficiency.
[0034] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.
[0036] Figure 1 It is a flowchart of a clock synchronization method according to an embodiment of the present disclosure;
[0037] Figure 2 It is a flowchart of a clock synchronization method according to another embodiment of the present disclosure;
[0038] Figure 3 It is a flowchart of a clock synchronization method according to another embodiment of the present disclosure;
[0039] Figure 4 It is a flowchart of a clock synchronization method according to another embodiment of the present disclosure;
[0040] Figure 5 It is a signaling interaction diagram of the clock synchronization method;
[0041] Figure 6 It is a schematic structural diagram of a clock synchronization device according to an embodiment of the present disclosure;
[0042] Figure 7 It is a schematic structural diagram of a clock synchronization device according to an embodiment of the present disclosure;
[0043] Figure 8 It is a structural block diagram of an electronic device shown according to an exemplary embodiment of the present disclosure;
[0044] Figure 9 It is a schematic structural diagram of a chip according to an embodiment of the present disclosure. Detailed implementation manners
[0045] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data may be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0047] The current clock synchronization method mainly involves the master device sending clock synchronization-related information to the slave device via a Bluetooth communication connection. Among them, the Bluetooth communication connection between the master device and the slave device needs to be maintained in real time, thus occupying a relatively large amount of Bluetooth air interface resources. As a result, the master device can only perform clock synchronization processing on a limited number of slave devices, reducing the utilization rate of the Bluetooth air interface resources and the clock synchronization efficiency.
[0048] Figure 1 The flowchart of the clock synchronization method according to an embodiment of the present disclosure is shown. It should be noted that the clock synchronization method of this embodiment can be applied to a clock synchronization device, which can be configured in an electronic device or a chip so that the electronic device or the chip can perform the clock synchronization function.
[0049] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC for short), a mobile terminal, a terminal device, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a central device in Bluetooth data stream technology, etc., which are hardware devices with various operating systems, touch screens, and / or display screens. Among them, the central device can be, for example, a smart phone, a computer, etc. In addition, the clock synchronization device can also be a Bluetooth chip in the electronic device, or a Bluetooth system provided with a Bluetooth chip, etc.
[0050] In addition, the clock synchronization device can also be software in the electronic device. Among them, the software can be, for example, clock synchronization software, etc. In the following embodiments, the main Bluetooth system in the master device is taken as an example for description.
[0051] As Figure 1 shown, the method includes the following steps:
[0052] Step 101, receiving a start clock broadcast instruction from the master device; the start clock broadcast instruction includes source reference clock information.
[0053] In the embodiment of the present disclosure, the source reference clock information can be the clock information when the master device sends a start clock broadcast instruction to the main Bluetooth system. Among them, the source reference clock information can be at least one of the following: world clock information, the own clock information of the master device, etc. Among them, the start clock broadcast instruction is used to instruct the main Bluetooth system to perform clock synchronization message broadcast processing.
[0054] In the embodiments of the present disclosure, the start clock broadcast instruction may further include at least one of the following: the master device identifier of the master device, and the notification event configuration information. Among them, the notification event configuration information includes at least one of the following: the configuration information of the control type notification event and the configuration information of the time code signal type notification event. Among them, the control type notification event, for example, is the start shooting event, the termination shooting event, etc.
[0055] Step 102, determine the master Bluetooth clock information when receiving the start clock broadcast instruction.
[0056] In the embodiments of the present disclosure, the master Bluetooth clock information is the own clock information of the master Bluetooth system. Among them, the master Bluetooth clock information, for example, may be the time count value obtained by counting after the master Bluetooth system clock is turned on. Among them, the master Bluetooth system is provided with a time measurement unit, and this time count value may be the value obtained by counting every time measurement unit after the master Bluetooth system clock is turned on. The time measurement unit may be, for example, 1 us, 625 us, etc.
[0057] Among them, the master Bluetooth system can determine the count value when receiving the start clock broadcast instruction; combine this count value and the time measurement unit to determine the master Bluetooth clock information.
[0058] Among them, it should be noted that in the case where there are multiple Bluetooth clocks set in the master Bluetooth system, for example, there are a first Bluetooth clock and a second Bluetooth clock set in the master Bluetooth system. The time measurement unit of the first Bluetooth clock is 625 us, that is, a counting process is performed every 625 us; the time measurement unit of the second Bluetooth clock is 1 us, that is, a counting process is performed every 1 us. The master Bluetooth system can combine the count value of the first Bluetooth clock and the count value of the second Bluetooth clock when receiving the start clock broadcast instruction to comprehensively determine the master Bluetooth clock information.
[0059] In the embodiments of the present disclosure, in order to further improve the synchronization between the master Bluetooth clock information and the source reference clock information, after step 102, the master Bluetooth system may further perform the following process: determine the first delay information between the sending and receiving of the start clock broadcast instruction; adjust the master Bluetooth clock information according to the first delay information.
[0060] Among them, the first delay information can be calculated and determined by calculating the transmission duration of the start clock broadcast instruction and the processing duration of the start clock broadcast instruction by the master Bluetooth system, etc.
[0061] Step 103, broadcast a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
[0062] In an embodiment of the present disclosure, when the start clock broadcast instruction includes the master device identifier and / or the notification event configuration information, the clock synchronization message may further include the master device identifier and / or the notification event configuration information.
[0063] In an embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system. The setting of the master device identifier in the clock synchronization message enables the slave Bluetooth system in the slave device to selectively receive the clock synchronization message. For example, the slave Bluetooth system can determine the master device identifier of the master device belonging to the same video recording system as the slave device; receive the clock synchronization message carrying the master device identifier; and reject or ignore the clock synchronization message not carrying the master device identifier.
[0064] In the clock synchronization method of the embodiment of the present disclosure, by receiving the start clock broadcast instruction of the master device; the start clock broadcast instruction includes the source reference clock information; determining the master Bluetooth clock information when receiving the start clock broadcast instruction; broadcasting a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing; wherein, it is not necessary to maintain the Bluetooth communication connection between the master device and the slave device; and one broadcast of the clock synchronization message can enable multiple slave devices to perform clock synchronization processing, without limiting the number of slave devices; occupying less Bluetooth air interface resources, improving the utilization rate of Bluetooth air interface resources, and improving the clock synchronization efficiency.
[0065] Figure 2 It is a flowchart of the clock synchronization method for another embodiment of the present disclosure. It should be noted that the clock synchronization method of this embodiment can be applied to a clock synchronization device, and the device can be configured in an electronic device or a chip so that the electronic device or the chip can perform the clock synchronization function.
[0066] Among them, the electronic device can be any device with computing power, such as a personal computer (PC), a mobile terminal, a terminal device, a server, a controller in a vehicle, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a central device in Bluetooth data stream technology, etc., which are hardware devices with various operating systems, touch screens, and / or display screens. Among them, the central device can be, for example, a smart phone, a computer, etc. In addition, the clock synchronization device can also be a Bluetooth chip in the electronic device, or a Bluetooth system provided with a Bluetooth chip, etc.
[0067] In addition, the clock synchronization device can also be software in the electronic device. Among them, the software is, for example, clock synchronization software, etc. Among them, in the following embodiments, the execution entity is taken as the master Bluetooth system for illustration.
[0068] As Figure 2 shown, the method includes the following steps:
[0069] Step 201: Receive a start clock broadcast instruction from the master device; the start clock broadcast instruction includes source reference clock information, master device identification, and notification event configuration information.
[0070] Step 202: Determine the master Bluetooth clock information when receiving the start clock broadcast instruction.
[0071] Step 203: Broadcast a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes source reference clock information, master Bluetooth clock information, master device identification, and notification event configuration information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
[0072] Step 204: Determine the notification event and the corresponding notification time point according to the notification event configuration information.
[0073] In an embodiment of the present disclosure, when the notification event is a non-periodic event, the specific content and the notification time point of the notification event can be configured in the notification event configuration information. Among them, taking the control type notification event as an example, the specific content of the notification event can include at least one of the following: start video recording, terminate video recording.
[0074] When the notification event is a periodic event, the period duration, the initial notification time point, and the specific content of the notification event can be configured in the notification event configuration information. Among them, taking the time code signal type notification event as an example, the specific content of the notification event can be, for example, a time code signal.
[0075] Among them, the notification time point can be a time point on the source reference clock, or a time point on the clock of the master device itself.
[0076] Step 205: Send the notification event to the upper layer application in the master device at the notification time point.
[0077] In an embodiment of the present disclosure, taking the video recording system as an example, the upper layer application in the master device can include, for example, at least one of the following: an application with a video recording function, an application with an audio recording function, etc.
[0078] Among them, taking the notification event as a control - type notification event as an example, at the notification time point, the master Bluetooth system can send a notification event to the relevant upper - layer application in the master device, instructing the upper - layer application to start or terminate the video recording process according to the notification event. Among them, through the notification of starting and / or terminating the video recording process, it can be realized that the upper - layer applications in the master device and each slave device can start video recording at the same time point, and / or terminate video recording at the same time point, so as to realize the alignment process of the video recording results on multiple devices through the video recording start time point and / or the video recording end time point, thereby ensuring the synchronization between audio and video.
[0079] Among them, taking the time - code signal - type notification event as an example, at the notification time point, the master Bluetooth system can send a time - code signal to the relevant upper - layer application in the master device, instructing the upper - layer application to mark the time - code signal in the currently generated video frame or audio frame, so as to realize the alignment process of the video recording results on multiple devices through the time - code signal, thereby ensuring the synchronization between audio and video.
[0080] Among them, the time - code signal is the time code recorded for each frame in the audio - video. Among them, for each frame in the audio - video, the master Bluetooth system will send a time - code signal to record the time code on this frame. Among them, the time code is used to represent hours, minutes, seconds, and frame numbers, that is, to record the time point corresponding to this frame.
[0081] Among them, it should be noted that for the detailed description of steps 201 to 203, reference can be made to Figure 1 Steps 101 to 103 in the illustrated embodiment, and no detailed description will be given here.
[0082] In the clock synchronization method of the present disclosure embodiment, by receiving the start - up clock broadcast instruction of the master device; the start - up clock broadcast instruction includes source reference clock information; determining the master Bluetooth clock information when receiving the start - up clock broadcast instruction; broadcasting a clock synchronization message to the slave Bluetooth system in the slave device according to the start - up clock broadcast instruction; the clock synchronization message includes source reference clock information, master Bluetooth clock information, master device identifier, and notification event configuration information, which is used to instruct the slave Bluetooth system to perform clock synchronization processing; determining the notification event and the corresponding notification time point according to the notification event configuration information; at the notification time point, sending a notification event to the upper - layer application in the master device; among them, after the master device, the master Bluetooth system in the master device, and the slave Bluetooth system perform clock synchronization, based on the notification event configuration information, the sending process of the notification event is carried out, which can realize the sending process of the notification event in the master Bluetooth system and the notification event in the slave Bluetooth system at the same time point, so as to improve the alignment and synchronization processing of the video recording results between the master device and each slave device, thereby further improving the synchronization efficiency.
[0083] Figure 3 The flowchart of the clock synchronization method according to another embodiment of the present disclosure. It should be noted that the clock synchronization method of this embodiment can be applied to a clock synchronization device, which can be configured in an electronic device or a chip, so that the electronic device or the chip can perform the clock synchronization function.
[0084] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC for short), a mobile terminal, a terminal device, a server, a controller in a vehicle, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a central device in Bluetooth data stream technology, etc., which are hardware devices with various operating systems, touch screens, and / or display screens. Among them, the central device can be, for example, a smart phone, a computer, etc. In addition, the clock synchronization device can also be a Bluetooth chip in the electronic device, or a Bluetooth system provided with a Bluetooth chip, etc.
[0085] In addition, the clock synchronization device can also be software in the electronic device. Among them, the software can be, for example, clock synchronization software, etc. Among them, in the following embodiments, the execution entity is taken as an example of a slave Bluetooth system for description.
[0086] As Figure 3 shown, the method includes the following steps:
[0087] Step 301, receiving a clock synchronization message broadcast by the master Bluetooth system in the master device; the clock synchronization message includes source reference clock information and the master Bluetooth clock information of the master Bluetooth system.
[0088] In the embodiment of the present disclosure, the source reference clock information can be the clock information when the master device sends a start clock broadcast instruction to the master Bluetooth system. The master Bluetooth clock information of the master Bluetooth system can be the master Bluetooth clock information when the master Bluetooth system receives the start clock broadcast instruction.
[0089] In the embodiment of the present disclosure, the clock synchronization message can also include a master device identifier and / or notification event configuration information. Among them, when the master device identifier is included in the clock synchronization message, the number of master devices can be multiple, corresponding to different slave devices. Among them, the master device and the corresponding slave device can be devices in the same video recording system.
[0090] Among them, the clock synchronization message received by the slave device from the Bluetooth system can be the clock synchronization message broadcast by the master Bluetooth system in any master device. Correspondingly, in order to ensure that the slave Bluetooth system receives the clock synchronization message that needs to be received, after step 301, the slave Bluetooth system can also perform the following process: when there is no corresponding relationship between the master device corresponding to the master device identifier in the clock synchronization message and the slave device to which it belongs, ignore the clock synchronization message.
[0091] Among them, when there is a corresponding relationship between the master device corresponding to the master device identifier in the clock synchronization message and the slave device to which it belongs, retain the clock synchronization message. Among them, the master device identifier of the master device corresponding to the slave device can be pre-stored in the slave device or the slave Bluetooth system for convenient invocation and comparison processing.
[0092] Step 302, determine the slave Bluetooth clock information when receiving the clock synchronization message.
[0093] In the embodiments of the present disclosure, in order to further improve the synchronization between the master Bluetooth clock information and the slave Bluetooth clock information, after step 302, the slave Bluetooth system can also perform the following process: determine the second delay information between the sending and receiving of the clock synchronization message; adjust the slave Bluetooth clock information according to the second delay information.
[0094] Among them, the second delay information can be determined by calculating the transmission duration of the clock synchronization message and the processing duration of the clock synchronization message by the slave Bluetooth system.
[0095] Step 303, perform clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
[0096] In the embodiments of the present disclosure, the process of the slave Bluetooth system executing step 303 can be, for example, establishing a corresponding relationship between the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information; for the current slave Bluetooth clock information, determine the difference between the current slave Bluetooth clock information and the slave Bluetooth clock information; according to the difference and the source reference clock information, determine the current source reference clock information corresponding to the current slave Bluetooth clock information.
[0097] In the clock synchronization method according to the embodiments of the present disclosure, a clock synchronization message broadcast by the master Bluetooth system in the master device is received; the clock synchronization message includes source reference clock information and the master Bluetooth clock information of the master Bluetooth system; the slave Bluetooth clock information when receiving the clock synchronization message is determined; clock synchronization processing is performed according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information; wherein, it is not necessary to maintain a Bluetooth communication connection between the master device and the slave device; and a single broadcast of the clock synchronization message can enable multiple slave devices to perform clock synchronization processing, without limiting the number of slave devices; the Bluetooth air interface resources occupied are relatively small, the utilization rate of the Bluetooth air interface resources is improved, and the clock synchronization efficiency is improved.
[0098] Figure 4 The flowchart of the clock synchronization method according to another embodiment of the present disclosure is shown. It should be noted that the clock synchronization method of this embodiment can be applied to a clock synchronization device, which can be configured in an electronic device or a chip, so that the electronic device or the chip can perform the clock synchronization function.
[0099] Among them, the electronic device can be any device with computing power, such as a personal computer (PC for short), a mobile terminal, a terminal device, a server, a controller in a vehicle, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a central device in Bluetooth data stream technology, etc., which are hardware devices with various operating systems, touch screens, and / or display screens. Among them, the central device can be, for example, a smart phone, a computer, etc. In addition, the clock synchronization device can also be a Bluetooth chip in the electronic device, or a Bluetooth system provided with a Bluetooth chip, etc.
[0100] In addition, the clock synchronization device can also be software in the electronic device. Among them, the software can be, for example, clock synchronization software, etc. Among them, in the following embodiments, the execution entity is taken as an example of the slave Bluetooth system for description.
[0101] As Figure 4 shown, the method includes the following steps:
[0102] Step 401, receive a clock synchronization message broadcast by the master Bluetooth system in the master device; the clock synchronization message includes source reference clock information, the master Bluetooth clock information of the master Bluetooth system, a master device identifier, and notification event configuration information; the notification event configuration information includes configuration information of control type notification events and configuration information of time code signal type notification events.
[0103] Step 402, determine the slave Bluetooth clock information when receiving the clock synchronization message.
[0104] Step 403, perform clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
[0105] Step 404: Determine the control class notification event and the corresponding notification time point according to the configuration information of the control class notification event.
[0106] In the embodiments of the present disclosure, the control class notification event may be an aperiodic event. Correspondingly, the specific content of the notification event and the notification time point may be configured in the configuration information of the control class notification event. Specifically, the specific content of the notification event may include at least one of the following: start video recording, stop video recording.
[0107] Among them, the notification time point may be a time point on the source reference clock, or a time point on the main device's own clock.
[0108] Step 405: Send the control class notification event to the upper-layer application in the slave devices to which it belongs at the notification time point.
[0109] Among them, after the slave Bluetooth system performs clock synchronization, a corresponding relationship is established among the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information on the slave Bluetooth system. Correspondingly, the process of the slave Bluetooth system executing step 405 may be, for example, combining the notification time point and the above corresponding relationship to determine the target slave Bluetooth clock information corresponding to the notification time point; when the target slave Bluetooth clock information is reached, send the control class notification event to the upper-layer application in the slave devices to which it belongs.
[0110] In the embodiments of the present disclosure, taking the video recording system as an example, the upper-layer applications in the master device may include at least one of the following: an application with a video recording function, an application with an audio recording function, etc.
[0111] Among them, for the control class notification event, at the notification time point, the master Bluetooth system may send the notification event to the relevant upper-layer application in the master device, instructing the upper-layer application to perform start video recording processing or stop video recording processing according to the notification event. Correspondingly, at the notification time point, the slave Bluetooth system may send the notification event to the relevant upper-layer application in the slave device, instructing the upper-layer application to perform start video recording processing or stop video recording processing according to the notification event. Thus, it can be realized that the upper-layer applications in the master device and the upper-layer applications in each slave device can start video recording at the same time point, and / or stop video recording at the same time point, so that it can be realized that the video recording results on multiple devices are aligned through the video recording start time point and / or the video recording stop time point, thereby ensuring the synchronization between audio and video.
[0112] Step 406: Determine the sending requirements for the time code signal class notification event according to the configuration information of the time code signal class notification event.
[0113] In an embodiment of the present disclosure, the sending requirement for a time code signal type notification event means that the master device requests the slave Bluetooth system in the slave device to send a time code signal to the upper layer application during the video recording process.
[0114] In an embodiment of the present disclosure, the time code signal type notification event may be a periodic event. Correspondingly, the configuration information of the time code signal type notification event may configure the period duration of the notification event, the initial notification time point, and the specific content of the notification event. Among them, the specific content of the notification event may be, for example, a time code signal.
[0115] Step 407: Determine the time code signal type notification event and the corresponding notification time point of the time code signal type notification event according to the configuration information of the time code signal type notification event or the time code signal requirement of the upper layer application in the slave device to which it belongs.
[0116] In an embodiment of the present disclosure, in one example, the process of the slave Bluetooth system executing step 407 may be, for example, to determine the time code signal type notification event and the corresponding notification time point of the time code signal type notification event according to the configuration information of the time code signal type notification event. In this example, the notification time point corresponding to the time code signal type notification event in the slave Bluetooth system is the same as the notification time point corresponding to the time code signal type notification event in the master Bluetooth system, and is determined by the same configuration information of the time code signal type notification event.
[0117] In an embodiment of the present disclosure, in another example, the process of the slave Bluetooth system executing step 407 may be, for example, to determine the time code signal type notification event and the corresponding notification time point of the time code signal type notification event according to the time code signal requirement of the upper layer application in the slave device to which it belongs. In this example, the notification time point corresponding to the time code signal type notification event in the slave Bluetooth system may be the same as or different from the notification time point corresponding to the time code signal type notification event in the master Bluetooth system, and is determined by different configuration information of the time code signal type notification event.
[0118] Specifically, the time code signal requirement of the upper layer application in the slave device may specifically be the period or frequency during video recording in the upper layer application of the slave device. For example, the number of video frames recorded per unit time in the upper layer application, or the number of audio frames recorded per unit time in the upper layer application, etc.
[0119] Step 408: Send a time code signal type notification event to the upper layer application at the notification time point.
[0120] Among them, for time code signal - type notification events, at each notification time point determined based on the configuration information of the time code signal - type notification events, the master Bluetooth system can send a time code signal to relevant upper - layer applications in the master device to mark video frames or audio frames. Correspondingly, at each notification time point determined based on the configuration information of the time code signal - type notification events or the time code signal requirements of upper - layer applications in the slave device, the slave Bluetooth system can send a time code signal to relevant upper - layer applications in the slave device to mark video frames or audio frames. Among them, there are identical notification time points among the multiple notification time points determined by the master Bluetooth system and the multiple notification time points determined by the slave Bluetooth system. Based on the time code signals at the identical notification time points, it is possible to align the recording results on multiple devices, thereby ensuring the synchronization between audio and video.
[0121] Among them, it should be noted that for the detailed descriptions of steps 401 to 403, reference can be made to Figure 1 steps 301 to 303 in the illustrated embodiments, and no detailed description will be given here.
[0122] In the clock synchronization method of the present disclosure embodiment, by receiving a clock synchronization message broadcast by the master Bluetooth system in the master device; the clock synchronization message includes source reference clock information, master Bluetooth clock information of the master Bluetooth system, master device identification, and notification event configuration information; the notification event configuration information includes configuration information of control - type notification events and configuration information of time code signal - type notification events; determining the slave Bluetooth clock information when receiving the clock synchronization message; performing clock synchronization processing according to the source reference clock information, master Bluetooth clock information, and slave Bluetooth clock information; determining control - type notification events and the corresponding notification time points according to the configuration information of control - type notification events; sending control - type notification events to upper - layer applications in the slave device to which it belongs at the notification time points; determining the sending requirements for time code signal - type notification events according to the configuration information of time code signal - type notification events; determining time code signal - type notification events and the corresponding notification time points according to the configuration information of time code signal - type notification events or the time code signal requirements of upper - layer applications in the slave device to which it belongs; sending time code signal - type notification events to upper - layer applications at the notification time points; among them, after clock synchronization is performed among the master device, the master Bluetooth system in the master device, and the slave Bluetooth system, performing the sending process of notification events based on the notification event configuration information can achieve the sending process of notification events in the master Bluetooth system and notification events in the slave Bluetooth system at the same time point, thereby improving the alignment and synchronization processing of the recording results on the master device and each slave device, and further improving the synchronization efficiency.
[0123] The following is an example for illustration. As Figure 5 shown, it is a signaling interaction diagram of the clock synchronization method. InFigure 5 It may include the following steps: Step 501, the master device sends a start clock broadcast instruction to the master Bluetooth system, which carries source reference clock information and notification event configuration information to indicate starting clock synchronization broadcast and starting local clock periodic event reporting. Step 502, the master Bluetooth system broadcasts a clock synchronization message to at least one slave Bluetooth system, which carries source reference clock information and master Bluetooth clock information. Step 503, the slave device sends a start broadcast scan instruction to the slave Bluetooth system and receives the clock synchronization message returned by the slave Bluetooth system. Step 504, the master Bluetooth system determines the notification event and the corresponding notification time point according to the notification event configuration information; and sends the notification event to the master device at the notification time point. Step 505, the slave device selects a clock synchronization source (master device) according to the clock synchronization message and starts periodic event reporting, which carries the time code signal requirement of the upper-layer application. Step 506, the slave Bluetooth system determines the notification event and the corresponding notification time point according to the time code signal requirement; and sends the notification event to the slave device at the notification time point.
[0124] Figure 6 It is a schematic structural diagram of a clock synchronization device according to an embodiment of the present disclosure.
[0125] As Figure 6 shown, the clock synchronization device may include: a receiving module 601, a first determination module 602, and a broadcast module 603.
[0126] Among them, the receiving module 601 is configured to receive the start clock broadcast instruction of the master device; the start clock broadcast instruction includes source reference clock information; the first determination module 602 is configured to determine the master Bluetooth clock information when receiving the start clock broadcast instruction; the broadcast module 603 is configured to broadcast a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
[0127] In an embodiment of the present disclosure, the device further includes: a second determination module and an adjustment processing module; the second determination module is configured to determine the first delay information between the sending and receiving of the start clock broadcast instruction; the adjustment processing module is configured to perform adjustment processing on the master Bluetooth clock information according to the first delay information.
[0128] In an embodiment of the present disclosure, the number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the clock synchronization message further includes the master device identifier corresponding to the master device, which is used to indicate the source of the clock synchronization message.
[0129] In an embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the device further includes: a third determination module and a sending module; the third determination module is configured to determine a notification event and a corresponding notification time point according to the notification event configuration information; the sending module is configured to send the notification event to an upper-layer application in the master device at the notification time point.
[0130] In an embodiment of the present disclosure, the notification event configuration information includes at least one of the following: configuration information of a control type notification event and configuration information of a time code signal type notification event.
[0131] In an embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system.
[0132] In the clock synchronization device according to an embodiment of the present disclosure, by receiving a start clock broadcast instruction of a master device; the start clock broadcast instruction includes source reference clock information; determining the master Bluetooth clock information when receiving the start clock broadcast instruction; broadcasting a clock synchronization message to a slave Bluetooth system in a slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing; wherein, it is not necessary to maintain a Bluetooth communication connection between the master device and the slave device; and one broadcast of the clock synchronization message can enable multiple slave devices to perform clock synchronization processing, without limiting the number of slave devices; it occupies less Bluetooth air interface resources, improves the utilization rate of Bluetooth air interface resources, and improves the clock synchronization efficiency.
[0133] Figure 7 It is a schematic structural diagram of a clock synchronization device according to an embodiment of the present disclosure.
[0134] As Figure 7 shown, the clock synchronization device may include: a receiving module 701, a first determination module 702, and a synchronization processing module 703.
[0135] Among them, the receiving module 701 is configured to receive a clock synchronization message broadcast by a master Bluetooth system in a master device; the clock synchronization message includes source reference clock information and the master Bluetooth clock information of the master Bluetooth system; the first determination module 702 is configured to determine the slave Bluetooth clock information when receiving the clock synchronization message; the synchronization processing module 703 is configured to perform clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
[0136] In an embodiment of the present disclosure, the device further includes: a second determination module and an adjustment processing module; the second determination module is configured to determine second delay information between the sending and receiving of the clock synchronization message; the adjustment processing module is configured to adjust and process the slave Bluetooth clock information according to the second delay information.
[0137] In an embodiment of the present disclosure, the number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the clock synchronization message further includes: a master device identifier corresponding to the master device; the device further includes: an ignoring processing module, configured to ignore the clock synchronization message when there is no corresponding relationship between the master device corresponding to the master device identifier in the clock synchronization message and the slave device to which it belongs.
[0138] In an embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of control type notification events; the device further includes: a third determination module and a first sending module; the third determination module is configured to determine a control type notification event and a notification time point corresponding to the control type notification event according to the configuration information of the control type notification event; the first sending module is configured to send the control type notification event to an upper layer application in the slave device to which it belongs at the notification time point.
[0139] In an embodiment of the present disclosure, the clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of time code signal type notification events; the device further includes: a fourth determination module, a fifth determination module and a second sending module; the fourth determination module is configured to determine a sending requirement for a time code signal type notification event according to the configuration information of the time code signal type notification event; the fifth determination module is configured to determine a time code signal type notification event and a notification time point corresponding to the time code signal type notification event according to the configuration information of the time code signal type notification event or the time code signal requirements of the upper layer application in the slave device to which it belongs; the second sending module is configured to send the time code signal type notification event to the upper layer application at the notification time point.
[0140] In an embodiment of the present disclosure, the master device and the slave device corresponding to the master device are devices in the same video recording system.
[0141] In the clock synchronization device according to the embodiments of the present disclosure, a clock synchronization message broadcast by the master Bluetooth system in the master device is received; the clock synchronization message includes source reference clock information and the master Bluetooth clock information of the master Bluetooth system; the slave Bluetooth clock information when receiving the clock synchronization message is determined; clock synchronization processing is performed according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information; wherein, it is not necessary to maintain a Bluetooth communication connection between the master device and the slave device; and one broadcast of the clock synchronization message can enable multiple slave devices to perform clock synchronization processing, without limiting the number of slave devices; the Bluetooth air interface resources occupied are relatively small, improving the utilization rate of Bluetooth air interface resources and the clock synchronization efficiency.
[0142] According to a fifth aspect of the embodiments of the present disclosure, a clock synchronization system is further provided, including: a master Bluetooth system in a master device and a slave Bluetooth system in a slave device; the master Bluetooth system is communicatively connected to the slave Bluetooth system; the master Bluetooth system executes the clock synchronization method as described in Figures 1 to 2 the embodiments in Figures 3 to 4 the embodiments described above; the slave Bluetooth system executes the clock synchronization method as described in
[0143] According to a sixth aspect of the embodiments of the present disclosure, an electronic device is further provided, including: a processor; a memory for storing processor-executable instructions, wherein the processor is configured to: implement the steps of the clock synchronization method as described above.
[0144] To implement the above embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium.
[0145] Wherein, when the instructions in the storage medium are executed by the processor, the processor can execute the clock synchronization method as described above.
[0146] To implement the above embodiments, the present disclosure also provides a computer program product.
[0147] Wherein, when the computer program product is executed by the processor of the electronic device, the electronic device can execute the method as described above.
[0148] Figure 8 It is a structural block diagram of an electronic device shown according to an exemplary embodiment. Figure 8 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0149] As Figure 8As shown, the electronic device 1000 includes a processor 111, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 112 or the program loaded from the memory 116 into the random access memory (RAM) 113. In the RAM 113, various programs and data required for the operation of the electronic device 1000 are also stored. The processor 111, the ROM 112, and the RAM 113 are connected to each other via a bus 114. The input / output (I / O) interface 115 is also connected to the bus 114.
[0150] The following components are connected to the I / O interface 115: a memory 116 including a hard disk, etc.; and a communication part 117 including a network interface card such as a local area network (LAN) card, a modem, etc., and the communication part 117 performs communication processing via a network such as the Internet; a drive 118 is also connected to the I / O interface 115 as needed.
[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 117. When the computer program is executed by the processor 111, the above functions defined in the method of the present disclosure are executed.
[0152] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by the processor 111 of the electronic device 1000 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0153] In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.
[0154] Figure 9 Schematic diagram of the structure of a chip according to an embodiment of the present disclosure. As Figure 9 shown, the chip includes a processor 901 and an interface circuit 902. Among them, the number of processors 901 may be one or more, and the number of interface circuits 902 may be one or more.
[0155] Optionally, the interface circuit 902 is used to receive signals, and the signals include computer instructions. When the processor 901 executes the computer instructions, the chip executes the clock synchronization method described in the above embodiments of the present disclosure.
[0156] The collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved in this application all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0157] In addition, the term "exemplary" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "exemplary" is not necessarily to be understood as being advantageous compared to other aspects or designs. Instead, the use of the term exemplary is intended to present concepts in a specific manner. As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X applies A or B" is intended to mean any arrangement in a natural inclusive arrangement. That is, if X applies A; X applies B; or X applies both A and B, then "X applies A or B" is satisfied in any of the foregoing instances. Additionally, unless otherwise specified or clear from the context referring to the singular form, the articles "a" and "an" as used in this application and the appended claims are generally understood to mean "one or more".
[0158] Similarly, although the present disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding the specification and drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the claims. Specifically with respect to the various functions performed by the components described above (e.g., elements, resources, etc.), unless otherwise indicated, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific function of the described component, even if not structurally equivalent to the disclosed structure. Additionally, although a particular feature of the present disclosure may have been disclosed with respect to only one of several implementations, such a feature may, as may be desired and advantageous for any given or particular application, be combined with one or more other features of other implementations. Further, with respect to the use of "comprises," "comprising," "has," "having," "includes," or "including" in the detailed description or claims, such terms are intended to be inclusive in a manner similar to the term "including."
[0159] Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known or customary techniques in the art that are not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0160] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes may be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A clock synchronization method, characterized in that, The method includes: Receiving a start clock broadcast instruction from a master device; the start clock broadcast instruction includes source reference clock information; Determining the master Bluetooth clock information when receiving the start clock broadcast instruction; Broadcasting a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
2. The method according to claim 1, characterized in that, After determining the master Bluetooth clock information when receiving the start clock broadcast instruction, the method further includes: Determining first delay information between the sending and receiving of the start clock broadcast instruction; Adjusting the master Bluetooth clock information according to the first delay information.
3. The method according to claim 1, wherein The number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; The master device identifier corresponding to the master device is further included in the clock synchronization message, and is used to indicate the source of the clock synchronization message.
4. The method according to claim 1 or 3, characterized in that, Notification event configuration information is further included in the clock synchronization message; the method further includes: Determining a notification event and a notification time point corresponding to the notification event according to the notification event configuration information; Sending the notification event to the upper-layer application in the master device at the notification time point.
5. The method according to claim 4, wherein The notification event configuration information includes at least one of the following: configuration information of a control type notification event and configuration information of a time code signal type notification event.
6. The method according to claim 1 or 3, characterized in that, The master device and the slave device corresponding to the master device are devices in the same video recording system.
7. A clock synchronization method, characterized in that, The method includes: Receiving a clock synchronization message broadcast by the master Bluetooth system in the master device; the clock synchronization message includes source reference clock information and the master Bluetooth clock information of the master Bluetooth system; Determining the slave Bluetooth clock information when receiving the clock synchronization message; Performing clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
8. The method according to claim 7, characterized in that, After determining the slave Bluetooth clock information when receiving the clock synchronization message, the method further includes: Determining second delay information between the sending and receiving of the clock synchronization message; Adjusting the slave Bluetooth clock information according to the second delay information.
9. The method according to claim 7, characterized in that, The number of master devices is multiple; there is a corresponding relationship between the master device and the slave device; the master device identifier corresponding to the master device is further included in the clock synchronization message; before determining the slave Bluetooth clock information when receiving the clock synchronization message, the method further includes: Ignoring the clock synchronization message when there is no corresponding relationship between the master device corresponding to the master device identifier in the clock synchronization message and the slave device to which itself belongs.
10. The method according to claim 7 or 9, characterized in that Notification event configuration information is further included in the clock synchronization message; the notification event configuration information includes configuration information of a control type notification event; the method further includes: Determining a control type notification event and a notification time point corresponding to the control type notification event according to the configuration information of the control type notification event; Sending the control type notification event to the upper-layer application in the slave device to which itself belongs at the notification time point.
11. The method according to claim 7 or 9, characterized in that, The clock synchronization message further includes notification event configuration information; the notification event configuration information includes configuration information of time code signal type notification events; the method further includes: Determining, according to the configuration information of the time code signal type notification event, that there is a sending requirement for the time code signal type notification event; Determining, according to the configuration information of the time code signal type notification event or the time code signal requirements of the upper-layer application in the slave device to which it belongs, the time code signal type notification event and the corresponding notification time point of the time code signal type notification event; Sending the time code signal type notification event to the upper-layer application at the notification time point.
12. The method according to claim 7 or 9, characterized in that The master device and the slave device corresponding to the master device are devices in the same video recording system.
13. A clock synchronization device, characterized in that, The device includes: A receiving module, configured to receive a start clock broadcast instruction of a master device; the start clock broadcast instruction includes source reference clock information; A first determination module, configured to determine the master Bluetooth clock information when receiving the start clock broadcast instruction; A broadcast module, configured to broadcast a clock synchronization message to the slave Bluetooth system in the slave device according to the start clock broadcast instruction; the clock synchronization message includes the source reference clock information and the master Bluetooth clock information, and is used to instruct the slave Bluetooth system to perform clock synchronization processing.
14. A clock synchronization device, characterized in that, The device includes: A receiving module, configured to receive a clock synchronization message broadcast by the master Bluetooth system in the master device; the clock synchronization message includes source reference clock information and the master Bluetooth clock information of the master Bluetooth system; A first determination module, configured to determine the slave Bluetooth clock information when receiving the clock synchronization message; A synchronization processing module, configured to perform clock synchronization processing according to the source reference clock information, the master Bluetooth clock information, and the slave Bluetooth clock information.
15. A clock synchronization system, characterized in that, The system includes: The master Bluetooth system in the master device and the slave Bluetooth system in the slave device; the master Bluetooth system is communicatively connected to the slave Bluetooth system; The master Bluetooth system executes the clock synchronization method according to any one of claims 1 to 6; the slave Bluetooth system executes the clock synchronization method according to any one of claims 7 to 12.
16. An electronic device, characterized in that, Includes: A processor; A memory for storing executable instructions of the processor; Wherein, the processor is configured to: Implement the steps of the clock synchronization method according to any one of claims 1 to 6; or, implement the steps of the clock synchronization method according to any one of claims 7 to 12.
17. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor, enable the processor to execute the clock synchronization method according to any one of claims 1 to 6; or, execute the clock synchronization method according to any one of claims 7 to 12.
18. A chip, characterized in that, Includes one or more interface circuits and one or more processors; the interface circuit is used to receive a signal, the signal includes computer instructions, and when the processor executes the computer instructions, enable the chip to execute the clock synchronization method according to any one of claims 1 to 6; or, execute the clock synchronization method according to any one of claims 7 to 12.