Mobile operation device with audio and video file efficient compression function
By dynamically adjusting the frame division strategy and combining the time domain and frequency domain signal characteristics, the problem of poor audio signal compression in the existing technology is solved, and more efficient audio signal compression and better data quality are achieved.
Patent Information
- Application Number
- CN202411803372.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
When compressing audio signals in the prior art, fixed-length frame-parting strategies are difficult to effectively capture long-term persistent characteristics and transient characteristics in the audio signals, resulting in poor compression effects and reduced data quality.
By obtaining the time and frequency domain signals of the audio signal, calculate the energy intensity characterization value and merge probability characterization value, dynamically adjust the framing strategy, merge similar frames and reframe them to adapt to the characteristics of the audio signal.
It improves the compression effect of the audio signal, ensures the compressed data quality, and enhances the robustness and adaptability of the MP3 algorithm.
Smart Images

Figure CN119649829A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a mobile operating device with an efficient audio and video file compression function. Background Art
[0002] A mobile working device with an efficient audio and video compression function refers to a mobile device that is integrated with the ability to efficiently compress and store audio and video data, and the mobile working device can collect audio and video data at the work site in real time based on its built-in microphone, camera and other equipment. In addition, an efficient compression algorithm is currently used to compress the collected data, and store it locally or transmit it to a cloud system to facilitate subsequent reading and processing of the audio and video data at any time. The mobile working device is generally used in the fields of audio and video data recording of personnel on-site activities, remote construction monitoring, etc.
[0003] However, in the prior art, MP3 algorithm is usually used to compress audio data collected by mobile working devices. The MP3 refers to the Moving Picture Experts Compression Standard Audio Level 3. However, when using the MP3 algorithm to compress the collected audio signal, the audio signal to be compressed is usually divided into frames of fixed length based on experience. However, this framing strategy may result in poor subsequent compression effect. For example, there are many long-lasting features in music or speech, such as crescendo, diminuendo or chord features. At this time, if a too short fixed length is used for framing, the audio signal with a long-lasting feature may lack the ability to capture, which will cause discontinuity in sound quality at the frame boundary. This phenomenon will lead to poor quality of compressed data, and using a shorter fixed length for framing will increase the amount of calculation during compression and affect the compression efficiency. If too long a fixed length is used for framing, it may cause the fast-changing signal in the audio signal to be smoothed, which will lead to the inability to accurately capture transient characteristics or the loss of certain sound details, resulting in poor quality of compressed data. If too long a fixed length is used for framing, transient characteristic signals such as plosives and fast rhythm changes in the audio will be smoothed. Therefore, how to adaptively frame the audio signal that needs to be compressed to improve the compression effect of the audio signal that needs to be compressed has become an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a mobile operation device with an efficient audio and video file compression function, and the technical solution adopted is as follows:
[0005] An embodiment of the present invention provides a mobile operation device with an efficient audio and video file compression function, including:
[0006] A first acquisition module is used to acquire the audio signal to be compressed collected by the mobile operation device during the working period, wherein the horizontal coordinate value of the data point on the audio signal to be compressed is time, and the vertical coordinate value is amplitude;
[0007] a second acquisition module, configured to perform initial framing of the audio signal to be compressed according to a preset unit time length, obtain each unit audio signal frame on the audio signal to be compressed, and obtain an energy intensity representation value of each unit audio signal frame according to data points in each unit audio signal frame;
[0008] A third acquisition module is used to acquire the frequency domain signal of the unit audio signal frame, and obtain a merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signal and the energy intensity representation value of the unit audio signal frame;
[0009] a fourth acquisition module, configured to merge the unit audio signal frames on the audio signal to be compressed according to the merging probability representation value between the two adjacent unit audio signal frames to obtain each initial audio signal frame on the audio signal to be compressed, and obtain a division quantity representation value between the two adjacent initial audio signal frames on the audio signal to be compressed according to the two adjacent initial audio signal frames on the audio signal to be compressed, and re-frame the audio signal to be compressed according to the division quantity representation value to obtain each target audio signal frame on the audio signal to be compressed;
[0010] The data compression module is used to compress each target audio signal frame using the MP3 algorithm to obtain compressed data.
[0011] Beneficial effects: The present invention includes a first acquisition module for acquiring an audio signal to be compressed collected by a mobile operating device during a working period; a second acquisition module for initially dividing the audio signal to be compressed into frames according to a preset unit time length, obtaining each unit audio signal frame on the audio signal to be compressed, and obtaining an energy intensity representation value of each unit audio signal frame according to data points in each unit audio signal frame; a third acquisition module for acquiring a frequency domain signal of a unit audio signal frame, and obtaining a merging probability between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signal and the energy intensity representation value of the unit audio signal frame. rate characterization value; a fourth acquisition module, for merging the unit audio signal frames on the audio signal to be compressed according to the merging probability characterization value between two adjacent unit audio signal frames, to obtain each initial audio signal frame on the audio signal to be compressed, and for obtaining the division quantity characterization value between two adjacent initial audio signal frames on the audio signal to be compressed, and for re-framing the audio signal to be compressed according to the division quantity characterization value, to obtain each target audio signal frame on the audio signal to be compressed; a data compression module, for compressing each target audio signal frame respectively using the MP3 algorithm to obtain compressed data. And the adaptive framing strategy provided in the present invention can not only improve the compression effect when the MP3 algorithm is used for subsequent compression, but also ensure the robustness and adaptability of the MP3 algorithm when compressing the audio signal to be compressed. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 The present invention is a structural block diagram of a mobile operation device with an efficient audio and video file compression function. DETAILED DESCRIPTION
[0014] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the embodiments of the present invention.
[0015] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0016] This embodiment provides a mobile operation device with an efficient audio and video file compression function, which is described in detail as follows:
[0017] like Figure 1 As shown, the present embodiment provides a mobile operation device with an efficient audio and video file compression function, including:
[0018] The first acquisition module 01 is used to acquire the audio signal to be compressed collected by the mobile operation device during the working period, wherein the horizontal coordinate value of the data point on the audio signal to be compressed is time, and the vertical coordinate value is amplitude.
[0019] The present embodiment mainly compresses the audio signals collected by the mobile working device with the function of efficiently compressing audio and video files, and it is implemented by using the MP3 algorithm. Moreover, when using the MP3 algorithm to compress the audio signals collected by the mobile working device with the function of efficiently compressing audio and video files, the purpose of improving the compression effect is achieved by adaptively framing the audio signals to be compressed. That is, the present embodiment mainly optimizes the framing strategy to ensure the robustness and adaptability of the MP3 algorithm when compressing the audio signals to be compressed, thereby improving the working performance of the mobile working device in the usage scenario. In addition, the present embodiment only analyzes and describes the framing compression process of the audio signals collected by a mobile working device, that is, the mobile working device that appears subsequently is the same mobile working device.
[0020] First, this embodiment obtains the audio signal collected by the mobile working device with the function of efficiently compressing audio and video files during the working time period, and records it as the audio signal to be compressed, which is a time domain signal; then, the audio signal to be compressed is sampled from the starting position on the audio signal to be compressed, and the sampling position is recorded as the sampling point on the audio signal to be compressed, and all the sampling points on the audio signal to be compressed are recorded as data points, and the horizontal axis value of the data point on the audio signal to be compressed is time, and the vertical axis value is amplitude.
[0021] In this embodiment, the implementer needs to determine the working time period according to the actual working situation. For example, the working time period in this embodiment refers to the time period when the mobile working device last worked. For example, if the last working start time of the mobile working device is t1, and the last working end time of the mobile working device is t2, then the time period formed by t1 to t2 is the working time period in this embodiment; and in specific applications, the implementer also needs to set the time interval between adjacent sampling points on the audio signal to be compressed according to the actual situation. For example, in this embodiment, the time interval between adjacent sampling points can be set to 1 millisecond.
[0022] In addition, the mobile operation device with efficient compression function of audio and video files in this embodiment is mainly composed of an audio and video acquisition device and its matching hat, and the connection between the two is mainly fixed by buckles and slides, so as to facilitate disassembly, maintenance and replacement; wherein, the audio and video acquisition device is mainly composed of a camera module, a microphone module, a data cache module, an audio data analysis and processing module, a storage module, a transmission module, a power module, etc. Moreover, during the operation of the mobile operation device, the microphone module and the camera module will be used to collect audio and video data, and the collected data will be stored in the cache module first, and the cache module will transmit the collected audio and video data to the analysis and processing module for analysis and compression processing, and the analysis and processing module has the function of audio data analysis and compression, and the data after analysis and compression processing will be transmitted to the storage module for storage, and at the same time, the device can compress the collected audio and video data according to the demand, and then transmit it to the remote terminal through the transmission module of the mobile operation device, so as to facilitate remote monitoring and viewing operations; based on the above analysis, it can be seen that the mobile operation device can collect audio and video, but this embodiment mainly describes the analysis and compression process of the collected audio signal, and mainly describes the frame division strategy in the compression process.
[0023] Therefore, this embodiment can obtain the audio signal to be compressed collected by the mobile working device during the working period through the above process.
[0024] The second acquisition module 02 is used to perform initial framing on the audio signal to be compressed according to a preset unit time length to obtain each unit audio signal frame on the audio signal to be compressed, and obtain an energy intensity representation value of each unit audio signal frame according to data points in each unit audio signal frame.
[0025] When the MP3 algorithm is currently used to compress audio signals, it is usually based on experience to divide the audio signals to be compressed into frames of fixed length. However, this framing strategy may lead to poor compression effect. For example, there are many long-lasting features in music or speech, such as crescendo, diminuendo or chords. At this time, if a too short fixed length is used for framing, the audio signal with long-lasting features may lack the ability to capture, resulting in discontinuity or uneven sound quality at the frame boundary. This phenomenon will lead to poor quality of compressed data, and using a shorter fixed length for framing will increase The amount of calculation during compression affects the compression efficiency. If a fixed length that is too long is used for framing, the rapidly changing signal in the audio signal may be smoothed, which may lead to the inability to accurately capture transient characteristics or the loss of certain sound details, resulting in poor quality of compressed data. If a fixed length that is too long is used for framing, signal characteristics such as plosive sounds and rapid rhythm changes in the audio will be smoothed. In order to achieve the best compression effect as much as possible, this embodiment will adaptively frame the audio signal to be compressed based on the characteristics of the signal to be compressed, thereby improving the compression effect of the audio signal to be compressed when the MP3 algorithm is used to compress the audio signal.
[0026] In order to achieve the purpose of adaptively framing the compressed audio signal, the present embodiment first performs initial framing on the compressed audio signal using a preset unit time length, and then merges the unit audio signal frames on the compressed audio signal by analyzing the data point amplitudes in each unit audio signal frame obtained by the initial framing and the frequency domain signals of the unit audio signal frames, so as to obtain each initial audio signal frame on the audio signal to be compressed. Subsequently, the compressed audio signal is re-framed based on the analysis results of adjacent initial audio signal frames on the compressed audio signal, and the framing result obtained at this time is used as the final framing result, that is, each target audio signal frame on the audio signal to be compressed can be obtained by re-framing the compressed audio signal again, and the framing strategy in the present embodiment can improve the compression rate while improving the continuity of the compressed audio signal, thereby ensuring the stability of the mobile working device in different working environments.
[0027] It can be seen from this that the present embodiment then performs initial framing of the audio signal to be compressed according to the preset unit time length, and records each frame obtained after the initial framing as a unit audio signal frame. Therefore, after the initial framing, each unit audio signal frame on the audio signal to be compressed can be obtained; and in specific applications, the implementer needs to set the preset unit time length according to actual conditions, but the preset unit time length cannot be set too long. For example, the preset unit time length can be set to 10 milliseconds in the present embodiment, then each unit audio signal frame contains 10 milliseconds of audio signal, that is, on the audio signal to be compressed, a unit audio signal frame can be obtained every 10 milliseconds.
[0028] Since the energy intensity characterization value is an important parameter for the subsequent determination of whether to merge the unit audio signal frames, after obtaining the unit audio signal frames, this embodiment will obtain the energy intensity characterization value of each unit audio signal frame on the audio signal to be compressed according to the data points in each unit audio signal frame on the audio signal to be compressed. The specific acquisition process is: for any unit audio signal frame, first obtain the square value of the ordinate value of all data points in the unit audio signal frame, and record it as the square value of the ordinate of the corresponding data point, and then obtain the average of the square values of the ordinates of all data points in the unit audio signal frame, and record it as the energy intensity characterization value of the unit audio signal frame.
[0029] Therefore, this embodiment can obtain the energy intensity representation value of each unit audio signal frame through the above process, and the energy intensity representation value of the unit audio signal frame represents the overall energy intensity of the audio signal segment in the corresponding unit audio signal frame.
[0030] The third acquisition module 03 is used to acquire the frequency domain signal of the unit audio signal frame, and obtain the merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signal and the energy intensity representation value of the unit audio signal frame.
[0031] After obtaining the energy intensity characterization value of the unit audio signal frame, the present embodiment then performs short-time Fourier transform (STFT) on each unit audio signal frame to obtain a frequency domain signal of each unit audio signal frame, wherein the horizontal axis of the frequency domain signal is the frequency and the vertical axis is the amplitude; and the process of transforming the time domain signal to obtain the frequency domain signal is a well-known technology, so this embodiment will not be described in detail; in addition, it should be noted that in the time domain signal, the amplitude of the signal represents the waveform of the signal changing with time, and the amplitude of the time domain signal takes time as the independent variable, describing the waveform of the signal changing with time, the horizontal axis is time, and the vertical axis is the amplitude, while in the frequency domain signal, the amplitude of the signal describes the component distribution of the signal in frequency, and the amplitude of the frequency domain signal takes frequency as the independent variable, describing the component distribution of the signal in frequency, the horizontal axis is frequency, and the vertical axis is amplitude.
[0032] After obtaining the energy intensity representation value and frequency domain signal of the unit audio signal frame, the present embodiment will analyze the energy intensity difference and frequency difference between adjacent unit audio signal frames based on the obtained energy intensity representation value and frequency domain signal, so as to obtain the merging probability representation value between two adjacent unit audio signal frames, that is, the present embodiment will obtain the merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signal and energy intensity representation value of each unit audio signal frame on the audio signal to be compressed, and the merging probability representation value is an important indicator for the subsequent merging of unit audio signal frames; then the specific process of obtaining the merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed is:
[0033] First, according to the frequency domain signals of each unit audio signal frame on the audio signal to be compressed, a signal frequency difference representation value between two adjacent unit audio signal frames on the audio signal to be compressed is obtained; then, according to the energy intensity representation value of each unit audio signal frame on the audio signal to be compressed, an energy intensity table difference representation value between two adjacent unit audio signal frames on the audio signal to be compressed is obtained; finally, according to the signal frequency difference representation value and the energy intensity table difference representation value between two adjacent unit audio signal frames on the audio signal to be compressed, a merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed is obtained; and for ease of understanding, this embodiment will be described below by taking the acquisition process of the merging probability representation value between the i-th unit audio signal frame on the audio signal to be compressed and the i+1-th unit audio signal frame on the audio signal to be compressed as an example, that is, the acquisition process of the merging probability representation value between the i-th unit audio signal frame on the audio signal to be compressed and the i+1-th unit audio signal frame on the audio signal to be compressed is, and i is not equal to the total number of unit audio signal frames on the audio signal to be compressed:
[0034] First, a function is used to negatively correlate the energy intensity table difference representation values between the i-th unit audio signal frame and the i+1-th unit audio signal frame, and the mapping result is recorded as the first mapping value; a function is used to negatively correlate the signal frequency difference representation values between the i-th unit audio signal frame and the i+1-th unit audio signal frame, and the mapping result is recorded as the second mapping value; then, the average of the first mapping value and the second mapping value is obtained, and the average of the first mapping value and the second mapping value is recorded as the merged probability representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame.
[0035] In this embodiment, in order to facilitate the understanding of the process of obtaining the signal frequency difference representation value between two adjacent unit audio signal frames, this embodiment will take the process of obtaining the signal frequency difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame on the audio signal to be compressed as an example for description, that is, the process of obtaining the signal frequency difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame is:
[0036] First, the frequency domain signal of the i-th unit audio signal frame and the frequency domain signal of the i+1-th unit audio signal frame are respectively recorded as the first frequency domain signal and the second frequency domain signal; then, all frequencies with amplitudes not equal to 0 are obtained on the first frequency domain signal, and the set constructed by all frequencies with amplitudes not equal to 0 obtained on the first frequency domain signal is recorded as the first set; then, all frequencies with amplitudes not equal to 0 are obtained on the second frequency domain signal, and the set constructed by all frequencies with amplitudes not equal to 0 obtained on the second frequency domain signal is recorded as the second set; then, the union of the first set and the second set is obtained, and recorded as the third set.
[0037] After obtaining the third set, the target amplitude pairs corresponding to each frequency in the third set are obtained, and the absolute value of the difference between the two target amplitudes in the target amplitude pair corresponding to each frequency is recorded as the amplitude difference value corresponding to the corresponding frequency, and then the cumulative sum of the amplitude difference values corresponding to all frequencies in the third set is obtained, and the cumulative sum is recorded as the signal frequency difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame; in addition, the first target amplitude in the target amplitude pair corresponding to any frequency a in the third set refers to the normalized value of the amplitude corresponding to the frequency equal to the frequency a located on the first frequency domain signal, the second target amplitude in the target amplitude pair corresponding to the frequency a refers to the normalized value of the amplitude corresponding to the frequency equal to the frequency a located on the second frequency domain signal, and the amplitude difference value corresponding to the frequency a is the absolute value of the difference between the two target amplitudes in the target amplitude pair corresponding to the frequency a.
[0038] In this embodiment, the specific process of obtaining the energy intensity table difference representation value between two adjacent unit audio signal frames on the audio signal to be compressed is: for the i-th unit audio signal frame and the i+1-th unit audio signal frame on the audio signal to be compressed: obtain the absolute value of the difference between the energy intensity representation value of the i-th unit audio signal frame and the energy intensity representation value of the i+1-th unit audio signal frame, and record it as the energy intensity table difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame.
[0039] In addition, in this embodiment, the specific expression for obtaining the combined probability representation value between the i-th unit audio signal frame and the (i+1)-th unit audio signal frame is:
[0040]
[0041] Wherein, P(i,i+1) is the combined probability representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame, exp() is an exponential function with a constant e as the base, and the exp(-) function is mainly used for negative correlation mapping, N i is the energy intensity representation value of the i-th unit audio signal frame, N i+1 is the energy intensity representation value of the i+1th unit audio signal frame, |N i -N i+1 | is the energy intensity difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame, and F(i,i+1) is the signal frequency difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame.
[0042] And when |N i -N i+1 The smaller | and the smaller F(i,i+1), it indicates that the i-th unit audio signal frame and the i+1-th unit audio signal frame after the merger are more likely to be new audio segments with long-term continuous characteristics in the audio signal to be compressed, that is, it indicates that the i-th unit audio signal frame and the i+1-th unit audio signal frame are more likely to be the new audio segments with long-term continuous characteristics in the audio signal to be compressed that are divided into two different unit audio signal frames; and because if the new audio segments with long-term continuous characteristics in the audio signal are divided into different unit audio signal frames, not only will the sound quality of the compressed audio be discontinuous at the frame boundary, but it will also lead to an increase in the amount of calculation and a decrease in compression efficiency during the compression process. Therefore, in order to ensure the compression effect, when |N i -N i+1 The smaller | and the smaller F(i,i+1) is, the i-th unit audio signal frame should be merged with the i+1-th unit audio signal frame, and since |N i -Ni+1 The smaller | is and the smaller F(i,i+1) is, the larger the value of P(i,i+1) is. Therefore, the larger the value of P(i,i+1) is, the greater the probability that the i-th unit audio signal frame is merged with the i+1-th unit audio signal frame is.
[0043] When |N i -N i+1 The larger | and the larger F(i,i+1) are, the less likely it is that the merged i-th unit audio signal frame and the i+1-th unit audio signal frame are new audio segments with long-term continuous characteristics in the audio signal to be compressed, and the greater the possibility that transient signals such as plosives and rapid rhythm changes exist in the i-th unit audio signal frame and the i+1-th unit audio signal frame; and if transient signals such as plosives and rapid rhythm changes are divided into longer frames, these transient signals will be smoothed during compression, which will make the compressed data quality poor. Therefore, in order to ensure the compression effect, when |N i -N i+1 | is larger and F(i,i+1) is larger, the i-th unit audio signal frame should not be merged with the i+1-th unit audio signal frame, and since |N i -N i+1 The larger | is and the larger F(i,i+1) is, the smaller the value of P(i,i+1) is. Therefore, when the value of P(i,i+1) is smaller, it indicates that the probability of merging the i-th unit audio signal frame with the i+1-th unit audio signal frame is smaller.
[0044] Therefore, this embodiment can obtain the merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed through the above process.
[0045] The fourth acquisition module 04 is used to merge the unit audio signal frames on the audio signal to be compressed according to the merging probability representation value between the two adjacent unit audio signal frames to obtain each initial audio signal frame on the audio signal to be compressed, and obtain the division quantity representation value between the two adjacent initial audio signal frames on the audio signal to be compressed according to the two adjacent initial audio signal frames on the audio signal to be compressed, and re-frame the audio signal to be compressed according to the division quantity representation value to obtain each target audio signal frame on the audio signal to be compressed.
[0046] This embodiment obtains the merging probability representation value between two adjacent unit audio signal frames through the above steps. After obtaining the merging probability representation value between two adjacent unit audio signal frames, this embodiment merges the unit audio signal frames on the audio signal to be compressed according to the merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed to obtain each initial audio signal frame on the audio signal to be compressed. The specific process of merging the unit audio signal frames on the audio signal to be compressed to obtain each initial audio signal frame on the audio signal to be compressed is as follows:
[0047] On the audio signal to be compressed, all two adjacent unit audio signal frames whose merging probability representation values are greater than a preset probability threshold are merged, and the merged audio signal frames and the unit audio signal frames that are not merged are all recorded as initial audio signal frames; for example, for the r-th unit audio signal frame on the audio signal to be compressed, and r is not equal to 1 and R, R is the total number of unit audio signal frames on the audio signal to be compressed: if the merging probability representation value between the r-1-th unit audio signal frame and the r-th unit audio signal frame on the audio signal to be compressed is greater than the preset probability threshold, the merging probability representation value between the r-2-th unit audio signal frame and the r-1-th unit audio signal frame on the audio signal to be compressed is not greater than the preset probability threshold, the merging probability representation value between the r+1-th unit audio signal frame on the audio signal to be compressed and the r-th unit audio signal frame If the merging probability representation value between the audio signal frames is greater than the preset probability threshold and the merging probability representation value between the r+1th unit audio signal frame and the r+2th unit audio signal frame on the audio signal to be compressed is not greater than the preset probability threshold, then the result of merging the three unit audio signal frames, the r-1th unit audio signal frame, the rth unit audio signal frame and the r+1th unit audio signal frame, is recorded as the initial audio signal frame; if the merging probability representation value between the r-1th unit audio signal frame and the rth unit audio signal frame on the audio signal to be compressed is not greater than the preset probability threshold and the merging probability representation value between the r+1th unit audio signal frame and the rth unit audio signal frame on the audio signal to be compressed is also not greater than the preset probability threshold, then the rth unit audio signal frame is recorded as the initial audio signal frame.
[0048] In addition, in a specific application, the implementer needs to set the preset probability threshold according to the actual situation. For example, in this embodiment, the preset probability threshold can be set to 0.65.
[0049] After obtaining each initial audio signal frame on the audio signal to be compressed, in order to further avoid the boundary effect between adjacent initial audio signal frames after compression, the boundary effect refers to the phenomenon that the connection or transition at the boundary of adjacent initial audio signal frames after compression is not smooth enough, and this phenomenon is also a factor leading to poor compression quality. In order to ensure the compression quality, this embodiment will analyze two adjacent initial audio signal frames on the audio signal to be compressed to obtain a division quantity representation value between the two adjacent initial audio signal frames, and then divide the frames again based on the obtained initial audio signal frames based on the obtained division quantity representation value to obtain to the final frame result, that is, the target audio signal frame; it can be seen that this embodiment will then obtain the division quantity representation value between two adjacent initial audio signal frames on the audio signal to be compressed according to the two adjacent initial audio signal frames on the audio signal to be compressed; in addition, for ease of understanding, this embodiment will subsequently take the acquisition process of the division quantity representation value between the j-th initial audio signal frame on the audio signal to be compressed and the j+1-th initial audio signal frame on the audio signal to be compressed as an example for description, that is, the acquisition process of the division quantity representation value between the j-th initial audio signal frame and the j+1-th initial audio signal frame is, and j is not equal to the total number of initial audio signal frames on the audio signal to be compressed:
[0050] First, a combined probability representation value between the last unit audio signal frame in the j-th initial audio signal frame and the first unit audio signal frame in the j+1-th initial audio signal frame is obtained, and recorded as a first probability representation value; then, a result of subtracting the first probability representation value from a preset first constant is obtained, and recorded as a first difference value; then, the product of the first difference value and a preset control factor is calculated, and recorded as a first product value; the preset control factor is used to control the size of the subsequent obtained division quantity representation value.
[0051] In specific applications, the implementer needs to set the preset first constant and the preset control factor according to actual conditions. For example, in this embodiment, the preset first constant and the preset control factor can be set to 1 and 0.4 respectively. Then, the specific expression for calculating the first product value is (1-P1)×0.4, wherein P1 is the first probability representation value, and the smaller the value of P1 is, the greater the audio signal difference between the jth initial audio signal frame and the j+1th initial audio signal frame may be. In order to ensure the smoothness of the frame boundary connection after compression of the jth initial audio signal frame and the j+1th initial audio signal frame, the division quantity representation value between the jth initial audio signal frame and the j+1th initial audio signal frame should be larger. Conversely, when the value of P1 is larger, the division quantity representation value between the jth initial audio signal frame and the j+1th initial audio signal frame should be smaller.
[0052] Next, the number of data points in the j-th initial audio signal frame is obtained and recorded as the first eigenvalue, and the number of data points in the j+1-th initial audio signal frame is obtained and recorded as the second eigenvalue; then, it is determined whether the first eigenvalue is not greater than the second eigenvalue. If so, the integer value of the result obtained by multiplying the first product value by the first eigenvalue is recorded as the representation value of the number of divisions between the j-th initial audio signal frame and the j+1-th initial audio signal frame; otherwise, the integer value of the result obtained by multiplying the first product value by the second eigenvalue is recorded as the representation value of the number of divisions between the j-th initial audio signal frame and the j+1-th initial audio signal frame.
[0053] Therefore, the present embodiment can obtain the division number representation value between two adjacent initial audio signal frames on the audio signal to be compressed through the above process; and after obtaining the division number representation value, the present embodiment then performs framing again on the basis of the obtained initial audio signal frame to obtain the final framing result, that is, the target audio signal frame, that is, the present embodiment will then re-frame the audio signal to be compressed according to the division number representation value between two adjacent initial audio signal frames on the audio signal to be compressed, and obtain each target audio signal frame on the audio signal to be compressed; in addition, for ease of understanding, the present embodiment will take the acquisition process of any one target audio signal frame as an example for description:
[0054] For the f-th initial audio signal frame on the audio signal to be compressed, f is not equal to 1 and M, and M is the total number of initial audio signal frames on the audio signal to be compressed:
[0055] First, the number of data points in the f-1th initial audio signal frame on the audio signal to be compressed is recorded as N1, the number of data points in the fth initial audio signal frame is recorded as N2, the number of data points in the f+1th initial audio signal frame on the audio signal to be compressed is recorded as N3, the representation value of the number of divisions between the f-1th initial audio signal frame and the fth initial audio signal frame is recorded as V1, and the representation value of the number of divisions between the fth initial audio signal frame and the f+1th initial audio signal frame is recorded as V2.
[0056] If it is determined that both N1 and N3 are greater than N2, then a new audio signal frame formed by the last V1 data points in the f-1th initial audio signal frame, the fth initial audio signal frame, and the front V2 data points in the f+1th initial audio signal frame is recorded as the target audio signal frame; if it is determined that both N1 and N3 are less than N2, then the fth initial audio signal frame is directly recorded as the target audio signal frame; if it is determined that N1 is not less than N2 but N3 is less than N2, then the fth initial audio signal frame and the new audio signal frame formed by the last V1 data points in the f-1th initial audio signal frame are recorded as the target audio signal frame; if it is determined that N1 is less than N2 but N3 is not less than N2, then the fth initial audio signal frame and the new audio signal frame formed by the front V2 data points in the f+1th initial audio signal frame are recorded as the target audio signal frame.
[0057] In addition, it should be noted that, for the first initial audio signal frame on the audio signal to be compressed, if it is determined that the number of data points in the first initial audio signal frame is greater than the number of data points in the second initial audio signal frame on the audio signal to be compressed, then the first initial audio signal frame is directly recorded as the target audio signal frame; and if the number of data points in the first initial audio signal frame is not greater than the number of data points in the second initial audio signal frame on the audio signal to be compressed, and if the division number representation value between the first initial audio signal frame and the second initial audio signal frame is U1, then the audio signal frame formed by the first U1 data points in the first initial audio signal frame and the second target audio signal frame is recorded as the target audio signal frame. , for the Mth initial audio signal frame on the audio signal to be compressed, if it is determined that the number of data points in the Mth initial audio signal frame is greater than the number of data points in the M-1th initial audio signal frame on the audio signal to be compressed, then the Mth initial audio signal frame is directly recorded as the target audio signal frame, and if the number of data points in the Mth initial audio signal frame is not greater than the number of data points in the M-1th initial audio signal frame on the audio signal to be compressed, and if the division number representation value between the M-1th initial audio signal frame and the Mth initial audio signal frame is U2, then the audio signal frame formed by the last U2 data points in the Mth initial audio signal frame and the M-1th target audio signal frame is recorded as the target audio signal frame.
[0058] Therefore, this embodiment can obtain each target audio signal frame on the audio signal to be compressed through the above process.
[0059] The data compression module 05 is used to compress each target audio signal frame using the MP3 algorithm to obtain compressed data.
[0060] Finally, this embodiment uses the MP3 algorithm to compress each target audio signal frame on the audio signal to be compressed to obtain compressed data; and because the target audio signal frame is obtained as described above, there will be partial repetition between some adjacent target audio signal frames, so when the restoration is performed subsequently, the data of the restored adjacent frames are aligned in time order, and then the average of the area with time repetition is calculated, and the result of the average is used as the data after the data is restored in the time repetition area; in addition, the process of compressing the audio signal in the target audio signal frame using the MP3 algorithm in this embodiment is a well-known technology, so this embodiment will not be described in detail.
[0061] So far, this embodiment has completed the compression process of the audio signal to be compressed.
[0062] In summary, the present embodiment includes a first acquisition module for acquiring the audio signal to be compressed collected by the mobile working device during the working time period; a second acquisition module for initially framing the audio signal to be compressed according to a preset unit time length, obtaining each unit audio signal frame on the audio signal to be compressed, and obtaining the energy intensity representation value of each unit audio signal frame according to the data points in each unit audio signal frame; a third acquisition module for acquiring the frequency domain signal of the unit audio signal frame, and obtaining the merging probability between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signal and the energy intensity representation value of the unit audio signal frame. rate characterization value; a fourth acquisition module, for merging the unit audio signal frames on the audio signal to be compressed according to the merging probability characterization value between two adjacent unit audio signal frames, to obtain each initial audio signal frame on the audio signal to be compressed, and for obtaining the division quantity characterization value between two adjacent initial audio signal frames on the audio signal to be compressed, and for re-framing the audio signal to be compressed according to the division quantity characterization value, to obtain each target audio signal frame on the audio signal to be compressed; a data compression module, for compressing each target audio signal frame respectively using the MP3 algorithm to obtain compressed data. And the adaptive framing strategy provided in this embodiment can not only improve the compression effect when the MP3 algorithm is used for subsequent compression, but also ensure the robustness and adaptability of the MP3 algorithm when compressing the audio signal to be compressed.
[0063] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A mobile operating device with efficient compression function for audio and video files, characterized in that: The mobile operation device with the function of efficiently compressing audio and video files includes: A first acquisition module is used to acquire the audio signal to be compressed collected by the mobile operation device during the working period, wherein the horizontal coordinate value of the data point on the audio signal to be compressed is time and the vertical coordinate value is amplitude; a second acquisition module, configured to perform initial framing of the audio signal to be compressed according to a preset unit time length, obtain each unit audio signal frame on the audio signal to be compressed, and obtain an energy intensity representation value of each unit audio signal frame according to data points in each unit audio signal frame; A third acquisition module is used to acquire the frequency domain signal of the unit audio signal frame, and obtain a merging probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signal and the energy intensity representation value of the unit audio signal frame; a fourth acquisition module, configured to merge the unit audio signal frames on the audio signal to be compressed according to the merging probability representation value between the two adjacent unit audio signal frames to obtain each initial audio signal frame on the audio signal to be compressed, and obtain a division quantity representation value between the two adjacent initial audio signal frames on the audio signal to be compressed according to the two adjacent initial audio signal frames on the audio signal to be compressed, and re-frame the audio signal to be compressed according to the division quantity representation value to obtain each target audio signal frame on the audio signal to be compressed; The data compression module is used to compress each target audio signal frame using the MP3 algorithm to obtain compressed data.
2. A mobile operation device with an efficient audio and video file compression function as claimed in claim 1, characterized in that: The method for obtaining the energy intensity characterization value of each unit audio signal frame includes: For any unit audio signal frame, the average of the square values of the ordinates of all data points in the unit audio signal frame is recorded as the energy intensity representation value of the unit audio signal frame.
3. The mobile operation device with high-efficiency compression function of audio and video files as claimed in claim 1, characterized in that: The method for obtaining the combined probability representation value between two adjacent unit audio signal frames on the audio signal to be compressed includes: Obtaining a signal frequency difference representation value between two adjacent unit audio signal frames on the audio signal to be compressed according to the frequency domain signals of each unit audio signal frame on the audio signal to be compressed; For the i-th unit audio signal frame and the i+1-th unit audio signal frame on the audio signal to be compressed: The absolute value of the difference between the energy intensity representation value of the i-th unit audio signal frame and the energy intensity representation value of the i+1-th unit audio signal frame is recorded as the energy intensity table difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame; A negative correlation mapping is performed on the energy intensity table difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame, and the mapping result is recorded as the first mapping value; a negative correlation mapping is performed on the signal frequency difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame, and the mapping result is recorded as the second mapping value; and an average of the first mapping value and the second mapping value is recorded as the merged probability representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame.
4. The mobile operation device with efficient audio and video file compression function as claimed in claim 3, characterized in that: The method for obtaining a signal frequency difference representation value between two adjacent unit audio signal frames on the audio signal to be compressed includes: For the i-th unit audio signal frame and the (i+1)-th unit audio signal frame: Record the frequency domain signal of the i-th unit audio signal frame and the frequency domain signal of the i+1-th unit audio signal frame as a first frequency domain signal and a second frequency domain signal, respectively; Recording a set constructed by all frequencies whose amplitudes on the first frequency domain signal are not 0 as a first set, recording a set constructed by all frequencies whose amplitudes on the second frequency domain signal are not 0 as a second set, and recording a union of the first set and the second set as a third set; Obtain target amplitude pairs corresponding to each frequency in the third set, record the absolute value of the difference between two target amplitudes in the target amplitude pairs corresponding to each frequency as the amplitude difference value corresponding to the corresponding frequency, and record the cumulative sum of the amplitude difference values corresponding to all frequencies in the third set as the signal frequency difference representation value between the i-th unit audio signal frame and the i+1-th unit audio signal frame; the first target amplitude in the target amplitude pair corresponding to any frequency a in the third set refers to the normalized value of the amplitude corresponding to the frequency equal to the frequency a on the first frequency domain signal, and the second target amplitude in the target amplitude pair corresponding to the frequency a refers to the normalized value of the amplitude corresponding to the frequency equal to the frequency a on the second frequency domain signal.
5. The mobile operation device with high-efficiency compression function of audio and video files according to claim 1, characterized in that: The method for acquiring each initial audio signal frame on the audio signal to be compressed comprises: On the audio signal to be compressed, all two adjacent unit audio signal frames whose merging probability representation values are greater than a preset probability threshold are merged, and the merged audio signal frames and the unmerged unit audio signal frames are both recorded as initial audio signal frames.
6. The mobile operation device with high-efficiency compression function of audio and video files as claimed in claim 1, characterized in that: The method for obtaining the value representing the number of divisions between two adjacent initial audio signal frames comprises: For the j-th initial audio signal frame and the j+1-th initial audio signal frame on the audio signal to be compressed: Recording the combined probability representation value between the last unit audio signal frame in the j-th initial audio signal frame and the first unit audio signal frame in the j+1-th initial audio signal frame as a first probability representation value; recording the result of subtracting the first probability representation value from a preset first constant as a first difference value; and recording the product of the first difference value and a preset control factor as a first product value; The number of data points in the j-th initial audio signal frame is recorded as the first eigenvalue, and the number of data points in the j+1-th initial audio signal frame is recorded as the second eigenvalue; if the first eigenvalue is not greater than the second eigenvalue, the integer value of the result obtained by multiplying the first product value by the first eigenvalue is recorded as the representation value of the number of divisions between the j-th initial audio signal frame and the j+1-th initial audio signal frame; if the first eigenvalue is greater than the second eigenvalue, the integer value of the result obtained by multiplying the first product value by the second eigenvalue is recorded as the representation value of the number of divisions between the j-th initial audio signal frame and the j+1-th initial audio signal frame.
7. The mobile operation device with high-efficiency compression function of audio and video files as claimed in claim 1, characterized in that: The method for acquiring each target audio signal frame on the audio signal to be compressed comprises: For the f-th initial audio signal frame on the audio signal to be compressed, f is not equal to 1 and M, and M is the total number of initial audio signal frames on the audio signal to be compressed: Record the number of data points in the f-1th initial audio signal frame on the audio signal to be compressed as N1, record the number of data points in the f-th initial audio signal frame as N2, record the number of data points in the f+1th initial audio signal frame on the audio signal to be compressed as N3, record the value representing the number of divisions between the f-1th initial audio signal frame and the f-th initial audio signal frame as V1, and record the value representing the number of divisions between the f-th initial audio signal frame and the f+1th initial audio signal frame as V2; If N1 and N3 are both greater than N2, an audio signal frame formed by the last V1 data points in the f-1th initial audio signal frame, the fth initial audio signal frame, and the first V2 data points in the f+1th initial audio signal frame is recorded as a target audio signal frame; If N1 and N3 are both smaller than N2, the f-th initial audio signal frame is directly recorded as the target audio signal frame; If N1 is not less than N2 and N3 is less than N2, the audio signal frame formed by the last V1 data points in the f-th initial audio signal frame and the f-1th initial audio signal frame is recorded as the target audio signal frame; If N1 is less than N2 and N3 is not less than N2, the audio signal frame formed by the front V2 data points in the f-th initial audio signal frame and the f+1-th initial audio signal frame is recorded as the target audio signal frame.