Data transmission method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202310161047.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-02-23
Smart Images

Figure CN116170720B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of sound channel positioning, and in particular to a data transmission method and device, electronic equipment and a storage medium. BACKGROUND
[0002] With the development of audio device technology, through the audio device of multiple microphones and multiple speakers, multi-channel audio playback and multi-channel recording can be achieved, and the user experience is improved.
[0003] Among them, the microphone and the speaker are arranged at the digital signal processor end, the digital signal processor end is connected with the system chip end through an audio transmission channel, the system chip is used for processing audio data, and the audio transmission channel is used for transmitting audio data.
[0004] In actual application, after the audio data is transmitted to the digital signal processor end or the system chip end, each sound channel of the audio data needs to be positioned to avoid the loss of the sound channel and affect the effect of the audio data.
[0005] Therefore, how to accurately position the sound channel is the key to improving the user experience of using the audio device. SUMMARY
[0006] The present application provides a data transmission method and device, electronic equipment and a storage medium, which are used to improve the accuracy of sound channel positioning.
[0007] In a first aspect, the present application provides a data transmission method, comprising: determining a first frame width of original playback data; splitting and processing the original playback data according to the first frame width to obtain a first sequence comprising a plurality of original playback data segments; determining target playback data according to the first sequence; determining the first frame width as a first channel bit width of a first audio transmission channel, and sending the target playback data to a digital signal processor through the first audio transmission channel.
[0008] In a possible implementation, the target playback data is determined according to the first sequence, comprising: copying each original playback data segment in the first sequence to obtain a corresponding copied playback data segment for each original playback data segment; determining the target playback data according to the first sequence and the corresponding copied playback data segment for each original playback data segment, wherein the original playback data segment is used to fill a left sound channel of a left-right clock signal, and the copied playback data segment is used to fill a right sound channel of the left-right clock signal.
[0009] In a possible implementation, the target playback data is determined according to the first sequence and each copied playback data segment corresponding to an original playback data segment, including: determining, in the first sequence, an insertion position of each copied playback data segment, the insertion position of the copied playback data segment being located after the original playback data segment corresponding to the copied playback data segment; and inserting, in the first sequence, the corresponding copied playback data segment according to the insertion position of each copied playback data segment, to obtain the target playback data.
[0010] In a possible implementation, the first frame width of the original playback data is determined, including: obtaining a first channel number and a first channel bit width of the original playback data; and determining a product of the first channel number and the first channel bit width as the first frame width.
[0011] In a possible implementation, the method further includes: receiving target recording data sent by the digital signal processor through a second audio transmission channel; and identifying the target recording data to obtain valid recording data.
[0012] In a possible implementation, the target recording data is identified to obtain valid recording data, including: determining a second channel bit width of the second audio transmission channel; and identifying the target recording data until N continuous zero data are identified, and then determining non-zero data after the N continuous zero data as the valid recording data, where N is a quantity corresponding to the second channel bit width, and N is an integer greater than or equal to 1.
[0013] In a second aspect, the present application provides a data transmission method, including: determining a second frame width of original recording data; splitting the original recording data according to the second frame width to obtain a second sequence including a plurality of original recording data segments; determining target recording data according to the second sequence; determining the second frame width as a second channel bit width of a second audio transmission channel, and sending the target recording data to a system-level chip through the second audio transmission channel.
[0014] In a possible implementation, the target recording data is determined according to the second sequence, including: generating zero data according to the second frame width, where a frame width of the zero data is equal to the second frame width; and determining the target recording data according to the second sequence and the zero data.
[0015] In a possible implementation, the target recording data is determined according to the second sequence and the zero data, including: determining an insertion position of the zero data in the second sequence, the insertion position of the zero data being between any two original recording data segments; and inserting the zero data in the second sequence according to the insertion position of the zero data to obtain the target recording data.
[0016] In a possible implementation, the second frame width of the original recording data is determined, including: obtaining a second channel number and a second channel bit width of the original recording data; and determining a product of the second channel number and the second channel bit width as the second frame width.
[0017] In a possible implementation, the method further includes: receiving target playing data sent by the system-level chip through a first audio transmission channel; and identifying the target playing data to obtain valid playing data.
[0018] In a possible implementation, the target playing data is transmitted in a left-right clock signal manner; and identifying the target playing data to obtain valid playing data includes: identifying the left-right clock signal to obtain a target level jump; and determining, as the valid playing data, a target playing data segment corresponding to the target level jump and a target playing data segment corresponding to each level jump every other level jump after the target level jump.
[0019] In a third aspect, the present application provides a data transmission apparatus, including: a first determining module configured to determine a first frame width of original playing data; a first splitting module configured to split the original playing data according to the first frame width to obtain a first sequence including a plurality of original playing data segments; a first generating module configured to determine target playing data according to the first sequence; and a first transmission module configured to determine the first frame width as a first channel bit width of a first audio transmission channel and send the target playing data to a digital signal processor through the first audio transmission channel.
[0020] In a possible implementation, the first generating module is specifically configured to copy each original playing data segment in the first sequence to obtain a copied playing data segment corresponding to each original playing data segment; and the first generating module is specifically further configured to determine the target playing data according to the first sequence and the copied playing data segment corresponding to each original playing data segment, wherein the original playing data segment is used to fill a left channel of a left-right clock signal, and the copied playing data segment is used to fill a right channel of the left-right clock signal.
[0021] In a possible implementation, the first generation module is specifically configured to determine an insertion position of each copied play data segment in the first sequence, and the insertion position of the copied play data segment is located after a corresponding original play data segment of the copied play data segment; and the first generation module is further configured to insert the corresponding copied play data segment into the first sequence according to the insertion position of each copied play data segment, to obtain the target play data.
[0022] In a possible implementation, the apparatus further includes a first acquisition module configured to acquire a first channel number and a first channel bit width of the original play data; and a first calculation module configured to determine a product of the first channel number and the first channel bit width as the first frame width.
[0023] In a possible implementation, the apparatus further includes a first identification module configured to receive target recording data sent by the digital signal processor through a second audio transmission channel; and the first identification module is further configured to identify the target recording data to obtain valid recording data.
[0024] In a possible implementation, the first identification module is specifically configured to determine a second channel bit width of the second audio transmission channel; and the first identification module is further configured to identify the target recording data until N continuous zero data are identified, and then determine non-zero data after the N continuous zero data as the valid recording data, where N is a quantity corresponding to the second channel bit width, and N is an integer greater than or equal to 1.
[0025] In a fourth aspect, the present application provides a data transmission apparatus, including: a second determination module configured to determine a second frame width of original recording data; a second splitting module configured to split the original recording data according to the second frame width to obtain a second sequence including a plurality of original recording data segments; a second generation module configured to determine target recording data according to the second sequence; and a second transmission module configured to determine the second frame width as a second channel bit width of a second audio transmission channel, and send the target recording data to a system-level chip through the second audio transmission channel.
[0026] In a possible implementation, the second generation module is specifically configured to generate zero data according to the second frame width, where a frame width of the zero data is equal to the second frame width; and the second generation module is further configured to determine the target recording data according to the second sequence and the zero data.
[0027] In a possible implementation, the second generation module is specifically configured to determine an insertion position of zero data in the second sequence, the insertion position of the zero data being located between any two original recording data segments; and the second generation module is further specifically configured to insert the zero data into the second sequence according to the insertion position of the zero data, to obtain the target recording data.
[0028] In a possible implementation, the apparatus further includes a second acquisition module configured to acquire a second number of sound channels and a second sound channel bit width of the original recording data; and a second calculation module configured to determine a product of the second number of sound channels and the second sound channel bit width as the second frame width.
[0029] In a possible implementation, the apparatus further includes a second identification module configured to receive target playing data sent by the system-level chip through a first audio transmission channel; and the second identification module is further configured to identify the target playing data to obtain effective playing data.
[0030] In a possible implementation, the target playing data is transmitted in a manner of left and right clock signals; the second identification module is specifically configured to identify the left and right clock signals to obtain a target level jump; and the second identification module is further specifically configured to determine, as the effective playing data, a target playing data segment corresponding to the target level jump, and a target playing data segment corresponding to each level jump that is separated from the target level jump by one level jump.
[0031] In a fifth aspect, the present application provides an electronic device, including a processor and a memory connected with the processor in communication; the memory stores computer execution instructions; and the processor executes the computer execution instructions stored in the memory to implement the method in any one of the first aspect.
[0032] In a sixth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing computer execution instructions, and the computer execution instructions are executed by a processor to implement the method in any one of the first aspect.
[0033] The data transmission method, device, electronic device and storage medium provided by the present application include: determining a first frame width of original playback data; splitting the original playback data according to the first frame width to obtain a first sequence including a plurality of original playback data segments; determining target playback data according to the first sequence; determining the first frame width as a first channel bit width of a first audio transmission channel, and sending the target playback data to a digital signal processor through the first audio transmission channel. The above scheme splits the playback data into playback data segments and sends them to the digital signal processor, and each playback data segment includes complete channels, so that the channel positioning accuracy is improved by a software method when the digital signal processor cannot realize channel positioning by hardware. BRIEF DESCRIPTION OF DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application.
[0035] Figure 1 An application scenario of a data transmission method provided by an embodiment of the present application is shown in the figure.
[0036] Figure 2 A flowchart of a data transmission method provided by an embodiment of the present application is shown in the figure.
[0037] Figure 3 A flowchart of a data transmission method provided by an embodiment of the present application is shown in the figure.
[0038] Figure 4 A schematic diagram of generating target playback data provided by an embodiment of the present application is shown in the figure.
[0039] Figure 5 A schematic diagram of identifying valid recording data provided by an embodiment of the present application is shown in the figure.
[0040] Figure 6 A flowchart of a data transmission method provided by an embodiment of the present application is shown in the figure.
[0041] Figure 7 A flowchart of a data transmission method provided by an embodiment of the present application is shown in the figure.
[0042] Figure 8 A schematic diagram of generating target recording data provided by an embodiment of the present application is shown in the figure.
[0043] Figure 9 A schematic diagram of identifying valid playback data provided by an embodiment of the present application is shown in the figure.
[0044] Figure 10 A structural schematic diagram of a data transmission device provided by an embodiment of the present application is shown in the figure.
[0045] Figure 11 A structural schematic diagram of a data transmission device provided by an embodiment of the present application is shown in FIG. 1.
[0046] Figure 12 A structural schematic diagram of a data transmission device provided by an embodiment of the present application is shown in FIG. 1.
[0047] Figure 13 A structural schematic diagram of a data transmission device provided by an embodiment of the present application is shown in FIG. 1.
[0048] Figure 14 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 1.
[0049] The specific embodiments of the present application have been shown and described in the above drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application in any way, but to illustrate the concept of the present application by reference to specific embodiments. DETAILED DESCRIPTION
[0050] The exemplary embodiments will be described in detail herein below with reference to the drawings. In the following description, the same drawings reference numbers are used to denote like or similar elements. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0051] Figure 1 An application scenario of a data transmission method provided by an embodiment of the present application is shown in FIG. 1. The scenario shown in FIG. 1 is an example of an audio device including a system chip and a digital signal processor. The system chip is inside the audio device, and the digital signal processor is outside the audio device. The digital signal processor is connected to a microphone and a speaker. The system chip generates playback data and transmits the data to the digital signal processor. The digital signal processor plays the data through the speaker. The microphone receives recording data from a user and transmits the data to the digital signal processor. The digital signal processor transmits the recording data to the system chip inside the audio device, and processes the recording data.
[0052] The technical solutions of the present application and the technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. In the description of the present application, unless otherwise specified and limited, each term should be understood in a broad sense in the art. The embodiments of the present application will be described below with reference to the drawings.
[0053] Figure 2A flowchart of a data transmission method provided by an embodiment of the present application is shown in the figure. The method comprises the following steps:
[0054] S201: Determine a first frame width of original play data.
[0055] For example, the execution subject of the embodiment can be a data transmission device, which can be implemented in various ways. For example, it can be a program software, a medium storing a related computer program, such as a U disk, or an entity device integrated or installed with a related computer program, such as a chip, a smart terminal, a computer, a server, etc.
[0056] The play data is generated by a system-level chip, sent to a digital signal processor through an audio transmission channel, and played through a loudspeaker connected to the digital signal processor. The play data comprises multiple audio channels, and the digital signal processor plays the audio channels through the loudspeaker after locating the audio channels, thereby avoiding loss or disorder of the audio channels.
[0057] S202: Split the original play data according to the first frame width to obtain a first sequence comprising multiple original play data segments.
[0058] The original play data is composed of multiple original play data segments connected in sequence, and the connection between every two adjacent original play data segments is removed after the splitting, without changing the sequence.
[0059] It can be understood that the original play data segments obtained by splitting according to the first frame width comprise complete audio channels.
[0060] S203: Determine target play data according to the first sequence.
[0061] The difference between the target play data and the original play data is that there is no connection between two adjacent original play data segments in the target play data.
[0062] S204: Determine the first frame width as a first channel bit width of a first audio transmission channel, and send the target play data to a digital signal processor through the first audio transmission channel.
[0063] Optionally, the interface of the first audio transmission channel can set the channel bit width, and the first channel bit width can be set as the first frame width, so that the length of the play data segments in the target play data does not change during transmission.
[0064] Further optionally, the interface of the first audio transmission channel comprises but is not limited to an integrated audio interface and a time division multiplex bus communication interface.
[0065] The data transmission method provided in the embodiments of the present application comprises the following steps: determining a first frame width of original playback data; splitting the original playback data according to the first frame width to obtain a first sequence comprising a plurality of original playback data segments; determining target playback data according to the first sequence; determining the first frame width as a first channel bit width of a first audio transmission channel, and sending the target playback data to a digital signal processor through the first audio transmission channel. The above scheme splits the playback data into playback data segments and then sends the playback data segments to the digital signal processor, and each playback data segment comprises complete channels, so that the channel positioning accuracy is improved by a software method when the channel positioning cannot be realized by hardware of the digital signal processor.
[0066] On the basis of any one of the above embodiments, the following will be described in combination with Figure 3 The detailed process of data transmission is described.
[0067] Figure 3 A flowchart of a data transmission method provided in the embodiments of the present application is shown in FIG. 2. As shown in FIG. 2, the method comprises the following steps. Figure 3
[0068] S301: obtaining a first channel number and a first channel bit width of original playback data.
[0069] In the related art, channel positioning is performed by hardware functions of a system on chip and a digital signal processor. However, in actual application, some digital signal processors do not have the channel positioning function or the digital signal processor fails to position.
[0070] S302: determining a product of the first channel number and the first channel bit width as a first frame width of the original playback data.
[0071] In combination with a scene example, the original playback data is 2 channels, and the first channel bit width is 8 bits, so the first frame width is 16 bits.
[0072] S303: splitting the original playback data according to the first frame width to obtain a first sequence comprising a plurality of original playback data segments.
[0073] It should be noted that the execution process of S303 is described in S202, which is not described herein again.
[0074] S304: copying each original playback data segment in the first sequence to obtain a copied playback data segment corresponding to each original playback data segment.
[0075] It can be understood that the copied playback data segment is completely consistent with the corresponding original playback data segment, and the channels of the copied playback data segment are completely consistent with the channels of the corresponding original playback data segment.
[0076] Optionally, playback data is transmitted via left and right clock signals, wherein the original playback data segment is used to fill the left channel of the left and right clock signals, and the copied playback data segment is used to fill the right channel of the left and right clock signals.
[0077] S305. Determine the insertion position of each copied playback data segment in the first sequence.
[0078] In a scenario example, each copied playback data segment is inserted after its corresponding original playback data segment in the first sequence. The relative order of the original playback data segments is determined by the first sequence.
[0079] S306. Based on the insertion position of each copied playback data segment, insert the corresponding copied playback data segment into the first sequence to obtain the target playback data.
[0080] Below, in conjunction with Figure 4 Explanation of the generated target playback data.
[0081] Figure 4 This is a schematic diagram illustrating the generation of target playback data provided in an embodiment of this application. For example... Figure 4 As shown, for 2-channel playback data, the original playback data segment is also 2-channel. D0 and D1 represent the two channels of the original playback data segment 1. The d0 and d1 channels of the copied playback data segment 1 are the same as the D0 and D1 channels. The copied playback data segment 1 is inserted after the original playback data segment 1.
[0082] The above scheme illustrates how a system-on-a-chip (SoC) sends playback data to a digital signal processor (DSP). Next, we will illustrate how a SoC receives recording data sent by a DSP.
[0083] One feasible implementation method further includes: receiving target recording data sent by the digital signal processor through a second audio transmission channel; identifying the target recording data to obtain valid recording data.
[0084] In a scenario example, the recording data is generated by a digital signal processor (DSP). The DSP processes the raw recording data to obtain the target recording data. The raw recording data is complete. If the system-on-a-chip (SoC) performs channel localization on the complete raw recording data based on hardware functions, it may fail to locate the channel. However, the target recording data includes multiple recording data segments. The SoC can directly locate the channel from a recording data segment containing only one set of channels, avoiding the influence of different recording data segments in the complete raw recording data on the accuracy of channel localization.
[0085] A possible implementation manner is that the target recording data is identified to obtain valid recording data, including: determining a second channel bit width of the second audio transmission channel; identifying the target recording data until N continuous zero data are identified, and then determining non-zero data after the N continuous zero data as the valid recording data, where N is a quantity corresponding to the second channel bit width, and N is an integer greater than or equal to 1.
[0086] Next, in combination with Figure 5 The valid recording data is described.
[0087] Figure 5 An identification valid recording data schematic diagram provided by an embodiment of the present application is shown in FIG. 2. Figure 5 As shown in the figure, the target recording data is N valid data segments and N zero data arranged alternately, so if N continuous zero data are identified, the next data is a complete valid data segment, and all the subsequent zero data can be removed to obtain valid data.
[0088] In this possible implementation manner, by identifying N continuous zero data, the integrity of the subsequent valid data can be ensured, thereby improving the accuracy of sound channel positioning.
[0089] Figure 6 A flowchart of a data transmission method provided by an embodiment of the present application is shown in FIG. 3, which is applied to a digital signal processor end. Figure 6 As shown in the figure, the method includes:
[0090] S601, determining a second frame width of original recording data.
[0091] The recording data is generated by a digital signal processor according to a sound received by a microphone.
[0092] S602, splitting the original recording data according to the second frame width to obtain a second sequence including a plurality of original recording data segments.
[0093] The original recording data is a plurality of original recording data segments connected in sequence, and after splitting processing, each adjacent two original recording data segments are disconnected without changing the sequence.
[0094] It can be understood that the original recording data segment obtained by splitting according to the second frame width includes a complete audio channel.
[0095] S603, determining target recording data according to the second sequence.
[0096] The difference between the target recording data and the original recording data is that there is no connection between the adjacent two original recording data segments of the target recording data.
[0097] S604, determine the second frame width as a second channel bit width of a second audio transmission channel, and send the target recording data to a system level chip through the second audio transmission channel.
[0098] Optionally, the interface of the second audio transmission channel can set the channel bit width, and the second channel bit width is set as the second frame width, so that the length of the recording data segment of the target recording data does not change during transmission.
[0099] On the basis of any one of the above embodiments, the following will be described in combination with Figure 7 The detailed process of data transmission is described.
[0100] Figure 7 A flowchart of a data transmission method provided by the embodiment of the application is shown in FIG. 3. Figure 7 The method includes the following steps.
[0101] S701, obtain a second channel number and a second channel bit width of original recording data.
[0102] It should be noted that the execution process of S701 is referred to S301, which will not be described here.
[0103] S702, determine the product of the second channel number and the second channel bit width as a second frame width of the original recording data.
[0104] It should be noted that the execution process of S702 is referred to S302, which will not be described here.
[0105] S703, split the original recording data according to the second frame width to obtain a second sequence including a plurality of original recording data segments.
[0106] It should be noted that the execution process of S703 is referred to S602, which will not be described here.
[0107] S704, generate zero data according to the second frame width.
[0108] It can be understood that the frame width of the zero data is consistent with the second frame width. For example, if the second frame width of the original recording data is 16 bits, then the frame width of the zero data is also 16 bits.
[0109] S705, determine the insertion position of the zero data in the second sequence.
[0110] With the scene example, the insertion position of each zero data is between each two original recording data segments in the second sequence. One zero data is inserted between each two original recording data segments. The relative position sequence between each original recording data segment is determined by the second sequence.
[0111] S706, inserting the zero data in the second sequence according to the insertion position of the zero data, to obtain the target recording data.
[0112] Next, the generation of the target recording data is described in combination with Figure 8 The generation of the target recording data is described.
[0113] Figure 8 The generation of the target recording data is described. Figure 8 As shown, for 2 channels, the original recording data of the second channel has a bit width of 8 bits, the frame width of the zero data is 16 bits, the second frame width of the original recording data segment is consistent with that of the zero data, and E0 and E1 represent 2 channels of the original recording data segment 1. A piece of zero data is inserted between each two adjacent original recording data segments, to generate the target recording data.
[0114] The above scheme is an example description of the digital signal processor sending recording data to the system-on-chip. Next, the digital signal processor receiving the playback data sent by the system-on-chip is described as an example.
[0115] A feasible implementation manner, the data transmission method further comprises: receiving the target playback data sent by the system-on-chip through the first audio transmission channel; identifying the target playback data to obtain valid playback data.
[0116] With the scene example, the playback data is generated by the system-on-chip, the system-on-chip processes the original playback data to obtain the target playback data, the original playback data is complete playback data, and the digital signal processor performs channel positioning based on hardware functions when the complete original playback data is positioned, which has the problem of positioning failure. The target playback data includes multiple playback data segments, and the digital signal processor can directly position the channel from the playback data segment containing only one group of channels, avoiding the influence of the channels of different playback data segments in the complete original playback data on the accuracy of positioning the channel.
[0117] A feasible implementation manner, the target playback data is transmitted through left and right clock signals; identifying the target playback data to obtain valid playback data comprises: identifying the left and right clock signals to obtain a target level jump; determining the target playback data segment corresponding to the target level jump and the target playback data segment corresponding to each level jump separated by one level jump after the target level jump as the valid playback data.
[0118] Below, in conjunction with Figure 9 Explanation of the identification of valid playback data.
[0119] Figure 9 This is a schematic diagram illustrating the identification of valid playback data provided in an embodiment of this application. For example... Figure 9 As shown, the target playback data consists of alternating original playback data segments and copied playback data segments. Since the original and copied playback data segments are identical, redundant data segments need to be removed to obtain valid data. The original playback data segments fill the left channel of the left and right clock signals, while the copied playback data segments fill the right channel. During transmission via the left and right clock signals, a level jump occurs between the original and copied playback data segments. This level jump determines the boundary between the original and copied playback data segments. Figure 5 If both sampling points 1 and 2 produce level jumps, and the digital signal processor (DSP) determines sampling point 1 as the target sampling point, then the original playback data segment 1 following sampling point 1, and the original playback data segment 2 and original playback data segment 3 separated by one level jump are determined as valid playback data. If the DSP determines sampling point 2 as the target sampling point, then the copied playback data segment 1 following sampling point 2, and the copied playback data segment 2 and copied playback data segment 3 separated by one level jump are determined as valid playback data.
[0120] In this feasible implementation, the digital signal processor can identify the boundary points between playback data segments by using left and right clock signals, and the identified playback data segments can be combined to form complete playback data, thereby improving the accuracy of channel positioning.
[0121] Figure 10 This is a schematic diagram of a data transmission device provided in an embodiment of this application. Figure 10 As shown, the data transmission device 100 may include: a first determining module 101, a first splitting module 102, a first generating module 103, and a first transmitting module 104, wherein,
[0122] The first determining module 101 is used to determine the width of the first frame of the original playback data.
[0123] The first splitting module 102 is used to split the original playback data according to the first frame width to obtain a first sequence including multiple original playback data segments.
[0124] The first generation module 103 is used to determine target playback data based on the first sequence.
[0125] The first transmission module 104 is configured to determine the first frame width as a first channel bit width of a first audio transmission channel, and transmit the target playback data to a digital signal processor through the first audio transmission channel.
[0126] Optionally, the first determination module 101 can perform Figure 2 S201 in the embodiment.
[0127] Optionally, the first splitting module 102 can perform Figure 2 S202 in the embodiment.
[0128] Optionally, the first generation module 103 can perform Figure 2 S203 in the embodiment.
[0129] Optionally, the first transmission module 104 can perform Figure 2 S204 in the embodiment.
[0130] It should be noted that the data transmission apparatus shown in the embodiment of the present application can perform the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects are similar, which will not be described here in detail.
[0131] In a possible implementation, the first generation module 103 is specifically configured to:
[0132] copy each original playback data segment in the first sequence to obtain a copied playback data segment corresponding to each original playback data segment;
[0133] determine the target playback data according to the first sequence and the copied playback data segment corresponding to each original playback data segment, wherein the original playback data segment is used to fill a left channel of a left-right clock signal, and the copied playback data segment is used to fill a right channel of the left-right clock signal.
[0134] In a possible implementation, the first generation module 103 is specifically configured to:
[0135] determine an insertion position of each copied playback data segment in the first sequence, wherein the insertion position of the copied playback data segment is located after an original playback data segment corresponding to the copied playback data segment;
[0136] insert the corresponding copied playback data segment into the first sequence according to the insertion position of each copied playback data segment to obtain the target playback data.
[0137] Figure 11 A structural schematic diagram of a data transmission apparatus provided by the embodiment of the present application is shown in Figure 10 the basis of the embodiment shown in the above, such asFigure 11 As shown in the figure, the model training apparatus 100 further includes a first obtaining module 105, a first calculating module 106, and a first identifying module 107, wherein:
[0138] The first obtaining module 105 is configured to obtain a first channel number and a first channel bit width of the original playback data.
[0139] The first calculating module 106 is configured to determine a product of the first channel number and the first channel bit width as the first frame width.
[0140] The first identifying module 107 is configured to:
[0141] receive target recording data sent by the digital signal processor through a second audio transmission channel;
[0142] identify the target recording data to obtain valid recording data.
[0143] In a possible implementation, the first identifying module 107 is specifically configured to:
[0144] determine a second channel bit width of the second audio transmission channel;
[0145] identify the target recording data until N continuous zero data are identified, and then determine non-zero data after the N continuous zero data as the valid recording data, wherein N is a quantity corresponding to the second channel bit width, and N is an integer greater than or equal to 1.
[0146] Figure 12 A structural schematic diagram of a data transmission apparatus provided by an embodiment of the present application is shown in FIG. 2. Figure 12 As shown in the figure, the data transmission apparatus 120 can include a second determining module 121, a second splitting module 122, a second generating module 123, and a second transmission module 124, wherein,
[0147] The second determining module 121 is configured to determine a second frame width of original recording data.
[0148] The second splitting module 122 is configured to split the original recording data according to the second frame width to obtain a second sequence including a plurality of original recording data segments.
[0149] The second generating module 123 is configured to determine target recording data according to the second sequence.
[0150] The second transmission module 124 is configured to determine the second frame width as a second channel bit width of a second audio transmission channel, and send the target recording data to a system-level chip through the second audio transmission channel.
[0151] Optionally, the second determining module 121 can perform Figure 6 S601 in the embodiment.
[0152] Optionally, the second splitting module 122 can perform Figure 6 S602 in the embodiment.
[0153] Optionally, the second generating module 123 can perform Figure 6 S603 in the embodiment.
[0154] Optionally, the second transmitting module 124 can perform Figure 6 S604 in the embodiment.
[0155] It should be noted that the data transmission apparatus shown in the embodiment of the present application can perform the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects are similar, which will not be repeated here.
[0156] In a possible implementation, the second generating module 123 is specifically configured to:
[0157] generate zero data according to the second frame width, wherein the frame width of the zero data is equal to the second frame width;
[0158] determine the target recording data according to the second sequence and the zero data.
[0159] In a possible implementation, the second generating module 123 is specifically configured to:
[0160] determine an insertion position of zero data in the second sequence, wherein the insertion position of the zero data is located between any two original recording data segments;
[0161] insert the zero data in the second sequence according to the insertion position of the zero data to obtain the target recording data.
[0162] Figure 13 A structural schematic diagram of a data transmission apparatus provided by the embodiment of the present application is shown in Figure 12 the embodiment shown in the figure, based on Figure 13 the model training apparatus 120 shown in the figure, the model training apparatus 120 further includes a second obtaining module 125, a second calculating module 126, and a second identifying module 127, wherein:
[0163] The second obtaining module 125 is configured to: obtain a second channel number and a second channel bit width of the original recording data.
[0164] The second calculation module 126 is configured to determine the product of the second number of channels and the second bit width of the channels as the second frame width.
[0165] The second identification module 127 is configured to:
[0166] receive target playback data sent by the system on chip through a first audio transmission channel;
[0167] identify the target playback data to obtain valid playback data.
[0168] In a possible implementation, the second identification module 127 is specifically configured to:
[0169] identify left and right clock signals to obtain a target level jump;
[0170] determine a target playback data segment corresponding to the target level jump and a target playback data segment corresponding to each level jump separated by one level jump after the target level jump as the valid playback data.
[0171] Figure 14 A structural schematic diagram of an electronic device provided in the embodiments of the present application is shown in FIG. 1. Figure 14 The electronic device includes:
[0172] A processor 291, and the electronic device further includes a memory 292; and can further include a communication interface 293 and a bus 294. The processor 291, the memory 292, and the communication interface 293 can complete communication with each other through the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke a logical instruction in the memory 292 to execute the method of the above-described embodiments.
[0173] In addition, the logical instruction in the memory 292 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium.
[0174] The memory 292, as a computer readable storage medium, can be used to store software programs, computer executable programs, such as program instructions / modules corresponding to the method in the embodiments of the present application. The processor 291 executes functions, applications, and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, implements the method in the above-described method embodiments.
[0175] The memory 292 can include a program storage area and a data storage area, where the program storage area can store an operating system, application programs required by at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 292 can include a high-speed random access memory, and can also include a nonvolatile memory.
[0176] The embodiment of the present application provides a kind of non-transitory computer readable storage medium, the computer readable storage medium has the computer execution instruction, the computer execution instruction is executed when processor is used to realize the method as described in the foregoing embodiments.
[0177] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0178] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0179] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the application is limited only by the claims that follow.
Claims
1. A data transmission method, characterized in that, include: The data transmission device acquires the number of first channels and the bit width of the first channel from the original playback data; The product of the first channel number and the first channel bit width is determined as the first frame width; The original playback data is split according to the width of the first frame to obtain a first sequence including multiple original playback data segments; Each original playback data segment in the first sequence is copied to obtain a copied playback data segment corresponding to each original playback data segment. In the first sequence, the insertion position of each copied playback data segment is determined, wherein the insertion position of the copied playback data segment is located after the original playback data segment corresponding to the copied playback data segment; According to the insertion position of each copied playback data segment, the corresponding copied playback data segment is inserted into the first sequence to obtain the target playback data. The original playback data segment is used to fill the left channel of the left and right clock signals, and the copied playback data segment is used to fill the right channel of the left and right clock signals. The width of the first frame is determined as the first channel bit width of the first audio transmission channel, and the target playback data is sent to the digital signal processor through the first audio transmission channel. The digital signal processor receives target playback data sent by the system-on-a-chip through the first audio transmission channel; the target playback data is transmitted via left and right clock signals. Identify the left and right clock signals to obtain the target level jump; The target playback data segment corresponding to the target level jump, and the target playback data segment corresponding to each level jump after the target level jump that is separated by one level jump, are determined as valid playback data; The method further includes the digital signal processor determining the second frame width of the original recording data; The original recording data is split according to the second frame width to obtain a second sequence including multiple original recording data segments; The target recording data is determined based on the second sequence; The second frame width is determined as the second channel bit width of the second audio transmission channel, and the target recording data is sent to the system-on-a-chip through the second audio transmission channel.
2. The method according to claim 1, characterized in that, The method further includes: Receive target recording data sent by the digital signal processor through the second audio transmission channel; The target audio recording data is identified to obtain valid audio recording data.
3. The method according to claim 2, characterized in that, The target audio recording data is identified to obtain valid audio recording data, including: Determine the second channel bit width of the second audio transmission channel; The target recording data is identified until N consecutive zero data points are identified. Then, the non-zero data points after the N consecutive zero data points are determined as the valid recording data. N is the number corresponding to the second channel bit width, and N is an integer greater than or equal to 1.
4. The method according to claim 1, characterized in that, The target recording data is determined based on the second sequence, including: Zero data is generated based on the second frame width, wherein the frame width of the zero data is equal to the second frame width; The target recording data is determined based on the second sequence and the zero data.
5. The method according to claim 4, characterized in that, Determining the target recording data based on the second sequence and the zero data includes: In the second sequence, the insertion position of the zero data is determined, and the insertion position of the zero data is located between any two original recording data segments; The zero data is inserted into the second sequence according to the insertion position of the zero data to obtain the target recording data.
6. The method according to claim 5, characterized in that, Determining the width of the second frame of the original recording data includes: Obtain the second channel number and second channel bit width of the original recording data; The product of the second channel number and the second channel bit width is determined as the second frame width.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Audio playing method and device and vehicle
CN111768791A
Apparatus for providing audio data to multiple audio logical devices
US20220329959A1