CN107680607B - Signal compression method, signal decompression method and device thereof - Google Patents

Signal compression method, signal decompression method and device thereof Download PDF

Info

Publication number
CN107680607B
CN107680607B CN201710908567.2A CN201710908567A CN107680607B CN 107680607 B CN107680607 B CN 107680607B CN 201710908567 A CN201710908567 A CN 201710908567A CN 107680607 B CN107680607 B CN 107680607B
Authority
CN
China
Prior art keywords
data
compressed
audio signal
data block
compression
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
CN201710908567.2A
Other languages
Chinese (zh)
Other versions
CN107680607A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201710908567.2A priority Critical patent/CN107680607B/en
Publication of CN107680607A publication Critical patent/CN107680607A/en
Application granted granted Critical
Publication of CN107680607B publication Critical patent/CN107680607B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/008Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Mathematical Physics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses a signal compression method, which comprises the following steps: acquiring at least one data block, wherein the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; based on the judgment result of whether the data block meets the compression condition, compressing the at least one data block to obtain compressed data aiming at the audio signal, and sending the compressed data aiming at the audio signal; generating compression characteristic data representing whether at least one data block in the audio signal is compressed or not based on a judgment result of whether the data block meets a compression condition or not, and sending the compression characteristic data aiming at the audio signal; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal. The embodiment of the invention also discloses a signal decompression method, a signal compression device and a signal decompression device.

Description

Signal compression method, signal decompression method and device thereof
Technical Field
The present invention relates to signal processing technologies, and in particular, to a signal compression method, a signal decompression method, and a device thereof.
Background
Voice service is a research and development hotspot at present, and a typical usage is that a device collects data of Pulse Code Modulation (PCM) waveform from a microphone and sends the data to a server for voice and/or text recognition, and if the accuracy of recognition and the smooth operation of voice service are to be ensured, low delay of data transmission and low loss of sound quality must be ensured. However, the existing compression algorithm causes different degrees of delay and consumption of operation resources due to the existence of more calculation processes.
Disclosure of Invention
In order to solve the technical problems in the prior art, embodiments of the present invention provide a signal compression method, a signal decompression method, and a device thereof, which can at least solve the above problems in the prior art.
The technical scheme of the embodiment of the invention is realized as follows:
a first aspect of an embodiment of the present invention provides a signal compression method, where the method includes:
acquiring at least one data block, wherein the at least one data block is obtained after the audio signal to be compressed is subjected to block processing;
based on the judgment result of whether the data block meets the compression condition, compressing the at least one data block to obtain compressed data aiming at the audio signal, and sending the compressed data aiming at the audio signal;
generating compression characteristic data representing whether at least one data block in the audio signal is compressed or not based on a judgment result of whether the data block meets a compression condition or not, and sending the compression characteristic data aiming at the audio signal; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal.
In the above scheme, the method further comprises:
generating identification information representing whether the data block is compressed or not based on a judgment result of whether the data block meets the compression condition or not, wherein the identification information corresponds to the data block, and whether the data block corresponding to the identification information is compressed or not can be determined by utilizing the identification information;
and generating compression characteristic data for the audio signal based on the corresponding identification information of the at least one data block.
In the above scheme, the data blocks correspond to the identification information represented by the compressed feature data one to one; alternatively, the first and second electrodes may be,
the data blocks which meet the compression conditions correspond to the first identification information represented by the compression characteristic data, and the data blocks which do not meet the compression conditions correspond to the second identification information represented by the compression characteristic data; the first identification information is different from the second identification information.
In the above scheme, the data block includes at least two sampling data meeting a preset data condition; correspondingly, the method further comprises:
and judging whether the sampled data in the data block meets preset data characteristics or not, and determining whether the data block meets compression conditions or not based on the judgment result, wherein the preset data characteristics represent that preset bits in the sampled data are preset values.
In the above scheme, the method further comprises:
after the sampling data in the data block is determined to meet the preset data characteristics, deleting preset values corresponding to preset bits in the sampling data to obtain first sub-compressed data corresponding to the sampling data;
obtaining second sub-compressed data corresponding to the data block based on first sub-compressed data corresponding to the sampling data in the data block;
and taking the second sub-compressed data corresponding to the at least one data block as compressed data of the audio signal.
A second aspect of the embodiments of the present invention provides a signal decompression method, including:
acquiring compressed data for an audio signal, wherein the compressed data is obtained by compressing at least one data block in the audio signal based on a judgment result of whether the data block in the audio signal meets the requirement of the compressed signal; the at least one data block is obtained after the audio signal to be compressed is subjected to block processing;
acquiring compression characteristic data aiming at the audio signal, wherein the compression characteristic data is characteristic data which represents whether the at least one data block in the audio signal is subjected to compression processing or not;
and decompressing the compressed data based on the compressed characteristic data of the audio signal to obtain the audio signal.
In the above scheme, the method further comprises:
obtaining identification information representing whether a data block in the compressed data is compressed or not based on the compressed feature data;
and determining whether to decompress the data blocks in the compressed data corresponding to the identification information according to the identification information to obtain the audio signal.
In the above scheme, the data block corresponding to the audio signal includes at least two pieces of sampling data that satisfy a preset data condition, and whether to compress the data block is determined based on whether the sampling data in the data block corresponding to the audio signal satisfies a preset data characteristic; the preset data characteristics represent that preset bits of sampling data in a data block corresponding to the audio signal are preset values; correspondingly, the method further comprises:
determining to decompress the data blocks in the compressed data corresponding to the identification information based on the identification information, and adding preset values to preset bits of sampling data corresponding to the data blocks in the compressed data to obtain decompressed sampling data;
and obtaining a decompressed data block based on the decompressed sampling data so as to complete the decompression process of the data block in the compressed data and obtain the audio signal.
A third aspect of an embodiment of the present invention provides a signal compression apparatus, including:
the device comprises a processor and a control unit, wherein the processor is used for acquiring at least one data block, and the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; based on the judgment result of whether the data block meets the compression condition, compressing the at least one data block to obtain compressed data aiming at the audio signal; generating compression characteristic data representing whether the at least one data block in the audio signal is subjected to compression processing or not based on a judgment result of whether the data block meets a compression condition or not; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal
A transmitter for transmitting compressed data for the audio signal; and for transmitting compressed feature data for the audio signal.
A fourth aspect of the embodiments of the present invention provides a signal decompression apparatus, including:
the receiver is used for acquiring compressed data for the audio signal, wherein the compressed data is obtained by compressing at least one data block in the audio signal based on the judgment result of whether the data block in the audio signal meets the requirement of the compressed signal; the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; the audio signal processing device is further configured to acquire compression feature data for the audio signal, where the compression feature data is feature data that characterizes whether the at least one data block in the audio signal is subjected to compression processing;
and the processor is used for decompressing the compressed data based on the compressed characteristic data of the audio signal to obtain the audio signal.
A fifth aspect of an embodiment of the present invention provides a signal compression apparatus, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is operable to perform the steps of the signal compression method described above when executing the computer program.
A sixth aspect of the embodiments of the present invention provides a signal decompression apparatus, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is adapted to perform the steps of the signal decompression method described above when executing the computer program.
A seventh aspect of the embodiments of the present invention provides a first computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the signal compression method described above.
An eighth aspect of the embodiments of the present invention provides a second computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the signal decompression method described above.
The signal compression method, the signal decompression method and the device thereof in the embodiment of the invention can represent whether the data block in the audio signal is compressed or not by using the compression characteristic data, so that the receiving end can conveniently decompress the compression data based on the compression characteristic data to obtain the audio signal, the compression mode is simplified, and a foundation is laid for ensuring low delay of data transmission and low loss of tone quality.
Drawings
FIG. 1 is a schematic diagram of a signal compression method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a correspondence relationship between data blocks and compressed feature data in a signal compression method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a signal compression method according to an embodiment of the present invention in a specific implementation process;
FIG. 4 is a schematic diagram of a signal compression apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a structure of a signal decompression apparatus according to an embodiment of the present invention.
Detailed Description
To ensure low latency, the raw data of the PCM waveform is typically sent directly and continuously in units of one small piece of data. In this case, if the MP3 compression algorithm is used, although the compression rate is good, it will cause distortion of PCM waveform, and further affect the recognition rate, and since the MP3 compression algorithm uses frames as units, and the number of samples loaded in each Frame is a fixed value, it is not suitable for compressing small pieces of data in a speech scene; while lossless compression algorithms, such as zip, generally have poor compression rates on small pieces of data. Thus, existing compression algorithms are not optimized for speech characteristics. Therefore, to solve the above problems, embodiments of the present invention provide a signal compression method, a signal decompression method, and apparatuses thereof. So that the manner in which the features and aspects of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
Example one
The present embodiment provides a signal compression method, where the method is applied to a signal compression apparatus, and specifically, fig. 1 is a schematic flow chart of an implementation of the signal compression method according to the embodiment of the present invention; as shown in fig. 1, the method includes:
step 101: the method comprises the steps that a signal compression device obtains at least one data block, wherein the at least one data block is obtained after an audio signal to be compressed is subjected to block processing;
that is to say, before compressing an audio signal to be compressed, the signal compression apparatus needs to perform block processing on the audio signal to obtain at least one data block; here, in practical applications, the size of the data block may be determined according to practical situations, and this embodiment is not limited to this.
Step 102: the signal compression device compresses at least one data block based on the judgment result of whether the data block meets the compression condition to obtain compressed data aiming at the audio signal, and sends the compressed data aiming at the audio signal;
in a specific embodiment, whether the data block meets the compression condition is judged, and when the data block meets the compression condition is determined, the data block meeting the compression condition is compressed, and the data block not meeting the compression condition is not compressed, that is, in the embodiment, only the data block meeting the compression condition is compressed, and the data block not meeting the compression condition is not compressed, so that the compression algorithm is simplified, and a foundation is laid for ensuring low delay of data transmission and low loss of tone quality.
Further, the signal compression apparatus needs to determine all data blocks obtained after the audio signal is subjected to the block processing, and compress the data blocks that satisfy the compression condition among all the data blocks, and not compress the data blocks that do not satisfy the compression condition, so as to obtain the compressed data for the audio signal.
Step 103: the signal compression device generates compression characteristic data representing whether the at least one data block in the audio signal is compressed or not based on the judgment result of whether the data block meets the compression condition or not, and sends the compression characteristic data aiming at the audio signal; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal.
That is, after the signal decompression device acquires the compressed data for the audio signal and the compressed feature data for the audio signal, the signal decompression device can decompress the compressed data according to the compressed feature data and further decompress the compressed data to obtain the audio signal. Specifically, the signal decompression device acquires compressed data for an audio signal, where the compressed data is obtained by compressing at least one data block in the audio signal based on a determination result of whether the data block in the audio signal satisfies the compressed signal; the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; acquiring compression characteristic data aiming at the audio signal, wherein the compression characteristic data is characteristic data for representing whether the at least one data block in the audio signal is subjected to compression processing or not; and then based on the compression characteristic data of the audio signal, carrying out decompression processing on the compression data to obtain the audio signal.
In a specific embodiment, the compressed data for the audio signal and the compressed feature data for the audio signal may be sent as target compressed data for the audio signal, so that a receiving end, such as a signal decompression device, can decompress the compressed data of the audio signal based on the compressed feature data in the target compressed data after acquiring the target compressed data, so as to obtain the audio signal.
That is, in this embodiment, the compressed data and the compressed feature data of the audio signal may be sent out as a whole data in one or more times by one data packet or multiple data packets; or, the compressed data and the compressed feature data of the audio signal are not an integral data, and are sent out once or multiple times through the same data packet or through different data packets, which is not limited in this embodiment.
In a particular embodiment, the identification information may be employed to characterize whether the data block is compressed; specifically, the signal compression device generates identification information representing whether the data block is compressed or not based on a judgment result of whether the data block meets a compression condition or not, wherein the identification information corresponds to the data block, and whether the data block corresponding to the identification information is compressed or not can be determined by using the identification information; and generating compression feature data for the audio signal based on the identification information corresponding to the at least one data block, where the compression feature data includes identification information of all data blocks corresponding to the audio signal, for example, so that whether the data block corresponding to the identification information is compressed can be determined by the identification information in the compression feature data.
Correspondingly, after the signal decompression device acquires the compression characteristic data, identification information for representing whether the data block in the compression data is compressed or not can be acquired based on the compression characteristic data; and then determining whether to decompress the data blocks in the compressed data corresponding to the identification information according to the identification information so as to finally decompress to obtain the audio signal.
Here, the identification information corresponding to the data block can be implemented in two ways:
the first method is as follows: the data blocks correspond to the identification information represented by the compressed feature data one to one, that is, one data block corresponds to one identification information, for example, if the audio signal corresponds to 16 data blocks, there are 16 identification information, and each identification information corresponds to one data block. In practical applications, the identification information may use different values to identify whether the data block is compressed, for example, 0 indicates uncompressed, 1 indicates compressed, etc.
The second method comprises the following steps: the data blocks which meet the compression conditions correspond to the first identification information represented by the compression characteristic data, and the data blocks which do not meet the compression conditions correspond to the second identification information represented by the compression characteristic data; the first identification information is different from the second identification information. For example, the compressed feature data includes at most two identification information, namely a first identification information (for example, 1) and a second identification information (for example, 0), where each of the identification information corresponds to one or more data blocks, that is, the identification information does not correspond to the data blocks, but corresponds to one or more data blocks.
Of course, in practical application, the corresponding relationship between the identification information and the data block may also take other forms, which is not limited in this embodiment.
Therefore, the method according to the embodiment of the invention represents whether the data block in the audio signal is compressed or not by using the compression characteristic data, so that the receiving end can conveniently decompress the compression data based on the compression characteristic data to obtain the audio signal, the compression mode is simplified, and a foundation is laid for ensuring low delay of data transmission and low loss of tone quality.
Example two
Based on the method described in the first embodiment, the present embodiment provides a fast lossless compression method in consideration of the data characteristics of the PCM waveform in the speech scene. Specifically, in the voice service, the data of the PCM waveform often includes more quiet periods (such as the non-question period of the user), and even if the amplitude of the whole audio is not high (especially in the far-field speech scene) in the speaking stage (such as the question period), these characteristics make a large amount of data in the collected data of the PCM waveform have only a small amplitude, so that the present embodiment compresses the audio data by deleting bits that are not used in the quantization of the small-amplitude data, thereby achieving the purpose of fast lossless compression.
Specifically, in a specific example, the data block includes at least two sampling data satisfying a preset data condition; at this time, the signal compression apparatus may determine whether the data block satisfies the compression condition by determining whether the sampled data in the data block satisfies a preset data characteristic, where the preset data characteristic represents that a preset bit in the sampled data is a preset value. For example, after the sampling data is determined to meet the preset data characteristics, the data block corresponding to the sampling data meeting the preset data characteristics is considered to meet the compression conditions, and at the moment, the data block corresponding to the sampling data meeting the preset data characteristics is compressed; and after the sampling data are determined not to meet the preset data characteristics, the data blocks corresponding to the sampling data which do not meet the preset data characteristics are also considered not to meet the compression conditions, and at the moment, the data blocks corresponding to the sampling data which meet the preset data characteristics are not compressed.
Further, in a specific example, the compression processing may be performed in a manner that, after determining that the sampled data in the data block satisfies the preset data characteristic, the signal compression apparatus deletes a preset value corresponding to a preset bit in the sampled data to obtain first sub-compressed data corresponding to the sampled data, further obtains second sub-compressed data corresponding to the data block based on the first sub-compressed data corresponding to the sampled data in the data block, and finally uses the second sub-compressed data corresponding to the at least one data block as the compressed data of the audio signal. In this way, the compression process of the audio signal is completed.
Correspondingly, in the process of decompressing the audio signal compressed according to the above manner, the signal decompression device may determine, based on the identification information, that the data block in the compressed data corresponding to the identification information is decompressed, add a preset value to a preset bit of the sample data corresponding to the data block in the compressed data, to obtain decompressed sample data, and then obtain the decompressed data block based on the decompressed sample data, so as to complete the process of decompressing the data block in the compressed data, and obtain the audio signal.
The embodiments of the present invention are described in further detail below with reference to specific examples; specifically, the voice device collects data of a PCM waveform, which is generally small-amplitude data in which some quantization bits are not used; here, taking 16-bit quantization as an example, at this time, a large amount of data in the acquired PCM waveform data only uses the lower 8 bits, and the upper 8 bits are fixed 0x00 or 0xFF, so that the PCM waveform data can be compressed by deleting the 0x00 or 0xFF corresponding to the upper 8 bits, and whether the 0x00 or 0xFF corresponding to the upper 8 bits is deleted is marked in the byte of bitmap, that is, whether the data block is compressed is recorded by using bitmap. Further, the bitmap bytes are stored or transmitted together with the compressed data. The compressed data can be recovered under the direction of bitmap bytes during decompression.
Specifically, the present embodiment may set the size of a data block (block), perform block processing on data of a PCM waveform to be compressed to obtain multiple blocks, and determine whether to compress the PCM waveform by using one block as a unit, instead of determining whether to compress the PCM waveform by using one byte.
Here, the block includes a plurality of samples, for example, it is assumed that one block includes 16 samples, and one sample includes two bytes, as shown in fig. 2, 16 samples are 3400, 3800, 3600, 3300, 2800, 2300, 1E 00, 1600, 0500, F8 FF, F9 FF, E2 FF, E1 FF, DA FF, D6 FF, and F2 FF, and the 16 samples correspond to 32 bytes. In a specific example, one bitmap holds 8 bits, and each bit may adopt 0 or 1 to indicate whether the corresponding block is compressed, such as 1 to indicate compression and 0 to indicate no compression. At this time, one bitmap corresponds to 8 × 16 ═ 128 (i.e., 256 bytes) samples, that is, one bitmap records whether data of 128 samples is compressed or not.
Here, in this example, the criterion for determining whether block satisfies the compression condition is: judging whether the high 8bit in the sample is 0x00 or 0 xFF; further, if it is determined that 8 bits of all samples in the block are 0x00 or 0xFF, the block is considered to satisfy the compression condition.
Further, the block meeting the compression condition is compressed, and as shown in fig. 2, the compression algorithm of this embodiment directly deletes the high 8bit, that is, directly deletes the 0x00 or 0xFF corresponding to the high 8bit, so as to obtain the compressed block.
Correspondingly, during decompression, for the compressed block, if the highest bit of the low 8bit is 0, the high 8bit is recovered to 0x 00; if the highest bit of the lower 8 bits is 1, the higher 8 bits are restored to 0 xFF.
Specifically, fig. 3 is a schematic flow chart of the signal compression method in the embodiment of the present invention in a specific implementation process, and as shown in fig. 3, after a plurality of blocks corresponding to an audio signal to be compressed are obtained, a bitmap is created; reading an uncompressed block, judging whether the uncompressed block meets a compression condition, if so, performing compression processing, and writing an identifier in a bitmap, otherwise, copying the uncompressed block, and writing an identifier in the bitmap; further, whether the bitmap is full, for example, whether 8 bits are written, is judged, if yes, a bitmap is newly created, and if not, an uncompressed block is read until all the uncompressed blocks are directly read.
In practical application, the voice scene described in this embodiment may specifically be an Artificial Intelligence (AI) voice scene; correspondingly, the audio data may be PCM waveform data in an AI voice scene.
In this way, the embodiment of the invention realizes data compression by directly deleting the data meeting the conditions in the sampled data, and whether each data block is compressed can be marked by one bit, so the compression algorithm is simple, the compression and the decompression can be rapidly carried out byte by byte, and extremely low delay is realized; in addition, since the embodiment of the invention deletes the data in the quiet time period after analyzing the voice scene, the compression method of the embodiment of the invention has no voice quality loss and is more suitable for small-scale data compression. Therefore, compared with the zip and MP3 compression methods, the present embodiment satisfies the requirements of low delay and low loss of sound quality, and is more suitable for speech scenes.
EXAMPLE III
The present embodiment provides a signal compression apparatus, as shown in fig. 4, the apparatus including:
a processor 41, configured to obtain at least one data block, where the at least one data block is obtained after performing block processing on an audio signal to be compressed; based on the judgment result of whether the data block meets the compression condition, compressing the at least one data block to obtain compressed data aiming at the audio signal; generating compression characteristic data representing whether the at least one data block in the audio signal is subjected to compression processing or not based on a judgment result of whether the data block meets a compression condition or not; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal
A transmitter 42 for transmitting compressed data for the audio signal; and for transmitting compressed feature data for the audio signal.
In a specific embodiment, the processor 41 is further configured to:
generating identification information representing whether the data block is compressed or not based on a judgment result of whether the data block meets the compression condition or not, wherein the identification information corresponds to the data block, and whether the data block corresponding to the identification information is compressed or not can be determined by utilizing the identification information;
and generating compression characteristic data for the audio signal based on the corresponding identification information of the at least one data block.
In another specific embodiment, the data blocks correspond to the identification information represented by the compressed feature data one by one; alternatively, the first and second electrodes may be,
the data blocks which meet the compression conditions correspond to the first identification information represented by the compression characteristic data, and the data blocks which do not meet the compression conditions correspond to the second identification information represented by the compression characteristic data; the first identification information is different from the second identification information.
In another specific embodiment, the data block includes at least two sampling data satisfying a predetermined data condition; correspondingly, the processor is further configured to determine whether the sampled data in the data block satisfies a preset data characteristic, and determine whether the data block satisfies a compression condition based on the determination result, where the preset data characteristic represents that a preset bit in the sampled data is a preset value.
In another specific embodiment, the processor 41 is further configured to:
after the sampling data in the data block is determined to meet the preset data characteristics, deleting preset values corresponding to preset bits in the sampling data to obtain first sub-compressed data corresponding to the sampling data;
obtaining second sub-compressed data corresponding to the data block based on first sub-compressed data corresponding to the sampling data in the data block;
and taking the second sub-compressed data corresponding to the at least one data block as compressed data of the audio signal.
An embodiment of the present invention further provides a signal compression apparatus, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is operable to perform the steps of the signal compression method described above when executing the computer program.
Here, it should be noted that: the above description of the embodiment of the apparatus is similar to the above description of the embodiment of the method, and has similar beneficial effects to the embodiment of the method, and therefore, the description thereof is omitted. For technical details that are not disclosed in the embodiments of the apparatus of the present invention, please refer to the description of the embodiments of the method of the present invention for understanding, and therefore, for brevity, will not be described again.
Example four
The present embodiment provides a signal decompression apparatus, as shown in fig. 5, the apparatus including:
a receiver 51, configured to acquire compressed data for an audio signal, where the compressed data is obtained by compressing at least one data block in the audio signal based on a determination result of whether the data block in the audio signal satisfies a compressed signal; the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; the audio signal processing device is further configured to acquire compression feature data for the audio signal, where the compression feature data is feature data that characterizes whether the at least one data block in the audio signal is subjected to compression processing;
and the processor 52 is configured to decompress the compressed data based on the compressed feature data of the audio signal to obtain the audio signal.
In a specific embodiment, the processor 52 is further configured to:
obtaining identification information representing whether a data block in the compressed data is compressed or not based on the compressed feature data;
and determining whether to decompress the data blocks in the compressed data corresponding to the identification information according to the identification information to obtain the audio signal.
In another specific embodiment, the data block corresponding to the audio signal includes at least two pieces of sample data satisfying a preset data condition, and whether to compress the data block is determined based on whether the sample data in the data block corresponding to the audio signal satisfies a preset data characteristic; the preset data characteristics represent that preset bits of sampling data in a data block corresponding to the audio signal are preset values; in a corresponding manner, the first and second electrodes are,
the processor 52 is further configured to:
determining to decompress the data blocks in the compressed data corresponding to the identification information based on the identification information, and adding preset values to preset bits of sampling data corresponding to the data blocks in the compressed data to obtain decompressed sampling data;
and obtaining a decompressed data block based on the decompressed sampling data so as to complete the decompression process of the data block in the compressed data and obtain the audio signal.
An embodiment of the present invention further provides a signal decompression apparatus, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is adapted to perform the steps of the signal decompression method described above when executing the computer program.
Here, it should be noted that: the above description of the embodiment of the apparatus is similar to the above description of the embodiment of the method, and has similar beneficial effects to the embodiment of the method, and therefore, the description thereof is omitted. For technical details that are not disclosed in the embodiments of the apparatus of the present invention, please refer to the description of the embodiments of the method of the present invention for understanding, and therefore, for brevity, will not be described again.
Further, the present invention also provides a first computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the signal compression method described above.
Embodiments of the present invention further provide a second computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the signal decompression method described above.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A method of signal compression, the method comprising:
acquiring at least one data block, wherein the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; the data block comprises at least two sampling data meeting preset data characteristics; judging whether the sampled data in the data block meets preset data characteristics or not, and determining whether the data block meets compression conditions or not based on the judgment result of whether the data block meets the preset data characteristics or not, wherein the preset data characteristics represent that preset bits in the sampled data are preset values;
based on the judgment result of whether the data block meets the compression condition, compressing the at least one data block to obtain compressed data aiming at the audio signal, and sending the compressed data aiming at the audio signal;
generating compression characteristic data representing whether at least one data block in the audio signal is compressed or not based on a judgment result of whether the data block meets a compression condition or not, and sending the compression characteristic data aiming at the audio signal; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal.
2. The method of claim 1, further comprising:
generating identification information representing whether the data block is compressed or not based on a judgment result of whether the data block meets the compression condition or not, wherein the identification information corresponds to the data block, and whether the data block corresponding to the identification information is compressed or not can be determined by utilizing the identification information;
and generating compression characteristic data for the audio signal based on the corresponding identification information of the at least one data block.
3. The method of claim 2, wherein the data blocks correspond one-to-one with identification information characterized by the compressed feature data; alternatively, the first and second electrodes may be,
the data blocks which meet the compression conditions correspond to the first identification information represented by the compression characteristic data, and the data blocks which do not meet the compression conditions correspond to the second identification information represented by the compression characteristic data; the first identification information is different from the second identification information.
4. The method of claim 1, further comprising:
after the sampling data in the data block is determined to meet the preset data characteristics, deleting preset values corresponding to preset bits in the sampling data to obtain first sub-compressed data corresponding to the sampling data;
obtaining second sub-compressed data corresponding to the data block based on first sub-compressed data corresponding to the sampling data in the data block;
and taking the second sub-compressed data corresponding to the at least one data block as compressed data of the audio signal.
5. A method of signal decompression, the method comprising:
acquiring compressed data for an audio signal, wherein the compressed data is obtained by compressing at least one data block in the audio signal based on a judgment result of whether the data block in the audio signal meets the requirement of the compressed signal; the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; the data block corresponding to the audio signal comprises at least two pieces of sampling data meeting preset data characteristics, and whether to compress the data block is determined based on whether the sampling data in the data block corresponding to the audio signal meets the preset data characteristics; the preset data characteristics represent that preset bits of sampling data in a data block corresponding to the audio signal are preset values;
acquiring compression characteristic data aiming at the audio signal, wherein the compression characteristic data is characteristic data which represents whether the at least one data block in the audio signal is subjected to compression processing or not;
and decompressing the compressed data based on the compressed characteristic data of the audio signal to obtain the audio signal.
6. The method of claim 5, further comprising:
obtaining identification information representing whether a data block in the compressed data is compressed or not based on the compressed feature data;
and determining whether to decompress the data blocks in the compressed data corresponding to the identification information according to the identification information to obtain the audio signal.
7. The method of claim 5, further comprising:
determining to decompress the data blocks in the compressed data corresponding to the identification information based on the identification information, and adding preset values to preset bits of sampling data corresponding to the data blocks in the compressed data to obtain decompressed sampling data;
and obtaining a decompressed data block based on the decompressed sampling data so as to complete the decompression process of the data block in the compressed data and obtain the audio signal.
8. A signal compression apparatus, the apparatus comprising:
the device comprises a processor and a control unit, wherein the processor is used for acquiring at least one data block, and the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; the data block comprises at least two sampling data meeting preset data characteristics; judging whether the sampled data in the data block meets preset data characteristics or not, and determining whether the data block meets compression conditions or not based on a judgment result, wherein the preset data characteristics represent that preset bits in the sampled data are preset values; based on the judgment result of whether the data block meets the compression condition, compressing the at least one data block to obtain compressed data aiming at the audio signal; generating compression characteristic data representing whether the at least one data block in the audio signal is subjected to compression processing or not based on a judgment result of whether the data block meets a compression condition or not; wherein the compressed data can be decompressed based on the compressed characteristic data to obtain the audio signal;
a transmitter for transmitting compressed data for the audio signal; and for transmitting compressed feature data for the audio signal.
9. A signal decompression apparatus, characterized in that the apparatus comprises:
the receiver is used for acquiring compressed data for the audio signal, wherein the compressed data is obtained by compressing at least one data block in the audio signal based on the judgment result of whether the data block in the audio signal meets the requirement of the compressed signal; the at least one data block is obtained after the audio signal to be compressed is subjected to block processing; the data block corresponding to the audio signal comprises at least two pieces of sampling data meeting preset data characteristics, and whether to compress the data block is determined based on whether the sampling data in the data block corresponding to the audio signal meets the preset data characteristics; the preset data characteristics represent that preset bits of sampling data in a data block corresponding to the audio signal are preset values; the audio signal processing device is further configured to acquire compression feature data for the audio signal, where the compression feature data is feature data that characterizes whether the at least one data block in the audio signal is subjected to compression processing;
and the processor is used for decompressing the compressed data based on the compressed characteristic data of the audio signal to obtain the audio signal.
CN201710908567.2A 2017-09-29 2017-09-29 Signal compression method, signal decompression method and device thereof Active CN107680607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710908567.2A CN107680607B (en) 2017-09-29 2017-09-29 Signal compression method, signal decompression method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710908567.2A CN107680607B (en) 2017-09-29 2017-09-29 Signal compression method, signal decompression method and device thereof

Publications (2)

Publication Number Publication Date
CN107680607A CN107680607A (en) 2018-02-09
CN107680607B true CN107680607B (en) 2021-05-18

Family

ID=61139359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710908567.2A Active CN107680607B (en) 2017-09-29 2017-09-29 Signal compression method, signal decompression method and device thereof

Country Status (1)

Country Link
CN (1) CN107680607B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741391A (en) * 2008-11-19 2010-06-16 中国科学院微电子研究所 Method for optimizing memory space during MP3 audio decoding by fixed-point DSP
CN101796579A (en) * 2007-07-06 2010-08-04 法国电信公司 The hierarchical coding of digital audio and video signals
JP2010262703A (en) * 2009-05-08 2010-11-18 Panasonic Corp Data discriminating device of linear pcm audio data and compressed encoded data
CN103050123A (en) * 2011-10-17 2013-04-17 多玩娱乐信息技术(北京)有限公司 Method and system for transmitting voice information
CN106302245A (en) * 2015-06-08 2017-01-04 ***通信集团公司 The compression method of packet and device in a kind of LTE system
CN107094142A (en) * 2017-04-28 2017-08-25 电信科学技术研究院 A kind of upstream data decompression, the method and apparatus of compression

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101796579A (en) * 2007-07-06 2010-08-04 法国电信公司 The hierarchical coding of digital audio and video signals
CN101741391A (en) * 2008-11-19 2010-06-16 中国科学院微电子研究所 Method for optimizing memory space during MP3 audio decoding by fixed-point DSP
JP2010262703A (en) * 2009-05-08 2010-11-18 Panasonic Corp Data discriminating device of linear pcm audio data and compressed encoded data
CN103050123A (en) * 2011-10-17 2013-04-17 多玩娱乐信息技术(北京)有限公司 Method and system for transmitting voice information
CN106302245A (en) * 2015-06-08 2017-01-04 ***通信集团公司 The compression method of packet and device in a kind of LTE system
CN107094142A (en) * 2017-04-28 2017-08-25 电信科学技术研究院 A kind of upstream data decompression, the method and apparatus of compression

Also Published As

Publication number Publication date
CN107680607A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
US9218820B2 (en) Audio fingerprint differences for end-to-end quality of experience measurement
CN107682752B (en) Method, device and system for displaying video picture, terminal equipment and storage medium
CN103560836A (en) Sound wave wireless communication method and device
US20100324914A1 (en) Adaptive Encoding of a Digital Signal with One or More Missing Values
CN201789600U (en) Interphone
JP2014027658A (en) Compression encoding and decoding method and apparatus
EP3507799A1 (en) Quantizer with index coding and bit scheduling
CN106776663B (en) Audio file compression method and device
CN116800796A (en) Method, device, equipment and medium for transmitting internet of vehicles data
KR20050037431A (en) Signal processing system, signal processing apparatus and method, recording medium, and program
CN112202939A (en) Method, device and storage medium for compressing and decompressing IP address and transmitting and receiving message
CN115552518B (en) Signal encoding and decoding method and device, user equipment, network side equipment and storage medium
CN111865952A (en) Data processing method, data processing device, storage medium and electronic equipment
CN113314133A (en) Audio transmission method and electronic equipment
CN112335203A (en) Processing local area network diagnostic data
CN109725836B (en) User context compression method and device
JP6297933B2 (en) Audio data transmitting apparatus and operation method thereof
CN111885412B (en) HDMI signal screen transmission method and wireless screen transmission device
CN107680607B (en) Signal compression method, signal decompression method and device thereof
CN116170632A (en) Sound compensation method and device
CN109286922B (en) Bluetooth prompt tone processing method, system, readable storage medium and Bluetooth device
CN114244911A (en) Voice analysis method and device, receiving terminal equipment and storage medium
CN108989401B (en) Alarm clock setting method, device, terminal, server and storage medium
US10742231B2 (en) Compression/encoding apparatus and method, decoding apparatus and method, and program
JP2006350090A (en) Client/server speech recognizing method, speech recognizing method of server computer, speech feature quantity extracting/transmitting method, and system and device using these methods, and program and recording medium

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