CN111865434A - Method, device, equipment and storage medium for transmitting data - Google Patents

Method, device, equipment and storage medium for transmitting data Download PDF

Info

Publication number
CN111865434A
CN111865434A CN202010696934.9A CN202010696934A CN111865434A CN 111865434 A CN111865434 A CN 111865434A CN 202010696934 A CN202010696934 A CN 202010696934A CN 111865434 A CN111865434 A CN 111865434A
Authority
CN
China
Prior art keywords
data
bits
preset
frame sequence
preset number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010696934.9A
Other languages
Chinese (zh)
Inventor
焦煦然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010696934.9A priority Critical patent/CN111865434A/en
Publication of CN111865434A publication Critical patent/CN111865434A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/26Systems using multi-frequency codes
    • H04L27/2601Multicarrier modulation systems
    • H04L27/2697Multicarrier modulation systems in combination with other modulation techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/32Carrier systems characterised by combinations of two or more of the types covered by groups H04L27/02, H04L27/10, H04L27/18 or H04L27/26
    • H04L27/34Amplitude- and phase-modulated carrier systems, e.g. quadrature-amplitude modulated carrier systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for transmitting data, and relates to the field of data transmission and voice recognition. The specific implementation scheme is as follows: acquiring target data; dividing target data into data blocks with a first preset number of bytes; determining a first frame sequence according to the data block; modulating the first sequence of frames into audio data; and playing the audio data. According to the implementation mode, the target data are divided into the data blocks, so that the accuracy of data verification is improved, and a better information transmission effect is achieved.

Description

Method, device, equipment and storage medium for transmitting data
Technical Field
The present application relates to the field of data processing, and in particular, to the field of data transmission and speech recognition, and more particularly, to a method, an apparatus, a device, and a storage medium for transmitting data.
Background
Information transmission is the transmission of commands or status information from one end to the other over a channel and is received by the other. Including transmission and reception. The transmission medium is divided into a wired transmission medium and a wireless transmission medium, wherein the wired transmission medium is a telephone line or a special cable; radio uses radio, microwave, and satellite technologies, etc. The information cannot be changed during the information transmission process, and the information itself cannot be transmitted or received. There must be a carrier, e.g. data, language, signal, etc., and the transmitting side and the receiving side have a common interpretation of the carrier.
At present, the most common information transmission schemes include a pattern-based scheme, such as a bar code, and a radio frequency-based scheme, but the two schemes are limited by various conditions, so that the information transmission effect is poor.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for transmitting data.
According to an aspect of the present disclosure, there is provided a method for transmitting data, including: acquiring target data; dividing target data into data blocks with a first preset number of bytes; determining a first frame sequence according to the data block; modulating the first sequence of frames into audio data; and playing the audio data.
According to another aspect of the present disclosure, there is provided a method for transmitting data, including: sampling the played audio data; demodulating the sampled audio data into a second frame sequence; determining a plurality of data blocks according to the second frame sequence and the first preset number; target data is determined based on the plurality of data blocks.
According to another aspect of the present disclosure, there is provided an apparatus for transmitting data, including: a data acquisition unit configured to acquire target data; a data block dividing unit configured to divide the target data into data blocks having a first preset number of bytes; a first frame sequence determination unit configured to determine a first frame sequence based on the data block; a modulation unit configured to modulate the first frame sequence into audio data; an audio playing unit configured to play audio data.
According to another aspect of the present disclosure, there is provided an apparatus for transmitting data, including: a sampling unit configured to sample the played audio data; a demodulation unit configured to demodulate the sampled audio data into a second frame sequence; a data block determination unit configured to determine a plurality of data blocks according to the second frame sequence and the first preset number; a target data determination unit configured to determine target data from the plurality of data blocks.
According to yet another aspect of the present disclosure, there is provided an electronic device for transmitting data, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for transmitting data as described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to execute the method for transmitting data as described above.
According to the technology of the application, the problem that the information transmission effect of the current information transmission scheme is poor is solved, the target data are divided into the data blocks, the accuracy of data verification is improved, and the better information transmission effect is achieved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for transmitting data according to the present application;
FIG. 3 is a schematic diagram of an application scenario of a method for transmitting data according to the present application;
FIG. 4 is a flow diagram of another embodiment of a method for transmitting data according to the present application;
FIG. 5 is a schematic block diagram illustrating one embodiment of an apparatus for transmitting data according to the present application;
FIG. 6 is a flow diagram for one embodiment of a method for transmitting data according to the present application;
FIG. 7 is a schematic diagram of an application scenario of a method for transmitting data according to the present application;
FIG. 8 is a flow diagram of another embodiment of a method for transmitting data according to the present application;
FIG. 9 is a schematic diagram illustrating an embodiment of an apparatus for transmitting data according to the present application
Fig. 10 is a block diagram of an electronic device for implementing a method for transmitting data according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method for transmitting data or the apparatus for transmitting data of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as music players, video players, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, smart phones, tablet computers, e-book readers, car computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a background server that processes data provided by the terminal devices 101, 102, 103. The background server may receive the target data, and modulate/demodulate the received target data to obtain modulated audio data or obtain demodulated and restored target data.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for transmitting data provided in the embodiment of the present application may be executed by the server 105. Accordingly, the means for transmitting data is typically provided in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for transmitting data in accordance with the present application is shown. The method for transmitting data of the embodiment comprises the following steps:
step 201, target data is acquired.
In this embodiment, the execution subject of the method for transmitting data (e.g., the server 105 shown in fig. 1) may acquire the target data from a computer or a terminal by wired connection or wireless connection. The target data may be payload data in which audio information to be transmitted is described.
In step 202, the target data is divided into data blocks having a first predetermined number of bytes.
In this embodiment, after the execution main body obtains the target data, the execution main body may divide the target data into data blocks having a first preset number of bytes. The number of bytes contained in the data block may be fixed or variable, and is not specifically limited in this application. Each data block comprises a set of data arranged consecutively together in the order of the target data.
Step 203, determining a first frame sequence according to the data block.
After obtaining the data block, the execution subject may determine the first frame sequence from the data block. Specifically, the execution body may add a check code at the head or the tail of the data block, and a specific relationship exists between the check code added by the execution body and the corresponding data block, for example, the check code is obtained by the operation of adding, subtracting, multiplying and/or dividing data between the data blocks, and if a bit or bits of the data block are erroneous due to interference or the like, the specific relationship is destroyed. The data blocks to which the check code is added are combined into a first frame sequence. Wherein, the length of the check code is fixed or has a special mark.
Step 204, the first sequence of frames is modulated into audio data.
The execution body may modulate the first sequence of frames into audio data after obtaining the first sequence of frames. In particular, the first frame sequence may be a baseband signal and the audio data may be a frequency band signal, which needs to be modulated for higher quality transmission. The modulation of the first frame sequence may be classified as amplitude modulation, frequency modulation, phase modulation. The first frame sequence may be modulated into audio data by adjusting the Amplitude and phase of the first frame sequence, for example, by a Quadrature Amplitude Modulation (QAM) method.
Step 205, playing the audio data.
After obtaining the audio data, the execution main body may play the audio data through an audio playing device, such as a sound box, a radio, and the like.
With continued reference to fig. 3, a schematic diagram of one application scenario of a method for transmitting data according to the present application is shown. In the application scenario of fig. 3, a server 301 obtains target data W, and the server 301 divides the target data W into data blocks 302 having a first preset number of bytes, where the data blocks are denoted by a, B, C, D, …, I; the server 301 determines a first frame sequence 303 from the data blocks a, B, C, D, …, I, the first frame sequence 303 being denoted a, B, C, D, …, I. The server 301 modulates the first frame sequence 303 into audio data 304 and the audio data 304 is played by the audio playing device 305.
According to the embodiment, the target data is divided into the data blocks, so that the accuracy of data verification is improved, and a better information transmission effect is achieved.
With continued reference to fig. 4, a flow 400 of another embodiment of a method for transmitting data in accordance with the present application is shown. As shown in fig. 4, the method for transmitting data of the present embodiment may include the following steps:
step 401, target data is obtained.
At step 402, the target data is divided into data blocks having a first predetermined number of bytes.
Step 403, determining a first frame sequence according to the data block.
The principle of step 401 and step 403 is similar to that of step 201 and step 203, and is not described here again.
Specifically, step 403 can be implemented by steps 4031 to 4032 as follows:
step 4031, calculate the first check code corresponding to each data block.
After the execution main body obtains the data blocks, a first check code corresponding to each data block can be calculated. Specifically, the Check code corresponding to each data block may be calculated by a Cyclic Redundancy Check (CRC). CRC is a calculation method for checking the accuracy of digital transmission over a communication link, and an agreed relationship between data bits and check bits is established by a certain mathematical operation, so that corresponding check bits can be calculated from the data bits, that is, a corresponding check code can be calculated for each data block according to the CRC32 algorithm in the present application.
Step 4032, combine each data block with the first check code corresponding to each data block to obtain a first frame sequence.
After the execution main body obtains the first check code corresponding to each data block, each data block may be combined with the first check code corresponding to each data block to obtain a first frame sequence. The execution main body can place the first check code at the head part or the tail part of the corresponding data block, or at a certain position inside the data block, so that the data block and the corresponding first check code are combined to form a first frame sequence. The first frame sequence is obtained by combining a plurality of data frames, and each data frame is obtained by combining one data block and a corresponding first check code. The specific position of the first check code placed in the data block is not limited by the application.
In this embodiment, the first check code corresponding to each data block is calculated, and each data block and the corresponding first check code are combined to form the first frame sequence, so that the accuracy of the transmitted data can be more accurately judged.
Step 404 modulates the first sequence of frames into audio data.
The principle of step 404 is similar to that of step 204, and is not described here again.
Specifically, step 404 can be implemented by steps 4041 to 4042 as follows:
step 4041, the first frame sequence is divided into data groups having a second predetermined number of bits.
Step 4042, adjust the bits in each data group to bits with a preset phase and a preset amplitude, and modulate the bits to a preset carrier to obtain audio data.
The execution subject, after obtaining the first frame sequence, may divide the first frame sequence into data groups having a second preset number of bits, for example, dividing every 4 bits into a group; and adjusting the bits in each data group into bits with preset phases and preset amplitudes, and modulating the bits to preset carriers to obtain audio data. Specifically, the execution subject may adjust the Amplitude and the phase of each group of data in the first frame sequence by a Quadrature Amplitude Modulation (QAM) method using a 16QAM modulator. And modulating each group of data after adjusting amplitude and phase onto a carrier by Orthogonal Frequency Division Multiplexing (OFDM), wherein the carrier can select the frequency of 2 KHz-12 KHz and the number of the subcarriers can be 8 in consideration of the characteristics of audio playing and receiving equipment, thereby obtaining audio data. OFDM is one type of multi-carrier modulation. The parallel transmission of high-speed serial data is realized through frequency division multiplexing, and the parallel transmission device has better multipath fading resistance and can support multi-user access.
The present embodiment can improve the accuracy of phase and amplitude adjustment for the first frame sequence by dividing the first frame sequence into data groups and adjusting the phase and amplitude for each data group.
Specifically, step 4042 may be implemented by steps 40421 to 40422 as follows:
step 40421, mapping the bits in each data group to a state of a preset constellation.
Specifically, after the execution body divides every 6 bits in the first frame sequence into one data group, the 6 bits in each data group may be mapped to one state of a 64QAM constellation by a 64QAM modulator. State, refers to the unique 64 constellation points of a 64QAM constellation determined by 6 bits. For example, there is 2 from the 6 bits of a data set 100001 in the first frame sequence6Different permutation combinations, each of which may be mapped to a constellation point in a 64QAM constellation diagram, such that one of the first frame sequencesData set 100001 may determine 64 constellation points of a 64QAM constellation, where the 64 constellation points determined correspond to a unique state of a 64QAM constellation.
Step 40422, modulate each state to a preset carrier to obtain audio data.
After obtaining the state of the preset constellation corresponding to each data group, the execution main body may modulate each state to a preset carrier to obtain audio data. Specifically, the execution main body may modulate data having a preset phase and amplitude corresponding to each state onto carriers of 2KHz to 12KHz through an OFDM technique, where the number of the carriers may be 8, and the carrier frequency and the number are not specifically limited in the present application.
In the embodiment, the bits in each data group are mapped into one state of the preset constellation diagram, so that a foundation can be laid for correctly demodulating data subsequently.
Step 405, playing the audio data.
The principle of step 405 is similar to that of step 205, and is not described here again.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for transmitting data, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for transmitting data of the present embodiment includes: a data acquisition unit 501, a data block division unit 502, a first frame sequence determination unit 503, a modulation unit 504, and an audio playback unit 505.
A data acquisition unit 501 configured to acquire target data.
A data block dividing unit 502 configured to divide the target data into data blocks having a first preset number of bytes.
A first frame sequence determining unit 503 configured to determine the first frame sequence based on the data blocks.
A modulation unit 504 configured to modulate the first sequence of frames into audio data.
An audio playing unit 505 configured to play audio data.
In some optional implementations of this embodiment, the first frame sequence determining unit 503 is further configured to: calculating a first check code corresponding to each data block; and combining each data block with the first check code corresponding to each data block to obtain a first frame sequence.
In some optional implementations of this embodiment, the modulation unit 504 is further configured to: dividing the first frame sequence into data groups having a second preset number of bits; and adjusting the bits in each data group into bits with preset phases and preset amplitudes, and modulating the bits to preset carriers to obtain audio data.
In some optional implementations of this embodiment, the modulation unit 504 is further configured to: mapping the bits in each data group into a state of a preset constellation diagram; and modulating each state to a preset carrier wave to obtain audio data.
It should be understood that units 501 to 505, respectively, recited in the apparatus 500 for transmitting data correspond to the respective steps in the method described with reference to fig. 2. Thus, the operations and features described above for the method for transmitting data are equally applicable to the apparatus 500 and the units included therein and will not be described again here.
With continued reference to FIG. 6, a flow 600 of one embodiment of a method for transmitting data in accordance with the present application is shown. The method for transmitting data of the embodiment comprises the following steps:
step 601, sampling the played audio data.
In this embodiment, the execution subject of the method for transmitting data (for example, the server 105 shown in fig. 1) may sample the audio data played from the audio playing device through a wired connection or a wireless connection. In particular, the execution body may sample audio data at a 32k sampling rate. The sampling rate is not specifically limited in this application. The sampling rate, i.e. the sampling frequency, refers to the number of times a sound sample is taken per second. The higher the sampling frequency is, the better the sound quality is, and the more real the sound is restored, but the more resources are occupied at the same time.
Step 602 demodulates the sampled audio data into a second frame sequence.
The audio data obtained by performing the body sampling is a frequency band signal overmodulating the phase and amplitude, and the frequency band signal needs to be demodulated into a second frame sequence, which can be obtained by demodulating the modulated frequency band signal through OFDM.
Step 603, determining a plurality of data blocks according to the second frame sequence and the first preset number.
After obtaining the second frame sequence, the execution subject may determine the plurality of data blocks according to the second frame sequence and the first preset number. In particular, the execution body may divide the second frame sequence into a plurality of data blocks having a first preset number of bytes.
Step 604, determining target data according to the plurality of data blocks.
After the execution main body obtains the plurality of data blocks, the accuracy of the obtained plurality of data blocks can be verified, and after the verification is passed, the execution main body can directly combine the plurality of data blocks according to a preset arrangement sequence to obtain target data.
With continued reference to fig. 7, a schematic diagram of one application scenario of a method for transmitting data according to the present application is shown. In the application scenario of fig. 7, the server 701 samples the played audio data; the server 701 demodulates the sampled audio data V into a second frame sequence 702, where the second frame sequence 702 is composed of a ', a, B ', B, C ', C, D ', D, …, and I ', I; determining a plurality of data blocks 703 according to the second frame sequence and the first preset number, where the plurality of data blocks 703 may be denoted as a ', B ', C ', D ', …, I '; the server 701 determines the target data 704 from the plurality of data chunks a ', B ', C ', D ', …, I '.
According to the embodiment, the plurality of data blocks are determined according to the second frame sequence and the first preset number, so that the accuracy of data verification is improved, and a better information transmission effect is achieved.
With continued reference to fig. 8, a flow 800 of another embodiment of a method for transmitting data in accordance with the present application is shown. As shown in fig. 8, the method for transmitting data of the present embodiment may include the following steps:
step 801, sampling the played audio data.
Step 802, demodulate the sampled audio data into a second frame sequence.
The principle of steps 801 to 802 is similar to that of steps 601 to 602, and is not described here again.
Specifically, step 802 can be implemented by steps 8021 to 8023 as follows:
step 8021, divide the audio data into data groups having a second predetermined number of bits.
The execution body may divide the audio data into data groups having a second preset number of bits after the audio data is sampled. The audio data is effectively a sequence of frames that have been amplitude and phase modulated. The sequence of frames corresponding to the audio data is divided into data groups having a second predetermined number of bits. For example, when the target data is modulated, every 4 bits in the first frame sequence corresponding to the target data are divided into one data group, and then when the audio data is demodulated, every 4 bits in the frame sequence corresponding to the audio data are also divided into one data group.
Step 8022, determining a second predetermined number of bits corresponding to the phase and amplitude of the data set having the second predetermined number of bits.
The execution body may determine a state of a preset constellation corresponding to each data group after dividing the audio data into the data groups having the second preset number of bits. The state of the predetermined constellation is a mapping of possible combinations of data in each data set, each data combination being mapped to a constellation point in the predetermined constellation, and each constellation point representing a combination of phase and amplitude. According to the phase and amplitude of the data group with the second preset number of bits, the constellation point can be determined, according to the constellation point, the state of the preset constellation diagram can be determined, and according to the preset relation between the state of the preset constellation diagram and the second preset double bits, the second preset number of bits which are uniquely corresponding to the state of the preset constellation diagram can be determined.
Specifically, step 8022 can be implemented by the following step 80221:
step 80221, according to each state of the preset constellation diagram, determining a second preset number of bits corresponding to each state.
Each data group in the audio data corresponds to a state of a preset constellation diagram. After dividing the audio data into data groups having a second preset number of bits, an execution entity of the preset constellation may determine the second preset number of bits mapped to each state of the preset constellation according to a mapping relationship between each data group and one state of the preset constellation, respectively. For example, three bits of 001, can uniquely determine the state of an 8QAM constellation. Three bits of 001, having 2 3Different permutation combinations, each mapping to a constellation point in an 8QAM constellation, 23Arranging and combining to form a state of the 8QAM constellation diagram, wherein the state and the corresponding mapping relation determined by the three bits 001 are unique, and after the execution main body obtains a state of the preset constellation diagram, if the state and 2 of the three bits 001 are the same3If the permutation and combination are matched, the data of the second preset number of bits corresponding to the state of the 8QAM constellation can be determined to be 001.
In this embodiment, the second preset number of bits corresponding to each state is determined according to each state of the preset constellation diagram, so that the sampled audio data can be accurately demodulated.
Step 8023, determining a second frame sequence according to the corresponding second predetermined number of bits.
And after obtaining a second preset number of bits corresponding to each state of the preset constellation diagram, the execution main body arranges and combines the second preset number of bits according to a preset sequence to form a second frame sequence.
The present embodiment can accurately demodulate sampled audio data.
Step 803, determining a plurality of data blocks according to the second frame sequence and the first preset number.
The principle of step 803 is similar to that of step 603, and is not described here again.
Specifically, step 803 can be implemented by the following step 8031:
step 8031, divide each frame in the second frame sequence into a data block having a first preset number of bytes and a first check code, to obtain a plurality of data blocks.
After the execution main body obtains the second frame sequence, each frame in the second frame sequence may be divided into a data block having a first preset number of bytes and a first check code, so as to obtain a plurality of data blocks. Here, a cyclic redundancy check method is used to check the sampled audio data. Before audio data is sent, the execution main body calculates a first check code for the divided data blocks, attaches the first check code to the transmitted data blocks and sends the data blocks to the audio receiving equipment. After the audio receiving device receives the data, a second frame sequence is obtained through demodulation, the second frame sequence comprises a first check code carried by the transmitted data, and the execution main body can divide each frame of the second frame sequence to separate the payload data of each frame, namely the data blocks of the first preset number of bytes of each frame, from the first check code to obtain a plurality of data blocks with the first preset number of bytes.
Step 804, determining target data according to the plurality of data blocks.
The principle of step 804 is similar to that of step 604, and is not described here again.
Specifically, step 804 can be realized by steps 8041 to 8042 as follows:
step 8041 calculates a second parity code corresponding to each of the plurality of data blocks.
Specifically, after obtaining the plurality of data blocks, the execution subject may calculate the second parity code corresponding to each data block according to the cyclic redundancy check algorithm again.
Step 8042, in response to determining that the first check code and the second check code corresponding to each data block are the same, combining the plurality of data blocks into the target data.
After the execution main body obtains the second check code corresponding to each data block, the second check code corresponding to each data block can be compared with the first check code carried by the execution main body, if the second check code and the first check code are the same, the audio data is correctly transmitted, and the plurality of data blocks can be arranged and combined according to a preset sequence to restore the target data.
In the embodiment, the second check code calculated again according to the cyclic redundancy check algorithm is compared with the first check code carried by the audio data, so that whether the transmitted audio data is wrong or not can be determined, if the second check code is the same as the first check code, the audio data is correctly transmitted, and the target data is restored by arranging and combining the plurality of data blocks, so that the method has the effects of less limitation of equipment, difficulty in environmental influence, larger transmission bandwidth and broadcasting.
With further reference to fig. 9, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for transmitting data, which corresponds to the method embodiment shown in fig. 6, and which is particularly applicable to various electronic devices.
As shown in fig. 9, the apparatus 900 for transmitting data of the present embodiment includes: a sampling unit 901, a demodulation unit 902, a data block determination unit 903, and a target data determination unit 904.
A sampling unit 901 configured to sample the played audio data.
A demodulation unit 902 configured to demodulate the sampled audio data into a second frame sequence.
A data block determination unit 903 configured to determine a plurality of data blocks according to the second frame sequence and the first preset number.
A target data determination unit 904 configured to determine target data from the plurality of data blocks.
In some optional implementations of this embodiment, the demodulation unit 902 is further configured to: dividing the audio data into data groups having a second preset number of bits; determining a corresponding second preset number of bits according to the phase and amplitude of the data group with the second preset number of bits; and determining a second frame sequence according to the corresponding second preset number of bits.
In some optional implementations of this embodiment, each data group in the audio data corresponds to a state of the preset constellation diagram; and demodulation unit 902 is further configured to: and determining a second preset number of bits corresponding to each state according to each state of the preset constellation diagram.
In some optional implementations of this embodiment, the data block determination unit 903 is further configured to: dividing each frame in the second frame sequence into a data block with a first preset number of bytes and a first check code to obtain a plurality of data blocks; and the target data determination unit is further configured to: calculating a second check code corresponding to each data block in the plurality of data blocks; and combining the plurality of data blocks into the target data in response to determining that the first check code and the second check code corresponding to each data block are the same.
It should be understood that units 901 to 904, which are recited in the apparatus 900 for transmitting data, correspond to respective steps in the method described with reference to fig. 6, respectively. Thus, the operations and features described above for the method for transmitting data are equally applicable to the apparatus 900 and the units included therein and will not be described again here.
According to an embodiment of the present application, an electronic device and a readable storage medium for transmitting data are also provided.
As shown in fig. 10, is a block diagram of an electronic device for a method of transmitting data according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 10, the electronic apparatus includes: one or more processors 1001, memory 1002, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses 1005 and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses 1005 may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 10 illustrates an example of one processor 1001.
The memory 1002 is a non-transitory computer readable storage medium provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for transmitting data provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method for transmitting data provided herein.
The memory 1002, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and units, such as program instructions/units corresponding to the method for transmitting data in the embodiment of the present application (for example, the data acquisition unit 501, the data block division unit 502, the first frame sequence determination unit 503, the modulation unit 504, and the audio playback unit 505 shown in fig. 5, for example, the sampling unit 901, the demodulation unit 902, the data block determination unit 903, and the target data determination unit 904 shown in fig. 9). The processor 1001 executes various functional applications of the server and data processing, i.e., implements the method for transmitting data in the above-described method embodiments, by executing non-transitory software programs, instructions, and modules stored in the memory 1002.
The memory 1002 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of an electronic device for transmitting data, and the like. Further, the memory 1002 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 1002 may optionally include memory located remotely from the processor 1001, which may be connected to an electronic device for communicating data over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method for transmitting data may further include: an input device 1003 and an output device 1004. The processor 1001, the memory 1002, the input device 1003, and the output device 1004 may be connected by a bus 1005 or by other means, and fig. 10 illustrates an example in which these are connected by the bus 1005.
The input device 1003 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus for transmitting data, such as an input device like a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, etc. The output devices 1004 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the target data are divided into the data blocks, so that the accuracy of data verification is improved, and a better information transmission effect is achieved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (18)

1. A method for transmitting data, comprising:
acquiring target data;
dividing the target data into data blocks having a first preset number of bytes;
determining a first frame sequence from the data block;
modulating the first sequence of frames into audio data;
and playing the audio data.
2. The method of claim 1, wherein the determining a first frame sequence from the data blocks comprises:
calculating a first check code corresponding to each data block;
and combining each data block with the first check code corresponding to each data block to obtain a first frame sequence.
3. The method of claim 2, wherein the modulating the first sequence of frames into audio data comprises:
dividing the first frame sequence into data groups having a second preset number of bits;
and adjusting the bits in each data group into bits with preset phases and preset amplitudes, and modulating the bits to preset carriers to obtain audio data.
4. The method of claim 3, wherein the adjusting the bits in each data group to bits with a preset phase and a preset amplitude and modulating to a preset carrier to obtain audio data comprises:
Mapping the bits in each data group into a state of a preset constellation diagram;
and modulating each state to a preset carrier wave to obtain audio data.
5. A method for transmitting data, comprising:
sampling the played audio data;
demodulating the sampled audio data into a second frame sequence;
determining a plurality of data blocks according to the second frame sequence and a first preset number;
and determining target data according to the plurality of data blocks.
6. The method of claim 5, wherein the demodulating the sampled audio data into a second frame sequence comprises:
dividing the audio data into data groups having a second preset number of bits;
determining a corresponding second preset number of bits according to the phase and amplitude of the data group with the second preset number of bits;
and determining the second frame sequence according to the corresponding second preset number of bits.
7. The method of claim 6, wherein each of the data groups in the audio data corresponds to a state of a preset constellation; and
the determining a second preset number of bits according to the phase and amplitude of the data set having the second preset number of bits includes:
And determining a second preset number of bits corresponding to each state according to each state of the preset constellation diagram.
8. The method of claim 7, wherein the determining a plurality of data blocks according to the second frame sequence and a first preset number comprises:
dividing each frame in the second frame sequence into a data block with a first preset number of bytes and a first check code to obtain a plurality of data blocks; and
the determining target data according to the plurality of data blocks includes:
calculating a second check code corresponding to each data block in the plurality of data blocks;
in response to determining that the first parity code and the second parity code corresponding to each data chunk are the same, combining the plurality of data chunks into target data.
9. An apparatus for transmitting data, comprising:
a data acquisition unit configured to acquire target data;
a data block dividing unit configured to divide the target data into data blocks having a first preset number of bytes;
a first frame sequence determination unit configured to determine a first frame sequence based on the data block;
a modulation unit configured to modulate the first sequence of frames into audio data;
An audio playing unit configured to play the audio data.
10. The apparatus of claim 9, wherein the first frame sequence determination unit is further configured to:
calculating a first check code corresponding to each data block;
and combining each data block with the first check code corresponding to each data block to obtain a first frame sequence.
11. The apparatus of claim 10, wherein the modulation unit is further configured to:
dividing the first frame sequence into data groups having a second preset number of bits;
and adjusting the bits in each data group into bits with preset phases and preset amplitudes, and modulating the bits to preset carriers to obtain audio data.
12. The apparatus of claim 11, wherein the modulation unit is further configured to:
mapping the bits in each data group into a state of a preset constellation diagram;
and modulating each state to a preset carrier wave to obtain audio data.
13. An apparatus for transmitting data, comprising:
a sampling unit configured to sample the played audio data;
a demodulation unit configured to demodulate the sampled audio data into a second frame sequence;
A data block determination unit configured to determine a plurality of data blocks according to the second frame sequence and a first preset number;
a target data determination unit configured to determine target data from the plurality of data blocks.
14. The apparatus of claim 13, wherein the demodulation unit is further configured to:
dividing the audio data into data groups having a second preset number of bits;
determining a corresponding second preset number of bits according to the phase and amplitude of the data group with the second preset number of bits;
and determining the second frame sequence according to the corresponding second preset number of bits.
15. The apparatus of claim 14, wherein each of the data groups in the audio data corresponds to a state of a preset constellation; and
the demodulation unit is further configured to:
and determining a second preset number of bits corresponding to each state according to each state of the preset constellation diagram.
16. The apparatus of claim 15, wherein the data block determination unit is further configured to:
dividing each frame in the second frame sequence into a data block with a first preset number of bytes and a first check code to obtain a plurality of data blocks; and
The target data determination unit is further configured to:
calculating a second check code corresponding to each data block in the plurality of data blocks;
in response to determining that the first parity code and the second parity code corresponding to each data chunk are the same, combining the plurality of data chunks into target data.
17. An electronic device for transmitting data, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202010696934.9A 2020-07-20 2020-07-20 Method, device, equipment and storage medium for transmitting data Pending CN111865434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010696934.9A CN111865434A (en) 2020-07-20 2020-07-20 Method, device, equipment and storage medium for transmitting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010696934.9A CN111865434A (en) 2020-07-20 2020-07-20 Method, device, equipment and storage medium for transmitting data

Publications (1)

Publication Number Publication Date
CN111865434A true CN111865434A (en) 2020-10-30

Family

ID=73000926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010696934.9A Pending CN111865434A (en) 2020-07-20 2020-07-20 Method, device, equipment and storage medium for transmitting data

Country Status (1)

Country Link
CN (1) CN111865434A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567485A (en) * 2022-03-01 2022-05-31 北京全路通信信号研究设计院集团有限公司 Data processing method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05122735A (en) * 1991-04-25 1993-05-18 Thomson Consumer Electron Sa Method of repairing and executing recreation equipment
CN102017520A (en) * 2008-04-30 2011-04-13 Lg电子株式会社 Home appliance system and operation method thereof
CN102017519A (en) * 2008-04-29 2011-04-13 Lg电子株式会社 Home appliance and home appliance system
CN102388572A (en) * 2009-04-10 2012-03-21 Lg电子株式会社 Home appliance and home appliance system
CN102388574A (en) * 2009-04-10 2012-03-21 Lg电子株式会社 System and method for diagnosing home appliance
CN102474420A (en) * 2009-07-06 2012-05-23 Lg电子株式会社 Home appliance diagnosis system and method for operating same
CN102725603A (en) * 2010-01-15 2012-10-10 Lg电子株式会社 Refrigerator and diagnostic system for the same

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05122735A (en) * 1991-04-25 1993-05-18 Thomson Consumer Electron Sa Method of repairing and executing recreation equipment
CN102017519A (en) * 2008-04-29 2011-04-13 Lg电子株式会社 Home appliance and home appliance system
CN102017520A (en) * 2008-04-30 2011-04-13 Lg电子株式会社 Home appliance system and operation method thereof
CN102388572A (en) * 2009-04-10 2012-03-21 Lg电子株式会社 Home appliance and home appliance system
CN102388574A (en) * 2009-04-10 2012-03-21 Lg电子株式会社 System and method for diagnosing home appliance
CN102474420A (en) * 2009-07-06 2012-05-23 Lg电子株式会社 Home appliance diagnosis system and method for operating same
CN102725603A (en) * 2010-01-15 2012-10-10 Lg电子株式会社 Refrigerator and diagnostic system for the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567485A (en) * 2022-03-01 2022-05-31 北京全路通信信号研究设计院集团有限公司 Data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
EP2239897B1 (en) Channel tracking with scattered pilots using a kalman filter
US10601629B2 (en) Virtual lookup table for probabilistic constellation shaping
US9461850B2 (en) Parallel data processing
US8514913B2 (en) System and method for transmitting pilot and data symbols in a relayed-wireless communications network
JP2012157017A (en) Multi input multi output (mimo) orthogonal frequency division multiple access (ofdma) communication system
CN103067327B (en) Method for transmitting signals and signal transmitting apparatus
CN109802907B (en) OFDM symbol generation method and communication device
US11444702B2 (en) Transmitter identification based on machine learning
Bohra et al. Bit error rate analysis in simulation of digital communication systems with different modulation schemes
CN106063212B (en) Method and apparatus for generating non-gaussian interference channel in a wireless communication system
CN110679100B (en) Signal processing
CN111865434A (en) Method, device, equipment and storage medium for transmitting data
JP6302092B2 (en) Wireless communication apparatus, integrated circuit, transmission method, reception method, and communication method
KR20170018537A (en) Channel Equalization Apparatus and Method Based on Pilot Signals for DOCSIS Down Stream System
CN102246424B (en) Method and transmitter for implementing dirty paper pre-coding by using phase shaping anew
CN108141281B (en) Bandwidth limiting
US8654874B1 (en) Method and apparatus for detecting impulse noise
CN112578692B (en) Industrial bus communication method and device, computer equipment and storage medium
CN113992305A (en) Pilot insertion method, optical communication method, readable storage medium, and computing device
CN109474895B (en) Data transmission method and apparatus for digital broadcasting system
CN105357161B (en) Sub-carrier wave distribution method, the apparatus and system of power line communication ofdm system
CN109474370B (en) Pipeline data transmission method and equipment of digital broadcasting system
CN107809402A (en) A kind of method and apparatus being demodulated
US10917277B2 (en) Transmission device, transmission method, reception device, and reception method
CN112543085B (en) Method, device, equipment and storage medium for selecting subcarriers for transmission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201030

RJ01 Rejection of invention patent application after publication