Vehicle-mounted multi-sound-area recording method and device
By providing a vehicle-mounted multi-tone zone recording method in the vehicle-mounted system, processing audio data of each sound zone and generating standardized recording files, the problems of inconsistent recording formats and inaccurate startup timing in the prior art are solved, and the problem of inconsistent multi-tone zone recording formats and inaccurate startup timing in the prior art are realized Unified management and efficient processing of multi-sound recordings.
Patent Information
- Application Number
- CN202411484311.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the recording strategy of in-vehicle multi-sound zones is processed by the APP, resulting in inconsistent recording format standards of the multi-sound zones of each vehicle model, and the startup timing is inaccurate, which cannot meet the various needs in the in-vehicle project.
A method for recording a vehicle multi-tone zone is provided, by receiving a multi-tone zone recording start command, reading the original sound data of each sound zone, generating an audio data packet, and creating a processing thread for processing to generate a standardized multi-tone zone recording file. The method includes a preset algorithm for data processing and gain adjustment, determining the file format according to the configuration file, and ensuring the uniformity of the file through the data header and data arrangement order.
By uniformly processing the recording data format of multi-sound zones of each vehicle model, the application development volume is reduced and the probability of problems is reduced, effectively managing multi-sound zone recording is achieved.
Smart Images

Figure CN119479718A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio processing, and in particular to a vehicle-mounted multi-zone recording method and device. Background Art
[0002] At present, Android system is gradually becoming the main operating system for in-vehicle infotainment devices. Android system supports multiple recording types in multiple audio zones at the same time, such as conversations between the driver zone, passenger zone, and outside zone in an RV, and tour guides shouting from the driver zone to the passenger zone in a tourist bus.
[0003] The existing multi-zone recording strategies are all handled by the APP end. The different processing methods of each APP lead to uneven multi-zone recording format standards for each car model, and the recording processing is performed at an inaccurate start time, which cannot meet the various needs of vehicle-mounted projects. Therefore, a technical solution that can handle multiple recording types of data in multiple zones is urgently needed for unified management. Summary of the invention
[0004] The present invention provides a vehicle-mounted multi-zone recording method and device, aiming to solve the defects in the prior art, reduce the application development workload, and reduce the probability of problem occurrence.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The present invention provides a vehicle-mounted multi-zone recording method, comprising:
[0007] Step 1, receiving a multi-zone recording start instruction and a recording file name;
[0008] Step 2, reading the original sound data picked up by each sound zone, and generating an audio data packet corresponding to each sound zone;
[0009] Step 3: Create a processing thread corresponding to each audio zone, receive the audio data packet for processing, and generate a multi-audio zone recording file.
[0010] Specifically, the step 3 includes:
[0011] Step 301, processing the audio data packet according to a preset algorithm to generate standardized multi-zone recording data;
[0012] Step 302, determining the content storage format of the multi-zone recording file according to a preset multi-zone recording configuration file, wherein the content storage format includes a data header format and a data storage area format, and the data header includes a sampling rate, a number of channels, a bit width, and a data arrangement order;
[0013] Step 303: Generate the data header according to a preset rule;
[0014] Step 304, determining the storage location of the standardized recording data of each audio zone according to the data header;
[0015] Step 305: write the standardized multi-zone recording data into the data storage area to generate a multi-zone recording file.
[0016] Specifically, the preset algorithm includes: comparing the sampling rate, number of channels, and bit width in the audio data packet with preset multi-zone recording data standard parameters, and resampling if any parameter is inconsistent.
[0017] Specifically, the preset algorithm further includes: performing gain adjustment on the audio data packet.
[0018] Specifically, the gain adjustment of the audio data packet includes: reading a volume gain configuration file, and determining a final gain value of the audio data packet according to a preset relationship.
[0019] Specifically, the preset relationship is:
[0020] mZoneRecordVol=PcmVol*Multiplier+WeightValue
[0021] Among them, mZoneRecordVol is the final gain value of the audio in this audio zone, PcmVol is the gain value of the original audio stream in this audio zone, Multiplier represents the gain or attenuation factor, and WeightValue represents the weight factor.
[0022] Specifically, the preset rules include:
[0023] Step A, writing the standard parameters of the multi-zone recording data into the corresponding positions of the data header;
[0024] Step B, parsing the audio data packet to determine the audio zone to which the current audio data packet belongs;
[0025] Step C: generating a numerical value of the data arrangement sequence according to all the audio zone numbers of the audio data packet, and writing the numerical value into a corresponding position of the data header.
[0026] Furthermore, after step 3, the method further includes:
[0027] Step 4: Receive a multi-zone recording stop command and wait for a new recording start command.
[0028] Furthermore, after step 4, the method further includes:
[0029] Step 5: Publish a message generated by the multi-zone recording file to a target application.
[0030] Another aspect of the present invention provides a vehicle-mounted multi-zone recording device, comprising:
[0031] A recording APP and a recording control APP are set up in each audio zone at the application layer; the recording APP is used to record audio data of each audio zone; the recording control APP is used to control the start and stop of recording, set the recording file name, encoding format, volume gain parameters, and provide notifications to each recording APP to obtain multi-audio zone recording file information;
[0032] A multi-zone audio data management module and a multi-zone recording engine module are arranged in the framework layer; the multi-zone audio data management module is used to generate an audio processing thread corresponding to each zone, receive audio data from the sound card of each zone, package the audio data of each zone and send it to the multi-zone recording engine module; the multi-zone recording engine module is used to process all the zone recording data from the multi-zone audio data management module to generate a multi-zone recording file, send it to the storage module, and notify the recording control APP.
[0033] The sound card and storage module of each sound zone are arranged in the hardware layer; the sound card is used to read the audio data from each sound zone; the storage module is used to store the multi-sound zone recording files.
[0034] The beneficial effect of the present invention is that the present invention uniformly processes the multi-zone recording data formats of various vehicle models, so that the entire system uses a unified multi-zone recording data processing method, and each APP does not need to pay attention to how to process the car sound zone, recording format, and recording timing, thereby reducing the amount of application development and the probability of problems occurring. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic flow chart of the vehicle-mounted multi-zone recording method of the present invention;
[0036] Figure 2 It is a schematic diagram of the content storage format of a multi-zone recording file of the present invention;
[0037] Figure 3 It is a schematic diagram of the data header format of the present invention;
[0038] Figure 4 It is a schematic diagram of the data arrangement sequence of the present invention;
[0039] Figure 5 It is a schematic diagram of the multi-zone recording file format of the present invention;
[0040] Figure 6 It is a structural schematic diagram of the vehicle-mounted multi-zone recording device of the present invention. DETAILED DESCRIPTION
[0041] The following specifically describes the embodiments of the present invention in conjunction with the accompanying drawings, which are only for reference and illustration and do not constitute a limitation on the scope of patent protection of the present invention.
[0042] In the process described in the specification, claims or drawings of the present invention, the serial numbers of each step (such as step 10, 20, etc.) are included. The serial numbers are only used to distinguish the steps, and the serial numbers themselves do not represent any execution order. It should be noted that the descriptions such as "first" and "second" in this article are only used to distinguish the description objects, etc., and do not represent the order of precedence, nor do they mean that "first", "second", etc. are different types.
[0043] Example 1
[0044] like Figure 1 As shown, this embodiment provides a vehicle-mounted multi-zone recording method, comprising:
[0045] Step 1: Receive the multi-zone recording start command and the recording file name.
[0046] Step 2: Read the original sound data picked up by each sound zone, and generate an audio data packet corresponding to each sound zone.
[0047] The original sound data picked up by the sound pickup devices in each sound zone are different. For example, the driver zone collects the driver's sound data, the passenger zone collects the passenger's sound data, and the exterior zone collects the sound data of the exterior environment.
[0048] In this embodiment, the audio data packet is a data packet obtained by packaging the original audio stream obtained by each sound zone pickup device and the sound zone type, and the data packet structure includes: sound zone type, sampling rate, number of channels, bit width, and the original audio stream of the corresponding sound zone.
[0049] For example, the audio data packets recorded in the driver area are as follows:
[0050] {01, 48000, 1, 16, PCM data}
[0051] Among them, the first parameter 01 is the audio zone ID, indicating the driver zone type, that is, the original audio stream data comes from the driver zone; the second parameter 48000 indicates that the sampling rate is 48000Hz; the third parameter 1 indicates a single channel; the fourth parameter 16 indicates that the bit width is 16bit; the fifth parameter indicates the audio data type.
[0052] Step 3: Create a processing thread corresponding to each audio zone, receive the audio data packet for processing, and generate a multi-audio zone recording file.
[0053] In this proposal, step 3 includes:
[0054] Step 301: Process the audio data packet according to a preset algorithm to generate standardized multi-zone recording data.
[0055] In this embodiment, the preset algorithm includes: comparing the sampling rate, number of channels, and bit width in the audio data packet with preset multi-zone recording data standard parameters, and resampling if any parameter is inconsistent.
[0056] For example, in this specific implementation, the standard parameters of the multi-zone recording data are: sampling rate = 16000 Hz, number of channels = 1, bit width = 16. Then, for the above data packet {01, 48000, 1, 16, PCM data}, due to the different sampling rates, resampling processing is required.
[0057] It is easy to understand that if the sampling rate, number of channels, and bit width of the audio data packet are consistent with the preset multi-zone recording data standard parameters, there is no need to resample, and the audio data packet can be directly used as standardized recording data.
[0058] In another embodiment of the present invention, the preset algorithm further includes: performing gain adjustment on the audio data packet.
[0059] Specifically, the gain adjustment of the audio data packet includes: reading a volume gain configuration file, and determining a final gain value of the audio data packet according to a preset relationship.
[0060] In this proposal, the preset relationship is:
[0061] mZoneRecordVol=PcmVol*Multiplier+WeightValue
[0062] Among them, mZoneRecordVol is the final gain value of the audio in this audio zone, PcmVol is the gain value of the original audio stream in this audio zone, Multiplier represents the gain or attenuation factor, and WeightValue represents the weight factor.
[0063] The gain or attenuation factor represents the multiple by which the volume of the audio data in the sound zone is increased or decreased, and the weight factor is determined by the recording microphone hardware used in the vehicle model.
[0064] For example, PcmVol is 10db, Multiplier is 1.5, and WeightValue is 2db, so the final gain value is mZoneRecordVol = 10*1.5+2 = 17db
[0065] Step 302: determine the content storage format of the multi-zone recording file according to a preset multi-zone recording configuration file, wherein the content storage format includes a data header format and a data storage area format, and the data header includes a sampling rate, number of channels, bit width and data arrangement order.
[0066] The multi-zone recording configuration file is a pre-written configuration file, which determines which items are included in the content saving format of the multi-zone recording file, and is compiled and integrated into the system.
[0067] For example, the content storage format of the multi-zone recording file determined by the multi-zone recording configuration file is as follows: Figure 2 As shown, the data header format is as follows Figure 3 shown.
[0068] Step 303: Generate the data header according to a preset rule, wherein the preset rule includes:
[0069] Step A: writing the standard parameters of the multi-zone recording data into the corresponding positions of the data header.
[0070] Step B: parsing the audio data packet to determine the audio zone to which the current audio data packet belongs.
[0071] Specifically, the step 301 includes: determining the audio zone to which the current audio data packet belongs according to the audio zone ID in the audio data packet.
[0072] For example, if the audio zone ID in the audio data packet is 01, the audio zone type is the driver zone.
[0073] Step C: generating a numerical value of the data arrangement sequence according to all the audio zone numbers of the audio data packet, and writing the numerical value into a corresponding position of the data header.
[0074] In this embodiment, the data arrangement sequence is recorded in 8 bits, each bit corresponds to a sound zone, when the bit is 1, it indicates that the sound zone data exists, when the bit is 0, it indicates that the sound zone data does not exist, such as Figure 4 shown.
[0075] For example, if the data of the driver area and the area outside the vehicle are collected at the same time, the generated data header is: 160001165, among which the first five bits 16000 represent the sampling rate, the sixth bit 1 represents the number of channels, the seventh to eighth bits 16 represent the bit width, and the ninth bit 5 is converted to binary bits as 00000101, that is, the first and third bits are 1, and the other bits are 0, indicating that there are data of the driver area and the area outside the vehicle, and no data of other areas exists.
[0076] Step 304: Determine the storage location of the standardized recording data of each audio zone according to the data header.
[0077] For example, when recording the data of the driver area and the outside area at the same time, the data arrangement order bits in the data header are 00000101, then the data area arrangement order is driver area, outside area, and so on. Then, the multi-zone recording file format is as follows: Figure 5 shown.
[0078] Step 305: write the standardized multi-zone recording data into the data storage area to generate a multi-zone recording file.
[0079] In another embodiment of the present invention, after step 3, the method further includes:
[0080] Step 4: Receive a multi-zone recording stop command and wait for a new recording start command.
[0081] In another embodiment of the present invention, after step 4, the method further includes:
[0082] Step 5: Publish a message generated by the multi-zone recording file to a target application.
[0083] Specifically, step 5 includes: publishing a message generated by the multi-zone recording file to a target application through an external API interface.
[0084] Example 2
[0085] like Figure 6 As shown, this embodiment provides a vehicle-mounted multi-zone recording device, including:
[0086] A recording APP and a recording control APP are set up in each audio zone at the application layer; the recording APP is used to record audio data of each audio zone; the recording control APP is used to control the start and stop of recording, set the recording file name, encoding format, volume gain parameters, and provide notifications to each recording APP to obtain multi-audio zone recording file information;
[0087] A multi-zone audio data management module and a multi-zone recording engine module are arranged in the framework layer; the multi-zone audio data management module is used to generate an audio processing thread corresponding to each zone, receive audio data from the sound card of each zone, package the audio data of each zone and send it to the multi-zone recording engine module; the multi-zone recording engine module is used to process all the zone recording data from the multi-zone audio data management module to generate a multi-zone recording file, send it to the storage module, and notify the recording control APP.
[0088] The sound card and storage module of each sound zone are arranged in the hardware layer; the sound card is used to read the audio data from each sound zone; the storage module is used to store the multi-sound zone recording files.
[0089] The vehicle-mounted multi-zone recording device described in this embodiment is used to run the vehicle-mounted multi-zone recording method described in Example 1. Its working process is as described in Example 1 and will not be repeated here.
[0090] The above disclosure is only a preferred embodiment of the present invention, which cannot be used to limit the scope of protection of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope covered by the present invention.
Claims
1. A vehicle-mounted multi-zone recording method, characterized in that: include: Step 1, receiving a multi-zone recording start instruction and a recording file name; Step 2, reading the original sound data picked up by each sound zone, and generating an audio data packet corresponding to each sound zone; Step 3: Create a processing thread corresponding to each audio zone, receive the audio data packet for processing, and generate a multi-audio zone recording file.
2. The vehicle-mounted multi-zone recording method according to claim 1, characterized in that: The step 3 comprises: Step 301, processing the audio data packet according to a preset algorithm to generate standardized multi-zone recording data; Step 302, determining the content storage format of the multi-zone recording file according to a preset multi-zone recording configuration file, wherein the content storage format includes a data header format and a data storage area format, and the data header includes a sampling rate, a number of channels, a bit width, and a data arrangement order; Step 303: Generate the data header according to a preset rule; Step 304, determining the storage location of the standardized recording data of each audio zone according to the data header; Step 305: write the standardized multi-zone recording data into the data storage area to generate a multi-zone recording file.
3. The vehicle-mounted multi-zone recording method according to claim 2, characterized in that: The preset algorithm includes: comparing the sampling rate, number of channels, and bit width in the audio data packet with preset multi-zone recording data standard parameters, and resampling if any parameter is inconsistent.
4. The vehicle-mounted multi-zone recording method according to claim 3, characterized in that: The preset algorithm also includes: performing gain adjustment on the audio data packet.
5. The vehicle-mounted multi-zone recording method according to claim 4, characterized in that: The gain adjustment of the audio data packet includes: reading a volume gain configuration file, and determining a final gain value of the audio data packet according to a preset relationship.
6. The vehicle-mounted multi-zone recording method according to claim 5, characterized in that: The preset relationship is: mZoneRecordVol=PcmVol*Multiplier+WeightValue Among them, mZoneRecordVol is the final gain value of the audio in this audio zone, PcmVol is the gain value of the original audio stream in this audio zone, Multiplier represents the gain or attenuation factor, and WeightValue represents the weight factor.
7. The vehicle-mounted multi-zone recording method according to claim 2, characterized in that: The preset rules include: Step A, writing the standard parameters of the multi-zone recording data into the corresponding positions of the data header; Step B, parsing the audio data packet to determine the audio zone to which the current audio data packet belongs; Step C: generating a numerical value of the data arrangement sequence according to all the audio zone numbers of the audio data packet, and writing the numerical value into a corresponding position of the data header.
8. The vehicle-mounted multi-zone recording method according to claim 1, characterized in that: After step 3, the method further includes: Step 4: Receive a multi-zone recording stop command and wait for a new recording start command.
9. The vehicle-mounted multi-zone recording method according to claim 8, characterized in that: After step 4, the method further includes: Step 5: Publish a message generated by the multi-zone recording file to a target application.
10. A vehicle-mounted multi-zone recording device, characterized in that: include: The recording APP and recording control APP for each audio zone are set up in the application layer; The recording APP is used to record audio data of each sound zone; The recording control APP is used to control the start and stop of recording, set the recording file name, encoding format, volume gain parameters, provide notifications to each recording APP, and obtain multi-zone recording file information; A multi-zone audio data management module and a multi-zone recording engine module are arranged in the framework layer; the multi-zone audio data management module is used to generate an audio processing thread corresponding to each zone, receive audio data from the sound card of each zone, package the audio data of each zone and send it to the multi-zone recording engine module; the multi-zone recording engine module is used to process all the zone recording data from the multi-zone audio data management module to generate a multi-zone recording file, send it to the storage module, and notify the recording control APP. A sound card and a storage module are provided in each sound zone at the hardware layer; the sound card is used to read audio data from each sound zone; The storage module is used to store multi-zone recording files.