Multi-channel data transmission synchronization method and synchronization apparatus, and device

By sending test data packets to multiple receiving devices, calculating the sending cycle and delayed playback timestamp, and adjusting the fault tolerance time according to feedback, the problem of audio out-synchronization and delay in multi-channel audio packet transmission is solved, and efficient audio data synchronization is achieved.

WO2025055028A1PCT designated stage expired Publication Date: 2025-03-20QUESTYLE AUDIO TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/122310
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-15
Filing Date
2023-09-27
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

The existing wireless transmission technology has problems of audio out-synchronization and delay in multi-channel audio packet transmission.

Method used

By sending test data packets to N receiving devices, recording the time required for transmission completion, calculating the transmission cycle and delay playback timestamp, and obtaining the time difference based on the confirmation packet feedback from the receiving device, adjusting the fault tolerance time to realize synchronization of the audio data packets.

Benefits of technology

The synchronization of multi-channel wireless transmission audio data packets is realized, reducing playback delay time and improving the synchronization rate of audio data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023122310_20032025_PF_FP_ABST
    Figure CN2023122310_20032025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a multi-channel data transmission synchronization method and synchronization apparatus, and a device. In the multi-channel data transmission synchronization method in the present application, testing data is sent to N receiving devices, and calculation is performed on the basis of information, which is fed back by the receiving devices, and a data packet preparation time, a first time and a first fault-tolerant time, so as to acquire a sending period and N delayed playing timestamps; audio data packets are sent to the N receiving devices, and calculation is performed on the basis of acknowledgement packets, which are fed back by the receiving devices, so as to acquire an existing data playing duration and a time difference; and the first fault-tolerant time is adjusted on the basis of a comparison result of the time difference and a preset synchronization time difference threshold value, so as to obtain a second fault-tolerate time, and the first fault-tolerate time is replaced with the second fault-tolerate time obtained after adjustment, so as to realize that a playing delay time of audio data packets, which are wirelessly transmitted through multiple channels, is adjusted in real time and in a timely manner on the basis of an actual data transmission situation, i.e., adjusting the first fault-tolerate time to be the second fault-tolerate time, thereby achieving the aim of synchronizing data / audio, which is wirelessly transmitted through multiple channels.
Need to check novelty before this filing date? Find Prior Art

Description

Synchronization method, synchronization device and equipment for multi-channel data transmission

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 15, 2023, with application number 2023112054961 and application name “Synchronization method, synchronization device and equipment for multi-channel data transmission”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of wireless communication technology, and in particular to a synchronization method, synchronization device and equipment for multi-channel data transmission. Background Art

[0003] With the development of wireless technology, the use of wireless transmission methods such as Wi-Fi and Bluetooth for audio transmission is becoming increasingly mature. Freeing users from the constraints of wired connections, they can enjoy a variety of music at any time, providing greater flexibility and convenience in life and a better auditory entertainment experience. Bluetooth headsets, Bluetooth speakers, and Wi-Fi speakers have emerged to meet various occasions, and corresponding audio transmission technologies and audio processing algorithms have also developed accordingly.

[0004] In the prior art, when wireless transmission technology is applied to the transmission of multi-channel audio data packets, there are problems of audio asynchrony and large delay.

[0005] Therefore, how to solve the audio asynchrony and delay problems in wireless transmission of multi-channel audio data packets is an urgent problem to be solved.

[0006] Summary of the Invention

[0007] In view of this, the present application provides a synchronization method, synchronization device and equipment for multi-channel data transmission to solve the problems of audio asynchrony and large delay in the existing wireless transmission of multi-channel audio data packets.

[0008] In a first aspect, the present application provides a method for synchronizing multi-channel data transmission, comprising the steps of:

[0009] Sending test data packets to N receiving devices in sequence, and recording the time required for all the test data packets to be sent to obtain a first time, wherein N is a positive integer greater than 1;

[0010] Acquire a sending period and N delayed play timestamps according to a data packet preparation time, the first time, and a first fault tolerance time, wherein the N delayed play timestamps correspond one-to-one to the N receiving devices;

[0011] After sending audio data packets to the N receiving devices respectively according to the sending cycle and the N delayed playback timestamps, receiving confirmation packets fed back by the receiving devices;

[0012] Acquire the existing data playback duration according to the confirmation packet, and acquire the time difference according to the delayed playback timestamp and the existing data playback duration;

[0013] The first fault tolerance time is adjusted according to the comparison result of the time difference and the synchronization time difference threshold to obtain a second fault tolerance time, and the first fault tolerance time is replaced by the second fault tolerance time.

[0014] Optionally, the step of recording the time required for all the test data packets to be sent to obtain the first time includes:

[0015] Recording the first data sending time in the test data packet to obtain a first timestamp;

[0016] Receive the reception completion data packet fed back by the Nth receiving device;

[0017] Determine a second timestamp according to the receiving completion data packet;

[0018] A subtraction operation is performed on the second timestamp and the first timestamp to obtain the first time.

[0019] Optionally, the step of acquiring the data packet preparation time includes:

[0020] Acquire, according to the reception completion data packet, a third timestamp at which the receiving device starts receiving the data packet and a fourth timestamp at which the receiving device starts playing the data packet;

[0021] A subtraction operation is performed on the fourth timestamp and the third timestamp to obtain the data packet preparation time.

[0022] Optionally, the step of acquiring a sending period and N delayed playback timestamps according to the data packet preparation time, the first time, and the first error tolerance time includes:

[0023] Acquire the sending period according to the first time and the first fault tolerance time;

[0024] Acquire a first delayed playback timestamp according to the sending cycle and the data packet preparation time;

[0025] An Nth delayed playback timestamp is obtained according to the first time and the first delayed playback timestamp, where N is a positive integer greater than 1.

[0026] Optionally, the step of acquiring a sending period according to the first time and the first fault tolerance time includes:

[0027] An AND operation is performed on the first time and the first error tolerance time to obtain the sending period.

[0028] Optionally, the step of acquiring a first delayed playback timestamp according to the sending cycle and the data packet preparation time includes:

[0029] A subtraction operation is performed on the sending period and the data packet preparation time to obtain the first delayed playback time.

[0030] Optionally, the step of acquiring an Nth delayed playback timestamp according to the first time and the first delayed playback timestamp includes:

[0031] When N is 2, performing a subtraction operation on the first time and the first delayed playback timestamp to obtain a second delayed playback timestamp;

[0032] When N is greater than 2, a subtraction operation is performed on the first time and the (N-1)th delayed playback timestamp to obtain the Nth delayed playback timestamp.

[0033] Optionally, the step of obtaining the time difference according to the delayed playback timestamp and the playback duration of the existing data includes:

[0034] A subtraction operation is performed on the delayed playback timestamp and the existing data playback duration to obtain a difference, and an absolute value operation is performed on the difference to obtain the time difference.

[0035] Optionally, the step of adjusting the first fault tolerance time to obtain the second fault tolerance time according to the comparison result of the time difference and the synchronization time difference threshold includes:

[0036] Comparing the time difference with the synchronization time difference threshold;

[0037] When the time difference is less than the synchronization time difference threshold, setting the second fault tolerance time equal to the first fault tolerance time;

[0038] When the time difference is greater than or equal to the synchronization time difference threshold, the first fault tolerance time is adjusted to obtain the second fault tolerance time.

[0039] In a second aspect, the present application further provides a synchronization device, comprising:

[0040] A first sending module is configured to send test data packets to N receiving devices in sequence, and record the time required for all the test data packets to be sent to obtain a first time, wherein N is a positive integer greater than 1;

[0041] a first calculation module, configured to obtain a sending period and N delayed play timestamps according to a data packet preparation time, the first time, and a first fault tolerance time, wherein the N delayed play timestamps correspond one-to-one to the N receiving devices;

[0042] A second sending module is configured to send audio data packets to the N receiving devices respectively according to the sending period and the N delayed playback timestamps, and receive confirmation packets fed back by the receiving devices;

[0043] A second calculation module is configured to obtain a playback duration of the existing data according to the confirmation packet, and obtain a time difference according to the delayed playback timestamp and the playback duration of the existing data;

[0044] An adjustment module is configured to adjust the first fault tolerance time according to a comparison result between the time difference and a synchronization time difference threshold to obtain a second fault tolerance time, and then replace the first fault tolerance time with the second fault tolerance time.

[0045] Optionally, the step of the first calculating module acquiring a sending period and N delayed playback timestamps according to the data packet preparation time, the first time, and the first fault tolerance time includes:

[0046] Acquire a sending period according to the first time and the first fault tolerance time;

[0047] Acquire a first delayed playback timestamp according to the sending cycle and the data packet preparation time;

[0048] An Nth delayed playback timestamp is obtained according to the first time and the first delayed playback timestamp, where N is a positive integer greater than 1.

[0049] In a third aspect, the present application further provides a device comprising a sending device and a receiving device, wherein the sending device and the receiving device are communicatively connected via wireless transmission, and the sending device or the receiving device comprises the synchronization device.

[0050] The multi-channel data transmission synchronization method of the present application records the time required for all test data packets to be sent to obtain a first time, obtains a sending cycle and N delayed playback timestamps through the data packet preparation time, the first time, and the first fault tolerance time; sends audio data packets to the N receiving devices respectively according to the sending cycle and the N delayed playback timestamps; obtains the existing data playback duration through the confirmation packet, obtains the time difference through the delayed playback timestamp and the existing data playback duration; adjusts the first fault tolerance time to obtain a second fault tolerance time based on the comparison result of the time difference and the synchronization time difference threshold, and replaces the first fault tolerance time with the second fault tolerance time;

[0051] This application sends test data to N receiving devices, and then calculates the sending period and N delayed playback timestamps based on the information fed back by the receiving devices and the data packet preparation time, the first time and the first fault tolerance time. Then, it sends audio data packets to N receiving devices, and calculates the existing data playback duration and time difference based on the confirmation packets fed back by the receiving devices. Finally, it adjusts the first fault tolerance time to obtain the second fault tolerance time by comparing the time difference with the preset synchronization time difference threshold, and replaces the first fault tolerance time with the adjusted second fault tolerance time, thereby realizing real-time and timely adjustment of the playback delay time of the multi-channel wireless transmission audio data packet according to the actual situation of data transmission, that is, adjusting the first fault tolerance time to the second fault tolerance time, so as to achieve the purpose of multi-channel wireless transmission data audio synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0053] FIG1 is a flow chart of a method for synchronizing multi-channel data transmission according to an embodiment of the present application;

[0054] FIG2 is a flowchart of a method for synchronizing multi-channel data transmission in a first embodiment of the present application;

[0055] 3 is a flowchart of a method for synchronizing multi-channel data transmission in a second embodiment of the present application;

[0056] FIG4 is a flowchart of obtaining a sending cycle and a delayed playback timestamp according to an embodiment of the present application;

[0057] FIG5 is a schematic structural diagram of a synchronization device according to an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0059] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, connection can be used for both fixing and circuit connection.

[0060] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention.

[0061] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, the meaning of "plurality" is two or more, unless otherwise clearly specified.

[0062] The following description of the embodiments will help the public better understand the present invention, but the specific embodiments given by the applicant cannot and should not be regarded as limitations on the technical solutions of the present invention, or any definition of components or technical features.

[0063] The embodiments of the present application provide a synchronization method, a synchronization device, and a device for multi-channel data transmission.

[0064] 1 , the multi-channel data transmission synchronization method provided by the present application includes the following steps:

[0065] S1: Send test data packets to N receiving devices in sequence, and record the time required for all test data packets to be sent to obtain a first time, where N is a positive integer greater than 1;

[0066] S2: Obtain a sending period and N delayed playback timestamps according to the data packet preparation time, the first time, and the first fault tolerance time, where the N delayed playback timestamps correspond one-to-one to the N receiving devices;

[0067] S3: After sending audio data packets to N receiving devices according to the sending cycle and N delayed playback timestamps, receiving confirmation packets fed back by the receiving devices;

[0068] S4: Obtain the playback duration of the existing data according to the confirmation packet, and obtain the time difference according to the delayed playback timestamp and the playback duration of the existing data;

[0069] S5: Adjust the first fault tolerance time to obtain the second fault tolerance time according to the comparison result of the time difference and the synchronization time difference threshold, and replace the first fault tolerance time with the second fault tolerance time.

[0070] In some embodiments, in the first implementation of the present application, referring to FIG. 2 , before performing step S1 , the multi-channel data transmission synchronization method of the present application further includes step S0:

[0071] A wireless communication connection is established with a receiving device, and a first fault tolerance time and a synchronization time difference threshold are preset.

[0072] In some specific applications, the first error tolerance time and the synchronization time difference threshold can be set or adjusted according to the actual situation or requirements of audio data packet transmission.

[0073] In some embodiments, the synchronization time difference threshold is the minimum asynchronous duration allowed for transmission and playback of audio data packets. In some specific embodiments, the synchronization time difference threshold can be set to 2ms.

[0074] In some specific embodiments, in step S0, the step of establishing a wireless communication connection with the receiving device includes:

[0075] S01: The sending device and several receiving devices establish wireless sending tasks and wireless receiving tasks;

[0076] S02: The sending device switches to the sending task state and sends a pairing request message to the receiving device;

[0077] S03: The receiving device switches to a receiving task state to obtain the requested pairing information. After confirming that the requested pairing information has been received, the receiving device switches to a sending task state and sends the pairing information to the sending device.

[0078] Repeat the above steps S02 and S03 until all receiving devices have sent pairing information to the sending device.

[0079] S04: The sending device switches to a receiving task state and receives pairing information. Based on the pairing information, the receiving device model is checked to match the system default wireless communication connection device model.

[0080] If they match, the pairing of the sending device and the receiving device is completed;

[0081] If not, return to step S02;

[0082] Step S04 is repeated until all receiving devices are paired with the sending device, and the receiving device enters the receiving task state, ready to receive data sent by the sending device.

[0083] In some specific embodiments, the sending device and the receiving device perform wireless communication via Ultra Wide Band (UWB), that is, both the sending device and the receiving device are provided with a UWB sending module and a UWB receiving module to send and receive audio data packets or confirmation packets via UWB.

[0084] As an optional implementation of the present application, in step S1, the step of recording the time required for all test data packets to be sent to obtain the first time includes:

[0085] S11: Record the time when the first data in the test data packet is sent to obtain a first timestamp;

[0086] S12: Receive the confirmation packet fed back by the Nth receiving device;

[0087] S13: Determine a second timestamp according to the confirmation packet;

[0088] S14: Perform a subtraction operation on the second timestamp and the first timestamp to obtain a first time.

[0089] In some embodiments, the calculation formula of the first time is as follows: T0=T 12 -T 11

[0090] Among them, T0 is the first time, T 11 is the first timestamp, T 12 The second timestamp.

[0091] In some specific embodiments, in step S1, the step of sequentially sending test data packets to N receiving devices includes:

[0092] The sending device switches to the sending task state and sends the maximum data packet to N receiving devices in sequence. After the maximum data packet is sent to all receiving devices, the sending device switches to the receiving task state;

[0093] It should be noted that the above test data includes a maximum data packet, which refers to the length of the data before compression and is also the actual length of the data played by the receiving device.

[0094] After the receiving device completes pairing with the sending device, it enters the receiving task state. After receiving the maximum data packet, the receiving device generates an acknowledgment packet ACK. After the receiving device switches to the sending task state, it sends the acknowledgment packet ACK to the sending device.

[0095] After the sending device receives the confirmation packets ACK from N receiving devices, it calculates the total time T0 for completing the data transmission to the N receiving devices based on the confirmation packets ACK. It can be noted that T0 may refer to the first time in the above steps S1 and S2.

[0096] As an optional implementation of the present application, in step S2, the step of obtaining the data packet preparation time includes:

[0097] Acquire, according to the reception completion data packet, a third timestamp at which the receiving device starts receiving the data packet and a fourth timestamp at which the receiving device starts playing the data packet;

[0098] A subtraction operation is performed on the fourth timestamp and the third timestamp to obtain the packet preparation time.

[0099] In some embodiments, the data packet preparation time is calculated as: prepare =T 24 -T 23

[0100] Among them, T prepare T is the data packet preparation time, which is the delay time from when the receiving device receives the data packet to when it plays the data packet. It is also the timestamp attached to the data packet and the reference time for playback synchronization detection. 23 is the third time, T 24 For the fourth time.

[0101] As an optional embodiment of the present application, referring to FIG3 , in step S2, the step of obtaining a sending period and N delayed playback timestamps according to the data packet preparation time, the first time, and the first error tolerance time includes:

[0102] S21: Obtaining a sending cycle according to the first time and the first fault tolerance time;

[0103] S22: Obtain a first delayed playback timestamp based on the sending cycle and the data packet preparation time;

[0104] S23: Obtain an Nth delayed playback timestamp according to the first time and the first delayed playback timestamp, where N is a positive integer greater than 1.

[0105] As an optional implementation of the present application, in step S21, the step of obtaining a sending period according to the first time and the first fault tolerance time includes:

[0106] A sum operation is performed on the first time and the first error tolerance time to obtain a sending cycle.

[0107] In some embodiments, the calculation formula of the sending period is as follows: t =T0+T delay1

[0108] Among them, T t is the sending cycle, which is also the standard sending cycle matched by the sending device and the receiving device; T0 is the first time, T delay1 The first fault tolerance time.

[0109] As an optional implementation of the present application, in step S22, the step of obtaining the first delayed playback timestamp according to the sending cycle and the data packet preparation time includes:

[0110] A subtraction operation is performed on the sending period and the data packet preparation time to obtain a first delayed playback time.

[0111] In some embodiments, the calculation formula for the first delayed play time is as follows: T1=T t -T prepare

[0112] Among them, T1 is the first delayed playback time, Tt is the sending cycle; Tprepare is the data packet preparation time, which is the delay time from the receiving device receiving the data packet to playing the data packet. It is also the timestamp attached to the data packet and the reference time for playback synchronization detection.

[0113] As an optional implementation of the present application, in step S23, the step of obtaining the Nth delayed playback timestamp according to the first time and the first delayed playback timestamp includes:

[0114] When N is 2, a subtraction operation is performed on the first time and the first delayed playback timestamp to obtain a second delayed playback timestamp;

[0115] When N is greater than 2, a subtraction operation is performed on the first time and the (N-1)th delayed playback timestamp to obtain the Nth delayed playback timestamp.

[0116] In some embodiments, the calculation formula for the Nth delayed playback timestamp is as follows:

[0117] When N=2, T2=T0-T1;

[0118] When N>2, T n =T0-T n-1

[0119] Among them, T1 is the first delayed play timestamp, T2 is the second delayed play timestamp, T n The Nth delayed playback timestamp, T n-1 is the (N-1)th delayed playback timestamp, T0 is the first time;

[0120] In some embodiments, the first receiving device RX1, the second receiving device RX2, ..., the (N-1)th receiving device RX n-1, Nth receiving device RX n T1, T2, ..., T n-1 、T n The timestamp is used as the time for delayed playback of data.

[0121] In some embodiments, in step S3, the step of sending the audio data packet to N receiving devices respectively according to the sending period and the N delayed playback timestamps includes:

[0122] The sending device sends audio data packets and delayed playback timestamps to N receiving devices in sequence based on the sending cycle as the standard data sending cycle, specifically:

[0123] The audio data packet and T1 are sent to the first receiving device RX1, the audio data packet and T2 are sent to the second receiving device RX2, and the audio data packet and T2 are sent to the Nth receiving device RX n Audio data packets and T n .

[0124] In some specific embodiments, in step S3, after sending the audio data packets to N receiving devices respectively according to the sending period and the N delayed playback timestamps, the step of receiving the confirmation packets fed back by the receiving devices includes:

[0125] S31: The sending device switches to the sending task state, sends audio data packets to N receiving devices in sequence, and sets T1, T2, ..., T n-1 、T n The timestamp and the audio data packet are sequentially sent to the first receiving device RX1, the second receiving device RX2, ..., the (N-1)th receiving device RX n-1 , Nth receiving device RX n ;

[0126] Among them, T n For the Nth receiving device RX n The delay time of playing the received audio data packet is also the timestamp attached to the received audio data packet, which is also the reference time for playing synchronization detection.

[0127] S32: The receiving device switches to the receiving task state and receives the audio data packet and timestamps T1, T2, ..., T n-1 、T n After that, the receiving device determines whether the received audio data and timestamp are normal; if not, it continues to detect the received data until it is normal; if normal, the receiving device switches to the sending task state and sends an acknowledgment packet ACK to the sending device;

[0128] S33: The sending device switches to the receiving task state and receives the confirmation packet ACK fed back by the receiving device;

[0129] S34: Repeat the above steps S32 to S33 until the receiving device receives the confirmation packets ACK fed back by all the receiving devices, indicating that all the audio data have been sent.

[0130] As an optional embodiment of the present application, in step S4, the step of obtaining the time difference according to the delayed playback timestamp and the playback duration of the existing data includes:

[0131] A subtraction operation is performed on the delayed playback timestamp and the playback duration of the existing data to obtain a difference, and an absolute value operation is performed on the difference to obtain a time difference.

[0132] In some embodiments, the time difference in step S4 is calculated as follows: d =|T p -T n |

[0133] Among them, T p T is the playback time of existing data, that is, the playback time required for all audio data in the Nth receiving device, n is the Nth delayed playback timestamp, Tp-Tn is the difference, T d For time difference.

[0134] As an optional implementation of the present application, in step S5, the step of adjusting the first fault tolerance time to obtain the second fault tolerance time according to the comparison result of the time difference and the synchronization time difference threshold includes:

[0135] Compare the time difference with the synchronization time difference threshold;

[0136] When the time difference is less than the synchronization time difference threshold, the second fault tolerance time is set to be equal to the first fault tolerance time;

[0137] When the time difference is greater than or equal to the synchronization time difference threshold, the first fault tolerance time is adjusted to obtain a second fault tolerance time.

[0138] In some embodiments, step S5 includes the steps of:

[0139] When T d <T s , where T s To synchronize the time difference threshold, there is no need to adjust the fault tolerance time, even if the second fault tolerance time T delay2 Equal to the first fault tolerance time, T delay2 =T delay1 .

[0140] In some embodiments, the synchronization time difference threshold T s Can be set to 2ms.

[0141] In some other embodiments, step S5 includes the steps of:

[0142] When T d ≥T s , you need to adjust the fault tolerance time, determine the existing data playback duration and the size of the Nth delayed playback timestamp, the specific steps are as follows:

[0143] According to the above formula T n =T0-T n-1 T t =T0+T delay1 T1=T t -T prepare

[0144] The relationship formula between the Nth delayed playback timestamp and the first fault tolerance time is obtained:

[0145] When N=2, T2=T prepare -T delay1

[0146] Or, when N>2, T n =T t -T delay1

[0147] In summary, T n Size and T delay1 is inversely proportional to the size.

[0148] Therefore, when T p <T n When the first fault tolerance time T is increased delay1 To obtain the second fault tolerance time T delay1 , replace the first fault tolerance time with the second fault tolerance time to reduce the size of Tn, so as to shorten T n With T p The time difference is less than the synchronization time difference threshold T s ;

[0149] When T p >T n When the first fault tolerance time T is reduced delay1 To obtain the second fault tolerance time T delay2 , replace the first fault tolerance time with the second fault tolerance time to increase T n size, to reduce T n With T p The time difference is less than the synchronization time difference threshold T s .

[0150] In some embodiments, the delayed playback timestamp of each receiving device is calculated in turn to obtain a time difference, and the time difference is compared with the synchronization time difference threshold to determine whether the delayed playback timestamp in the receiving device needs to be adjusted, that is:

[0151] When the time difference of the receiving device is less than the synchronization time difference threshold, there is no need to adjust the delayed playback timestamp of the receiving device;

[0152] When the time difference of the receiving device is greater than the synchronization time difference threshold, the delayed playback timestamp of the receiving device needs to be adjusted;

[0153] Based on all the above, it is necessary to adjust the delayed playback timestamp of the receiving device to adjust the first fault tolerance time to obtain the second fault tolerance time, thereby improving the synchronization rate of the multi-channel wireless transmission data.

[0154] In some embodiments, referring to FIG. 4 , in a second embodiment of the present application, the multi-channel data transmission synchronization method of the present application further performs step S6 after performing step S5:

[0155] When the second error tolerance time is not equal to the first error tolerance time, the delayed playback timestamp is updated according to the second error tolerance time.

[0156] In some specific embodiments, step S5 and step S6 specifically include:

[0157] When the time difference in the receiving device is less than the synchronization time difference threshold, the delayed playback timestamp of the receiving device is kept unchanged;

[0158] When the time difference within the receiving device is greater than or equal to the synchronization time difference threshold, the first fault tolerance time of the receiving device is changed to obtain the second fault tolerance time, and the receiving device transmits the update information to the sending device. The sending device updates the delayed playback timestamp of the receiving device according to the updated second fault tolerance time, thereby improving the audio playback synchronization rate of multiple receiving devices.

[0159] The present application also provides a synchronization device, referring to FIG5 , comprising:

[0160] A first sending module 1 is configured to send test data packets to N receiving devices in sequence and record the time required for all test data packets to be sent to obtain a first time, where N is a positive integer greater than 1;

[0161] A first calculation module 2 is configured to obtain a sending period and N delayed play timestamps according to the data packet preparation time, the first time, and the first fault tolerance time, wherein the N delayed play timestamps correspond one-to-one to the N receiving devices;

[0162] The second sending module 3 is used to send audio data packets to N receiving devices respectively according to the sending cycle and N delayed playback timestamps, and receive confirmation packets fed back by the receiving devices;

[0163] The second calculation module 4 is used to obtain the playback time of the existing data according to the confirmation packet, and obtain the time difference according to the delayed playback timestamp and the playback time of the existing data;

[0164] The adjustment module 5 is configured to adjust the first fault tolerance time according to the comparison result between the time difference and the synchronization time difference threshold to obtain the second fault tolerance time, and then replace the first fault tolerance time with the second fault tolerance time.

[0165] In some embodiments, the first sending module 1 and the second sending module 3 may be one sending module or two different sending modules, and the sending module may send one or more of a test data packet, an audio data packet, and a delayed playback timestamp.

[0166] In some embodiments, referring to FIG5 , the synchronous connection device of the present application further includes a communication connection module 7 for establishing a wireless communication connection with a receiving device; the communication connection module 7 is connected to the first sending module 1 and the second sending module 3 to implement a communication connection between the first sending module 1 and the receiving device, and a communication connection between the second sending device and the receiving device;

[0167] The editing module 6 is connected to the first calculation module 2 and the adjustment module 5 , and is used to preset the first fault tolerance time and the synchronization time difference threshold and transmit them to the first calculation module 2 and the adjustment module 5 .

[0168] In some specific embodiments, the step of establishing a wireless communication connection with the receiving device by the communication connection module 7 includes:

[0169] S01: The sending device and several receiving devices establish wireless sending tasks and wireless receiving tasks;

[0170] S02: The sending device switches to the sending task state and sends a pairing request message to the receiving device;

[0171] S03: The receiving device switches to a receiving task state to obtain the requested pairing information. After confirming that the requested pairing information has been received, the receiving device switches to a sending task state and sends the pairing information to the sending device.

[0172] Repeat the above steps S02 and S03 until all receiving devices have sent pairing information to the sending device.

[0173] S04: The sending device switches to a receiving task state and receives pairing information. Based on the pairing information, the receiving device model is checked to match the system default wireless communication connection device model.

[0174] If they match, the pairing of the sending device and the receiving device is completed;

[0175] If not, return to step S02;

[0176] Step S04 is repeated until all receiving devices are paired with the sending device, and the receiving device enters the receiving task state, ready to receive data sent by the sending device.

[0177] In some specific embodiments, the transmitting device and the receiving device perform wireless communication via UWB.

[0178] In some embodiments, the step of the first sending module 1 recording the time required for all test data packets to be sent to obtain the first time includes:

[0179] Record the first data sending time in the test data packet to obtain the first timestamp;

[0180] Receive the confirmation packet fed back by the Nth receiving device;

[0181] determining a second timestamp based on the confirmation packet;

[0182] A subtraction operation is performed on the second timestamp and the first timestamp to obtain a first time.

[0183] In some embodiments, the calculation formula of the first time is as follows: T0=T 12 -T 11

[0184] Among them, T0 is the first time, T 11 is the first timestamp, T 12 The second timestamp.

[0185] In some specific embodiments, the step of the first sending module 1 sending the test data packet to N receiving devices in sequence includes:

[0186] The sending device switches to the sending task state and sends the maximum data packet to N receiving devices in sequence. After the maximum data packet is sent to all receiving devices, the sending device switches to the receiving task state;

[0187] It should be noted that the above test data includes a maximum data packet, which refers to the length of the data before compression and is also the actual length of the data played by the receiving device.

[0188] After the receiving device completes pairing with the sending device, it enters the receiving task state. After receiving the maximum data packet, the receiving device generates an acknowledgment packet ACK. After the receiving device switches to the sending task state, it sends the acknowledgment packet ACK to the sending device.

[0189] After the sending device receives the confirmation packets ACK from the N receiving devices, the sending device calculates the total time T0 for completing the data transmission to the N receiving devices based on the confirmation packets ACK.

[0190] In some embodiments, the step of the first calculating module 2 acquiring the sending period and N delayed playback timestamps according to the data packet preparation time, the first time, and the first error tolerance time includes:

[0191] Obtaining a sending cycle according to the first time and the first fault tolerance time;

[0192] Obtain a first delayed playback timestamp based on the sending cycle and data packet preparation time;

[0193] An Nth delayed playback timestamp is obtained according to the first time and the first delayed playback timestamp, where N is a positive integer greater than 1.

[0194] In some specific embodiments, the step of the first calculating module 2 acquiring the sending period, the first delayed play timestamp, and the Nth delayed play timestamp according to the first time and the first error tolerance time includes:

[0195] Performing a sum operation on the first time and the first error tolerance time to obtain a sending period;

[0196] Performing a subtraction operation on the sending period and the data packet preparation time to obtain a first delayed playback time;

[0197] When N is 2, a subtraction operation is performed on the first time and the first delayed playback timestamp to obtain a second delayed playback timestamp;

[0198] When N is greater than 2, a subtraction operation is performed on the first time and the (N-1)th delayed playback timestamp to obtain the Nth delayed playback timestamp.

[0199] The calculation formula of the sending period is as follows: T t =T0+T delay1

[0200] Among them, T t is the sending cycle, which is also the standard sending cycle matched by the sending device and the receiving device; T0 is the first time, T delay1 is the first fault tolerance time;

[0201] The calculation formula for the first delayed playback time is as follows: T1=T t -T prepare

[0202] Wherein, T1 is the first delayed play time, Tt is the sending period; Tprepare is the data packet preparation time, which is the delay time from the receiving device receiving the data packet to the data packet playing. It is also the timestamp attached to the data packet and the reference time for playback synchronization detection;

[0203] The calculation formula for the Nth delayed playback timestamp is as follows:

[0204] When N=2, T2=T0-T1;

[0205] When N>2, T n =T0-T n-1

[0206] Among them, T1 is the first delayed play timestamp, T2 is the second delayed play timestamp, T n The Nth delayed playback timestamp, T n-1 is the (N-1)th delayed playback timestamp, T0 is the first time;

[0207] In some embodiments, the first receiving device RX1, the second receiving device RX2, ..., the (N-1)th receiving device RX n-1 , Nth receiving device RX n T1, T2, ..., T n-1 、T n The timestamp is used as the time for delayed playback of data.

[0208] In some embodiments, the step of the second sending module 3 sending the audio data packet to N receiving devices respectively according to the sending period and the N delayed playback timestamps includes:

[0209] The sending device sends audio data packets and delayed playback timestamps to N receiving devices in sequence based on the sending cycle as the standard data sending cycle, specifically:

[0210] The audio data packet and T1 are sent to the first receiving device RX1, the audio data packet and T2 are sent to the second receiving device RX2, and the audio data packet and T2 are sent to the Nth receiving device RX n Audio data packets and T n .

[0211] In some embodiments, the step of the second calculation module 4 obtaining the time difference according to the Nth delayed playback timestamp and the playback duration of the existing data includes:

[0212] A subtraction operation is performed on the delayed playback timestamp and the playback duration of the existing data to obtain a difference, and an absolute value operation is performed on the difference to obtain a time difference.

[0213] In some embodiments, the second calculation module 4 obtains the time difference by the following calculation formula: d =|T p -T n |

[0214] Among them, T p T is the playback time of existing data, that is, the playback time required for all audio data in the Nth receiving device, n is the Nth delayed playback timestamp, Tp-Tn is the difference, T d For time difference.

[0215] In some embodiments, the step of adjusting the first fault tolerance time to obtain the second fault tolerance time according to the comparison result between the time difference and the synchronization time difference threshold by the adjustment module 5 includes:

[0216] Compare the time difference with the synchronization time difference threshold;

[0217] When the time difference is less than the synchronization time difference threshold, the second fault tolerance time is set to be equal to the first fault tolerance time;

[0218] When the time difference is greater than or equal to the synchronization time difference threshold, the first fault tolerance time is adjusted to obtain a second fault tolerance time.

[0219] In some embodiments, the adjustment module 5 obtains the second fault tolerance time in the following steps:

[0220] When T d <T s , where T s To synchronize the time difference threshold, there is no need to adjust the fault tolerance time, even if the second fault tolerance time T delay2 Equal to the first fault tolerance time, T delay2 =T delay1 .

[0221] In some embodiments, the synchronization time difference threshold T s Can be set to 2ms.

[0222] In some other embodiments, the adjustment module 5 obtains the second fault tolerance time in the following steps:

[0223] When T d ≥T s , you need to adjust the fault tolerance time, determine the existing data playback duration and the size of the Nth delayed playback timestamp, the specific steps are as follows:

[0224] When T p <T n When the first fault tolerance time T is increased delay1 To obtain the second fault tolerance time T delay1 , replace the first fault tolerance time with the second fault tolerance time to reduce the size of Tn, so as to shorten T n With T p The time difference is less than the synchronization time difference threshold T s ;

[0225] When T p >T n When the first fault tolerance time T is reduced delay1 To obtain the second fault tolerance time T delay2 , replace the first fault tolerance time with the second fault tolerance time to increase T n size, to reduce T n With T p The time difference is less than the synchronization time difference threshold T s .

[0226] In some embodiments, referring to FIG5 , the adjustment module 5 is further configured to, when determining that the second tolerance period is not equal to the first tolerance period, update the Nth delayed playback timestamp based on the second tolerance period. The adjustment module 5 is connected to the first calculation module 2 . When the second tolerance period is not equal to the first tolerance period, the adjustment module 5 updates the first tolerance period to obtain a second tolerance period, and substitutes the second tolerance period into the calculation program of the first calculation module 2 to obtain an updated delayed playback timestamp.

[0227] In some specific embodiments, the adjusting module 5 updates the delayed playback timestamp according to the second fault tolerance period, specifically including:

[0228] When the time difference in the receiving device is less than the synchronization time difference threshold, the delayed playback timestamp of the receiving device is kept unchanged;

[0229] When the time difference within the receiving device is greater than or equal to the synchronization time difference threshold, the first fault tolerance time of the receiving device is changed to obtain the second fault tolerance time, and the receiving device transmits the update information to the sending device. The sending device updates the delayed playback timestamp of the receiving device according to the updated second fault tolerance time, thereby improving the audio playback synchronization rate of multiple receiving devices.

[0230] The present application also provides a device including a sending device and a receiving device, wherein the sending device and the receiving device are communicatively connected via wireless transmission, and the sending device or the receiving device includes a synchronization device.

[0231] In some embodiments, according to calculation requirements or device assembly requirements, the first sending module, the second sending module, the first calculation module, and the second calculation module are all provided in the sending device, and the adjustment module is provided in the receiving device.

[0232] In some other embodiments, the first sending module, the second sending module, the first calculating module, the second calculating module and the adjustment module are all arranged in the sending device.

[0233] The beneficial effects of the multi-channel data transmission synchronization method, synchronization device and equipment of the present application are:

[0234] The multi-channel data transmission synchronization method of the present application records the time required for all test data packets to be sent to obtain a first time, obtains a sending cycle and N delayed playback timestamps through the data packet preparation time, the first time, and the first fault tolerance time; sends audio data packets to N receiving devices respectively according to the sending cycle and the N delayed playback timestamps; obtains the existing data playback duration through the confirmation packet, obtains the time difference through the delayed playback timestamp and the existing data playback duration; adjusts the first fault tolerance time to obtain a second fault tolerance time based on the comparison result of the time difference and the synchronization time difference threshold, and replaces the first fault tolerance time with the second fault tolerance time;

[0235] This application sends test data to N receiving devices, and then calculates the sending period and N delayed playback timestamps based on the information fed back by the receiving devices and the data packet preparation time, the first time and the first fault tolerance time. Then, it sends audio data packets to N receiving devices, and calculates the existing data playback duration and time difference based on the confirmation packets fed back by the receiving devices. Finally, it adjusts the first fault tolerance time to obtain the second fault tolerance time by comparing the time difference with the preset synchronization time difference threshold, and replaces the first fault tolerance time with the adjusted second fault tolerance time, thereby realizing real-time and timely adjustment of the playback delay time of the multi-channel wireless transmission audio data packet according to the actual situation of data transmission, that is, adjusting the first fault tolerance time to the second fault tolerance time, so as to achieve the purpose of multi-channel wireless transmission data audio synchronization.

[0236] The above is a detailed introduction to a lawn mowing method, device, lawn mowing robot and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A synchronization method for multi-channel data transmission, characterized in that: Includes steps: Sending test data packets to N receiving devices in sequence, and recording the time required for all the test data packets to be sent to obtain a first time, wherein N is a positive integer greater than 1; Acquire a sending period and N delayed play timestamps according to the data packet preparation time, the first time and the first fault tolerance time, wherein the N delayed play timestamps correspond one-to-one to the N receiving devices; After sending the audio data packets to the N receiving devices respectively according to the sending cycle and the N delayed playback timestamps, receiving confirmation packets fed back by the receiving devices; Acquire the existing data playback duration according to the confirmation packet, and acquire the time difference according to the delayed playback timestamp and the existing data playback duration; The first fault-tolerant time is adjusted according to the comparison result between the time difference and the synchronization time difference threshold to obtain the second fault-tolerant time, and the first fault-tolerant time is replaced by the second fault-tolerant time.

2. The synchronization method for multi-channel data transmission according to claim 1, characterized in that: The step of recording the time required for all the test data packets to be sent to obtain the first time includes: Recording the first data sending time in the test data packet to obtain a first timestamp; Receive a receiving completion data packet fed back by the Nth receiving device; Determine a second timestamp according to the receiving completion data packet; A subtraction operation is performed on the second timestamp and the first timestamp to obtain the first time.

3. The synchronization method for multi-channel data transmission as claimed in claim 2, characterized in that: The step of acquiring the data packet preparation time comprises: Acquire, according to the reception completion data packet, a third timestamp at which the receiving device starts receiving the data packet and a fourth timestamp at which the receiving device starts playing the data packet; A subtraction operation is performed on the fourth timestamp and the third timestamp to obtain the data packet preparation time.

4. The synchronization method for multi-channel data transmission according to claim 1 or 3, characterized in that: The step of acquiring a sending cycle and N delayed playback timestamps according to the data packet preparation time, the first time and the first fault tolerance time comprises: Acquire the sending period according to the first time and the first fault tolerance time; Acquire a first delayed playback timestamp according to the sending cycle and the data packet preparation time; An Nth delayed playback timestamp is obtained according to the first time and the first delayed playback timestamp, wherein N is a positive integer greater than 1.

5. The synchronization method for multi-channel data transmission as claimed in claim 4, characterized in that: The step of acquiring a sending period according to the first time and the first fault tolerance time includes: An AND operation is performed on the first time and the first error tolerance time to obtain the sending cycle.

6. The synchronization method for multi-channel data transmission as claimed in claim 5, characterized in that: The step of acquiring a first delayed playback timestamp according to the sending cycle and the data packet preparation time comprises: A subtraction operation is performed on the sending period and the data packet preparation time to obtain the first delayed playback time.

7. The synchronization method for multi-channel data transmission as claimed in claim 6, characterized in that: The step of acquiring the Nth delayed playback timestamp according to the first time and the first delayed playback timestamp comprises: When N is 2, performing a subtraction operation on the first time and the first delayed playback timestamp to obtain a second delayed playback timestamp; When N is greater than 2, a subtraction operation is performed on the first time and the (N-1)th delayed playback timestamp to obtain the Nth delayed playback timestamp.

8. The synchronization method for multi-channel data transmission as claimed in claim 1, characterized in that: The step of obtaining the time difference according to the delayed play timestamp and the play duration of the existing data comprises: A subtraction operation is performed on the delayed play timestamp and the existing data play duration to obtain a difference, and an absolute value operation is performed on the difference to obtain the time difference.

9. The synchronization method for multi-channel data transmission as claimed in claim 8, characterized in that: The step of adjusting the first fault tolerance time to obtain the second fault tolerance time according to the comparison result of the time difference and the synchronization time difference threshold comprises: Comparing the time difference with the synchronization time difference threshold; When the time difference is less than the synchronization time difference threshold, setting the second fault tolerance time equal to the first fault tolerance time; When the time difference is greater than or equal to the synchronization time difference threshold, the first fault tolerance time is adjusted to obtain the second fault tolerance time.

10. A synchronization device, characterized in that: include: A first sending module, used to send test data packets to N receiving devices in sequence, and record the time required for all the test data packets to be sent to obtain a first time, wherein N is a positive integer greater than 1; A first calculation module, configured to obtain a sending period and N delayed play timestamps according to a data packet preparation time, the first time, and a first fault tolerance time, wherein the N delayed play timestamps correspond one-to-one to the N receiving devices; The second sending module is used to send the N delayed playback timestamps to the N players respectively according to the sending cycle and the N delayed playback timestamps. The receiving device sends an audio data packet and receives a confirmation packet fed back by the receiving device; A second calculation module, configured to obtain the playback duration of the existing data according to the confirmation packet, and obtain the time difference according to the delayed playback timestamp and the playback duration of the existing data; The adjustment module is used to adjust the first fault-tolerant time according to the comparison result between the time difference and the synchronization time difference threshold to obtain the second fault-tolerant time, and then replace the first fault-tolerant time with the second fault-tolerant time.

11. The synchronization device according to claim 10, characterized in that: The step of the first calculating module acquiring a sending cycle and N delayed playback timestamps according to the data packet preparation time, the first time and the first fault tolerance time comprises: Acquire a sending period according to the first time and the first fault tolerance time; Acquire a first delayed playback timestamp according to the sending cycle and the data packet preparation time; An Nth delayed playback timestamp is obtained according to the first time and the first delayed playback timestamp, wherein N is a positive integer greater than 1.

12. A device, characterized in that: It comprises a sending device and a receiving device, wherein the sending device and the receiving device are communicatively connected via wireless transmission, and the sending device or the receiving device comprises the synchronization device as described in any one of claims 10 to 11.

Citation Information

Patent Citations

  • Synchronization method, synchronization device and equipment for multi-channel data transmission

    CN117040677A

  • Play control method and device, and terminal

    CN106411447A

  • Playing control method and device, terminal and playing system

    CN106452643A

  • Multi-terminal synchronous playing method and device

    CN107809685A

  • Multi-intelligent-terminal synchronous playing method, device and system and intelligent terminals

    CN111147907A