Multi-channel data transmission synchronization method, device and system, medium and equipment
By configuring synchronization components for the multi-channel data transmission system and controlling the channel enable state according to the delay time, the multi-channel data transmission synchronization problem is solved, efficient data transmission synchronization is achieved, and processor burden and delay error are reduced.
Patent Information
- Application Number
- CN202410065993.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2025-07-18
AI Technical Summary
During multi-channel data transmission, the different delay times of each channel make it difficult to ensure synchronization. The prior art requires the processor to perform reverse compensation processing, which increases the processor burden and delay error.
By configuring synchronization components for each channel, determining its relevant delay time, and controlling the channel's enable state according to the delay time, using a counter or timer to realize the synchronization of the channel, enabling time to match the count threshold, reducing processor participation.
Eliminates the delay of multi-channel transmission, improves the synchronization of data transmission, reduces processor burden, reduces unpredictable delay errors, and improves transmission efficiency.
Smart Images

Figure CN120343693A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a synchronization method, device, system, medium and equipment for multi-channel data transmission. Background Art
[0002] With the development of wireless technology, the technology of transmitting audio by wireless transmission means such as WIFI and Bluetooth is becoming more and more mature. Users are freed from the limitation of wired connection and can enjoy different music at any time, which provides greater flexibility and convenience for life and brings better entertainment experience in hearing. Bluetooth headsets, Bluetooth speakers, WIFI speakers and other devices suitable for various occasions have emerged in the market, and corresponding audio transmission technology and audio processing algorithms have also been developed accordingly.
[0003] Multi-channel data transmission, such as multi-channel audio transmission, is becoming a common phenomenon in daily life, such as multi-array recording, multi-array radar, multi-array sound system, etc. In the multi-channel data transmission process, multiple channels can use different technologies, resulting in different data processing time for each channel during the data transmission process, that is, there is a delay when multi-channel data is transmitted.
[0004] In daily life, there is a need for synchronization, that is, different data sources with the same phase are required to have a unified phase alignment at the same time. For example, in a movie theater, at least dozens of speaker units form a complex sound system. The total delay time from the sound track to the corresponding best listening position of the speaker is different for each channel. Because the parameters such as electroacoustic conversion and sound propagation distance are fixed after the theater is designed, in order to achieve the same acoustic phase of the best listening position of so many transmission channels, it is necessary to compensate for these different delays in the circuit to make the total delay of all transmission channels consistent. For another example, for the recording system of an opera house or symphony orchestra, at least dozens of musical instruments are recorded by different collectors (such as microphones MIC) at different locations to the recording system at the same time. These collectors may cause differences in the delay of the entire receiving channel due to different frequency response characteristics. After collecting multi-channel data, multi-track sound effect processing is required. This processing requires that the data source collected by each receiving channel corresponds to the same time of sound, and there can be no relative phase error.
[0005] Therefore, it is necessary to synchronize multi-channel data transmission to meet synchronization requirements. Summary of the invention
[0006] The purpose of the present disclosure is to provide a synchronization method, device, system, medium and equipment for multi-channel data transmission to ensure the synchronization of multi-channel data transmission.
[0007] To achieve the above object, a first aspect of the present disclosure provides a synchronization method for multi-channel data transmission. At least a target channel is configured with a synchronization component, and the synchronization method is applied to the synchronization component. The synchronization method includes:
[0008] Determine the relevant delay time of data transmission for each channel;
[0009] For each channel, control the state of the channel according to the relevant delay time of data transmission for the channel, where the state of the channel includes an enabled state and a disabled state.
[0010] Optionally, the synchronization component includes a counter or a timer.
[0011] Optionally, the controlling the state of the channel according to the relevant delay time of data transmission for each channel includes:
[0012] For each channel, determine the enabling time of the channel according to the relevant delay time of data transmission for the channel, and control the channel to be enabled when the enabling time is reached, so that the channel is in an enabled state.
[0013] Optionally, when the synchronization component includes a counter, the determining the enabling time of the channel according to the relevant delay time of data transmission for the channel includes:
[0014] According to the relevant delay time of data transmission for the channel, determine the counting threshold corresponding to the channel, and determine the time when the count value of the counter reaches the counting threshold as the enabling time of the channel.
[0015] Optionally, the multi-channels include a plurality of sending channels, and the synchronization method is applied to the counter of the target channel; the relevant delay time is the delay time of the sending channel relative to the data transmission of the target channel;
[0016] The determining the counting threshold corresponding to the channel according to the relevant delay time of data transmission for the channel includes:
[0017] According to the delay time of the sending channel relative to the data transmission of the target channel and the counting rate of the counter of the target channel, determine the counting threshold corresponding to the sending channel.
[0018] Optionally, the determining the relevant delay time of data transmission for each channel includes:
[0019] Determine the delay time of data transmission for each sending channel;
[0020] Determine the sending channel with the maximum delay time as the target channel;
[0021] Determine the difference between the latency of data transmission in the target channel and the latency of data transmission in the sending channel as the latency of data transmission of the sending channel relative to the target channel.
[0022] Optionally, the multi-channel includes a plurality of receiving channels, each receiving channel is configured with a counter for recording the amount of data output by the receiving channel, and the synchronization method is applied to each counter. The relevant latency of data transmission in the receiving channel is the latency of storing the data transmitted by the receiving channel.
[0023] Determining the corresponding counting threshold for the channel according to the relevant latency of data transmission in the channel includes:
[0024] Determine the counting threshold corresponding to the receiving channel according to the latency of storing the data transmitted by the receiving channel and the writing speed of storing the data transmitted by the receiving channel.
[0025] Optionally, the multi-channel is a receiving channel, and each receiving channel is respectively connected to a storage unit. Controlling the enabling of the channel when reaching the enabling time includes:
[0026] When reaching the enabling time of the receiving channel, determine the data output by the receiving channel as valid data and store the valid data.
[0027] Optionally, the multi-channel data transmission system includes a plurality of sending channels, a plurality of receiving channels, and a plurality of storage units, and the plurality of sending channels, the plurality of receiving channels, and the plurality of storage units are connected in one-to-one correspondence.
[0028] Determining the relevant latency of data transmission for each channel includes:
[0029] When the latencies of data transmission in the plurality of receiving channels are the same, determine the time for storing the target data in the storage unit connected to each receiving channel.
[0030] For each receiving channel, determine the difference between the time for storing the target data in the target storage unit connected to the target receiving channel and the time for storing the target data in the storage unit connected to the receiving channel as the relevant latency of data transmission of the sending channel connected to the receiving channel.
[0031] Optionally, the multi-channel data transmission system includes a plurality of sending channels, a plurality of receiving channels, and a plurality of storage units, and the plurality of sending channels, the plurality of receiving channels, and the plurality of storage units are connected in one-to-one correspondence.
[0032] Determining the relevant latency of data transmission for each channel includes:
[0033] When the latency times for transmitting data in the multiple transmission channels are the same, determine the time when the target data is stored in the storage unit connected to each of the receiving channels;
[0034] For each of the receiving channels, determine the relevant latency time for data transmission in the receiving channel according to the time when the target data is stored in the storage unit connected to the receiving channel.
[0035] A second aspect of the present disclosure provides a synchronization device for multi-channel data transmission. At least the target channel is configured with a synchronization component, and the synchronization method is applied to the synchronization component. The synchronization device for multi-channel data transmission includes:
[0036] A first determination module, configured to determine the relevant latency time for data transmission in each channel;
[0037] A control module, configured to control the state of each channel according to the relevant latency time for data transmission in the channel, where the state of the channel includes an enabled state and a disabled state.
[0038] A third aspect of the present disclosure provides a multi-channel data transmission system, where the system includes multiple channels and a synchronization component configured for the target channel;
[0039] Each of the channels is used to transmit data;
[0040] The synchronization component is configured to execute the synchronization method for multi-channel data transmission according to any one of the first aspects of the present disclosure.
[0041] A fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method according to any one of the first aspects of the present disclosure are implemented.
[0042] A fifth aspect of the present disclosure provides an electronic device, including:
[0043] A memory, on which a computer program is stored;
[0044] A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of the first aspects of the present disclosure.
[0045] With the above technical solution, for each channel, according to the relevant delay time of the data transmitted by the channel, the state of the channel is controlled, and the state of the channel includes an enabled state and a disabled state. In this way, the delay of multi-channel data transmission can be eliminated, thus ensuring the synchronization of multi-channel data transmission. In addition, at least a synchronization component is configured for the target channel, and the synchronization component is used to perform data transmission synchronization processing on multiple channels, greatly reducing the participation of the processor, reducing the burden on the processor, eliminating the unpredictable delay error that may be brought by the processor's participation in processing, and improving the efficiency of data transmission synchronization.
[0046] Other features and advantages of the present disclosure will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. Together with the following specific implementation, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:
[0048] Figure 1 is a block diagram of a multi-channel data transmission system shown according to an exemplary embodiment.
[0049] Figure 2 is a flowchart of a synchronization method for multi-channel data transmission shown according to an exemplary embodiment.
[0050] Figure 3 is a schematic diagram of a multi-channel data transmission system shown according to an exemplary embodiment.
[0051] Figure 4 is a schematic diagram of another multi-channel data transmission system shown according to an exemplary embodiment.
[0052] Figure 5 is a schematic diagram of another multi-channel data transmission system shown according to an exemplary embodiment.
[0053] Figure 6 is a block diagram of a synchronization device for multi-channel data transmission shown according to an exemplary embodiment.
[0054] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0055] The following will describe in detail the specific embodiments of the present disclosure with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining and understanding the present disclosure, and are not used to limit the present disclosure.
[0056] It should be noted that all actions of obtaining signals, information, or data in this disclosure are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and with the authorization given by the owner of the corresponding device.
[0057] In the related art, for the receiving channel, after sampling and processing the data transmitted by the receiving channel, the data is output and saved in the order of the output time. Subsequently, a data demand device, such as a processor, then simultaneously calls the data saved at different times for arithmetic processing. For the transmitting channel, the processor controls the enabling of the corresponding transmitting channels respectively according to the different delay times of different transmitting channels, that is, data transmission synchronization is achieved through reverse compensation. In this way, the processor needs to participate in the compensation processing of different delays of multiple channels. On the one hand, it increases the workload of the processor, and on the other hand, due to the delay of the processor processing, there is also a risk of misalignment. In addition, the reverse compensation time of the processor is not accurate, which will further increase the delay of the data transmitted by multiple channels.
[0058] In view of this, the present disclosure provides a synchronization method, device, system, medium, and equipment for multi-channel data transmission, which eliminates the delay of multi-channel data transmission, greatly reduces the participation of the processor, reduces the burden on the processor, eliminates the unpredictable delay error that may be brought by the processor's participation in processing, and improves the efficiency of data transmission synchronization.
[0059] Before describing in detail the synchronization method for multi-channel data transmission provided by the present disclosure, first, a multi-channel data transmission system is described. Figure 1 is a block diagram of a multi-channel data transmission system shown according to an exemplary embodiment. As Figure 1 shown, the multi-channel data transmission system may include a plurality of channels 10 and a synchronization component 20 configured for the target channel.
[0060] Exemplarily, the target channel may be any one of the plurality of channels. For example, the target channel may be the channel with the maximum delay time for transmitting data. Or, the target channel may be each of the plurality of channels. In Figure 1 this, an example where the target channel is any one of the plurality of channels is described.
[0061] In the present disclosure, each channel 10 is used to transmit data, and the synchronization component 20 is used to execute the synchronization method for multi-channel data transmission provided by the present disclosure.
[0062] Next, the synchronization method for multi-channel data transmission provided by the present disclosure is described.
[0063] Figure 2 is a flowchart of a synchronization method for multi-channel data transmission shown according to an exemplary embodiment. At least the target channel is configured with a synchronization component, and this synchronization method can be applied toFigure 1 The synchronization component 20 shown. As Figure 2 shown, the synchronization method for multi-channel data transmission may include the following steps.
[0064] In step 21, determine the relevant delay time of the data transmitted by each channel.
[0065] In the present disclosure, the relevant delay time of the data transmitted by the channel may be an absolute delay time or a relative delay time relative to the data transmitted by other channels. Exemplarily, the relevant delay time of the data transmitted by the channel may be the delay time of the data transmitted by the channel, or the delay time of the channel relative to the data transmitted by the target channel.
[0066] In step S22, for each channel, control the state of the channel according to the relevant delay time of the data transmitted by the channel, wherein the state of the channel includes an enabled state and a disabled state.
[0067] In the present disclosure, according to the relevant delay time of each channel, control whether each channel is in an enabled state. In this way, the channels can be enabled at different times according to the relevant delay time of each channel, thereby ensuring the synchronization of multi-channel data transmission.
[0068] Adopting the above technical solution, for each channel, control the state of the channel according to the relevant delay time of the data transmitted by the channel, and the state of the channel includes an enabled state and a disabled state. In this way, the delay of multi-channel data transmission can be eliminated, thereby ensuring the synchronization of multi-channel data transmission. In addition, at least configure a synchronization component for the target channel, and use the synchronization component to perform data transmission synchronization processing on multiple channels, which greatly reduces the participation of the processor, reduces the burden on the processor, eliminates the unpredictable delay error that may be brought by the processor's participation in processing, and improves the efficiency of data transmission synchronization.
[0069] In one embodiment, the specific implementation manner of step S22 for controlling the state of each channel according to the relevant delay time of the data transmitted by the channel may be: for each channel, determine the respective enabling time of the channel according to the relevant delay time of the data transmitted by the channel, and control the channel to be enabled when the enabling time is reached, so that the channel is in an enabled state.
[0070] In the present disclosure, multiple channels may be started simultaneously under the control of the processor. However, considering that the relevant delay times of each channel are different, the enabling times of multiple channels are also different. In this way, by controlling each channel to be enabled when its enabling time is reached, the purpose of multi-channel data transmission synchronization is achieved.
[0071] In the present disclosure, the synchronization component may include a counter and / or a timer.
[0072] In one embodiment, the synchronization component includes a timer. Exemplarily, the timer determines the enabling time of each channel according to the relevant delay time of data transmission of each channel, and controls the enabling of the channel when the timer time reaches the enabling time of the channel. In this embodiment, an additional high-speed clock source needs to be added to achieve the purpose of synchronizing multi-channel data transmission through the timer. In this way, the power consumption of the multi-channel data transmission system and the structural complexity of the multi-channel data transmission system will increase. In addition, when converting the time recorded by the additionally added high-speed clock source into the relative phase, an additional clock synchronization conversion is required due to different clock sources, increasing the synchronization workload.
[0073] In another embodiment, the synchronization component includes a counter. In this embodiment, the specific implementation of determining the enabling time of each channel according to the relevant delay time of data transmission of the channel may be: for each channel, determining the counting threshold corresponding to the channel according to the relevant delay time of data transmission of the channel, and determining the time when the count value of the counter reaches the counting threshold as the enabling time of the channel.
[0074] In this embodiment, considering that in a multi-channel data transmission system, each channel itself has a high-speed clock circuit, and this high-speed clock circuit matches the counting value, it is convenient for the counter to perform counting through the high-speed clock circuit that each channel itself has. Therefore, using the counter to achieve the synchronization of multi-channel data transmission will simplify the circuit structure of the multi-channel data transmission system.
[0075] In a possible way of this embodiment, the multi-channel includes multiple sending channels, and the synchronization is applied to the counter of the target channel. The relevant delay time is the delay time of the sending channel relative to the data transmission of the target channel. Accordingly, determining the counting threshold corresponding to the channel according to the relevant delay time of data transmission of the channel may be: determining the counting threshold corresponding to the sending channel according to the delay time of the sending channel relative to the data transmission of the target channel and the counting rate of the counter of the target channel.
[0076] Exemplarily, the ratio of the delay time of the sending channel relative to the data transmission of the target channel to the counting rate of the counter of the target channel is determined as the counting threshold corresponding to the channel.
[0077] Among them, step S21 of determining the relevant delay time of data transmission of each channel may include: determining the delay time of data transmission of each sending channel; determining the sending channel with the maximum delay time as the target channel; determining the difference between the delay time of the target channel transmitting data and the delay time of the sending channel transmitting data as the delay time of the sending channel relative to the data transmission of the target channel.
[0078] Exemplarily, Figure 3It is a schematic diagram of a multi-channel data transmission system shown according to an exemplary embodiment. As Figure 3 shown, it is assumed that multiple transmission channels are arranged on the right side of the processor, which are respectively denoted as transmission channel 0, transmission channel 1... transmission channel n, and the delay times for the multiple transmission channels to transmit data are respectively denoted as Tt0, Tt1... Ttn. Among them, the delay time for each transmission channel to transmit data can be obtained by counting the duration from the input end of the transmission channel to the output of the end unit of the transmission channel. For example, the data output by the end unit can be the data collected by the human ear or the audio acquisition device.
[0079] Assume that the delay time for transmission channel 0 to transmit data is the largest, then transmission channel 0 is determined as the target channel. Then, the difference in the delay time for the target channel to transmit data and the delay time for transmission channel 1 to transmit data (Tt0 - Tt1) is determined as the delay time for transmission channel 1 to transmit data relative to the target channel (transmission channel 0). Among them, the counting rate of the counter Cnt0 of the target channel can be a preset multiple of the data transmission rate of the target channel. The data transmission rates of different transmission channels can be the same or different, and the preset multiples can be the same or different. For example, if the target channel is transmission channel 0, the data transmission rate of the target channel is Ttf0, and the preset multiple can be m0. If the target channel is transmission channel 1, the data transmission rate of the target channel is Ttf1, and the preset multiple can be m1. Among them, Ttf0 and Ttf1 can be the same or different, and m0 and m1 can be the same or different.
[0080] In this method, assume that the counting thresholds corresponding to transmission channel 1... transmission channel n determined according to the above method are K1... Kn respectively. Then, when the processor enables multiple transmission channels, the target channel, that is, transmission channel 0, immediately enables and starts transmitting data, and the counter Cnt0 of transmission channel 0 starts counting. When the count value of the counter Cnt0 of transmission channel 0 reaches K1, transmission channel 1 is controlled to enable,... When the count value of the counter Cnt0 of transmission channel 0 reaches Kn, transmission channel n is controlled to enable. In this way, data transmission synchronization between other transmission channels except the target channel and the target channel in multiple transmission channels is achieved.
[0081] It should be understood that since the channel with the largest delay time may be different in different communication scenarios, that is, the target channel is not a fixed channel in different communication scenarios. Therefore, in the present disclosure, a counter can also be configured for each channel among multiple channels. In this way, in any communication scenario, it is ensured that the counter of the target channel can be used to execute the multi-channel data transmission synchronization method provided by the present disclosure.
[0082] With the above technical solution, for each channel, the counter of the target channel enables the channel when its count value reaches the count threshold corresponding to the channel, so that the channel can transmit data. In this way, each other channel can transmit data synchronously with the target channel, ensuring that multiple channels can automatically align the delay.
[0083] In another possible way of this embodiment, the multi-channel includes a plurality of receiving channels, each receiving channel is configured with a counter for recording the number of data output by the receiving channel, and this synchronization method is applied to each counter. The relevant delay time for the receiving channel to transmit data is the delay time for storing the data transmitted by the receiving channel.
[0084] In a possible way, a storage unit is configured for the plurality of receiving channels, that is, the storage unit can store the data transmitted by the plurality of receiving channels. In this way, the delay time for storing the data transmitted by each receiving channel in the storage unit and the writing speed for storing the data transmitted by the receiving channel are respectively determined, and then the ratio of the two is determined as the count threshold corresponding to the receiving channel. Exemplarily, the storage unit can be pre-regionally divided so that each receiving channel corresponds to a region, that is, each region is used to store the data transmitted by its corresponding receiving channel.
[0085] In another possible way, each receiving channel is respectively connected to a storage unit, and the relevant delay time for each receiving channel to transmit data is the absolute delay time for the storage unit connected to the receiving channel to store the data transmitted by the receiving channel.
[0086] Exemplarily, Figure 4 is a schematic diagram of another multi-channel data transmission system shown according to an exemplary embodiment. As Figure 4As shown, multiple receiving channels are provided on the left side of the processor, denoted as receiving channel 0, receiving channel 1,..., receiving channel n respectively, and each receiving channel is connected to a storage unit. For example, receiving channel 0 is connected to storage unit FIFO 0, receiving channel 1 is connected to storage unit FIFO 1,..., receiving channel n is connected to storage unit FIFO n. Assume that according to the delay time of storing the data transmitted by the receiving channel connected to each storage unit and the write speed of the storage unit, the absolute delay times for storing the data transmitted by these receiving channels are Tr0, Tr1,..., Trn. Assume that the absolute delay time for storing the data transmitted by receiving channel 0 is the largest, then receiving channel 0 is determined as the target channel. After that, the difference between the absolute delay time for storing the data transmitted by the target channel and the absolute delay time for storing the data transmitted by receiving channel 1 (Tr0 - Tr1) is determined as the relative delay time for storing the data transmitted by receiving channel 1 relative to the data transmitted by the storage target channel (receiving channel 0). Then, at the input end of the storage unit, the relative delay time can be reflected on the data written into the storage unit respectively, so as to ensure that the storage unit can synchronously write the data transmitted by the receiving channels connected to it respectively, and realize the synchronization of multi-channel transmitted data. Exemplarily, the counting threshold of the counter can be used as the trigger signal for channel enabling, so as to store the data transmitted by the receiving channel in the storage unit under this trigger signal.
[0087] Exemplarily, determining the counting threshold corresponding to the channel according to the relevant delay time of the data transmitted by the channel may include: determining the counting threshold corresponding to the receiving channel according to the delay time of storing the data transmitted by the receiving channel and the write speed of storing the data transmitted by the receiving channel.
[0088] For example, the ratio of the delay time of storing the data transmitted by the receiving channel to the write speed of storing the data transmitted by the receiving channel can be determined as the counting threshold corresponding to the receiving channel. Refer to Figure 4 , assume that the counter connected to receiving channel 0 is denoted as Cnr_0, the counting threshold corresponding to receiving channel 0 is num_0, the counter connected to receiving channel 1 is denoted as Cnr_1, the counting threshold corresponding to receiving channel 1 is num_1,..., the counter connected to receiving channel n is denoted as Cnr_n, and the counting threshold corresponding to receiving channel n is num_n. In this way, when multiple receiving channels are started, each counter starts counting. For each counter, when the number of data output by the receiving channel connected to this counter recorded by this counter reaches the counting threshold corresponding to this receiving channel, this time is determined as the enabling time of this receiving channel. For example, the time when the count value of Cnr_0 is equal to num_0 is determined as the enabling time of receiving channel 0, the time when the count value of Cnr_1 is equal to num_1 is determined as the enabling time of receiving channel 1,..., and the time when the count value of Cnr_n is equal to num_n is determined as the enabling time of receiving channel n.
[0089] In one embodiment, the multi-channel includes a plurality of receiving channels, and each receiving channel is respectively connected to a storage unit. Accordingly, the specific implementation of step S23 for controlling the enabling of each channel when the enabling time of the channel is reached may be: for each receiving channel, when the enabling time of the receiving channel is reached, the data output by the receiving channel is determined as valid data, and the valid data is stored in the storage unit connected to the receiving channel.
[0090] In this manner, after a plurality of receiving channels are started, each receiving channel processes and outputs data according to its own data processing logic. A counter connected to each receiving channel records the number of data output by the receiving channel. When the number of data reaches the counting threshold corresponding to the receiving channel, the data output by the receiving channel is determined as valid data, and the valid data is stored in the storage unit connected to the receiving channel. Among them, when the number of data output by the receiving channel does not reach the counting threshold corresponding to the receiving channel, the data output by the receiving channel is determined as invalid data and is prohibited from being stored in the storage unit.
[0091] Exemplarily, referring to Figure 4, determine the enabling time of receiving channel 0 when the count value of Cnr_0 is equal to num_0. At the same time, determine the data fifo_wdata0 output after the current moment of receiving channel 0 as the valid data fifo_wdata_0 and store it in the storage unit FIFO 0 connected to receiving channel 0. That is, when the count value of Cnr_0 > num_0, the data fifo_wdata0 output by receiving channel 0 is determined as the valid data fifo_wdata_0 and stored in the storage unit FIFO 0 connected to receiving channel 0. Determine the enabling time of receiving channel 1 when the count value of Cnr_1 is equal to num_1. At the same time, determine the data fifo_wdata1 output after the current moment of receiving channel 1 as the valid data fifo_wdata_1 and store it in the storage unit FIFO 1 connected to receiving channel 1. That is, when the count value of Cnr_1 > num_1, the data fifo_wdata1 output by receiving channel 1 is determined as the valid data fifo_wdata_1 and stored in the storage unit FIFO 1 connected to receiving channel 1.... Determine the enabling time of receiving channel n when the count value of Cnr_n is equal to num_n. At the same time, determine the data fifo_wdatan output after the current moment of receiving channel n as the valid data fifo_wdata_n and store it in the storage unit FIFO n connected to receiving channel n. That is, when the count value of Cnr_n > num_n, the data fifo_wdatan output by receiving channel n is determined as the valid data fifo_wdata_n and stored in the storage unit FIFO n connected to receiving channel n.
[0092] Adopting the above technical solution, the storage unit can write the data output by multiple receiving channels simultaneously, ensuring that the written data for each is the data after delay alignment. In this way, the data read from the storage unit subsequently is synchronous, ensuring the synchronism of multi-channel data transmission.
[0093] In another embodiment, the synchronization component includes a counter. The specific implementation of step S22 for controlling the state of each channel according to the relevant delay time of data transmission of the channel can be: for each channel, determine the corresponding counting threshold according to the relevant delay time of data transmission of the channel, and when the count value of the counter reaches the corresponding counting threshold of the channel, control the channel to be enabled so that the channel is in an enabled state.
[0094] Among them, the specific implementation of determining the corresponding counting threshold of the channel has been described in detail above and will not be elaborated here.
[0095] The following describes the specific implementation of step S21 for determining the relevant delay time of data transmission of each channel.
[0096] In one embodiment, a relatively mature method for measuring the delay time can be adopted to determine the transmission time of the data transmitted by each channel, and then the relevant delay time of the data transmitted by each channel can be obtained.
[0097] In another embodiment, the multi-channel data transmission system may include a plurality of sending channels, a plurality of receiving channels, and a plurality of storage units, wherein the plurality of sending channels, the plurality of receiving channels, and the plurality of storage units are connected in one-to-one correspondence.
[0098] Exemplarily, Figure 5 is a schematic diagram of another multi-channel data transmission system shown according to an exemplary embodiment. As Figure 5 shown, sending channel 0, receiving channel 0, and storage unit FIFO 0 are connected in sequence, sending channel 1, receiving channel 1, and storage unit FIFO 1 are connected in sequence,..., sending channel n, receiving channel n, and storage unit FIFO n are connected in sequence.
[0099] In one implementation manner of this embodiment, determining the relevant delay time of the data transmitted by each channel may include:
[0100] When the delay times of the data transmitted by the plurality of receiving channels are the same, determine the time when the target data is stored in the storage unit connected to each receiving channel;
[0101] For each receiving channel, the difference between the time when the target data is stored in the target storage unit connected to the target receiving channel and the time when the target data is stored in the storage unit connected to the receiving channel is determined as the relevant delay time of the data transmitted by the sending channel connected to the receiving channel.
[0102] In the present disclosure, there may be a delay time for the data transmitted by the plurality of sending channels. However, the delay time for the data transmitted by each sending channel is the same, that is, the relative delay time for the data transmitted by any two sending channels is 0.
[0103] Wherein, the target receiving channel refers to the receiving channel connected to the target sending channel, and the target sending channel refers to the sending channel with the maximum delay time. Exemplarily, taking the target sending channel as sending channel 0 as an example, the target receiving channel is receiving channel 0.
[0104] In this embodiment, different data processing means are adopted for multiple transmission channels, and the same data processing means are adopted for multiple reception channels, that is, the data transmission delay times of multiple transmission channels are different, and the data transmission delay times of multiple reception channels are the same. At this time, determine the time when the target data is stored in the storage unit connected to each reception channel. The target data may be characteristic data. For example, when the transmitted data is audio data, the target data may be the peak data of the audio. Then, for each reception channel, determine the difference between the time when the target data is stored in the target storage connected to the target reception channel and the time when the target data is stored in the storage unit connected to the reception channel, and determine it as the relevant delay time of the data transmitted by the transmission channel connected to the reception channel.
[0105] Exemplarily, assume that the target reception channel is reception channel 0, the target storage unit is storage unit FIFO 0, the time when the target data is stored in the target storage unit is denoted as T0, the time when the target data is stored in storage unit FIFO 1 is denoted as T1,... the time when the target data is stored in storage unit FIFO n is denoted as Tn. Then, determine T0 - T1 as the relevant delay time of the data transmitted by transmission channel 1, and determine T0 - Tn as the relevant delay time of the data transmitted by transmission channel n.
[0106] In one embodiment of this embodiment, determining the relevant delay time of the data transmitted by each channel may include: when the data transmission delay times of multiple transmission channels are the same, determine the time when the target data is stored in the storage unit connected to each of the reception channels; for each of the reception channels, determine the relevant delay time of the data transmitted by the reception channel according to the time when the target data is stored in the storage unit connected to the reception channel.
[0107] In this embodiment, different data processing means are adopted for multiple reception channels, and the same data processing means are adopted for multiple transmission channels, that is, the data transmission delay times of multiple transmission channels are the same, and the data transmission delay times of multiple reception channels are different. At this time, determine the time when the target data is stored in the storage unit connected to each reception channel. The target data may be characteristic data. For example, when the transmitted data is audio data, the target data may be the peak data of the audio. Finally, for each reception channel, determine the relevant delay time of the data transmitted by the reception channel according to the time when the target data is stored in the storage unit connected to the reception channel.
[0108] In one way, the time when the target data is stored in the storage unit connected to the receiving channel can be determined as the relevant delay time for the receiving channel to transmit data. At this time, the determined relevant delay time for the receiving channel to transmit data includes the delay time for the sending channel to transmit data. That is to say, the determined relevant delay time for each receiving channel to transmit data includes the delay time for the sending channel connected to it to transmit data. However, since the delay time for each sending channel to transmit data is the same, that is, for each receiving channel, a fixed delay time is superimposed on its own absolute delay time, this does not affect the alignment of the delay times of multiple receiving channels.
[0109] Exemplarily, assume that the target receiving channel is receiving channel 0, the target storage unit is storage unit FIFO 0, the time when the target data is stored in the target storage unit is denoted as T0, the time when the target data is stored in storage unit FIFO 1 is denoted as T1,..., and the time when the target data is stored in storage unit FIFO n is denoted as Tn. Then, T0 is determined as the relevant delay time for receiving channel 0 to transmit data, T1 is determined as the relevant delay time for receiving channel 1 to transmit data,..., and Tn is determined as the relevant delay time for receiving channel n to transmit data.
[0110] In another way, according to the time when the target data is stored in the storage unit connected to the receiving channel and the delay time for the sending channel to transmit data, the relevant delay time for the receiving channel to transmit data is determined. For example, for each receiving channel, the difference between the time when the target data is stored in the storage unit connected to the receiving channel and the delay time for the sending channel connected to the receiving channel to transmit data is determined as the relevant delay time for the receiving channel to transmit data.
[0111] Continuing with the above example, assume that the delay time for each sending channel to transmit data is t1. Then, T0 - t1 is determined as the relevant delay time for receiving channel 0 to transmit data, T1 - t1 is determined as the relevant delay time for receiving channel 1 to transmit data,..., and Tn - t1 is determined as the relevant delay time for receiving channel n to transmit data.
[0112] In this way, by adopting the above technical solution, the relevant delay time for each receiving channel to transmit data and the relevant delay time for each sending channel to transmit data can be determined.
[0113] Based on the same inventive concept, the present disclosure also provides a synchronization device for multi-channel data transmission. Figure 6 It is a block diagram of a synchronization device for multi-channel data transmission shown according to an exemplary embodiment. At least the target channel is configured with a synchronization component, and the synchronization method is applied to the synchronization component. As Figure 6 shown, the synchronization device 600 for multi-channel data transmission may include:
[0114] Determination module 601, configured to determine the relevant delay time for data transmission of each channel;
[0115] Control module 602, configured to, for each channel, control the state of the channel according to the relevant delay time for data transmission of the channel, where the state of the channel includes an enabled state and a disabled state.
[0116] Optionally, the synchronization component includes a counter or a timer.
[0117] Optionally, the control module 602 is configured to: for each channel, determine the enabling time of the channel according to the relevant delay time for data transmission of the channel, and control the channel to be enabled when the enabling time is reached, so that the channel is in an enabled state.
[0118] Optionally, when the synchronization component includes a counter, the control module 602 is further configured to: determine the counting threshold corresponding to the channel according to the relevant delay time for data transmission of the channel, and determine the time when the count value of the counter reaches the counting threshold as the enabling time of the channel.
[0119] Optionally, the multi-channel includes a plurality of sending channels, and the synchronization method is applied to the counter of the target channel; the relevant delay time is the delay time for the sending channel to transmit data relative to the target channel;
[0120] The control module 602 is further configured to: determine the counting threshold corresponding to the sending channel according to the delay time for the sending channel to transmit data relative to the target channel and the counting rate of the counter of the target channel.
[0121] Optionally, the determination module 601 may include:
[0122] The first determination sub-module is configured to determine the delay time for data transmission of each sending channel;
[0123] The second determination sub-module is configured to determine the sending channel with the maximum delay time as the target channel;
[0124] The third determination sub-module is configured to determine the difference between the delay time for the target channel to transmit data and the delay time for the sending channel to transmit data as the delay time for the sending channel to transmit data relative to the target channel.
[0125] Optionally, the multi-channel includes a plurality of receiving channels, each receiving channel is configured with a counter for recording the number of data output by the receiving channel, and the synchronization method is applied to each counter, and the relevant delay time for the receiving channel to transmit data is the delay time for storing the data transmitted by the receiving channel;
[0126] The control module 602 is further configured to: determine a counting threshold corresponding to the receiving channel according to the delay time for storing the data transmitted by the receiving channel and the writing speed for storing the data transmitted by the receiving channel.
[0127] Optionally, the multi-channel is a receiving channel, and each receiving channel is respectively connected to a storage unit; the control module 602 is further configured to: when the enabling time of the receiving channel is reached, determine the data output by the receiving channel as valid data, and store the valid data.
[0128] Optionally, the multi-channel data transmission system includes a plurality of sending channels, a plurality of receiving channels, and a plurality of storage units, and the plurality of sending channels, the plurality of receiving channels, and the plurality of storage units are connected in a one-to-one correspondence; the determining module 601 may include:
[0129] A fourth determining sub-module, configured to determine the time for storing target data in the storage unit respectively connected to each receiving channel when the delay times for the plurality of receiving channels to transmit data are the same;
[0130] A fifth determining sub-module, configured to, for each receiving channel, determine the difference between the time for storing the target data in the target storage unit connected to the target receiving channel and the time for storing the target data in the storage unit connected to the receiving channel as the relevant delay time for the sending channel connected to the receiving channel to transmit data.
[0131] Optionally, the multi-channel data transmission system includes a plurality of sending channels, a plurality of receiving channels, and a plurality of storage units, and the plurality of sending channels, the plurality of receiving channels, and the plurality of storage units are connected in a one-to-one correspondence; the determining module 601 may include:
[0132] A sixth determining sub-module, configured to determine the time for storing target data in the storage unit respectively connected to each receiving channel when the delay times for the plurality of sending channels to transmit data are the same;
[0133] A seventh determining sub-module, configured to, for each receiving channel, determine the relevant delay time for the receiving channel to transmit data according to the time for storing the target data in the storage unit connected to the receiving channel.
[0134] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0135] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment. As Figure 7As shown, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0136] Among them, the processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above multi-channel data transmission synchronization method. The memory 702 is used to store various types of data to support the operation of the electronic device 700. These data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, and so on. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 703 may include a screen and an audio component. The screen may be a touch screen, for example, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Accordingly, the communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, and so on.
[0137] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, and is used to execute the above-mentioned multi-channel data transmission synchronization method.
[0138] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above-mentioned multi-channel data transmission synchronization method are implemented. For example, the computer-readable storage medium may be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions may be executed by the processor 701 of the electronic device 700 to complete the above-mentioned multi-channel data transmission synchronization method.
[0139] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code part for executing the above-mentioned multi-channel data transmission synchronization method when executed by the programmable device.
[0140] The preferred embodiments of the present disclosure have been described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0141] In addition, it should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the present disclosure will not separately describe various possible combination methods.
[0142] Furthermore, any combination can be made between various different embodiments of the present disclosure as long as it does not violate the idea of the present disclosure, and it should also be regarded as the content disclosed by the present disclosure.
Claims
1. A synchronization method for multi-channel data transmission, characterized in that At least the target channel is configured with a synchronization component, and the synchronization method is applied to the synchronization component. The synchronization method includes: Determining the relevant delay time for each channel to transmit data; For each channel, controlling the state of the channel according to the relevant delay time for the channel to transmit data, where the state of the channel includes an enabled state and a disabled state.
2. The synchronization method according to claim 1, characterized in that The synchronization component includes a counter or a timer.
3. The synchronization method according to claim 1, wherein The controlling the state of the channel according to the relevant delay time for the channel to transmit data for each channel includes: For each channel, determining the enabling time of the channel according to the relevant delay time for the channel to transmit data, and controlling the channel to be enabled when the enabling time is reached, so that the channel is in an enabled state.
4. The synchronization method according to claim 3, wherein When the synchronization component includes a counter, the determining the enabling time of the channel according to the relevant delay time for the channel to transmit data includes: Determining the counting threshold corresponding to the channel according to the relevant delay time for the channel to transmit data, and determining the time when the count value of the counter reaches the counting threshold as the enabling time of the channel.
5. The synchronization method according to claim 4, characterized in that The multi-channel includes a plurality of sending channels, and the synchronization method is applied to the counter of the target channel; the relevant delay time is the delay time of the sending channel relative to the transmission of data by the target channel; The determining the counting threshold corresponding to the channel according to the relevant delay time for the channel to transmit data includes: Determining the counting threshold corresponding to the sending channel according to the delay time of the sending channel relative to the transmission of data by the target channel and the counting rate of the counter of the target channel.
6. The synchronization method according to claim 5, characterized in that, The determining the relevant delay time for each channel to transmit data includes: Determining the delay time for each sending channel to transmit data; Determining the sending channel with the maximum delay time as the target channel; Determining the difference between the delay time of the target channel to transmit data and the delay time of the sending channel to transmit data as the delay time of the sending channel relative to the transmission of data by the target channel.
7. The synchronization method according to claim 4, wherein The multi-channel includes a plurality of receiving channels, each receiving channel is configured with a counter for recording the number of data output by the receiving channel, and the synchronization method is applied to each counter. The relevant delay time for the receiving channel to transmit data is the delay time for storing the data transmitted by the receiving channel; The determining the counting threshold corresponding to the channel according to the relevant delay time for the channel to transmit data includes: Determining the counting threshold corresponding to the receiving channel according to the delay time for storing the data transmitted by the receiving channel and the writing speed for storing the data transmitted by the receiving channel.
8. The synchronization method according to claim 3, wherein The multi-channel is a receiving channel, and each receiving channel is respectively connected to a storage unit; the controlling the channel to be enabled when the enabling time is reached includes: When the enabling time of the receiving channel is reached, determining the data output by the receiving channel as valid data and storing the valid data.
9. The synchronization method according to claim 1, characterized in that The multi-channel data transmission system includes a plurality of sending channels, a plurality of receiving channels, and a plurality of storage units. The plurality of sending channels, the plurality of receiving channels, and the plurality of storage units are connected in one-to-one correspondence; The determination of the relevant delay time for data transmission of each channel includes: When the delay times for data transmission of the multiple receiving channels are the same, determining the time when the target data is stored in the storage unit connected to each of the receiving channels; For each of the receiving channels, determining the difference between the time when the target data is stored in the target storage unit connected to the target receiving channel and the time when the target data is stored in the storage unit connected to the receiving channel as the relevant delay time for data transmission of the sending channel connected to the receiving channel.
10. The synchronization method according to claim 1, wherein The multi-channel data transmission system includes multiple sending channels, multiple receiving channels, and multiple storage units, and the multiple sending channels, the multiple receiving channels, and the multiple storage units are connected in one-to-one correspondence; The determination of the relevant delay time for data transmission of each channel includes: When the delay times for data transmission of the multiple sending channels are the same, determining the time when the target data is stored in the storage unit connected to each of the receiving channels; For each of the receiving channels, determining the relevant delay time for data transmission of the receiving channel according to the time when the target data is stored in the storage unit connected to the receiving channel.
11. A synchronization device for multi-channel data transmission, characterized in that, At least the target channel is configured with a synchronization component, the synchronization method is applied to the synchronization component, and the synchronization device for multi-channel data transmission includes: A first determination module, configured to determine the relevant delay time for data transmission of each channel; A control module, configured to control the state of each channel according to the relevant delay time for data transmission of the channel, where the state of the channel includes an enabled state and a disabled state.
12. A multi-channel data transmission system, characterized in that, The system includes multiple channels and a synchronization component configured for the target channel; Each of the channels is used to transmit data; The synchronization component is configured to execute the synchronization method for multi-channel data transmission as described in any one of claims 1-10.
13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the steps of the method as described in any one of claims 1-10 are implemented.
14. An electronic device, characterized in that, Including: A memory, on which a computer program is stored; A processor, configured to execute the computer program in the memory to implement the steps of the method as described in any one of claims 1-10.