Automobile engine audio processing method and device based on audio reconstruction, equipment and medium

By constructing an engine audio preprocessing judgment model and improving the audio reconstruction method, the problems of frame loss and timbre changes in automobile engine audio during transmission were solved, achieving accurate judgment and realistic restoration of engine audio, and improving remote evaluation and gaming experience.

CN119007751APending Publication Date: 2024-11-22DIYIN AUTOMOTIVE TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411098334.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Car engine audio may experience frame loss and timbre changes during transmission, making it impossible to accurately diagnose car problems remotely, increasing transportation costs, and the car engine sound cannot be realistically reproduced in games or VR, affecting the player experience.

Method used

Engine audio signals are collected using a portable microphone, a preprocessing judgment model is built using a decibel meter, lost frames are processed using an improved waveform masking method, and the timbre is restored using an improved audio reconstruction method before being sent to the terminal for engine sound processing.

Benefits of technology

It achieves accurate and consistent judgment of engine audio signals, improves remote evaluation efficiency, enhances realism in games and VR, and reduces transportation requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007751A_ABST
    Figure CN119007751A_ABST
Patent Text Reader

Abstract

The invention relates to an automobile engine audio processing method and device based on audio reconstruction, equipment and a medium, and belongs to the field of audio processing. The method comprises the following steps: acquiring an engine audio signal parameter; outputting an engine audio signal preprocessing judgment result based on the engine audio signal parameter, and obtaining a first automobile engine audio signal when the output engine audio signal does not need the preprocessing result; acquiring a second automobile engine audio signal when the output engine audio signal needs to be preprocessed; obtaining a complete automobile engine audio signal and obtaining a restored automobile engine audio signal; and sending the restored automobile engine audio signal to a terminal. According to the method, the frame loss condition of the engine audio is comprehensively judged, the timbre is restored through audio reconstruction, and the engine quality can be remotely judged through the engine sound or the audio with the restored timbre is used for game audio or AR analog audio and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of audio processing, and in particular relates to a method, device, equipment and medium for processing automobile engine audio based on audio reconstruction. Background Art

[0002] Abnormal car engine sounds can often reflect car problems such as engine overheating, abnormal intake and exhaust systems, and missing cylinders. However, after being transmitted, car engine audio may experience frame loss and timbre changes, which makes it impossible to accurately and remotely judge car problems, resulting in reduced efficiency in handling car problems and increased transportation costs. At the same time, car engine sounds can be used in games or VR. The restored and authentic audio can make players feel more involved and greatly improve the realism of games or VR. Summary of the invention

[0003] In order to solve the above problems existing in the prior art, the present invention provides a method, device, equipment and medium for processing automobile engine audio based on audio reconstruction.

[0004] The purpose of the present invention can be achieved through the following technical solutions:

[0005] A method for processing automobile engine audio based on audio reconstruction, the implementation of the method for processing automobile engine audio comprising the following steps:

[0006] S1: Collect the car engine audio signal through a portable microphone and obtain the engine audio signal parameters;

[0007] S2: Obtain the volume of the automobile engine through a decibel detector, construct an engine audio signal preprocessing judgment model based on the engine audio signal parameters and output the engine audio signal preprocessing judgment result, wherein the engine audio signal preprocessing judgment result includes an engine audio signal preprocessing result and an engine audio signal no preprocessing result, and when the engine audio signal preprocessing judgment model outputs the engine audio signal no preprocessing result, obtain a first automobile engine audio signal;

[0008] S3: when the engine audio signal preprocessing judgment model outputs a result that the engine audio signal needs to be preprocessed, preprocessing the automobile engine audio signal by an improved waveform masking method and obtaining a second automobile engine audio signal, wherein the preprocessing is to mask the lost frames in the engine audio signal by replacing frames;

[0009] S4: obtaining a complete car engine audio signal, wherein the complete car engine audio signal is a collection of the first car engine audio signal and the second car engine audio signal, restoring the timbre of the complete car engine audio signal by an improved audio reconstruction method, and obtaining the restored car engine audio signal;

[0010] S5: Sending the restored car engine audio signal to a terminal, which performs car engine sound processing, wherein the car engine sound processing includes remote evaluation of car engine quality, game car engine sound insertion, and AR simulation car engine sound insertion.

[0011] Preferably, the engine audio signal parameters include audio frequency, audio sound pressure, audio quantization bit number, and audio channel number.

[0012] Preferably, the step S2 specifically includes:

[0013] S201: Calculate the engine audio signal preprocessing judgment index through the engine audio signal parameters and construct the engine audio signal preprocessing judgment model. The calculation formula of the engine audio signal preprocessing judgment index is:

[0014]

[0015] Among them, ∝ is the engine audio signal preprocessing judgment index, the unit is %, f is the audio frequency, the unit is Hz, V is the car engine volume, the unit is decibel, f v is the audio sound pressure in Pascals, d is the number of audio quantization bits in bits, and h is the number of audio channels in bits;

[0016] S202: Preset an engine audio signal preprocessing judgment threshold, and obtain the engine audio signal preprocessing judgment result by comparing the engine audio signal preprocessing judgment index with the engine audio signal preprocessing judgment threshold.

[0017] Preferably, the step S202 is specifically as follows:

[0018] Determine the engine audio signal preprocessing judgment index, when the engine audio signal preprocessing judgment index is greater than or equal to the engine audio signal preprocessing judgment threshold, the engine audio signal preprocessing judgment model outputs the engine audio signal preprocessing result;

[0019] When the engine audio signal preprocessing judgment index is less than the engine audio signal preprocessing judgment threshold, the engine audio signal preprocessing judgment model outputs a result that the engine audio signal does not require preprocessing and obtains the first automobile engine audio signal.

[0020] Preferably, the step S3 specifically includes:

[0021] S301: Obtain a signal frame set of the automobile engine audio signal, expressed as:

[0022] A={A1,A2,…,A N},

[0023] Among them, A is a signal frame set, A1 is the first frame, A2 is the second frame, and A N is the Nth frame, N is the total number of signal frames;

[0024] S302: Get the lost frame, and get the wavelet coefficient of the t-1th frame by wavelet decomposition method, the expression is:

[0025]

[0026] in, is the wavelet coefficient of the t-1th frame, t is the number of lost frames, N is the total number of signal frames, n is the number of wavelet decomposition layers, a t-1,n is the smoothing coefficient of the t-1th frame, b t-1,n is the detail coefficient of the t-1th frame of the nth layer, b t-1,n-1 is the detail coefficient of the t-1th frame of the n-1th layer, b t-1,1 is the detail coefficient of the t-1th frame of the first layer;

[0027] S303: Obtain the wavelet coefficient matrix of the first frame to the t-2th frame by wavelet decomposition method. The expression of the wavelet coefficient matrix is:

[0028]

[0029] Among them, C is the wavelet coefficient matrix, is the wavelet coefficient of the first frame, is the wavelet coefficient of the second frame, is the wavelet coefficient of the t-2th frame, t is the number of the lost frame, N is the total number of signal frames, a 1,n is the smoothing coefficient of the first frame, a 2,n is the second frame smoothing coefficient, a t-2,n is the smoothing coefficient of the t-2th frame, n is the number of wavelet decomposition layers, b 1,n is the detail coefficient of the first frame of the nth layer, b 1,n-1 is the detail coefficient of the first frame of the n-1th layer, b t-2,1 is the detail coefficient of the t-2th frame of the first layer;

[0030] S304: Obtain a smoothing coefficient set in the wavelet coefficient matrix, calculate the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient set and form a correlation vector, the smoothing coefficient set is:

[0031] a={a 1,n , a 2,n , ..., a t-2,n}, t∈[1,N],

[0032] Among them, a is the smoothing coefficient set, a 1,n is the smoothing coefficient of the first frame, a 2,n is the second frame smoothing coefficient, at-2,n is the smoothing coefficient of the t-2th frame, n is the number of wavelet decomposition layers, t is the number of lost frames, and N is the total number of signal frames;

[0033] The expression of the correlation vector is:

[0034]

[0035] in, is the correlation vector, a1 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the first frame, a2 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the second frame, and a t-2 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the t-2th frame, t is the number of the lost frame, and N is the total number of signal frames;

[0036] S305: Obtain the maximum signal frame wavelet coefficient corresponding to the maximum value in the correlation vector, use the maximum signal frame wavelet coefficient as the replacement frame wavelet coefficient and obtain the replacement frame, the expression of the maximum signal frame wavelet coefficient is:

[0037]

[0038] in, is the wavelet coefficient of the maximum signal frame, m is the number of the maximum signal frame, a m+1,n is the smoothing coefficient of the m+1th frame, b m+1,n is the detail coefficient of the m+1th frame of the nth layer, b m+1,n-1 is the detail coefficient of the m+1th frame of the n-1th layer, b m+1,1 is the detail coefficient of the m+1th frame in the first layer, n is the number of wavelet decomposition layers, t is the number of lost frames, and N is the total number of signal frames.

[0039] Preferably, the step S4 specifically includes:

[0040] S401: Acquire spectrum components by scanning and searching, wherein the spectrum components include forward spectrum components and backward spectrum components, and the expression of the forward spectrum components is:

[0041] ψ f (x, y)=min{ψ(x, y′)}, y-3≤y′≤y,

[0042] Among them, ψ f is the forward spectral component, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, y' is the y'th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and min{·} is the minimum value;

[0043] The expression of the backward spectral component is:

[0044] ψ b (x, y)=min{ψ(x, y′)}y≤y′≤y+2,

[0045] Among them, ψ b is the backward spectrum component, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, y' is the y'-th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and min{·} is the minimum value;

[0046] S402: Acquire a complete automobile engine audio signal reference value based on the frequency spectrum component, wherein the expression of the complete automobile engine audio signal reference value is:

[0047] ψ s (x, y) = max{ψ f (x,y),ψ b (x, y)},

[0048] Among them, ψ s is the reference value of the complete car engine audio signal, ψ f is the forward spectral component, ψ b is the backward spectrum component, y is the y-th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and max{·} is the maximum value;

[0049] S403: Setting an existence threshold, and calculating the existence probability of the complete car engine audio signal according to the complete car engine audio signal reference value, the calculation formula is:

[0050]

[0051] Where P is the probability of existence of a complete car engine audio signal, β is the first fixed coefficient, λ is the existence threshold, ψ is the complete car engine audio signal, ψ s is the reference value of the complete automobile engine audio signal, y is the y-th frame of the complete automobile engine audio signal, and x is the x-th sample point of the y-th frame of the complete automobile engine audio signal;

[0052] S404: Obtaining a final noise spectrum according to the existence probability of the complete automobile engine audio signal;

[0053] S405: Calculate the posterior signal-to-noise ratio according to the final noise spectrum, using the following calculation formula:

[0054]

[0055] Wherein, δ is the posterior signal-to-noise ratio, τ is the final noise spectrum, ψ is the complete car engine audio signal, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal;

[0056] S406: Calculate the a priori signal-to-noise ratio according to the a posteriori signal-to-noise ratio, and the calculation formula is:

[0057]

[0058] Where φ is the prior signal-to-noise ratio, κ is the first constant, δ is the posterior signal-to-noise ratio, y is the yth frame of the complete car engine audio signal, x is the xth sample point of the yth frame of the complete car engine audio signal, and max{·} is the maximum value;

[0059] S407: Obtain a gain factor based on the priori signal-to-noise ratio, where the gain factor is expressed as:

[0060]

[0061] Where G is the gain factor, φ is the prior signal-to-noise ratio, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal;

[0062] S408: Acquire the restored automobile engine audio signal based on the gain factor. The expression of the restored automobile engine audio signal is:

[0063] ψ′(x,y)=G(x,y)·ψ(x,y),

[0064] Among them, ψ′ is the restored car engine audio signal, G is the gain factor, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, and x is the x-th sample point of the y-th frame of the complete car engine audio signal.

[0065] Preferably, the step S404 specifically includes:

[0066] S404-1: Calculate the variable coefficient based on the complete automobile engine audio signal, the calculation formula is:

[0067] μ(x,y)=P(x,y)+k[1-P(x,y)],

[0068] Wherein, μ is a variable coefficient, P is the probability of existence of a complete car engine audio signal, k is a second fixed coefficient, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal;

[0069] S404-2: Calculate the noise spectrum excessive floating parameter according to the spectrum component, and the calculation formula is:

[0070]

[0071] Where Γ is the noise spectrum excess float parameter, ψ f is the forward spectral component, ψ b is the backward spectrum component, y is the y-th frame of the complete car engine audio signal, and x is the x-th sample point of the y-th frame of the complete car engine audio signal;

[0072] S404-3: Obtain the final noise spectrum based on the variable coefficient and the noise spectrum excessive floating parameter, the expression of the final noise spectrum is:

[0073]

[0074] Where τ is the final noise spectrum, ψ is the complete car engine audio signal, μ is the variable coefficient, ω is the compensation factor, and ψ s is the reference value of the complete car engine audio signal, Γ is the noise spectrum excess floating parameter, κ is the first constant, ι is the second constant, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal.

[0075] An automobile engine audio processing device based on audio reconstruction, used to execute the automobile engine audio processing method described above, characterized in that it comprises an audio acquisition module, a preprocessing model building module, an audio preprocessing module, an audio restoration module, and an audio processing module;

[0076] The audio acquisition module is used to collect the car engine audio signal through a portable microphone and obtain the engine audio signal parameters, wherein the engine audio signal parameters include audio frequency, audio sound pressure, audio quantization bit number, and audio channel number;

[0077] The preprocessing model building module is used to obtain the volume of the automobile engine through a decibel detector, build an engine audio signal preprocessing judgment model based on the engine audio signal parameters and output the engine audio signal preprocessing judgment result, the engine audio signal preprocessing judgment result includes the engine audio signal preprocessing result and the engine audio signal no preprocessing result, and when the engine audio signal preprocessing judgment model outputs the engine audio signal no preprocessing result, a first automobile engine audio signal is obtained;

[0078] The audio preprocessing module is used for preprocessing the automobile engine audio signal and obtaining a second automobile engine audio signal by using an improved waveform masking method when the engine audio signal preprocessing judgment model outputs a result that the engine audio signal needs to be preprocessed, wherein the preprocessing is to mask the lost frames in the engine audio signal by replacing frames;

[0079] The audio restoration module is used to obtain a complete car engine audio signal, where the complete car engine audio signal is a collection of the first car engine audio signal and the second car engine audio signal, and restore the timbre of the complete car engine audio signal by an improved audio reconstruction method to obtain a restored car engine audio signal;

[0080] The audio processing module is used to send the restored car engine audio signal to a terminal, and the terminal performs car engine sound processing, wherein the car engine sound processing includes remote evaluation of car engine quality, game car engine sound insertion, and AR simulation car engine sound insertion.

[0081] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned automobile engine audio processing method when executing the program.

[0082] A storage medium containing computer executable instructions, wherein the computer executable instructions are used to perform the above-mentioned automobile engine audio processing method when executed by a computer processor.

[0083] The beneficial effects of the present invention are:

[0084] (1) By constructing an engine audio signal preprocessing judgment model and outputting the engine audio signal preprocessing judgment result, it is comprehensively judged whether there is a frame loss phenomenon in the collected automobile engine audio signal and whether it is necessary to use a replacement frame to cover the lost frame in the engine audio signal. The judgment result is more accurate, and the judgment method is simple and efficient;

[0085] (2) By improving the waveform masking method, the lost frame masking process of the car engine audio signal is performed to obtain the complete car engine audio signal, so that the car engine audio signal is more coherent, which is conducive to the next step of audio processing;

[0086] (3) By improving the audio reconstruction method to restore the timbre of the complete car engine audio signal and obtain the restored car engine audio signal, the collected car engine audio signal is closer to the real timbre, which is conducive to applying the restored audio to multiple scenarios, such as remote evaluation of car engine quality. The quality of the car engine or the car engine failure can be judged by the restored car engine audio signal without transporting the car to a maintenance center;

[0087] (4) By scanning and searching to obtain spectral components and ultimately obtaining a priori signal-to-noise ratio, the sound restoration process of the car engine audio is made more accurate;

[0088] (5) The restored car engine audio signal is obtained through the gain factor, which effectively enhances the collected car engine audio signal and restores the collected car engine audio signal to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0090] Figure 1 The present invention is a flowchart of the steps of a method for processing automobile engine audio based on audio reconstruction. DETAILED DESCRIPTION

[0091] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation method, structure, characteristics and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0092] The working principle and use process of the present invention:

[0093] See also Figure 1 , a car engine audio processing method based on audio reconstruction, comprising:

[0094] S1: Collecting a car engine audio signal through a portable microphone and obtaining engine audio signal parameters, wherein the engine audio signal parameters include audio frequency, audio sound pressure, audio quantization bit number, and audio channel number;

[0095] S2: Obtain the volume of the automobile engine through a decibel detector, construct an engine audio signal preprocessing judgment model based on the engine audio signal parameters and output the engine audio signal preprocessing judgment result, wherein the engine audio signal preprocessing judgment result includes an engine audio signal preprocessing result and an engine audio signal no preprocessing result, and when the engine audio signal preprocessing judgment model outputs the engine audio signal no preprocessing result, obtain a first automobile engine audio signal;

[0096] S3: when the engine audio signal preprocessing judgment model outputs a result that the engine audio signal needs to be preprocessed, preprocessing the automobile engine audio signal by an improved waveform masking method and obtaining a second automobile engine audio signal, wherein the preprocessing is to mask the lost frames in the engine audio signal by replacing frames;

[0097] S4: obtaining a complete car engine audio signal, wherein the complete car engine audio signal is a collection of the first car engine audio signal and the second car engine audio signal, restoring the timbre of the complete car engine audio signal by an improved audio reconstruction method, and obtaining the restored car engine audio signal;

[0098] S5: Sending the restored car engine audio signal to a terminal, which performs car engine sound processing. The car engine sound processing includes but is not limited to remote evaluation of car engine quality, game car engine sound insertion, and AR simulation car engine sound insertion.

[0099] In this embodiment, the volume of the automobile engine is obtained by a decibel detector, an engine audio signal preprocessing judgment model is constructed based on the engine audio signal parameters, and the engine audio signal preprocessing judgment result is output, the engine audio signal preprocessing judgment result includes the engine audio signal preprocessing result and the engine audio signal no preprocessing result, and a comprehensive judgment is made on whether there is a frame loss phenomenon in the collected automobile engine audio signal and whether a replacement frame is needed to cover the lost frame in the engine audio signal. The judgment result is more accurate, and the judgment method is simple and efficient. When the engine audio signal preprocessing judgment model outputs the engine audio signal no need for preprocessing result, the first automobile engine audio signal is obtained, which can be implemented by the following steps:

[0100] S201: Calculate the engine audio signal preprocessing judgment index through the engine audio signal parameters and construct the engine audio signal preprocessing judgment model. The calculation formula of the engine audio signal preprocessing judgment index is:

[0101]

[0102] Among them, ∝ is the engine audio signal preprocessing judgment index, the unit is %, f is the audio frequency, the unit is Hz, V is the car engine volume, the unit is decibel, f v is the audio sound pressure in Pascals, d is the number of audio quantization bits in bits, and h is the number of audio channels in bits;

[0103] S202: Presetting an engine audio signal preprocessing judgment threshold, and obtaining the engine audio signal preprocessing judgment result by comparing the engine audio signal preprocessing judgment index with the engine audio signal preprocessing judgment threshold;

[0104] Determine the engine audio signal preprocessing judgment index, when the engine audio signal preprocessing judgment index is greater than or equal to the engine audio signal preprocessing judgment threshold, the engine audio signal preprocessing judgment model outputs the engine audio signal preprocessing result;

[0105] When the engine audio signal preprocessing judgment index is less than the engine audio signal preprocessing judgment threshold, the engine audio signal preprocessing judgment model outputs a result that the engine audio signal does not require preprocessing and obtains the first automobile engine audio signal.

[0106] In this embodiment, when the engine audio signal preprocessing judgment model outputs the result that the engine audio signal needs to be preprocessed, the car engine audio signal is preprocessed by an improved waveform masking method and a second car engine audio signal is obtained, so that the car engine audio signal is more coherent, which is conducive to the next step of audio processing. The preprocessing is to mask the lost frames in the engine audio signal by replacing frames, which can be specifically implemented by the following steps:

[0107] S301: Obtain a signal frame set of the automobile engine audio signal, expressed as:

[0108] A={A1,A2,…,A N},

[0109] Among them, A is a signal frame set, A1 is the first frame, A2 is the second frame, and A N is the Nth frame, N is the total number of signal frames;

[0110] S302: Get the lost frame, and get the wavelet coefficient of the t-1th frame by wavelet decomposition method, the expression is:

[0111]

[0112] in, is the wavelet coefficient of the t-1th frame, t is the number of lost frames, N is the total number of signal frames, n is the number of wavelet decomposition layers, a t-1,n is the smoothing coefficient of the t-1th frame, b t-1,n is the detail coefficient of the t-1th frame of the nth layer, b t-1,n-1 is the detail coefficient of the t-1th frame of the n-1th layer, b t-1,1 is the detail coefficient of the t-1th frame of the first layer;

[0113] S303: Obtain the wavelet coefficient matrix of the first frame to the t-2th frame by wavelet decomposition method. The expression of the wavelet coefficient matrix is:

[0114]

[0115] Among them, C is the wavelet coefficient matrix, is the wavelet coefficient of the first frame, is the wavelet coefficient of the second frame, is the wavelet coefficient of the t-2th frame, t is the number of the lost frame, N is the total number of signal frames, a 1,n is the smoothing coefficient of the first frame, a 2,n is the second frame smoothing coefficient, a t-2,n is the smoothing coefficient of the t-2th frame, n is the number of wavelet decomposition layers, b 1,n is the detail coefficient of the first frame of the nth layer, b 1,n-1 is the detail coefficient of the first frame of the n-1th layer, b t-2,1is the detail coefficient of the t-2th frame of the first layer;

[0116] S304: Obtain a smoothing coefficient set in the wavelet coefficient matrix, calculate the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient set and form a correlation vector, the smoothing coefficient set is:

[0117] a={a 1,n , a 2,n , ..., a t-2,n}, t∈[1,N],

[0118] Among them, a is the smoothing coefficient set, a 1,n is the smoothing coefficient of the first frame, a 2,n is the second frame smoothing coefficient, a t-2,n is the smoothing coefficient of the t-2th frame, n is the number of wavelet decomposition layers, t is the number of lost frames, and N is the total number of signal frames;

[0119] The expression of the correlation vector is:

[0120]

[0121] in, is the correlation vector, a1 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the first frame, a2 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the second frame, and a t-2 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the t-2th frame, t is the number of the lost frame, and N is the total number of signal frames;

[0122] S305: Obtain the maximum signal frame wavelet coefficient corresponding to the maximum value in the correlation vector, use the maximum signal frame wavelet coefficient as the replacement frame wavelet coefficient and obtain the replacement frame, the expression of the maximum signal frame wavelet coefficient is:

[0123]

[0124] in, is the wavelet coefficient of the maximum signal frame, m is the number of the maximum signal frame, a m+1,n is the smoothing coefficient of the m+1th frame, b m+1,n is the detail coefficient of the m+1th frame of the nth layer, b m+1,n is the detail coefficient of the m+1th frame of the n-1th layer, b m+1,n is the detail coefficient of the m+1th frame in the first layer, n is the number of wavelet decomposition layers, t is the number of lost frames, and N is the total number of signal frames.

[0125] In this embodiment, a complete automobile engine audio signal is obtained, and the complete automobile engine audio signal is a collection of the first automobile engine audio signal and the second automobile engine audio signal. The timbre of the complete automobile engine audio signal is restored by an improved audio reconstruction method and the restored automobile engine audio signal is obtained, so that the collected automobile engine audio signal is closer to the real timbre, which is conducive to applying the restored audio to multiple scenarios, such as remote evaluation of automobile engine quality, etc., and the quality of the automobile engine or automobile engine failure judgment can be judged by the restored automobile engine audio signal without transporting the automobile to a maintenance center. The specific implementation can be carried out through the following steps:

[0126] S401: Acquire spectrum components by scanning and searching, wherein the spectrum components include forward spectrum components and backward spectrum components, and the expression of the forward spectrum components is:

[0127] ψ f (x, y)=min{ψ(x, y′)}, y-3≤y′≤y,

[0128] Among them, ψ f is the forward spectral component, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, y' is the y'th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and min{·} is the minimum value;

[0129] The expression of the backward spectral component is:

[0130] ψ b (x,y)=min{ψ(x,y′)}y′≤y+2,

[0131] Among them, ψ b is the backward spectrum component, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, y' is the y'-th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and min{·} is the minimum value;

[0132] S402: Acquire a complete automobile engine audio signal reference value based on the frequency spectrum component, wherein the expression of the complete automobile engine audio signal reference value is:

[0133] ψ s (x,y)=min{ψ f (x, y′), ψ b (x, y)},

[0134] Among them, ψ s is the reference value of the complete car engine audio signal, ψ f is the forward spectral component, ψ bis the backward spectrum component, y is the y-th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and max{·} is the maximum value;

[0135] S403: Setting an existence threshold, and calculating the existence probability of the complete car engine audio signal according to the complete car engine audio signal reference value, the calculation formula is:

[0136]

[0137] Where P is the probability of existence of a complete car engine audio signal, β is the first fixed coefficient, λ is the existence threshold, ψ is the complete car engine audio signal, ψ s is the reference value of the complete automobile engine audio signal, y is the y-th frame of the complete automobile engine audio signal, and x is the x-th sample point of the y-th frame of the complete automobile engine audio signal;

[0138] S404: Obtaining a final noise spectrum according to the existence probability of the complete automobile engine audio signal;

[0139] S405: Calculate the posterior signal-to-noise ratio according to the final noise spectrum, using the following calculation formula:

[0140]

[0141] Wherein, δ is the posterior signal-to-noise ratio, τ is the final noise spectrum, ψ is the complete car engine audio signal, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal;

[0142] S406: Calculate the a priori signal-to-noise ratio according to the a posteriori signal-to-noise ratio, and the calculation formula is:

[0143]

[0144] Where φ is the prior signal-to-noise ratio, κ is the first constant, δ is the posterior signal-to-noise ratio, y is the yth frame of the complete car engine audio signal, x is the xth sample point of the yth frame of the complete car engine audio signal, and max{·} is the maximum value;

[0145] S407: A gain factor is obtained based on the priori signal-to-noise ratio, so that the timbre restoration process of the car engine audio is more accurate. The expression of the gain factor is:

[0146]

[0147] Where G is the gain factor, φ is the prior signal-to-noise ratio, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal;

[0148] S408: The restored car engine audio signal is obtained based on the gain factor, the collected car engine audio signal is effectively enhanced and the collected car engine audio signal is restored to the greatest extent. The expression of the restored car engine audio signal is:

[0149] ψ′(x,y)=G(x,y)·ψ(x,y),

[0150] Among them, ψ′ is the restored car engine audio signal, G is the gain factor, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, and x is the x-th sample point of the y-th frame of the complete car engine audio signal.

[0151] In this embodiment, the final noise spectrum is obtained according to the existence probability of the complete automobile engine audio signal, which can be implemented by the following steps:

[0152] S404-1: Calculate the variable coefficient based on the complete automobile engine audio signal, the calculation formula is:

[0153] μ(x,y)=P(x,y)+k[1-P(x,y)],

[0154] Wherein, μ is a variable coefficient, P is the probability of existence of a complete car engine audio signal, k is a second fixed coefficient, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal;

[0155] S404-2: Calculate the noise spectrum excessive floating parameter according to the spectrum component, and the calculation formula is:

[0156]

[0157] Where Γ is the noise spectrum excess float parameter, ψ f is the forward spectral component, ψ b is the backward spectrum component, y is the y-th frame of the complete car engine audio signal, and x is the x-th sample point of the y-th frame of the complete car engine audio signal;

[0158] S404-3: Obtain the final noise spectrum based on the variable coefficient and the noise spectrum excessive floating parameter, the expression of the final noise spectrum is:

[0159]

[0160] Where τ is the final noise spectrum, ψ is the complete car engine audio signal, μ is the variable coefficient, ω is the compensation factor, and ψ sis the reference value of the complete car engine audio signal, Γ is the noise spectrum excess floating parameter, κ is the first constant, ι is the second constant, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal.

[0161] An automobile engine audio processing device based on audio reconstruction includes an audio acquisition module, a preprocessing model building module, an audio preprocessing module, an audio restoration module, and an audio processing module;

[0162] The audio acquisition module is used to collect the car engine audio signal through a portable microphone and obtain the engine audio signal parameters, wherein the engine audio signal parameters include audio frequency, audio sound pressure, audio quantization bit number, and audio channel number;

[0163] The preprocessing model building module is used to obtain the volume of the automobile engine through a decibel detector, build an engine audio signal preprocessing judgment model based on the engine audio signal parameters and output the engine audio signal preprocessing judgment result, the engine audio signal preprocessing judgment result includes the engine audio signal preprocessing result and the engine audio signal no preprocessing result, and when the engine audio signal preprocessing judgment model outputs the engine audio signal no preprocessing result, a first automobile engine audio signal is obtained;

[0164] The audio preprocessing module is used for preprocessing the automobile engine audio signal and obtaining a second automobile engine audio signal by using an improved waveform masking method when the engine audio signal preprocessing judgment model outputs a result that the engine audio signal needs to be preprocessed, wherein the preprocessing is to mask the lost frames in the engine audio signal by replacing frames;

[0165] The audio restoration module is used to obtain a complete car engine audio signal, where the complete car engine audio signal is a collection of the first car engine audio signal and the second car engine audio signal, and restore the timbre of the complete car engine audio signal by an improved audio reconstruction method to obtain a restored car engine audio signal;

[0166] The audio processing module is used to send the restored car engine audio signal to a terminal, which performs car engine sound processing. The car engine sound processing includes but is not limited to remote evaluation of car engine quality, game car engine sound insertion, and AR simulation car engine sound insertion.

[0167] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.

[0168] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0169] The program code included on the computer readable medium can be transmitted with any appropriate medium, including but not limited to wireless, electric wire, optical cable, RF, etc., or any suitable combination of the above. The computer program code for performing the operation of the present invention can be written in one or more programming languages ​​or their combinations, and the programming language includes object-oriented programming languages-such as Java, Smalltalk, C++, and also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0170] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A method for processing automobile engine audio based on audio reconstruction, characterized in that: The implementation of the automobile engine audio processing method comprises the following steps: S1: Collecting a car engine audio signal through a portable microphone and obtaining engine audio signal parameters, wherein the engine audio signal parameters include audio frequency, audio sound pressure, audio quantization bit number, and audio channel number; S2: Obtain the volume of the automobile engine through a decibel detector, construct an engine audio signal preprocessing judgment model based on the engine audio signal parameters and output the engine audio signal preprocessing judgment result, wherein the engine audio signal preprocessing judgment result includes an engine audio signal preprocessing result and an engine audio signal no preprocessing result, and when the engine audio signal preprocessing judgment model outputs the engine audio signal no preprocessing result, obtain a first automobile engine audio signal; S3: when the engine audio signal preprocessing judgment model outputs a result that the engine audio signal needs to be preprocessed, preprocessing the automobile engine audio signal by an improved waveform masking method and obtaining a second automobile engine audio signal, wherein the preprocessing is to mask the lost frames in the engine audio signal by replacing frames; S4: obtaining a complete car engine audio signal, wherein the complete car engine audio signal is a collection of the first car engine audio signal and the second car engine audio signal, restoring the timbre of the complete car engine audio signal by an improved audio reconstruction method, and obtaining the restored car engine audio signal; S5: Sending the restored car engine audio signal to a terminal, which performs car engine sound processing, wherein the car engine sound processing includes remote evaluation of car engine quality, game car engine sound insertion, and AR simulation car engine sound insertion.

2. The automobile engine audio processing method according to claim 1, characterized in that: The step S2 specifically includes: S201: Calculate the engine audio signal preprocessing judgment index through the engine audio signal parameters and construct the engine audio signal preprocessing judgment model. The calculation formula of the engine audio signal preprocessing judgment index is: Among them, ∝ is the engine audio signal preprocessing judgment index, the unit is %, f is the audio frequency, the unit is Hz, V is the car engine volume, the unit is decibel, f v is the audio sound pressure in Pascals, d is the number of audio quantization bits in bits, and h is the number of audio channels in bits; S202: Preset an engine audio signal preprocessing judgment threshold, and obtain the engine audio signal preprocessing judgment result by comparing the engine audio signal preprocessing judgment index with the engine audio signal preprocessing judgment threshold.

3. The automobile engine audio processing method according to claim 2, characterized in that: The step S202 is specifically as follows: Determine the engine audio signal preprocessing judgment index, when the engine audio signal preprocessing judgment index is greater than or equal to the engine audio signal preprocessing judgment threshold, the engine audio signal preprocessing judgment model outputs the engine audio signal preprocessing result; When the engine audio signal preprocessing judgment index is less than the engine audio signal preprocessing judgment threshold, the engine audio signal preprocessing judgment model outputs a result that the engine audio signal does not require preprocessing and obtains the first automobile engine audio signal.

4. The automobile engine audio processing method according to claim 1, characterized in that: The step S3 specifically includes: S301: Obtain a signal frame set of the automobile engine audio signal, expressed as: <h2 style=";text-align:left;direction:ltr">A={A1,A2,…,A<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr">}, Among them, A is a signal frame set, A1 is the first frame, A2 is the second frame, and A N is the Nth frame, N is the total number of signal frames; S302: Get the lost frame, and get the wavelet coefficient of the t-1th frame by wavelet decomposition method, the expression is: t∈[1,N], in, is the wavelet coefficient of the t-1th frame, t is the number of lost frames, N is the total number of signal frames, n is the number of wavelet decomposition layers, a t-1,n is the smoothing coefficient of the t-1th frame, b t-1,n is the detail coefficient of the t-1th frame of the nth layer, b t-1,n-1 is the detail coefficient of the t-1th frame of the n-1th layer, b t-1,1 is the detail coefficient of the t-1th frame of the first layer; S303: Obtain the wavelet coefficient matrix of the first frame to the t-2th frame by wavelet decomposition method. The expression of the wavelet coefficient matrix is: t∈[l,N], Among them, C is the wavelet coefficient matrix, is the wavelet coefficient of the first frame, is the wavelet coefficient of the second frame, is the wavelet coefficient of the t-2th frame, t is the number of the lost frame, N is the total number of signal frames, a 1,n is the smoothing coefficient of the first frame, a 2,n is the second frame smoothing coefficient, a t-2,n is the smoothing coefficient of the t-2th frame, n is the number of wavelet decomposition layers, b 1,n is the detail coefficient of the first frame of the nth layer, b 1,n-1 is the detail coefficient of the first frame of the n-1th layer, b t-2,1 is the detail coefficient of the t-2th frame of the first layer; S304: Obtain a smoothing coefficient set in the wavelet coefficient matrix, calculate the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient set and form a correlation vector, the smoothing coefficient set is: a={a 1,n ,a 2,n ,...,a t-2n },t∈[1,N], Among them, a is the smoothing coefficient set, a 1,n is the smoothing coefficient of the first frame, a 2,n is the second frame smoothing coefficient, a t-2,n is the smoothing coefficient of the t-2th frame, n is the number of wavelet decomposition layers, t is the number of lost frames, and N is the total number of signal frames; The expression of the correlation vector is: t∈[1,N], in, is the correlation vector, a1 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the first frame, a2 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the second frame, and a t-2 is the correlation between the smoothing coefficient of the t-1th frame and the smoothing coefficient of the t-2th frame, t is the number of the lost frame, and N is the total number of signal frames; S305: Acquire the replacement frame based on the correlation vector.

5. The automobile engine audio processing method according to claim 4, characterized in that: The step S305 is specifically as follows: The maximum signal frame wavelet coefficient corresponding to the maximum value in the correlation vector is obtained, and the maximum signal frame wavelet coefficient is used as the replacement frame wavelet coefficient to obtain the replacement frame. The expression of the maximum signal frame wavelet coefficient is: t∈[1,N], in, is the wavelet coefficient of the maximum signal frame, m is the number of the maximum signal frame, a m+1,n is the smoothing coefficient of the m+1th frame, b m+1,n is the detail coefficient of the m+1th frame of the nth layer, b m+1,n-1 is the detail coefficient of the m+1th frame of the n-1th layer, b m+1,1 is the detail coefficient of the m+1th frame in the first layer, n is the number of wavelet decomposition layers, t is the number of lost frames, and N is the total number of signal frames.

6. The automobile engine audio processing method according to claim 1, characterized in that: The step S4 specifically includes: S401: Acquire spectrum components by scanning and searching, wherein the spectrum components include forward spectrum components and backward spectrum components, and the expression of the forward spectrum components is: ψ f (x,y)=min{ψ(x,y′)},y-3≤y′≤y, Among them, ψ f is the forward spectral component, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, y' is the y'th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and min{·} is the minimum value; The expression of the backward spectral component is: ψ b (x,y)=min{ψ(x,y′)},y≤y′≤y+2, Among them, ψ b is the backward spectrum component, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, y' is the y'-th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and min{·} is the minimum value; S402: Acquire a complete automobile engine audio signal reference value based on the frequency spectrum component, wherein the expression of the complete automobile engine audio signal reference value is: ψ s (x,y)=max{ψ f (x,y),ψ b (x,y)}, Among them, ψ s is the reference value of the complete car engine audio signal, ψ f is the forward spectral component, ψ b is the backward spectrum component, y is the y-th frame of the complete car engine audio signal, x is the x-th sample point of the y-th frame of the complete car engine audio signal, and max{·} is the maximum value; S403: Setting an existence threshold, and calculating the existence probability of the complete car engine audio signal according to the complete car engine audio signal reference value, the calculation formula is: Where P is the probability of existence of a complete car engine audio signal, β is the first fixed coefficient, λ is the existence threshold, ψ is the complete car engine audio signal, ψ s is the reference value of the complete automobile engine audio signal, y is the y-th frame of the complete automobile engine audio signal, and x is the x-th sample point of the y-th frame of the complete automobile engine audio signal; S404: Obtaining a final noise spectrum according to the existence probability of the complete automobile engine audio signal; S405: Calculate the posterior signal-to-noise ratio according to the final noise spectrum, using the following calculation formula: Wherein, δ is the posterior signal-to-noise ratio, τ is the final noise spectrum, ψ is the complete car engine audio signal, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal; S406: Calculate the a priori signal-to-noise ratio according to the a posteriori signal-to-noise ratio, and the calculation formula is: Where φ is the prior signal-to-noise ratio, κ is the first constant, δ is the posterior signal-to-noise ratio, y is the yth frame of the complete car engine audio signal, x is the xth sample point of the yth frame of the complete car engine audio signal, and max{·} is the maximum value; S407: Obtain a gain factor based on the priori signal-to-noise ratio, where the gain factor is expressed as: Where G is the gain factor, φ is the prior signal-to-noise ratio, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal; S408: Acquire the restored automobile engine audio signal based on the gain factor. The expression of the restored automobile engine audio signal is: ψ′(x,y)=G(x,y)·ψ(x,y), Among them, ψ′ is the restored car engine audio signal, G is the gain factor, ψ is the complete car engine audio signal, y is the y-th frame of the complete car engine audio signal, and x is the x-th sample point of the y-th frame of the complete car engine audio signal.

7. The automobile engine audio processing method according to claim 6, characterized in that: The step S404 specifically includes: S404-1: Calculate the variable coefficient based on the complete automobile engine audio signal, the calculation formula is: μ(x,y)=P(x,y)+k[1-P(x,y)], Wherein, μ is a variable coefficient, P is the probability of existence of a complete car engine audio signal, k is a second fixed coefficient, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal; S404-2: Calculate the noise spectrum excessive floating parameter according to the spectrum component, and the calculation formula is: Where Γ is the noise spectrum excess float parameter, ψ f is the forward spectral component, ψ b is the backward spectrum component, y is the y-th frame of the complete car engine audio signal, and x is the x-th sample point of the y-th frame of the complete car engine audio signal; S404-3: Obtain the final noise spectrum based on the variable coefficient and the noise spectrum excessive floating parameter, the expression of the final noise spectrum is: Where τ is the final noise spectrum, Ψ is the complete car engine audio signal, μ is the variable coefficient, ω is the compensation factor, ψ s is the reference value of the complete car engine audio signal, Γ is the noise spectrum excess floating parameter, κ is the first constant, ι is the second constant, y is the yth frame of the complete car engine audio signal, and x is the xth sample point of the yth frame of the complete car engine audio signal.

8. A car engine audio processing device based on audio reconstruction, characterized in that: It includes audio acquisition module, preprocessing model building module, audio preprocessing module, audio restoration module and audio processing module; The audio acquisition module is used to collect the car engine audio signal through a portable microphone and obtain the engine audio signal parameters, wherein the engine audio signal parameters include audio frequency, audio sound pressure, audio quantization bit number, and audio channel number; The preprocessing model building module is used to obtain the volume of the automobile engine through a decibel detector, build an engine audio signal preprocessing judgment model based on the engine audio signal parameters and output the engine audio signal preprocessing judgment result, the engine audio signal preprocessing judgment result includes the engine audio signal preprocessing result and the engine audio signal no preprocessing result, and when the engine audio signal preprocessing judgment model outputs the engine audio signal no preprocessing result, a first automobile engine audio signal is obtained; The audio preprocessing module is used for preprocessing the automobile engine audio signal and obtaining a second automobile engine audio signal by using an improved waveform masking method when the engine audio signal preprocessing judgment model outputs a result that the engine audio signal needs to be preprocessed, wherein the preprocessing is to mask the lost frames in the engine audio signal by replacing frames; The audio restoration module is used to obtain a complete car engine audio signal, where the complete car engine audio signal is a collection of the first car engine audio signal and the second car engine audio signal, and restore the timbre of the complete car engine audio signal by an improved audio reconstruction method to obtain a restored car engine audio signal; The audio processing module is used to send the restored car engine audio signal to a terminal, and the terminal performs car engine sound processing, wherein the car engine sound processing includes remote evaluation of car engine quality, game car engine sound insertion, and AR simulation car engine sound insertion.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the automobile engine audio processing method as described in any one of claims 1-7 is implemented.

10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to perform the automobile engine audio processing method as claimed in any one of claims 1 to 7 when executed by a computer processor.