Vehicle audio diagnostic data compression method, decoding method, device and storage medium
By dynamically adjusting the sampling rate and interpolation algorithm to reconstruct the audio curve, the problems of wasted storage resources and fault waveform restoration in vehicle audio diagnostics are solved, achieving efficient data storage and diagnostic accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGFENG MOTOR GRP
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional in-vehicle audio diagnostic data processing methods result in wasted storage resources, short storage cycles, and low retrieval efficiency, and cannot effectively capture signal distortion and fault waveforms before a fault occurs.
A dynamic sampling rate adjustment mechanism is adopted, which dynamically adjusts the sampling rate based on audio feature analysis and reconstructs high-resolution audio curves by combining interpolation algorithms. This enables on-demand allocation of the sampling rate, reduces storage overhead, and ensures diagnostic accuracy.
Through the collaborative innovation of dynamic sampling rate adjustment and interpolation algorithm, storage overhead is significantly reduced, solving the problem of resource waste in vehicle audio diagnostics, while ensuring the ability to restore fault waveforms.
Smart Images

Figure CN122290612A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data compression technology, and in particular to a method, decoding method, device and storage medium for compressing vehicle audio diagnostic data. Background Technology
[0002] In intelligent cockpit infotainment systems, the audio module needs to continuously capture raw audio data, such as microphone input signals, speaker output signals, and data used to diagnose intermittent faults (such as silence, noise, and popping sounds). Traditional solutions employ fixed-compression storage and segmented trigger recording. Fixed-compression storage uses general audio compression algorithms, but details are lost during compression (such as high-frequency transient noise), making it impossible to reconstruct fault waveforms. Segmented trigger recording only starts recording when an anomaly is detected, but it cannot capture signal distortion prior to the fault. Saving raw PCM data at the full sampling rate (e.g., 48kHz) leads to wasted storage resources, short storage cycles, and low retrieval efficiency, severely impacting the vehicle's storage space. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a method for compressing vehicle audio diagnostic data, a decoding method, a device and a storage medium.
[0004] In a first aspect, the present invention discloses a method for compressing in-vehicle audio diagnostic data, comprising the following steps:
[0005] Obtain the raw audio data;
[0006] Perform audio feature analysis on the raw audio data to determine the sampling rate;
[0007] Based on the determined sampling rate, the original audio data is downsampled to obtain compressed audio data for storage or transmission.
[0008] In some embodiments, after acquiring the raw audio data, the method further includes the following steps: determining whether the system storage space is sufficient; if the system storage space is insufficient, automatically reducing the sampling rate to a preset minimum value; otherwise, performing an audio feature analysis step.
[0009] In some embodiments, audio feature analysis is performed on the audio data, and the sampling rate is determined based on the analysis results. This includes: performing high-frequency component detection on the audio data, calculating the energy in the high-frequency band of the audio frame, and if the high-frequency band energy exceeds a preset high-frequency energy threshold, then a first sampling rate is used; if the high-frequency band energy does not exceed the preset high-frequency energy threshold, then content feature analysis is performed on the audio data to identify its content type; if it is identified as music content, then a second sampling rate is used; if it is identified as speech content, then a third sampling rate is used, wherein the first sampling rate is greater than the second sampling rate, and the second sampling rate is greater than the third sampling rate.
[0010] In some embodiments, audio feature analysis is performed on the audio data, and the sampling rate is determined based on the analysis results. The method further includes: for each audio frame, calculating its energy intensity; if the energy intensity of the frame is lower than a preset energy threshold, it is determined to be a silent segment or a noise segment, and downsampling is performed using a fourth sampling rate, or the sampling of the frame is skipped directly; if the energy intensity of the frame is not lower than the preset energy threshold, it is determined to be a valid sound segment, and a high-frequency component detection step is performed, wherein the fourth sampling rate is less than the third sampling rate.
[0011] In some embodiments, for each audio frame, its energy intensity is calculated, specifically including: for each audio frame, its average power RMS value is calculated.
[0012] In some embodiments, high-frequency component detection is performed on the audio data, and the energy in the high-frequency band of the audio frame is calculated, specifically including:
[0013] Perform a Fast Fourier Transform on each frame of audio data to obtain the frequency domain coefficients. ;
[0014] Determine the corresponding frequency index based on the preset high-frequency band range. and ;
[0015] According to the formula Calculate the high-frequency band energy of this frame. .
[0016] Secondly, the present invention also discloses a method for decoding vehicle audio diagnostic data, comprising the following steps:
[0017] Obtain the compressed audio data obtained by the method described in the first aspect;
[0018] Select the corresponding interpolation algorithm based on the audio content type or fault type corresponding to the compressed audio data;
[0019] The compressed audio data is reconstructed using a selected interpolation algorithm to obtain a high-resolution audio curve that can be used for fault diagnosis.
[0020] In some embodiments, a corresponding interpolation algorithm is selected based on the audio content type corresponding to the compressed audio data, specifically including:
[0021] If the audio data is music content, then the cubic spline interpolation algorithm should be selected;
[0022] If the audio data is speech-based, then select the linear interpolation algorithm;
[0023] Based on the fault type corresponding to the compressed audio data, a corresponding interpolation algorithm is selected, specifically including:
[0024] If the fault type is frequency-related, then the cubic spline interpolation algorithm is selected;
[0025] If the fault type is amplitude-dependent, then the linear interpolation algorithm is selected.
[0026] Thirdly, the present invention also discloses an electronic device, comprising:
[0027] One or more processors;
[0028] Memory, used to store one or more programs;
[0029] When the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle audio diagnostic data compression method as described in the first aspect, or the vehicle audio diagnostic data decoding method as described in the second aspect.
[0030] Fourthly, the present invention also discloses a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps in the vehicle audio diagnostic data compression method as described in the first aspect, or the steps in the vehicle audio diagnostic data decoding method as described in the second aspect.
[0031] The present invention has at least the following beneficial effects:
[0032] This invention achieves refined control of the "on-demand allocation" of sampling rate for capturing in-vehicle audio data through the collaborative innovation of a dynamic sampling rate adjustment mechanism, fundamentally solving the problem of resource waste caused by continuous high sampling rate recording. Attached Figure Description
[0033] Figure 1 A flowchart illustrating a method for compressing vehicle audio diagnostic data according to an embodiment of the present invention;
[0034] Figure 2 A flowchart illustrating another method for compressing vehicle audio diagnostic data provided in an embodiment of the present invention;
[0035] Figure 3 This is a flowchart illustrating a method for decoding vehicle audio diagnostic data according to an embodiment of the present invention.
[0036] Figure 4 A flowchart illustrating another method for decoding vehicle audio diagnostic data provided in an embodiment of the present invention;
[0037] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0039] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.
[0040] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0041] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0042] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.
[0043] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.
[0044] In intelligent cockpit infotainment systems, the audio module needs to continuously capture raw audio data, such as microphone input signals and speaker output signals, for diagnosing intermittent faults (such as silence, noise, and popping sounds). Traditional solutions employ fixed-compression storage and segmented trigger recording. Fixed-compression storage uses a general audio compression algorithm, but details are lost during compression (such as high-frequency transient noise), making it impossible to reconstruct fault waveforms. Segmented trigger recording only starts recording when an anomaly is detected, but it cannot capture signal distortion prior to the fault. Saving raw PCM data at the full sampling rate (e.g., 48kHz) leads to wasted storage resources, short storage cycles, and low retrieval efficiency, severely impacting the vehicle's storage space.
[0045] In order to effectively improve or even completely solve the above-mentioned problems in the related technologies, this disclosure provides corresponding solutions.
[0046] Figure 1 This is a flowchart illustrating a method for compressing vehicle audio diagnostic data according to an embodiment of the present invention. See also... Figure 1 An embodiment of a method for compressing in-vehicle audio diagnostic data includes the following steps:
[0047] S1a, Obtain raw audio data;
[0048] S2a. Perform audio feature analysis on the raw audio data to determine the sampling rate;
[0049] S3a. Based on the determined sampling rate, the original audio data is downsampled to obtain compressed audio data for storage or transmission.
[0050] In some embodiments, the raw audio data is the raw data for in-vehicle audio diagnostics.
[0051] In some embodiments, after obtaining the compressed audio data, the compressed audio data is encapsulated with metadata such as sampling rate identifier, frame number, and diagnostic timestamp to generate an in-vehicle audio diagnostic compressed data package for easy subsequent storage or transmission.
[0052] This invention dynamically adjusts the sampling rate of audio data based on the usage scenario of the audio system. Based on a predetermined target sampling rate, it downsamples the original high-sampling-rate audio data to generate low-sampling-rate compressed audio data. Through the collaborative innovation of the dynamic sampling rate adjustment mechanism, it achieves refined control of the "on-demand allocation" of sampling rate for capturing in-vehicle audio data, fundamentally solving the resource waste problem caused by continuous high-sampling-rate recording.
[0053] This invention employs an audio data capture module that interacts with the audio driver to retrieve raw audio data from the audio buffer. This module continuously captures audio data at a reduced sampling rate (such as 16kHz or 8kHz) and saves it to a storage device, reducing the data volume to 1 / 3 to 1 / 6 of the original sampling rate (typically 48kHz).
[0054] In some embodiments, after acquiring the raw audio data, the method further includes the following steps: determining whether the system storage space is sufficient; if the system storage space is insufficient, automatically reducing the sampling rate to a preset minimum value; otherwise, performing an audio feature analysis step. In some embodiments, the preset minimum value is 8kHz.
[0055] The above-mentioned solution of the present invention solves the problem that insufficient storage space caused by continuous monitoring of audio data in vehicle systems leads to the loss of faulty audio data, which has an adverse effect on fault diagnosis.
[0056] In some embodiments, frame-level audio feature analysis of audio data includes high-frequency component energy analysis and content type feature analysis. Based on the analysis results, the sampling rate is determined according to the rule of "high high-frequency energy → high sampling rate, music → medium sampling rate, speech → low sampling rate". The audio data is encoded and compressed according to the determined sampling rate, and metadata such as sampling rate and timestamp are encapsulated.
[0057] In some embodiments, see Figure 2 The audio data undergoes audio feature analysis, and the sampling rate is determined based on the analysis results. This includes: detecting high-frequency components in the audio data and calculating the energy in the high-frequency band of the audio frame. If the high-frequency band energy exceeds a preset high-frequency energy threshold, a first sampling rate is used. If the high-frequency band energy does not exceed the preset high-frequency energy threshold, the audio data undergoes content feature analysis to identify its content type. If it is identified as music content, a second sampling rate is used. If it is identified as speech content, a third sampling rate is used. The first sampling rate is greater than the second sampling rate, and the second sampling rate is greater than the third sampling rate.
[0058] In some embodiments, a lower sampling rate (16kHz) is used for speech content (which typically has its main capabilities below 4kHz), and a higher sampling rate (32kHz) is used for music content (which contains more high-frequency components).
[0059] In some embodiments, audio feature analysis is performed on the audio data, and the sampling rate is determined based on the analysis results, including: high-frequency component detection of the audio data, calculation of the energy in the high-frequency band of the audio frame, and if the high-frequency band energy exceeds a preset high-frequency energy threshold, a first sampling rate is used; if the high-frequency band energy does not exceed the preset high-frequency energy threshold, a third sampling rate is used.
[0060] In some embodiments, the first sampling rate is 48 kHz. The second sampling rate is 32 kHz. The third sampling rate is 16 kHz.
[0061] In some embodiments, audio feature analysis is performed on the audio data, and the sampling rate is determined based on the analysis results. The method further includes: for each audio frame, calculating its energy intensity; if the energy intensity of the frame is lower than a preset energy threshold, it is determined to be a silent segment or a noise segment, and downsampling is performed using a fourth sampling rate, or the sampling of the frame is skipped directly; if the energy intensity of the frame is not lower than the preset energy threshold, it is determined to be a valid sound segment, and a high-frequency component detection step is performed, wherein the fourth sampling rate is less than the third sampling rate.
[0062] In some embodiments, the fourth sampling rate is 8 kHz.
[0063] In some embodiments, for each audio frame, its energy intensity is calculated, specifically including: for each audio frame, its average power RMS value is calculated.
[0064] Signal energy calculation is used to quantify the strength of an audio signal. It calculates the average power RMS value of the output signal based on a discrete audio signal of an audio frame (containing 1024 sampling points).
[0065]
[0066] The output RMS value is compared with the set energy threshold (determined experimentally, usually 1.5 to 2 times the background noise capability), and the energy intensity is compared with the preset energy threshold to effectively distinguish between silent, noisy, and effective sound segments. Represents the root mean square value of the signal. This represents the amplitude of the discrete-time signal at the nth sampling point, where N represents the total number of sampling points involved in the calculation.
[0067] The energy threshold is calibrated experimentally. The calculated RMS value is compared with the energy threshold: if the RMS value is lower than the threshold, it is determined to be a silent segment or a noise segment, and a low sampling rate or skipping storage can be used to save resources. If the RMS value is higher than the threshold, it is determined to be a valid sound segment, and the preset sampling rate strategy (i.e., step S2) is used for storage to ensure diagnostic accuracy.
[0068] In some embodiments, the preset sampling rate strategy is as follows: if significant high-frequency components are detected, a high sampling rate (e.g., 48kHz) is maintained to ensure diagnostic accuracy. If it is speech or mid-to-low frequency music, the sampling rate is downsampled to 16kHz to optimize storage while ensuring intelligibility and sound quality.
[0069] High-frequency component detection is used to determine whether an audio signal contains abundant high-frequency components (greater than 10kHz). It calculates the energy within the high-frequency band of an audio frame. ,like If the signal exceeds a preset threshold (which can be set as a percentage of the total energy or as an absolute energy value), it is determined that the signal contains significant high-frequency components, and the sampling rate is adjusted to 48kHz.
[0070] In some embodiments, high-frequency component detection is performed on the audio data, and the energy in the high-frequency band of the audio frame is calculated, specifically including:
[0071] Perform a Fast Fourier Transform on each frame of audio data to obtain the frequency domain coefficients. ;
[0072] Determine the corresponding frequency index based on the preset high-frequency band range. and ;
[0073] According to the formula Calculate the high-frequency band energy of this frame. ;
[0074] If the high-frequency band energy of a certain frame If the sampling rate exceeds the preset threshold, the sampling rate of the frame and subsequent related frames will be dynamically adjusted to the first sampling rate. It is a frequency index, representing different frequency components. It is the starting frequency index of the high-frequency band. It is the end frequency index of the high-frequency band.
[0075] In some embodiments, the vehicle audio diagnostic data compression method of the present invention further includes the following steps: selecting a corresponding interpolation algorithm according to the audio content type or fault type to convert low sampling rate data into a high-resolution audio curve that can be used for fault diagnosis.
[0076] In some embodiments, a corresponding interpolation algorithm is selected based on the audio content type or fault type to convert low sampling rate data into a high-resolution audio curve that can be used for fault diagnosis. Specifically, if the audio data is music content, cubic spline interpolation is used; if the audio data is speech content, linear interpolation is used; if the fault type is a frequency-related fault, cubic spline interpolation is used; and if the fault type is an amplitude-related fault, linear interpolation is used.
[0077] Based on the same inventive concept Figure 3 This is a flowchart illustrating a method for compressing vehicle audio diagnostic data according to an embodiment of the present invention. See also... Figure 3 This disclosure also provides a method for decoding vehicle audio diagnostic data, including the following steps:
[0078] S1b: Obtain the compressed audio data obtained by the vehicle audio diagnostic data compression method described in any of the above embodiments;
[0079] S2b. Select the corresponding interpolation algorithm based on the audio content type or fault type corresponding to the compressed audio data;
[0080] S3b. The compressed audio data is interpolated and reconstructed using the selected interpolation algorithm to obtain a high-resolution audio curve that can be used for fault diagnosis.
[0081] When fault diagnosis is required, the compressed data packet is first decapsulated to extract the compressed audio data.
[0082] In some embodiments, see Figure 4 Based on the audio content type corresponding to the compressed audio data, a corresponding interpolation algorithm is selected, specifically including:
[0083] If the audio data is music content, then the cubic spline interpolation algorithm should be selected;
[0084] If the audio data is speech-based, then the linear interpolation algorithm should be selected.
[0085] In some embodiments, the corresponding interpolation algorithm is selected based on the fault type corresponding to the compressed audio data, specifically including:
[0086] If the fault type is frequency-related, then the cubic spline interpolation algorithm is selected;
[0087] If the fault type is amplitude-dependent, then the linear interpolation algorithm is selected.
[0088] Linear interpolation is simple to calculate, consumes few resources, and is suitable for speech signals and resource-constrained environments. The calculation formula is as follows:
[0089] in, and is the adjacent sampling point, and x is the position of the interpolation point.
[0090] Cubic spline interpolation can generate smoother audio curves, retain more high-frequency components, and is more suitable for music signals and fine analysis. Its basic formula is:
[0091]
[0092] Among them, coefficient , , , It is necessary to confirm by solving the tridiagonal matrix that the first and second derivatives of the curve are continuous at the connection points.
[0093] This invention dynamically adjusts the sampling rate of audio data according to the usage scenario of the audio system and uses interpolation algorithms to reconstruct the data for fault diagnosis. Through an innovative architecture of dynamic downsampling storage and hierarchical interpolation reconstruction, this invention resolves the contradiction between large data storage and high-precision analysis in in-vehicle audio diagnostics. While ensuring the ability to reconstruct fault waveforms, it significantly reduces storage overhead, such as by more than 80%. This invention is particularly suitable for long-term audio status monitoring and occasional fault tracing in smart cockpits, providing technical support for the reliability design of audio systems.
[0094] This invention achieves refined control of the "on-demand allocation" sampling rate for capturing in-vehicle audio data through the synergistic innovation of a dynamic sampling rate adjustment mechanism, intelligent audio content recognition, and high-fidelity interpolation reconstruction algorithm, fundamentally solving the problem of resource waste caused by continuous high sampling rate recording.
[0095] The above technical solutions mainly address the contradiction between big data storage and high-precision analysis in vehicle audio diagnostics. There are similar alternatives that can also increase the system's storage space, but they also increase hardware costs.
[0096] Based on the same inventive concept, this disclosure also provides an in-vehicle audio diagnostic data compression system. This in-vehicle audio diagnostic data compression system can implement the in-vehicle audio diagnostic data compression method provided in the preceding embodiments. The in-vehicle audio diagnostic data compression system includes:
[0097] An audio data acquisition module, which is used to acquire raw audio data;
[0098] A dynamic sampling rate adjustment module is used to perform audio feature analysis on the original audio data and determine the sampling rate.
[0099] An audio data compression module is used to downsample the original audio data according to a determined sampling rate to obtain compressed audio data for storage or transmission.
[0100] In some embodiments, the audio data acquisition module interacts with the audio driver and is responsible for acquiring raw audio data from the audio buffer.
[0101] The dynamic sampling rate adjustment module monitors system resource usage and audio signal characteristics in real time, dynamically determining the sampling rate strategy. This module considers factors including system resource availability, audio content characteristics, and high-frequency component detection.
[0102] In some embodiments, the dynamic sampling rate adjustment module is also used to monitor system resource availability and determine whether the system storage space is sufficient after acquiring the original audio data. When the system CPU load is higher than a threshold (e.g., 70%) or the system storage space is insufficient, the sampling rate is automatically reduced to a preset minimum value (e.g., 8kHz). Otherwise, the audio feature analysis step is performed.
[0103] Based on the same inventive concept, this disclosure also provides an in-vehicle audio diagnostic data decoding system. This in-vehicle audio diagnostic data decoding system can implement the in-vehicle audio diagnostic data decoding method provided in the preceding embodiments. The in-vehicle audio diagnostic data decoding system includes:
[0104] A compressed data acquisition module, which is used to acquire compressed audio data;
[0105] An interpolation algorithm determination module is used to select the corresponding interpolation algorithm based on the audio content type or fault type corresponding to the compressed audio data.
[0106] An audio data reconstruction module is used to reconstruct the compressed audio data using a selected interpolation algorithm to obtain a high-resolution audio curve that can be used for fault diagnosis.
[0107] The core of the technical solution of this invention is to reduce resource consumption by lowering the sampling rate of audio data capture, and to reconstruct the audio curve through an interpolation algorithm for fault diagnosis.
[0108] The audio data reconstruction module is responsible for converting low-sampling-rate data into high-resolution audio curves suitable for fault diagnosis. This module provides various interpolation algorithms, including linear interpolation, cubic spline interpolation, and finite impulse response filtering reconstruction algorithms.
[0109] The audio data reconstruction module of this invention also provides an algorithm selection strategy, such as automatically selecting the corresponding interpolation algorithm according to the audio content type. For example, linear interpolation is used for speech content, and cubic spline interpolation is used for music content; cubic spline interpolation is used for frequency-related faults, and linear interpolation is used for amplitude-related faults. This intelligent selection ensures reconstruction quality while maximizing the saving of system resources.
[0110] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 5As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement any of the vehicle audio diagnostic data compression methods or vehicle audio diagnostic data decoding methods described in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.
[0111] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).
[0112] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.
[0113] In some embodiments, the one or more processors 101 include a field-programmable gate array.
[0114] This invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when executed by a processor, the program implements the steps of any of the vehicle audio diagnostic data compression methods described in the above embodiments, or the steps of any of the vehicle audio diagnostic data decoding methods described in the above embodiments. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0115] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described vehicle audio diagnostic data compression method or vehicle audio diagnostic data decoding method.
[0116] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0117] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0118] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0119] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0120] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0121] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0122] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0125] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A method for compressing vehicle audio diagnostic data, characterized in that, Includes the following steps: Obtain the raw audio data; Perform audio feature analysis on the raw audio data to determine the sampling rate; Based on the determined sampling rate, the original audio data is downsampled to obtain compressed audio data for storage or transmission.
2. The method according to claim 1, characterized in that: After acquiring the raw audio data, the following steps are also included: determining whether the system storage space is sufficient. If the system storage space is insufficient, the sampling rate is automatically reduced to the preset minimum value; otherwise, the audio feature analysis step is performed.
3. The method according to claim 1 or 2, characterized in that: Audio feature analysis is performed on the audio data, and the sampling rate is determined based on the analysis results. This includes: high-frequency component detection of the audio data, calculation of the energy in the high-frequency band of the audio frame, and if the high-frequency band energy exceeds a preset high-frequency energy threshold, a first sampling rate is used. If the high-frequency band energy does not exceed the preset high-frequency energy threshold, content feature analysis is performed on the audio data to identify its content type. If it is identified as music content, a second sampling rate is used. If it is identified as speech content, a third sampling rate is used. The first sampling rate is greater than the second sampling rate, and the second sampling rate is greater than the third sampling rate.
4. The method according to claim 3, characterized in that: The audio data is subjected to audio feature analysis, and the sampling rate is determined based on the analysis results. The method also includes: for each audio frame, the energy intensity is calculated. If the energy intensity of the frame is lower than the preset energy threshold, it is determined to be a silent segment or a noise segment, and the fourth sampling rate is used for downsampling, or the sampling of the frame is skipped directly. If the energy intensity of the frame is not lower than the preset energy threshold, it is determined to be a valid sound segment, and the high-frequency component detection step is performed. The fourth sampling rate is less than the third sampling rate.
5. The method according to claim 4, characterized in that: For each audio frame, its energy intensity is calculated, specifically including: for each audio frame, its average power RMS value is calculated.
6. The method according to claim 3, characterized in that: High-frequency component detection is performed on the audio data, and the energy in the high-frequency band of the audio frame is calculated. Specifically, this includes: Perform a Fast Fourier Transform on each frame of audio data to obtain the frequency domain coefficients. ; Determine the corresponding frequency index based on the preset high-frequency band range. and ; According to the formula Calculate the high-frequency band energy of this frame. .
7. A method for decoding vehicle audio diagnostic data, characterized in that, Includes the following steps: Obtain the compressed audio data obtained by the method described in any one of claims 1-6; Select the corresponding interpolation algorithm based on the audio content type or fault type corresponding to the compressed audio data; The compressed audio data is reconstructed using a selected interpolation algorithm to obtain a high-resolution audio curve that can be used for fault diagnosis.
8. The method according to claim 7, characterized in that: Based on the audio content type corresponding to the compressed audio data, a corresponding interpolation algorithm is selected, specifically including: If the audio data is music content, then the cubic spline interpolation algorithm should be selected; If the audio data is speech-based, then select the linear interpolation algorithm; Based on the fault type corresponding to the compressed audio data, a corresponding interpolation algorithm is selected, specifically including: If the fault type is frequency-related, then the cubic spline interpolation algorithm is selected; If the fault type is amplitude-dependent, then the linear interpolation algorithm is selected.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle audio diagnostic data compression method as described in any one of claims 1 to 6, or the vehicle audio diagnostic data decoding method as described in claim 7 or 8.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the steps in the vehicle audio diagnostic data compression method as described in any one of claims 1 to 6, or the steps in the vehicle audio diagnostic data decoding method as described in claim 7 or 8.