Dynamic audio acquisition and debugging method and system for vehicle-mounted entertainment system
By dynamically adjusting the audio collection time and file storage method, the problem of inconvenient audio file collection in the prior art is solved, and efficient audio debugging and resource management are achieved.
Patent Information
- Application Number
- CN202510741862.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-26
AI Technical Summary
Existing technologies cannot automatically complete the collection of audio files and cannot dynamically clear redundant files, resulting in excessive system resource usage, and audio file classification is inconvenient for developers to debug.
The audio data acquisition time is dynamically adjusted according to the number of sound cards turned on, audio files are stored according to power cycle numbers, and the earliest file is deleted when the threshold is reached for packaging and compression.
Improves the development efficiency of audio debugging, reduces system resource usage, and provides more effective debugging information for developers to analyze.
Smart Images

Figure CN120705122A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle computers, and in particular to a method and system for dynamically collecting and debugging audio of an in-vehicle entertainment system. Background Art
[0002] The automotive industry is rapidly evolving toward intelligentization, with in-car entertainment systems becoming a key development focus. This has led to increasing complexity in audio modules, which must process audio data from modules such as radios, multimedia music, navigation prompts, and system notifications, creating additional challenges during project development. In actual development, audio debugging differs from other modules, as it involves both control and audio data channels. System logs cannot provide complete audio data information, requiring dedicated audio data collection and analysis. This inability to automatically collect the audio data required for debugging reduces development efficiency.
[0003] In the existing technology, traditional audio debugging has some defects: it is impossible to automatically complete the collection of audio files, which reduces the development efficiency of audio modules; the number of collected files and the size of files cannot be controlled, and audio files cannot be dynamically cleared, which will create the risk of excessive system resource usage; audio files are only recorded in chronological order, and audio files cannot be classified according to power cycles, which cannot provide developers with convenient debugging information; traditional audio debugging can only collect audio files at fixed times, and cannot dynamically adjust the audio collection time according to the adjustment of DSP audio processing, which may collect a large amount of information that is useless for debugging. Summary of the Invention
[0004] In order to solve the problems existing in the above-mentioned prior art, the present invention provides a method and system for dynamic audio acquisition and debugging of an in-vehicle entertainment system, which provides more effective debugging information for debugging work, improves development efficiency, and reduces the space occupied by audio files, avoiding the risk of system abnormalities caused by occupying too many system resources.
[0005] To this end, the technical solution adopted in the present invention is: The present invention provides a method for dynamic audio acquisition and debugging of an in-vehicle entertainment system, the method comprising: Read the previous power cycle number, and obtain the current power cycle number based on the previous power cycle number; According to the number of currently open sound cards, audio data of the corresponding time is collected, and the collected audio files are stored in the folder corresponding to the current power cycle number; Read the total size of audio files in all folders. If the total size is greater than the specified threshold, delete the redundant audio files. The remaining audio files in the folder are packaged and compressed, and the current system status is read. If the system status is startup completed, the audio collection is repeated, otherwise the audio collection process is terminated.
[0006] According to the above scheme, the audio data includes the audio data of multimedia music, system prompt sound, navigation prompt sound, radio media sound input to the DSP and the corresponding audio data output after being processed by the DSP.
[0007] According to the above scheme, the current power cycle number is obtained as follows: Read the previous power cycle number. If the previous power cycle number does not exist, the current power cycle number is 1; otherwise, the previous power cycle number is incremented to obtain the preliminary number of the current power cycle. Determine whether the current power cycle preliminary number exceeds a preset value. If so, set the current power cycle number to 1; if not, set the current power cycle number to be equal to the current power cycle preliminary number.
[0008] According to the above scheme, the steps of storing the collected audio files in the folder corresponding to the current power cycle number are as follows: The collected audio file is stored in the folder corresponding to the current power cycle number. If the folder corresponding to the current power cycle number does not exist, a folder is created; if an audio file is already stored in the folder corresponding to the current power cycle number, the folder is cleared to store the current audio file.
[0009] According to the above solution, deleting redundant audio files is specifically as follows: The earliest power cycle number and its corresponding folder are found according to the current power cycle number, and the earliest audio file in the folder is deleted in chronological order until the total size of all audio files is less than a specified threshold.
[0010] The present invention also provides an audio dynamic acquisition and debugging system for an in-vehicle entertainment system, the system comprising: A numbering module is used to read the number of the previous power cycle and obtain the current power cycle number based on the previous power cycle number; The acquisition module is used to collect audio data of the corresponding time according to the number of currently opened sound cards, and store the collected audio files in the folder corresponding to the current power cycle number; The cleaning module is used to read the total size of audio files in all folders. If the total size is greater than the specified threshold, the redundant audio files are deleted; The compression module is used to package and compress the remaining audio files in the folder and read the current system status. If the system status is startup completed, the audio collection is repeated, otherwise the audio collection process is terminated.
[0011] According to the above solution, the numbering module is specifically used for: Read the previous power cycle number. If the previous power cycle number does not exist, the current power cycle number is 1; otherwise, the previous power cycle number is incremented to obtain the preliminary number of the current power cycle. Determine whether the current power cycle preliminary number exceeds a preset value. If so, set the current power cycle number to 1; if not, set the current power cycle number to be equal to the current power cycle preliminary number.
[0012] According to the above solution, the acquisition module is specifically used for: Collect the audio data of multimedia music, system prompt tone, navigation prompt tone, and radio media tone input to the DSP and the corresponding audio data output after DSP processing, and store the collected audio files in the folder corresponding to the current power cycle number. If the folder corresponding to the current power cycle number does not exist, create a folder; if an audio file has been stored in the folder corresponding to the current power cycle number, clear the folder and store the current audio file.
[0013] According to the above solution, the cleaning module is specifically used to: The total size of audio files in all folders is read. If the total size is greater than a specified threshold, the earliest power cycle number and its corresponding folder are found based on the current power cycle number, and the earliest audio file in the folder is deleted in chronological order until the total size of all audio files is less than the specified threshold.
[0014] Finally, the present invention further provides a computer storage medium storing a computer program executable by a processor, wherein the computer program executes the above-mentioned method for audio dynamic acquisition and debugging of an in-vehicle entertainment system.
[0015] The beneficial effects produced by the present invention are: The present invention dynamically adjusts the time for automatic audio data collection according to the number of sound cards opened, thereby avoiding the collection of a large number of useless audio files only according to fixed time, providing more effective debugging information for debugging work and improving development efficiency; and the present invention numbering each power cycle, saving audio files in the same power cycle in the same folder, completing the classification of audio files between different power cycles, and facilitating developers to analyze audio files according to the power cycle.
[0016] Furthermore, the present invention dynamically deletes the oldest audio files while automatically completing audio file collection, thereby only saving audio files within a certain time window and packaging and compressing the remaining audio files, thereby reducing the space occupied by audio files and avoiding the risk of system abnormalities caused by occupying too many system resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of a method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to one embodiment of the present invention; Figure 2 This is a schematic diagram of an audio data flow in an in-vehicle entertainment system according to an embodiment of the present invention; Figure 3 This is a flowchart of an audio data collection process according to an embodiment of the present invention; Figure 4 The present invention is a schematic diagram of a module of an audio dynamic acquisition and debugging system for an in-vehicle entertainment system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0019] The embodiment of the present invention provides a method for dynamic audio acquisition and debugging of an in-vehicle entertainment system. Figure 1 As shown, the method includes: S1. Read the previous power cycle number, and obtain the current power cycle number based on the previous power cycle number.
[0020] Specifically, the current power cycle number is specifically: read the previous power cycle number, if the previous power cycle number does not exist, initialize the current power cycle number to 1; otherwise, increment the previous power cycle number to obtain the current power cycle preliminary number.
[0021] Determine whether the current power cycle preliminary number exceeds the preset value. If it exceeds the preset value, set the current power cycle number to 1 to ensure that the number is between one and the preset value; if it does not exceed the preset value, the current power cycle number is equal to the current power cycle preliminary number.
[0022] S2. Collect audio data of corresponding time according to the number of currently opened sound cards, and store the collected audio files in a folder corresponding to the current power cycle number.
[0023] Specifically, the audio data includes multimedia music, system prompt sounds, navigation prompt sounds, radio media sounds input to the DSP and corresponding audio data output after being processed by the DSP. Figure 2 In an in-car entertainment system, the audio data flow is shown in the figure: multimedia music, system prompts, and navigation prompts are transmitted from the SOC to the DSP, while radio media sounds are transmitted from the radio chip to the DSP. The DSP processes the received audio data and transmits it to the power amplifier (PA), which then transmits it to the speaker. Vehicle audio modules often exhibit noise, pops, and silence, requiring troubleshooting of each module in the audio chain. Therefore, the SOC collects audio data input to and output from the DSP and saves them as corresponding audio files for testing.
[0024] When collecting audio data, the system determines the number of currently active sound cards. For each additional sound card, the audio collection time is extended. Dynamically adjusting the audio file collection time based on the number of sound cards active ensures that the collected audio file contains the most information useful for debugging.
[0025] After the audio collection is completed, the collected audio file is saved in the folder corresponding to the current power cycle number. If the folder corresponding to the current power cycle number does not exist, a folder is created and the audio file collected this time is stored; if an audio file has been stored in the folder corresponding to the current power cycle number, the audio file previously stored in this folder is cleared and the currently collected audio file is stored.
[0026] In the actual development process of the audio module, some debugging problems mostly occur when the DSP is processing audio data. The traditional audio acquisition method collects audio files at fixed time intervals, which may miss the audio files when the acquisition problem occurs. Especially when the in-vehicle entertainment system is silent for a long time, the traditional audio acquisition method will collect a large number of useless audio files and cannot provide effective information for debugging. The present method dynamically adjusts the time of audio file acquisition according to the sound card startup status to ensure that the collected audio files contain most of the information that is effective for debugging. In addition, as the system operation time increases, the number of collected audio files also increases. In the traditional audio acquisition method, developers need to find the corresponding audio files by time, and audio problems in the development process are usually related to the system power cycle. Therefore, the traditional method is not conducive to developers to quickly locate the problem. In the embodiment of the present invention, the audio acquisition files are stored in different folders according to different startup times, which facilitates the rapid location of audio acquisition and debugging files at different time nodes.
[0027] S3. Read the total size of audio files in all folders. If the total size is greater than a specified threshold, delete the redundant audio files.
[0028] Specifically, the earliest power cycle number and its corresponding folder are found according to the current power cycle number, and the earliest audio file in the folder is deleted in chronological order until the total size of all audio files is less than a specified threshold.
[0029] As the number of audio files continues to increase, the space occupied by audio files is getting larger and larger. If the number of audio files is not limited, the system resources will gradually be exhausted, which will seriously affect the stability of system operation. Therefore, it is necessary to clean up the audio files. This method embodiment only saves audio files within a certain time window. Audio files outside the time window will be deleted to ensure that excessive system resources are not occupied.
[0030] S4. The remaining audio files in the folder are packaged and compressed, and the current system status is read. If the system status is startup completed, the audio collection is repeated, otherwise the audio collection process is terminated.
[0031] Specifically, if Figure 3 As shown, the current system status is read. If the system status is startup completed, it means that the vehicle's audio acquisition module has not yet finished running. Then, according to the number of currently opened sound cards, audio acquisition is performed again for a corresponding time. After the audio acquisition is completed, a certain time is paused and steps S2-S4 in this embodiment are repeated. If the system status is not startup completed, it means that the vehicle's audio acquisition module has finished running, and the audio acquisition process is terminated.
[0032] In addition, the embodiment of the present invention also provides a vehicle entertainment system audio dynamic acquisition and debugging system, such as Figure 4 As shown, the system includes: A numbering module is used to read the number of the previous power cycle and obtain the current power cycle number based on the previous power cycle number; The acquisition module is used to collect audio data of the corresponding time according to the number of currently opened sound cards, and store the collected audio files in the folder corresponding to the current power cycle number; The cleaning module is used to read the total size of audio files in all folders. If the total size is greater than the specified threshold, the redundant audio files are deleted; The compression module is used to package and compress the remaining audio files in the folder and read the current system status. If the system status is startup completed, the audio collection is repeated, otherwise the audio collection process is terminated.
[0033] In addition, embodiments of the present invention further provide a computer storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App store, etc., on which a computer program is stored. When the program is executed by a processor, the computer-readable storage medium of this embodiment implements a method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to a method embodiment.
[0034] An embodiment of the present invention provides a method and system for dynamic audio acquisition and debugging of an in-vehicle entertainment system. By dynamically adjusting the time for automated audio data acquisition according to the number of sound cards opened, it avoids the collection of a large number of useless audio files only according to a fixed time, provides more effective debugging information for debugging work, and improves development efficiency. In addition, the present invention numbers each power cycle, saves audio files in the same power cycle in the same folder, completes the classification of audio files between different power cycles, and facilitates developers to analyze audio files according to the power cycle.
[0035] Furthermore, an embodiment of the present invention provides a method and system for dynamic audio acquisition and debugging of an in-vehicle entertainment system. While automatically completing audio file acquisition, the system dynamically deletes the oldest audio files, thereby only saving audio files within a certain time window and packaging and compressing the remaining audio files, thereby reducing the space occupied by audio files and avoiding the risk of system abnormalities caused by occupying too many system resources.
[0036] Example 2 Based on Example 1, this embodiment of the present invention provides an audio dynamic acquisition and debugging system for an in-vehicle entertainment system, which differs from Example 1 in that: The numbering module is specifically used for: Read the previous power cycle number. If the previous power cycle number does not exist, the current power cycle number is 1; otherwise, the previous power cycle number is incremented to obtain the preliminary number of the current power cycle. Determine whether the current power cycle preliminary number exceeds a preset value. If so, set the current power cycle number to 1; if not, set the current power cycle number to be equal to the current power cycle preliminary number.
[0037] The acquisition module is specifically used for: Collect the audio data of multimedia music, system prompt tone, navigation prompt tone, and radio media tone input to the DSP and the corresponding audio data output after DSP processing, and store the collected audio files in the folder corresponding to the current power cycle number. If the folder corresponding to the current power cycle number does not exist, create a folder; if an audio file has been stored in the folder corresponding to the current power cycle number, clear the folder and store the current audio file.
[0038] The cleaning module is specifically used to: The total size of audio files in all folders is read. If the total size is greater than a specified threshold, the earliest power cycle number and its corresponding folder are found based on the current power cycle number, and the earliest audio file in the folder is deleted in chronological order until the total size of all audio files is less than the specified threshold.
[0039] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, or two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.
[0040] The size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0041] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A method for dynamic audio acquisition and debugging of an in-vehicle entertainment system, characterized in that: include: Read the previous power cycle number, and obtain the current power cycle number based on the previous power cycle number; According to the number of currently open sound cards, audio data of the corresponding time is collected, and the collected audio files are stored in the folder corresponding to the current power cycle number; Read the total size of audio files in all folders. If the total size is greater than the specified threshold, delete the redundant audio files. The remaining audio files in the folder are packaged and compressed, and the current system status is read. If the system status is startup completed, the audio collection is repeated, otherwise the audio collection process is terminated.
2. The method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to claim 1, characterized in that: The audio data includes audio data of multimedia music, system prompt sound, navigation prompt sound, and radio media sound input to the DSP and corresponding audio data output after being processed by the DSP.
3. The method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to claim 1, characterized in that: The current power cycle number is obtained as follows: Read the previous power cycle number. If the previous power cycle number does not exist, the current power cycle number is 1; otherwise, the previous power cycle number is incremented to obtain the preliminary number of the current power cycle. Determine whether the current power cycle preliminary number exceeds a preset value. If so, set the current power cycle number to 1; if not, set the current power cycle number to be equal to the current power cycle preliminary number.
4. The method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to claim 1, characterized in that: The method of storing the collected audio files in the folder corresponding to the current power cycle number is as follows: The collected audio file is stored in the folder corresponding to the current power cycle number. If the folder corresponding to the current power cycle number does not exist, a folder is created; if an audio file is already stored in the folder corresponding to the current power cycle number, the folder is cleared to store the current audio file.
5. The method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to claim 1, characterized in that: The specific steps of deleting redundant audio files are as follows: The earliest power cycle number and its corresponding folder are found according to the current power cycle number, and the earliest audio file in the folder is deleted in chronological order until the total size of all audio files is less than a specified threshold.
6. An audio dynamic acquisition and debugging system for an in-vehicle entertainment system, characterized in that: include: A numbering module is used to read the number of the previous power cycle and obtain the current power cycle number based on the previous power cycle number; The acquisition module is used to collect audio data of the corresponding time according to the number of currently opened sound cards, and store the collected audio files in the folder corresponding to the current power cycle number; The cleaning module is used to read the total size of audio files in all folders. If the total size is greater than the specified threshold, the redundant audio files are deleted; The compression module is used to package and compress the remaining audio files in the folder and read the current system status. If the system status is startup completed, the audio collection is repeated, otherwise the audio collection process is terminated.
7. The audio dynamic acquisition and debugging system for the in-vehicle entertainment system according to claim 6, characterized in that: The numbering module is specifically used for: Read the previous power cycle number. If the previous power cycle number does not exist, the current power cycle number is 1; otherwise, the previous power cycle number is incremented to obtain the preliminary number of the current power cycle. Determine whether the current power cycle preliminary number exceeds a preset value. If so, set the current power cycle number to 1; if not, set the current power cycle number to be equal to the current power cycle preliminary number.
8. The audio dynamic acquisition and debugging system for the in-vehicle entertainment system according to claim 6 is characterized in that: The acquisition module is specifically used for: Collect the audio data of multimedia music, system prompt tone, navigation prompt tone, and radio media tone input to the DSP and the corresponding audio data output after DSP processing, and store the collected audio files in the folder corresponding to the current power cycle number. If the folder corresponding to the current power cycle number does not exist, create a folder; if an audio file has been stored in the folder corresponding to the current power cycle number, clear the folder and store the current audio file.
9. The audio dynamic acquisition and debugging system for the in-vehicle entertainment system according to claim 6, characterized in that: The cleaning module is specifically used for: The total size of audio files in all folders is read. If the total size is greater than a specified threshold, the earliest power cycle number and its corresponding folder are found based on the current power cycle number, and the earliest audio file in the folder is deleted in chronological order until the total size of all audio files is less than the specified threshold.
10. A computer storage medium, characterized in that A computer program executable by a processor is stored therein, and the computer program executes a method for dynamic audio acquisition and debugging of an in-vehicle entertainment system according to any one of claims 1 to 5.