CN111865952B - Data processing method, data processing device, storage medium and electronic equipment - Google Patents

Data processing method, data processing device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111865952B
CN111865952B CN202010661720.8A CN202010661720A CN111865952B CN 111865952 B CN111865952 B CN 111865952B CN 202010661720 A CN202010661720 A CN 202010661720A CN 111865952 B CN111865952 B CN 111865952B
Authority
CN
China
Prior art keywords
metadata
data
service data
preset
value
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.)
Active
Application number
CN202010661720.8A
Other languages
Chinese (zh)
Other versions
CN111865952A (en
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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen 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 Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN202010661720.8A priority Critical patent/CN111865952B/en
Publication of CN111865952A publication Critical patent/CN111865952A/en
Application granted granted Critical
Publication of CN111865952B publication Critical patent/CN111865952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0009Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses a data processing method, a data processing device, a storage medium and electronic equipment. The scheme acquires service data to be transmitted, wherein the service data comprises multi-bit codes; dividing the multi-bit code of the service data according to a preset division length to obtain multi-element data; determining a target signal frequency value corresponding to each metadata; the single-frequency point waveform corresponding to each target signal frequency value is generated, the metadata corresponding to the target signal frequency value is sent based on the single-frequency point waveform, the service data to be transmitted are encoded into a plurality of continuous single-frequency point waveforms through the scheme, even if the waveforms are intercepted, the original service data cannot be acquired, and the safety of data transmission is improved.

Description

Data processing method, data processing device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, a storage medium, and an electronic device.
Background
With the development of information technology, the demand of people for data processing anytime and anywhere is more and more urgent, and nowadays, various information transmission modes, such as bluetooth, wifi, infrared and the like, have appeared in near field communication. Because these information transmission methods are widely used, the information transmitted by these methods is easy to intercept and crack. For example, common wifi is an ieee802.11n type, and anyone can receive signals and know the format of data frames, so that some information can be analyzed or all information can be cracked. The present network protocol uses TCP/IP protocol, so that any person following the protocol can easily intercept the transmitted data packet and obtain some information from the data packet. In summary, the security of the conventional data transmission method is low.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a data processing device, a storage medium and electronic equipment, and aims to improve the safety of data transmission.
The embodiment of the invention provides a data processing method, which is applied to a sending end and comprises the following steps:
acquiring service data to be transmitted, wherein the service data comprises multi-bit codes;
dividing the multi-bit code of the service data according to a preset division length to obtain multi-element data;
determining a target signal frequency value corresponding to each metadata;
generating a single-frequency point waveform corresponding to each target signal frequency value, and sending metadata corresponding to the target signal frequency value based on the single-frequency point waveform.
The embodiment of the invention also provides a data processing method which is applied to a receiving end, and the method comprises the following steps:
when a waveform signal is received, extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms;
determining the value of the metadata corresponding to the signal frequency value of each single-frequency point waveform according to a preset corresponding relation between the signal frequency value and the value of the metadata;
determining the code included in each metadata according to the value of each metadata;
and recoding the codes of the metadata according to a preset coding mode of the service data to obtain the service data.
An embodiment of the present invention further provides a data processing apparatus, where the apparatus is applied to a sending end, and the apparatus includes:
the data acquisition module is used for acquiring service data to be transmitted, wherein the service data comprises multi-bit codes;
the data conversion module is used for dividing the multi-bit code of the service data according to a preset division length to obtain multi-element data;
the data coding module is used for determining a target signal frequency value corresponding to each metadata;
and the waveform generating module is used for generating a single-frequency-point waveform corresponding to each target signal frequency value and sending metadata corresponding to the target signal frequency value based on the single-frequency-point waveform.
An embodiment of the present invention further provides a data processing apparatus, where the apparatus is applied to a receiving end, and the apparatus includes:
the signal extraction module is used for extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm when the waveform signal is received, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms;
the metadata determining module is used for determining the value of the metadata corresponding to the signal frequency value of each single-frequency point waveform according to the preset corresponding relation between the signal frequency value and the value of the metadata;
the encoding determining module is used for determining the encoding included by each metadata according to the value of each metadata;
and the data coding module is used for recoding the codes of the metadata according to the preset coding mode of the service data to obtain the service data.
The embodiment of the present invention further provides a storage medium, where multiple instructions are stored, and the instructions are suitable for being loaded by a processor to execute any one of the data processing methods provided in the embodiments of the present invention.
The embodiment of the present invention further provides an electronic device, where the electronic device includes a memory, a processor, and a data processing program that is stored in the memory and is executable on the processor, and when the data processing program is executed by the processor, the electronic device implements any one of the data processing methods provided in the embodiments of the present invention.
The data processing scheme provided by the embodiment of the invention converts the service data into continuous multiple sets of metadata, determines the target signal frequency value corresponding to each metadata, generates the single-frequency-point waveform corresponding to each target signal frequency value, and sends the metadata corresponding to the target signal frequency value based on the single-frequency-point waveform, so that the transmission of the service data can be realized by outputting the waveform signal.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a first flowchart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a second flowchart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
An execution main body of the data processing method may be the data processing apparatus provided in the embodiment of the present invention, or an electronic device integrated with the data processing apparatus, where the data processing apparatus may be implemented in a hardware or software manner. The electronic device may be a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer.
Referring to fig. 1, fig. 1 is a first flow chart of a data processing method according to an embodiment of the invention. The data processing method is applied to a data sending end, and the specific flow can be as follows:
101. acquiring service data to be transmitted, wherein the service data comprises multi-bit codes.
The service data to be transmitted in the embodiment of the application is obtained by converting original data according to a specific coding mode. The original data may be data in any format, such as text information, pictures, audio, and the like.
In the embodiment of the application, the electronic equipment serving as the sending end acquires original data and converts the original data into binary data; and using the binary data as service data to be transmitted. It is understood that when the data is stored in the computer, the data is converted into binary data by a specific encoding method and then stored. That is to say, when the original data is stored in the electronic device, the original data itself is transcoded and stored in a binary format, so that the binary format data of the original data can be directly acquired from the disk as the service data to be transmitted.
It should be understood that the scheme of the embodiment of the present application is not limited to binary coding the original data, and in other embodiments, the original data may be coded by other coding methods to obtain service data in other formats, for example, the coding method may also be decimal Code, hexadecimal Code, octal Code, ASCII (American Standard Code for Information Interchange), and the like.
For example, the original data is a text, the text is stored in a computer as a piece of binary data, and the binary data is acquired as the service data to be transmitted.
102. And dividing the multi-bit code of the service data according to a preset division length to obtain multi-element data.
Since the minimum unit of the computer storage data is byte (byte), and one byte is composed of 8 bits (bit), when the data size of the original data is large, the byte number of the service data is also increased. In order to facilitate the subsequent conversion of the service data into a frequency (frequency value) of a specific frequency band, the acquired original data is divided into a plurality of metadata.
For example, the traffic data is 20 bytes, and for binary data, each byte is encoded with eight bits, and the traffic data includes 160-bit data, i.e., 160-bit encoding. The embodiment of the application divides the multi-bit code of the service data into a plurality of groups of continuous metadata according to the preset division length. Assuming that the division length used in the division is 5 bits, 5-bit data is sequentially extracted from 160-bit data as one metadata to obtain 32 sets of metadata, and the metadata here is referred to as first metadata for the purpose of distinguishing from other metadata. After the 5-bit metadata are converted into decimal, the values are respectively the values from 0 to 31.
In addition to the sequential division of metadata, metadata can be obtained by division and completion when the number of division bits cannot be divided in a byte. For example, if the number of divided bits is 5 bits, after one byte extracts 5 bits of data to obtain one metadata, the following 3 bits are not enough to obtain another complete metadata, and preset data such as 0 may be filled to obtain a complete metadata. For example, one byte of data is 11001110, which can be divided into two sets of metadata, 11001 and 11000 (the last two bits are complemented by 0).
It is understood that the encoding of 5 bits as one metadata is only an implementation manner, and in other embodiments, other specific numbers of bits may be set as needed to divide the original binary data string into a plurality of metadata.
103. And determining a target signal frequency value corresponding to each metadata.
The electronic device stores a preset corresponding relationship, and the preset corresponding relationship defines a corresponding relationship between a value of the metadata and a frequency value in advance. And after the metadata are obtained, determining a target signal frequency value corresponding to each metadata according to the preset corresponding relation.
For example, the frequency band used for data transmission is set at 17000Hz-20000KHz, which is an insensitive frequency band for human ears, and the frequency of the frequency band is selected as the communication frequency, so that the environmental interference can be reduced and the human ears are not easy to perceive.
In one implementation, the difference between the frequencies corresponding to two metadata adjacent in value is the same. For example, if the metadata is divided by 5-bit encoding, the metadata corresponds to 32 values (0-31) in total, and thus, 32 frequency values between 17000Hz and 20000KHz can be selected to construct a correspondence between the values of the metadata and the frequency values, assuming that 17000Hz corresponds to 1, 117090Hz corresponds to 2, and so on. The frequency values between two adjacent frequency values differ by 90Hz.
In another implementation manner, according to a numerical value corresponding to a significant digit of metadata, an arithmetic progression or an geometric progression is used to generate a frequency corresponding to the metadata, which is specifically as follows:
Freqmetadata=FreqBase+metadata*θf
freqmetadata represents a target signal frequency value, freqBase is a preset initial signal frequency value, metadata is a value corresponding to the significant digit of the metadata, and θ f is a preset signal frequency difference value, namely the difference value of the frequencies of two metadata with adjacent numerical values, and the value can be a preset value.
104. Generating a single-frequency point waveform corresponding to each target signal frequency value, and sending metadata corresponding to the target signal frequency value based on the single-frequency point waveform.
Then, after the target signal frequency values of multiple sets of metadata corresponding to the special data to be transmitted are determined, a single-frequency waveform corresponding to each target signal frequency value is generated, and the metadata corresponding to the target signal frequency values are sent based on the single-frequency waveforms.
The single-frequency waveform of the sine wave can be obtained by the acoustic wave generator according to the single-frequency waveform of the corresponding frequency, for example, by a sin function, wherein one frequency value can generate one single-frequency waveform of the sine wave. After the waveforms of the single frequency points are combined, a complete waveform signal to be transmitted is obtained, and the waveform signal can be referred to as a first waveform signal for the convenience of distinguishing from other waveform signals. The duration of the single-frequency-point waveform corresponding to each metadata may be set as required, for example, 20 milliseconds.
After obtaining the first waveform signal of the service data, the electronic device may directly send the waveform signal, and the receiving end receives the waveform signal and then decodes the waveform signal to obtain the original data.
Alternatively, in some application scenarios, the electronic device may also store a plurality of continuous single-frequency-point waveforms as waveform data in a preset format, for example, as waveform data in a PCM (Pulse Code Modulation) format.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
The data processing method provided by the embodiment of the application converts the service data into continuous multiple sets of metadata, determines the target signal frequency value corresponding to each metadata, generates the single-frequency-point waveform corresponding to each target signal frequency value, and sends the metadata corresponding to the target signal frequency value based on the single-frequency-point waveform.
Wherein, in some embodiments, before determining the target signal frequency value corresponding to each of the metadata, the method further comprises:
acquiring message header data and identification information; the message header data comprises a multi-bit code, and the identification information comprises a multi-bit code;
calculating the service data, the message header data and the identification information by using an error correction code algorithm to obtain an error correction code; the error correction code comprises a multi-bit encoding;
dividing the multi-bit code of the message header data according to a preset division length to obtain multi-element data; dividing the multi-bit code of the identification information according to a preset division length to obtain multi-element data; and dividing the multi-bit code of the error correcting code according to a preset division length to obtain multi-element data.
In this embodiment, the sending end sends the service data in a message form, so that the message format of the service data is determined and the header data is obtained according to the message format, where the header data includes a multi-bit code. For example, the header data includes the frame number and the protocol version.
The frame number may be any number or character information, and after the frame number is converted into binary data, the binary data is divided into one or more groups of metadata, and the metadata is referred to as second metadata for distinguishing from other metadata. For example, the frame number is number 16, then after conversion to binary data, a second metadata of 10000 is extracted. The protocol version is predefined information for identifying the version number of the transmission protocol, and may also be converted into one or more sets of metadata, for example, the version number is 1, and then after being converted into metadata, it may be represented as 00001. It should be noted that the protocol version may also be used to indicate related information for dividing the first metadata, such as the number of bits used for division and whether to complete the data, so that the receiving end may perform data restoration according to the protocol version information.
When the message header data is converted into the metadata, the multi-bit code of the message header data can be divided according to the preset division length to obtain the multi-group metadata. The division length here may be the same as the division length of the traffic data.
After the message header data, identification information can be added to the service data, and the identification information includes multi-bit codes. The identification information is used for preventing data from being tampered in the transmission process, and the packets packaged by the same content can be different through the identification information, so that the cracking difficulty is improved. In some embodiments, the identification information is a unique identification code. In one implementation, "obtaining identification information" includes: determining current time information; and coding the time information to obtain the unique identification code. Specifically, after the current time information is acquired, encoding is performed based on the time information according to a UUID (universal Unique Identifier) algorithm, and a UUID is generated as the identification information. For the identification information, the multi-bit code of the identification information can be divided according to a preset division length to obtain multiple sets of metadata, so as to obtain one or multiple sets of metadata. For the purpose of distinguishing from other metadata, the metadata is referred to herein as third metadata.
After the message header data and the identification information are obtained, an error correction code algorithm can be used for calculating the service data, the message header data and the identification information to obtain an error correction code; the error correction code comprises a multi-bit encoding.
In order to further improve the security and accuracy of data transmission, after metadata corresponding to service data, header data and identification information are obtained, an error correction code algorithm is used to encode a metadata sequence formed by the metadata to obtain an error correction code, and the error correction code is converted into the metadata.
The fourth metadata is then taken as part of the metadata sequence. For example, the metadata sequence may be encoded using a reed-solomon code algorithm to obtain a reed-solomon code.
When the electronic device serving as the receiving end decodes data, error correction processing can be performed on the first metadata according to the reed-solomon code, so that noise influence in the data transmission process is eliminated, and the accuracy of data transmission is improved.
In some embodiments, the first metadata, the second metadata, and the third metadata form a metadata sequence, a frequency sequence corresponding to the metadata sequence is obtained according to a preset correspondence between values of the metadata and signal frequency values, and a first waveform signal formed by a plurality of continuous single-frequency-point waveforms can be generated based on the frequency sequence.
Wherein, in some embodiments, before dividing the multi-bit code of the service data according to a preset division length, the method further includes:
splitting the service data into multiple frames, wherein the length of each frame of service data is a preset byte number;
for each frame of service data, a step of dividing the multi-bit code of the service data according to a preset division length is performed.
In this embodiment, the waveform signal transmitted at one time is prevented from being too long. The service data can be divided into multi-frame data for transmission. Each frame of data can be processed according to the steps of 102-104 to obtain a plurality of waveform signals, and when the data is transmitted, the plurality of waveform signals are sequentially sent according to the sequence of each frame of data. For example, the service data is split into multiple frames, wherein the length of each frame of service data is a preset byte number; for each frame of traffic data, the steps of 102-104 are performed.
In this way, the length of each frame data can be limited, for example, 14-20 bytes are used as one frame data, and when the amount of data to be transmitted is large, the frame data can be divided into a plurality of frames of continuous service data. When the length of one frame of data is limited, the amount of metadata that can be converted from one frame of data is fixed, for example, 14 bytes of one frame of data and 5 bits of length of each metadata, then 28 metadata can be obtained after zero padding. In addition, the number of the metadata obtained after the identification information of the header data of the message is converted is also fixed, the length of the reed-solomon code obtained after the metadata is encoded by the reed-solomon code algorithm is also fixed, and the number of the target signal frequency values obtained after the frequency conversion is also fixed, so that the duration of the finally output waveform signal can also be fixed.
Furthermore, the positions of the second metadata, the third metadata, the first metadata and the fourth metadata in the metadata sequence may also be defined. For example, the first metadata follows the second metadata and the third metadata. For example, if the second metadata is 3 groups and the third metadata is 2 groups, the first metadata to be transmitted is from the 6 th group.
Based on this, the number of positions of each kind of metadata is limited, and after acquiring the metadata sequence, the receiving end can directly acquire the required metadata from a specific position. For example, the number of metadata of a frame of service data is limited to 30, 1 st to 2 nd are header data, 3 rd is identification information, 4 th to 26 th are service data, and 27 th to 30 th are reed-solomon codes.
In addition, if the service data is subjected to framing processing, the beginning of each frame of data carries header data and identification information, wherein the header data includes a frame number, and the frame number is used for indicating that the current data frame is the data of the data to be transmitted. For example, if the data to be transmitted is divided into 10 frames, the frame number of the first frame data is 1, the frame number of the second frame data is 2, and so on. By this way, the contents of the header data and the identification information in each frame of data are different, and after the receiving end receives the multi-frame data and decodes the data to determine the frame number, the receiving end can determine the sequence of the multi-frame data according to the frame number, and further merge the first metadata obtained by analyzing the multi-frame data into the transmitted service data according to the sequence.
The scheme provided by the embodiment of the application can realize near field communication based on sound waves, a sending end encodes information to be sent into a waveform signal to be played, a receiving end records the waveform signal, decodes the waveform signal to obtain a frequency sequence, reversely converts the frequency sequence according to the same frequency mapping relation as the sending end to obtain a metadata sequence, deletes message header data and metadata corresponding to identification information in the metadata sequence, combines the rest metadata sequence into transmission data, and decodes the transmission data to obtain original data.
In view of the above, the data processing method provided in the embodiment of the present invention obtains the service data obtained by converting the original data according to the preset coding method, converts the service data into multiple continuous sets of first metadata, and then converts the header data and the identification information into the second metadata and the third metadata, where the first metadata, the second metadata, and the third metadata form a metadata sequence, and according to the preset corresponding relationship between the metadata sequence and the signal frequency value, a frequency sequence is obtained, and based on the frequency sequence, a first waveform signal formed by multiple continuous single-frequency-point waveforms can be generated. Based on this, can realize through output first waveform signal to realize the transmission of service data, because the original data is encoded into a plurality of continuous frequencies, even this waveform is intercepted, under the condition without the coding rule, also can't know original data, improved the security of data transmission.
Referring to fig. 2, fig. 2 is a second flow chart illustrating a data processing method according to an embodiment of the invention. The data processing method is applied to a data receiving end, and the specific flow can be as follows:
201. when a waveform signal is received, extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms.
In this embodiment, the electronic device serving as the receiving end decodes the received waveform signal sent by the other device to obtain the service data. The service data is the service data transmitted by the transmitting end.
The electronic equipment extracts a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms.
202. And determining the value of the metadata corresponding to the signal frequency value of each single-frequency point waveform according to the preset corresponding relation between the signal frequency value and the value of the metadata.
The receiving end obtains a signal frequency value of each single-frequency point waveform, and determines a value of metadata corresponding to the signal frequency value of each single-frequency point waveform according to a preset corresponding relationship between the signal frequency value and the value of the metadata (the preset corresponding relationship is the same as the preset corresponding relationship in the transmitting end).
203. Determining the code each of the metadata comprises according to the value of each of the metadata.
Since in the transmitting end, the binary coded metadata is converted into decimal, and then the value of the metadata is obtained. Therefore, the receiving end converts the value (decimal data) of each metadata into binary data to obtain the code included in each metadata.
204. And recoding the codes of the metadata according to a preset coding mode of the service data to obtain the service data.
And after the codes included by each metadata are obtained, re-encoding the codes of the received metadata to obtain the service data. For example, the codes of all metadata are combined according to the received time sequence to obtain the service data.
In some embodiments, the sending end adds header data when transmitting data, and the receiving end detects whether the metadata corresponding to the header data is included in the metadata codes before recoding the metadata codes according to the preset coding mode of the service data, if so, the subsequent steps are continuously executed, otherwise, the decoding operation of the waveform signal is terminated.
The header data is located at a specific position of a metadata sequence formed by a plurality of metadata, so that whether the specific position contains the metadata can be directly detected. For example, after obtaining a plurality of metadata, the metadata at a specific position is obtained, whether the metadata is the metadata corresponding to the header data is determined, and if yes, the subsequent decoding operation is continued.
Since the bit number of the metadata of the header data in the metadata sequence is fixed, for example, the metadata sequence of one frame of service data includes 30 metadata, and the 1 st to 2 nd frames of service data are header data, and then the 3 rd metadata is the metadata corresponding to the service data transmitted by the transmitting end.
For another example, if the sending end performs framing processing on the data during transmission, for example, the number of metadata of one frame of service data is limited to 30, the 1 st to 2 nd are header data, the 3 rd is identification information, the 4 th to 26 th are service data, and the 27 th to 30 th are reed-solomon codes. The 4 th to 26 th metadata in the metadata sequence can be directly obtained as the metadata corresponding to the service data transmitted by the transmitting end.
Wherein, in some embodiments, before extracting the fundamental frequency signal from the waveform signal according to the fundamental frequency extraction algorithm, the method further comprises: and denoising the waveform signal based on a high-pass filter so as to eliminate low-frequency noise in the environment when the receiving end records the signal.
In some embodiments, before re-encoding the encoding of each metadata according to a preset encoding mode of the service data, the method further includes:
if the metadata comprises error correcting codes, carrying out error correcting processing on target metadata in the metadata based on the error correcting codes; the target metadata is metadata generated by business data;
recoding the codes of the metadata according to a preset coding mode of the service data, wherein the recoding comprises the following steps:
and recoding the target metadata subjected to error correction processing according to a preset coding mode of the service data to obtain the service data.
In this embodiment, if the sending end obtains the metadata corresponding to the service data, the error correction code algorithm is used to encode the metadata sequence formed by the metadata, and the obtained error correction code is converted into the metadata and used as a part of the sent metadata. Then, after determining the codes included in each metadata, the receiving end determines the metadata corresponding to the error correction codes from the metadata, converts the metadata into the error correction codes, and then performs error correction processing on the target metadata in the metadata according to the error correction codes. Wherein the target metadata is metadata generated by the service data.
When the obtained error correcting code is converted into metadata and is used as a part of the sent metadata, the metadata corresponding to the error correcting code is placed at a specific position of a metadata sequence, so that the receiving end can obtain the metadata corresponding to the error correcting code from a preset position of the metadata sequence formed by multiple sets of metadata obtained in 1023 and carry out coding processing on the metadata to obtain the error correcting code, so that noise influence in the data transmission process is eliminated, and the accuracy of data transmission is improved.
In order to implement the above method, an embodiment of the present invention further provides a data processing apparatus, where the data processing apparatus may be specifically integrated in a terminal device, such as a mobile phone, a tablet computer, and the like.
For example, referring to fig. 3, fig. 3 is a schematic diagram illustrating a first structure of a data processing apparatus according to an embodiment of the present invention. The data processing apparatus may include a data acquisition module 301, a data conversion module 302, a data encoding module 303, and a waveform generation module 304, as follows:
a data obtaining module 301, configured to obtain service data to be transmitted, where the service data includes a multi-bit code;
a data conversion module 302, configured to divide the multi-bit code of the service data according to a preset division length to obtain multi-element data;
a data encoding module 303, configured to determine a target signal frequency value corresponding to each metadata;
a waveform generating module 304, configured to generate a single-frequency-point waveform corresponding to each target signal frequency value, and send metadata corresponding to the target signal frequency value based on the single-frequency-point waveform.
In some embodiments, the data conversion module 302 is further configured to:
acquiring message header data and identification information; the message header data comprises a multi-bit code, and the identification information comprises a multi-bit code;
calculating the service data, the message header data and the identification information by using an error correction code algorithm to obtain an error correction code; the error correction code comprises a multi-bit encoding;
dividing the multi-bit code of the message header data according to a preset division length to obtain multi-element data; dividing the multi-bit code of the identification information according to a preset division length to obtain multi-element data; and dividing the multi-bit code of the error correcting code according to a preset division length to obtain multi-element data.
In some embodiments, the data encoding module 303 is further configured to:
and determining a target signal frequency value corresponding to each metadata according to a preset corresponding relation between the value of the metadata and the signal frequency value.
In some embodiments, the data encoding module 303 is further configured to:
calculating a target signal frequency value corresponding to each metadata according to a formula Freqmetadata = FreqBase + metadata θ f; wherein, freqmetadata represents a target signal frequency value, freqBase is a preset initial signal frequency value, metadata is a value corresponding to the significant digit of the metadata, and θ f is a preset signal frequency difference value.
In some embodiments, the data processing apparatus 300 further comprises:
the data splitting module is used for splitting the service data into multiple frames, wherein the length of each frame of service data is a preset byte number;
the data obtaining module 301 is further configured to divide the multi-bit code of the service data of each frame according to a preset division length.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
It should be noted that the data processing apparatus provided in the embodiment of the present invention and the data processing method in the foregoing embodiment belong to the same concept, and any method provided in the data processing method embodiment may be executed on the data processing apparatus, and a specific implementation process thereof is described in detail in the data processing method embodiment, and is not described herein again.
The data processing device provided by the embodiment of the invention converts the service data into continuous multiple sets of metadata, determines the target signal frequency value corresponding to each metadata, generates the single-frequency-point waveform corresponding to each target signal frequency value, and sends the metadata corresponding to the target signal frequency value based on the single-frequency-point waveform, so that the transmission of the service data can be realized by outputting the waveform signal.
In order to implement the above method, an embodiment of the present invention further provides a data processing apparatus, where the apparatus is applied to a receiving end. The data processing apparatus may be specifically integrated in a terminal device, such as a mobile phone, a tablet computer, and the like.
The data processing device comprises a signal extraction module, a metadata determination module, a coding determination module and a data coding module, and comprises the following components:
the signal extraction module is used for extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm when the waveform signal is received, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms;
the metadata determining module is used for determining the value of the metadata corresponding to the signal frequency value of each single-frequency point waveform according to the preset corresponding relation between the signal frequency value and the value of the metadata;
the encoding determining module is used for determining the encoding included by each metadata according to the value of each metadata;
and the data coding module is used for recoding the codes of the metadata according to the preset coding mode of the service data to obtain the service data.
Fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention, where fig. 4 is a schematic structural diagram of the electronic device according to an embodiment of the present invention. Specifically, the method comprises the following steps:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that the functions of charging, discharging, and power consumption management are managed through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
acquiring service data to be transmitted, wherein the service data comprises multi-bit codes;
dividing the multi-bit code of the service data according to a preset division length to obtain multi-element data;
determining a target signal frequency value corresponding to each metadata;
generating a single-frequency point waveform corresponding to each target signal frequency value, and sending metadata corresponding to the target signal frequency value based on the single-frequency point waveform.
Alternatively, in another embodiment, the processor 401 in the electronic device may load an executable file corresponding to a process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, thereby implementing various functions as follows:
when a waveform signal is received, extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms;
determining a value of metadata corresponding to the signal frequency value of each single-frequency point waveform according to a preset corresponding relation between the signal frequency value and the value of the metadata;
determining the code included in each metadata according to the value of each metadata;
and recoding the codes of the metadata according to a preset coding mode of the service data to obtain the service data.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
As described above, the electronic device provided in the embodiment of the present invention converts service data into multiple sets of continuous metadata, determines a target signal frequency value corresponding to each metadata, generates a single-frequency waveform corresponding to each target signal frequency value, and sends the metadata corresponding to the target signal frequency value based on the single-frequency waveform.
To this end, embodiments of the present invention provide a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute any one of the data processing methods provided by the embodiments of the present invention. For example, the instructions may perform:
acquiring service data to be transmitted, wherein the service data comprises multi-bit codes;
dividing the multi-bit code of the service data according to a preset division length to obtain multi-element data;
determining a target signal frequency value corresponding to each metadata;
generating a single-frequency point waveform corresponding to each target signal frequency value, and sending metadata corresponding to the target signal frequency value based on the single-frequency point waveform.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute any data processing method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any data processing method provided in the embodiments of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again. The foregoing detailed description has provided a data processing method, apparatus, and storage medium according to embodiments of the present invention, and the present disclosure has described the principles and embodiments of the present invention with specific examples, and the description of the foregoing embodiments is only provided to help understand the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A data processing method is applied to a sending end, and the method comprises the following steps:
acquiring service data to be transmitted, wherein the service data comprises multi-bit codes;
splitting the service data into multiple frames, wherein each frame of service data corresponds to one frame number;
for each frame of the service data, dividing the multi-bit code of the service data according to a preset division length to obtain multiple continuous groups of first metadata;
acquiring message header data and identification information, wherein the message header data comprises the frame number;
calculating the service data, the message header data and the identification information by using an error correction code algorithm to obtain an error correction code;
dividing the multi-bit code of the message header data according to a preset division length to obtain a plurality of groups of second element data; dividing the multi-bit code of the identification information according to a preset division length to obtain a plurality of groups of third metadata; dividing the multi-bit code of the error correcting code according to a preset division length to obtain a plurality of groups of fourth metadata;
determining preset position information corresponding to the first metadata, the second metadata, the third metadata and the fourth metadata respectively;
determining a target signal frequency value corresponding to each of the first metadata, the second metadata, the third metadata and the fourth metadata according to a preset corresponding relationship between a value of the metadata and a signal frequency value;
and generating a single-frequency point waveform corresponding to each target signal frequency value according to the sequence indicated by the preset position information, and sending metadata corresponding to the target signal frequency values based on the single-frequency point waveforms.
2. The data processing method of claim 1, wherein determining a target signal frequency value for each of the metadata comprises:
calculating a target signal frequency value corresponding to each metadata according to a formula Freqmetadata = FreqBase + metadata θ f; wherein, freqmetadata represents a target signal frequency value, freqBase is a preset initial signal frequency value, metadata is a value corresponding to the significant digit of the metadata, and θ f is a preset signal frequency difference value.
3. A data processing method, applied to a receiving end, the method comprising:
when a waveform signal is received, extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms;
determining the value of the metadata corresponding to the signal frequency value of each single-frequency point waveform according to the received time sequence according to the preset corresponding relation between the signal frequency value and the value of the metadata;
determining the codes included by each metadata according to the value of each metadata and the preset corresponding relation between the signal frequency value and the arrival of the metadata so as to obtain a metadata sequence;
according to preset position information, first metadata corresponding to the service data, second metadata corresponding to the message header data, third metadata corresponding to the identification information and fourth metadata corresponding to the error correction code are determined from the metadata sequence;
recoding the codes of the first metadata, the second metadata, the third metadata and the fourth metadata according to a preset coding mode of service data to obtain service data, header data, identification information and an error correction code;
performing error correction processing on the service data, the message header data and the identification information according to the error correction code to obtain error-corrected service data, message header data and identification information;
determining the frame number of the service data according to the corrected message header data;
and merging the service data corresponding to the received multiple waveform signals according to the corresponding frame numbers.
4. A data processing apparatus, wherein the apparatus is applied to a transmitting end, and the apparatus comprises:
the data acquisition module is used for acquiring service data to be transmitted, wherein the service data comprises multi-bit codes;
the data conversion module is used for dividing the multi-bit code of the service data according to a preset division length so as to obtain continuous multi-element data; dividing the service data into multiple frames, wherein each frame of service data corresponds to one frame number;
a data encoding module to:
for each frame of the service data, dividing the multi-bit code of the service data according to a preset division length to obtain multiple continuous groups of first metadata;
acquiring message header data and identification information, wherein the message header data comprises the frame number;
calculating the service data, the message header data and the identification information by using an error correction code algorithm to obtain an error correction code;
dividing the multi-bit code of the message header data according to a preset division length to obtain a plurality of groups of second element data; dividing the multi-bit code of the identification information according to a preset division length to obtain a plurality of groups of third metadata; dividing the multi-bit code of the error correcting code according to a preset division length to obtain multiple groups of fourth element data;
determining preset position information corresponding to the first metadata, the second metadata, the third metadata and the fourth metadata respectively;
determining a target signal frequency value corresponding to each metadata according to a preset corresponding relation between the value of the metadata and the signal frequency value;
and the waveform generating module is used for generating a single-frequency-point waveform corresponding to each target signal frequency value according to the sequence indicated by the preset position information and sending metadata corresponding to the target signal frequency value based on the single-frequency-point waveform.
5. A data processing apparatus, wherein the apparatus is applied to a receiving end, the apparatus comprising:
the signal extraction module is used for extracting a fundamental frequency signal from the waveform signal according to a fundamental frequency extraction algorithm when the waveform signal is received, wherein the fundamental frequency signal comprises a plurality of single-frequency-point waveforms;
the metadata determining module is used for determining the value of the metadata corresponding to the signal frequency value of each single-frequency point waveform according to the received time sequence according to the preset corresponding relation between the signal frequency value and the value of the metadata;
the encoding determination module is used for determining the encoding included by each metadata according to the value of each metadata and the preset corresponding relation between the signal frequency value and the arrival of the metadata so as to obtain a metadata sequence;
a data encoding module to:
according to preset position information, first metadata corresponding to the service data, second metadata corresponding to the message header data, third metadata corresponding to the identification information and fourth metadata corresponding to the error correcting code are determined from the metadata sequence;
recoding codes of the first metadata, the second metadata, the third metadata and the fourth metadata according to a preset coding mode of service data to obtain service data, message header data, identification information and an error correction code;
performing error correction processing on the service data, the message header data and the identification information according to the error correction code to obtain error-corrected service data, message header data and identification information;
determining the frame number of the service data according to the corrected message header data;
and merging the service data corresponding to the received multiple waveform signals according to the corresponding frame numbers.
6. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the data processing method of any one of claims 1 to 3.
7. An electronic device, comprising: a memory, a processor, and a data processing program stored on the memory and executable on the processor, the data processing program when executed by the processor implementing the method of any one of claims 1 to 3.
CN202010661720.8A 2020-07-10 2020-07-10 Data processing method, data processing device, storage medium and electronic equipment Active CN111865952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010661720.8A CN111865952B (en) 2020-07-10 2020-07-10 Data processing method, data processing device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010661720.8A CN111865952B (en) 2020-07-10 2020-07-10 Data processing method, data processing device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111865952A CN111865952A (en) 2020-10-30
CN111865952B true CN111865952B (en) 2023-04-18

Family

ID=73153274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010661720.8A Active CN111865952B (en) 2020-07-10 2020-07-10 Data processing method, data processing device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111865952B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579541A (en) * 2020-12-09 2021-03-30 李永生 GRIB data extraction method based on accurate positioning and rapid customization
CN114039698A (en) * 2021-10-12 2022-02-11 深圳智慧林网络科技有限公司 Data sending and receiving method, device and equipment based on multiple frequencies
CN115225710B (en) * 2022-06-17 2024-06-07 中国电信股份有限公司 Data packet transmission method and device, electronic equipment and storage medium
CN116505975B (en) * 2023-06-27 2023-09-22 无锡量子感知研究所 Data transmission method and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645343A (en) * 2016-07-20 2018-01-30 阿里巴巴集团控股有限公司 Data transmission/method of reseptance and data transmission system based on sound wave

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100818268B1 (en) * 2005-04-14 2008-04-02 삼성전자주식회사 Apparatus and method for audio encoding/decoding with scalability
CN105790852B (en) * 2014-12-19 2019-02-22 北京奇虎科技有限公司 Data transmission method and system based on multifrequency sound wave
CN105846911A (en) * 2016-05-23 2016-08-10 罗迎晓 Data transmission method, device and system based on sound wave
US20180041224A1 (en) * 2016-08-04 2018-02-08 International Business Machines Corporation Data value suffix bit level compression
CN108964786B (en) * 2018-06-13 2020-10-02 厦门声连网信息科技有限公司 Method and device for coding and decoding sound wave signal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645343A (en) * 2016-07-20 2018-01-30 阿里巴巴集团控股有限公司 Data transmission/method of reseptance and data transmission system based on sound wave

Also Published As

Publication number Publication date
CN111865952A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111865952B (en) Data processing method, data processing device, storage medium and electronic equipment
CN102394724B (en) Highly-reliable data transmission method and device based on dual tone multiple frequency sound waves
US9245529B2 (en) Adaptive encoding of a digital signal with one or more missing values
CN202663412U (en) Sending equipment, receiving equipment and transmission system
CN112685248A (en) Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium
CN105790853A (en) Method and device for transmitting character data through sound wave
US11196868B2 (en) Audio data processing method, server, client and server, and storage medium
CN105722183A (en) Sharing method and apparatus for Wi-Fi (wireless fidelity) link information
CN110381056B (en) Netty-based private protocol coding and decoding method and apparatus
CN112533185A (en) Sound distribution network method and device, computer equipment and storage medium
US11870501B2 (en) Method and system for improved acoustic transmission of data
CN112311720B (en) Data transmission method and device
CN113961289A (en) Data processing method, device, equipment and storage medium
CN116521634B (en) Method, system, electronic equipment and storage medium for processing call ticket data service
CN109741756B (en) Method and system for transmitting operation signal based on USB external equipment
CN113162628B (en) Data encoding method, data decoding method, terminal and storage medium
WO2019090466A1 (en) Firmware upgrade method for stylus, terminal and stylus
CN111314375B (en) Medical insurance data adaptation engine, medical insurance data adaptation method, electronic equipment and storage medium
CN110517045B (en) Block chain data processing method, device, equipment and storage medium
CN111507068B (en) Input information processing method and device and mobile terminal
CN114466105B (en) Binding method and device for fixed telephone number, electronic equipment and medium
CN113625965B (en) Data storage method, system and device of distributed storage system and storage medium
CN115065852B (en) Sound and picture synchronization method and device, electronic equipment and readable storage medium
CN107680607B (en) Signal compression method, signal decompression method and device thereof
CN114333857A (en) Data processing method and device, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant