Method, device, storage medium and equipment for identifying audio data packaging format

By detecting audio data and applying multiple depackaging rules, the audio data packaging format is determined, and the decoding error problem caused by the loss of encoding format in audio data transmission is solved, and the stable restoration of audio data is achieved.

CN114093376BActive Publication Date: 2025-04-11ZHEJIANG UNIVIEW TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010857848.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-24
Publication Date
2025-04-11
Estimated Expiration
2040-08-24

AI Technical Summary

Technical Problem

During the audio data transmission process, if the fields representing the encoding format are lost, it is difficult to quickly determine the encoding format. The existing technology lacks effective solutions, which may select the wrong encoding format for decoding, resulting in the audio format being unable to be decoded correctly, which is manifested as noisy and disordered sound effects.

Method used

By detecting audio data in unknown packaging formats, the first and second decapsulation rules are used to process them separately to obtain the respective original data parameters. If these parameters satisfy the preset numerical relationship, the audio data packaging format is determined.

Benefits of technology

The encoding format of the audio data is quickly and accurately determined, so that the encoding format that meets actual needs is used for decoding and the original audio data is stable restored.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114093376B_ABST
    Figure CN114093376B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, device, storage medium and equipment for identifying the encapsulation format of audio data. The method includes: if audio data of an unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; the audio data is processed using a second decapsulation rule to obtain second original data; the first parameter and the second parameter of the first original data are obtained, and the first parameter and the second parameter of the second original data are obtained; if the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, then the audio data encapsulation format is determined. By executing this scheme, the encoding format can be determined quickly and accurately, so that the encoding format that meets the actual needs is used for decoding, and the purpose of stable restoration of the original audio data is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of audio processing technology, and in particular, to a method, device, storage medium and equipment for identifying an audio data encapsulation format. Background Art

[0002] The encoding of audio data is used in many fields, such as the transmission of telephone voice, the transmission of video and audio, etc. In the industry, there is a more standardized encoding method, namely the G711 audio data encoding format. This encoding format has the advantages of high sound clarity and high voice naturalness. In fact, G711 encoding is also divided into G711A and G711U. Although both encodings belong to G711, the encoding strategies and methods are completely different, the application areas are also different, and the effects of emphasis are also different. For example, the G711A audio data encoding format is obtained by calculating specific symbols and samples, and needs to be specially designed to facilitate the rapid calculation of digital devices. The G711U encoding format is obtained by looking up the table and adding the basic value to the average offset value, and the encoding speed is faster.

[0003] During the audio data transmission process, once the field indicating the encoding format is lost, it is difficult to quickly determine the encoding format. There is no effective solution to this problem in general technology. One can only select an encoding format for decoding based on guesswork, and this method is not very accurate. Once the encoding format is selected incorrectly, the audio format cannot be decoded correctly, resulting in a noisy and chaotic sound effect. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, storage medium and device for identifying an audio data encapsulation format, which can quickly and accurately determine the encoding format, thereby using an encoding format that meets actual needs for decoding, thereby achieving the purpose of stably restoring the original audio data.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying an audio data encapsulation format, the method comprising:

[0006] If audio data of an unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; and the audio data is processed using a second decapsulation rule to obtain second original data;

[0007] Acquire a first parameter and a second parameter of the first original data, and acquire a first parameter and a second parameter of the second original data;

[0008] If the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, then the audio data encapsulation format is determined.

[0009] In a second aspect, an embodiment of the present application provides a device for identifying an audio data encapsulation format, the device comprising:

[0010] A decapsulation processing module, configured to, if audio data of an unknown encapsulation format is detected, process the audio data using a first decapsulation rule to obtain first original data; and process the audio data using a second decapsulation rule to obtain second original data;

[0011] A parameter acquisition module, used to acquire a first parameter and a second parameter of the first original data, and to acquire a first parameter and a second parameter of the second original data;

[0012] The packaging format identification module is used to determine the audio data packaging format if the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship.

[0013] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for identifying the audio data encapsulation format as described in the embodiment of the present application.

[0014] In a fourth aspect, an embodiment of the present application provides a device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for identifying the audio data encapsulation format as described in the embodiment of the present application is implemented.

[0015] The technical solution provided in the embodiment of the present application, if audio data of unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; the audio data is processed using a second decapsulation rule to obtain second original data; the first parameter and the second parameter of the first original data are obtained, and the first parameter and the second parameter of the second original data are obtained; if the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, then the audio data encapsulation format is determined. The technical solution provided in the present application can quickly and accurately determine the encoding format, so as to use the encoding format that meets actual needs for decoding, and achieve the purpose of stable restoration of the original audio data. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of a method for identifying an audio data encapsulation format provided in an embodiment of the present application;

[0017] Figure 2 It is a schematic diagram of the encoding rule of G711A provided in the embodiment of the present application;

[0018] Figure 3 It is a schematic diagram of the encoding rule of G711U provided in the embodiment of the present application;

[0019] Figure 4 It is a structural schematic diagram of an audio data encapsulation format recognition device provided in an embodiment of the present application;

[0020] Figure 5 It is a structural schematic diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0022] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0023] Figure 1 It is a flowchart of the method for identifying the audio data encapsulation format provided in an embodiment of the present application. This embodiment can be applicable to the case of audio decapsulation. The method can be executed by the audio data encapsulation format identification device provided in an embodiment of the present application. The device can be implemented by software and / or hardware and can be integrated in devices such as smart terminals.

[0024] like Figure 1 As shown, the method for identifying the audio data encapsulation format includes:

[0025] S110: If audio data in an unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; and the audio data is processed using a second decapsulation rule to obtain second original data.

[0026] The audio data may be separately recorded audio data or audio data transmitted along with the video stream. The audio data is transmitted after being encapsulated. Therefore, the encapsulation format is like a key to the audio data. Only by knowing the correct encapsulation format can the content of the audio data be obtained. Therefore, after detecting audio data with an unknown encapsulation format, it is necessary to determine the encapsulation format.

[0027] The audio data is processed using a first decapsulation rule to obtain first original data; and the audio data is processed using a second decapsulation rule to obtain second original data. It is understandable that the first decapsulation rule may be a rule that matches the first encapsulation format, and the audio data may be encapsulated using the first encapsulation format, and then the first decapsulation rule is used to decapsulate the audio data to obtain the original audio data. The second decapsulation rule is similar. Therefore, in the case of an unknown audio encapsulation format, two decapsulation rules may be used to decapsulate the audio data to obtain two original data. Of course, in the case of a large number of audio encapsulation formats, more rules may be used to decapsulate the audio data, which will not be described in detail here.

[0028] In this solution, the first original data and the second original data may be PCM (Pulse Code Modulation) data.

[0029] It can be understood that one of the two original data is real original data and the other is wrong original data. For example, after being encapsulated in the first encapsulation format, the real original data can be obtained by using the first decapsulation rule, while the wrong original data is obtained by using the second decapsulation rule.

[0030] In this embodiment, optionally, the first decapsulation rule is a G711A decapsulation rule, and the second decapsulation rule is a G711U decapsulation rule.

[0031] From the previous introduction, we can know that G711A and G711U are two encapsulation formats, each with its own focus. Since the encoding principles of the two encapsulation formats are different, the original data obtained by using the two decapsulation rules are also different.

[0032] Here are two encoding rules:

[0033] Figure 2 is a schematic diagram of the encoding rule of G711A provided in the embodiment of the present application, such as Figure 2 As shown, for G711A, the encoding rules are:

[0034] 1. Take the sign bit and invert it to get S;

[0035] 2. Get the intensity bit eee, the acquisition method is as follows Figure 2 ;

[0036] 3. Get the high-order sample bit wxyz;

[0037] 4. The combination is seeewxyz, and the complement of seeewxyz is taken when it is an even number. The encoding is completed.

[0038] Figure 3 is a schematic diagram of the encoding rule of G711U provided in the embodiment of the present application, such as Figure 3 As shown, for G711U, the encoding rules are:

[0039] For example: PCM=2345;

[0040] 1. Get the range value +4062 to +2015 in 16 intervals of 128 to get the base value 0x90;

[0041] 2. Interval number 128;

[0042] 3. The basic value of the interval is 4062;

[0043] 4. The difference between the current value 2345 and the interval basic value is 4062-2345=1717;

[0044] 5. Offset value = 1717 / interval number = 1717 / 128 to get the integer 13;

[0045] 6. Output 0x90+13=0x9D.

[0046] Therefore, by reversing the encoding rules of G711A and G711U, the original uncompressed PCM audio data can be obtained.

[0047] S120: Acquire a first parameter and a second parameter of the first original data, and acquire a first parameter and a second parameter of the second original data.

[0048] The first original data and the second original data may be stored in a certain storage location in the form of binary data. The first parameter and the second parameter are obtained by reading the information therein or parsing the data therein. The first parameter and the second parameter may be the duration and amplitude of the two original data, or other data. It is understandable that as long as the two parameters can be used to distinguish which is the correct original data and which is the incorrect original data, it is sufficient.

[0049] In this solution, optionally, the first parameter includes the average decibel; the second parameter includes the decibel variance. The average decibel is determined based on the amplitude value of the waveform of the original data, which can be the average value of the decibel over a period of time. The decibel variance is calculated based on the average decibel and the decibel value of each sampling point.

[0050] In this solution, based on data analysis, the two parameters with the greatest difference between the correct original data and the wrong original data, or the two parameters with the most stable difference, are determined. For example, after encapsulation in one encapsulation format, two decapsulation rules are used for decapsulation, then there must be one correct original data and one wrong original data. The most stable difference mentioned here can be a parameter that is selected from multiple parameters, and there will be obvious differences as long as the correct original data and the wrong original data are compared. After using these two parameters to characterize the original data, the correct original data and the wrong original data can be clearly compared.

[0051] In this solution, optionally, the average decibel is determined in the following manner:

[0052] Determine the total amplitude of the original data according to the sampling point values ​​of the original data; wherein the original data is the first original data or the second original data;

[0053] Determine the average amplitude according to the total amplitude and the number of sampling points of the original data;

[0054] Substituting the average amplitude into a preset decibel calculation formula to obtain the average decibel;

[0055] The decibel variance is determined in the following manner:

[0056] The decibel variance is obtained according to the decibel of each sampling point and the average decibel.

[0057] Specifically, the average decibel can be calculated by finding the average amplitude, and then substituting the average amplitude into a preset decibel calculation formula to obtain the average decibel.

[0058] The highest and lowest decibels at each sampling point of the PCM audio data are then used to calculate the average decibel and variance of the PCM based on the collected information. The default decibel calculation formula is as follows:

[0059]

[0060] Among them, L p is the sound decibel value, P rms is the amplitude value of the current sampling point; P ref The maximum value of the total amplitude of the sound.

[0061] Two bytes represent one sampling point. For example, 1Mb of data may include 512 sampling points. The value in the two bytes is the amplitude. The total amplitude is obtained by traversing the original PCM data.

[0062]

[0063] Calculate the average amplitude aver = sum / pcm[].size;

[0064] Calculate the average decibel db = (int)(20.0*log10(aver));

[0065] The variance calculation of decibels can be implemented using the following code:

[0066] Calculate the decibel of each sampling point, perdb[i]=20log10(pcm[i]);

[0067] Using the variance formula, substitute the decibel perdb[i] of each sampling point into xi, where M is the average decibel db;

[0068] n is pcm[].size, and the final decibel variance sdb is obtained;

[0069] Here, it is worth explaining that the sampling point value of the original data can be used to characterize the amplitude of each sampling point of the original data, including the positive amplitude and the reverse amplitude. Assuming that the positive amplitude is a positive value, the reverse amplitude is a negative value in the amplitude curve. Therefore, when calculating the total amplitude, it is necessary to remove the absolute value of the negative value to obtain the true total amplitude.

[0070] Through the above calculation, this solution can use a clear algorithm to determine the specific values ​​of the two parameters, so that during the implementation of the solution, no manual setting is required and it can be applied to any situation.

[0071] In the technical solution, optionally, determining the total amplitude of the original data according to the sampling point values ​​of the original data includes:

[0072] Determine the sum of the absolute values ​​of the amplitudes of all sampling points in the original data as the total amplitude of the original data.

[0073] The sum of the absolute values ​​of the amplitudes of all sampling points is taken as the total amplitude of the original data. It can be understood that for a section of audio data, a certain range can be intercepted as test data for determining the encoding format of the audio data. Therefore, all the sampling points here can be for the entire audio data or only for the test data. In this way, the amount of calculation can be reduced and the calculation speed can be increased by intercepting the test data.

[0074] S130: If the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, determine an audio data encapsulation format.

[0075] The preset numerical relationship may be a magnitude relationship between numerical values ​​or a positive and negative relationship between numerical values. In this solution, the correct decapsulation rule may be determined based on whether the first parameters of the two original data satisfy the preset numerical relationship and the second parameters of the two original data satisfy the preset numerical relationship, thereby determining the audio data encapsulation format.

[0076] In the technical solution, optionally, if a first parameter of the first original data and a first parameter of the second original data satisfy a preset numerical relationship, and a second parameter of the first original data and a second parameter of the second original data satisfy a preset numerical relationship, determining the audio data encapsulation format includes:

[0077] If the first parameter of the first original data is greater than the first parameter of the second original data, and the second parameter of the first original data is greater than the second parameter of the second original data, determining that the audio data encapsulation format is the second encapsulation format;

[0078] If the first parameter of the first original data is smaller than the first parameter of the second original data, and the second parameter of the first original data is smaller than the second parameter of the second original data, determining that the audio data encapsulation format is the first encapsulation format;

[0079] The first encapsulation format and the first decapsulation rule are inverse operations of each other, and the second encapsulation format and the second decapsulation rule are inverse operations of each other.

[0080] Among them, the first parameter can be the average decibel, and the second parameter can be the decibel variance. Since one encapsulation format is used for encapsulation and another decapsulation rule is used for decapsulation, the original data will be distorted, the decibel at the sampling point will be greater than normal, and the fluctuation range will be larger. Therefore, the average decibel and the variance will be greater than the original data obtained by the normal decapsulation rule.

[0081] For example, the original G711A audio data is abnormally magnified according to the audio waveform after being decapsulated by G711U. Based on this phenomenon, the average decibel of the audio data can be calculated by calculating the decibel of each sampling point of the decapsulated PCM audio data, and then the variance of the decibel of the entire PCM audio data is calculated, and the decibel variance and average decibel of the two sets of data are compared. The larger the decibel variance and the larger the average decibel, the greater the audio fluctuation amplitude and the greater the frequency, and it is considered that the decapsulation rule is wrong. The smaller the decibel variance and the average decibel, the correct decapsulation rule is considered.

[0082] The technical solution provided by the present application is to restore the original PCM data of the audio data in advance according to the encoding principles of G711A and G711U, and then calculate the decibel average and decibel variance based on the restored PCM data, and further analyze and compare to obtain the most matching encoding format, so as to obtain the correct encoding format of the original audio in the absence of bit stream information, and use the corresponding decapsulation rules to perform decapsulation processing to obtain better playback effect.

[0083] The technical solution provided in the embodiment of the present application, if audio data of unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; the audio data is processed using a second decapsulation rule to obtain second original data; the first parameter and the second parameter of the first original data are obtained, and the first parameter and the second parameter of the second original data are obtained; if the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, then the audio data encapsulation format is determined. The technical solution provided in the present application can quickly and accurately determine the encoding format, so that the encoding format that meets the actual needs can be used for decoding, and the purpose of stably restoring the original audio data can be achieved.

[0084] It can be understood that according to the actual situation, when the first parameter can be the average decibel and the second parameter can be the decibel variance, there is no situation where the first parameter of the first original data is greater than the first parameter of the second original data, and the second parameter of the first original data is less than the second parameter of the second original data, or the first parameter of the first original data is less than the first parameter of the second original data, and the second parameter of the first original data is greater than the second parameter of the second original data. Therefore, if this situation exists in the test, an error processing can be performed and the sampling point can be reselected for calculation.

[0085] Figure 4 Schematic diagram of the structure of the device for identifying the audio data encapsulation format provided in the embodiment of the present application. Figure 4 As shown, the audio data encapsulation format recognition device includes:

[0086] The decapsulation processing module 410 is used to, if the audio data of unknown encapsulation format is detected, process the audio data using a first decapsulation rule to obtain first original data; and process the audio data using a second decapsulation rule to obtain second original data;

[0087] A parameter acquisition module 420, configured to acquire a first parameter of the first original data and a second parameter of the first original data, and to acquire a first parameter of the second original data and a second parameter of the second original data;

[0088] The packaging format identification module 430 is used to determine the audio data packaging format if the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship.

[0089] The recognition device further includes an average decibel determination module and a decibel variance determination module, wherein the average decibel determination module is specifically used to:

[0090] Determine the total amplitude of the original data according to the sampling point values ​​of the original data; wherein the original data is the first original data or the second original data;

[0091] Determine the average amplitude according to the total amplitude and the number of sampling points of the original data;

[0092] Substituting the average amplitude into a preset decibel calculation formula to obtain the average decibel;

[0093] The decibel variance determination module is specifically used to obtain the decibel variance according to the decibel of each sampling point and the average decibel.

[0094] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.

[0095] The embodiment of the present application further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to perform a method for identifying an audio data encapsulation format when executed by a computer processor, the method comprising:

[0096] If audio data of an unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; and the audio data is processed using a second decapsulation rule to obtain second original data;

[0097] Acquire a first parameter and a second parameter of the first original data, and acquire a first parameter and a second parameter of the second original data;

[0098] If the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, then the audio data encapsulation format is determined.

[0099] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system, which is connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different unknowns (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0100] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present application, whose computer executable instructions are not limited to the recognition operation of the audio data encapsulation format as described above, can also execute related operations in the audio data encapsulation format recognition method provided in any embodiment of the present application.

[0101] An embodiment of the present application provides a device in which the device for identifying the audio data encapsulation format provided by the embodiment of the present application can be integrated. Figure 5 Schematic diagram of a device provided in an embodiment of the present application. Figure 5 As shown, this embodiment provides a device 500, which includes: one or more processors 520; a storage device 510, which is used to store one or more programs. When the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the audio data encapsulation format recognition method provided in the embodiment of the present application, and the method includes:

[0102] If audio data of an unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; and the audio data is processed using a second decapsulation rule to obtain second original data;

[0103] Acquire a first parameter and a second parameter of the first original data, and acquire a first parameter and a second parameter of the second original data;

[0104] If the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, then the audio data encapsulation format is determined.

[0105] Of course, those skilled in the art can understand that the processor 520 also implements the technical solution of the method for identifying the audio data encapsulation format provided in any embodiment of the present application.

[0106] Figure 5 The device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0107] like Figure 5 As shown, the device 500 includes a processor 520, a storage device 510, an input device 530, and an output device 540; the number of processors 520 in the device can be one or more. Figure 5 A processor 520 is taken as an example; the processor 520, the storage device 510, the input device 530 and the output device 540 in the device can be connected via a bus or other means. Figure 5 The connection via bus 550 is taken as an example.

[0108] The storage device 510, as a computer-readable storage medium, can be used to store software programs, computer executable programs and module units, such as program instructions corresponding to the method for identifying the audio data encapsulation format in the embodiment of the present application.

[0109] The storage device 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 510 may further include a memory remotely arranged relative to the processor 520, and these remote memories may be connected via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0110] The input device 530 may be used to receive input numbers, character information or voice information, and generate key signal input related to user settings and function control of the device. The output device 540 may include a display screen, a speaker and other devices.

[0111] The device provided in the embodiment of the present application can quickly and accurately determine the encoding format, so that the encoding format actually required can be used for decoding, thereby stably restoring the original audio data.

[0112] The audio data encapsulation format recognition device, storage medium and equipment provided in the above embodiments can execute the audio data encapsulation format recognition method provided in any embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiments, please refer to the audio data encapsulation format recognition method provided in any embodiment of the present application.

[0113] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for identifying an audio data encapsulation format, characterized in that: The method comprises: If audio data of an unknown encapsulation format is detected, the audio data is processed using a first decapsulation rule to obtain first original data; and the audio data is processed using a second decapsulation rule to obtain second original data; Acquire a first parameter and a second parameter of the first original data, and acquire a first parameter and a second parameter of the second original data; the first parameter includes an average decibel; the second parameter includes a decibel variance; If the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, the audio data encapsulation format is determined; wherein the preset numerical relationship is a size relationship between numerical values ​​or a positive and negative relationship between numerical values.

2. The method according to claim 1, characterized in that: Determine the total amplitude of the original data according to the sampling point values ​​of the original data; wherein the original data is the first original data or the second original data; Determine the average amplitude according to the total amplitude and the number of sampling points of the original data; Substituting the average amplitude into a preset decibel calculation formula to obtain the average decibel; The decibel variance is obtained according to the decibel of each sampling point and the average decibel.

3. The method according to claim 2, characterized in that Determining the total amplitude of the original data according to the sampling point values ​​of the original data includes: The sum of the absolute values ​​of the amplitudes of all sampling points in the original data is taken as the total amplitude of the original data.

4. The method according to any one of claims 1 to 3, characterized in that If the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship, determining the audio data encapsulation format includes: If the first parameter of the first original data is greater than the first parameter of the second original data, and the second parameter of the first original data is greater than the second parameter of the second original data, determining that the audio data encapsulation format is the second encapsulation format; If the first parameter of the first original data is smaller than the first parameter of the second original data, and the second parameter of the first original data is smaller than the second parameter of the second original data, it is determined that the audio data encapsulation format is the first encapsulation format.

5. The method according to claim 4, characterized in that The first encapsulation format and the first decapsulation rule are inverse operations of each other, and the second encapsulation format and the second decapsulation rule are inverse operations of each other.

6. A device for identifying an audio data encapsulation format, characterized in that: The device comprises: A decapsulation processing module, configured to, if audio data of an unknown encapsulation format is detected, process the audio data using a first decapsulation rule to obtain first original data; and process the audio data using a second decapsulation rule to obtain second original data; A parameter acquisition module, used to acquire a first parameter and a second parameter of the first original data, and a first parameter and a second parameter of the second original data; the first parameter includes an average decibel; the second parameter includes a decibel variance; A packaging format identification module is used to determine the audio data packaging format if the first parameter of the first original data and the first parameter of the second original data satisfy a preset numerical relationship, and the second parameter of the first original data and the second parameter of the second original data satisfy a preset numerical relationship; wherein the preset numerical relationship is a size relationship between numerical values ​​or a positive and negative relationship between numerical values.

7. The device according to claim 6, characterized in that The device also includes an average decibel determination module and a decibel variance determination module, and is specifically used for: Determine the total amplitude of the original data according to the sampling point values ​​of the original data; wherein the original data is the first original data or the second original data; Determine the average amplitude according to the total amplitude and the number of sampling points of the original data; Substituting the average amplitude into a preset decibel calculation formula to obtain the average decibel; The decibel variance is obtained according to the decibel of each sampling point and the average decibel.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for identifying the audio data encapsulation format as described in any one of claims 1 to 5 is implemented.

9. A device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for identifying the audio data encapsulation format according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Methods, apparatus, and articles of manufacture to identify sources of network streaming services

    US20190139559A1