CN111354383B - Audio defect positioning method and device and terminal equipment - Google Patents

Audio defect positioning method and device and terminal equipment Download PDF

Info

Publication number
CN111354383B
CN111354383B CN201811591010.1A CN201811591010A CN111354383B CN 111354383 B CN111354383 B CN 111354383B CN 201811591010 A CN201811591010 A CN 201811591010A CN 111354383 B CN111354383 B CN 111354383B
Authority
CN
China
Prior art keywords
audio
cache
data
audio data
defect
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811591010.1A
Other languages
Chinese (zh)
Other versions
CN111354383A (en
Inventor
熊友军
潘宇超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN201811591010.1A priority Critical patent/CN111354383B/en
Publication of CN111354383A publication Critical patent/CN111354383A/en
Application granted granted Critical
Publication of CN111354383B publication Critical patent/CN111354383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/18Error detection or correction; Testing, e.g. of drop-outs
    • G11B20/1816Testing
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • G11B2020/10537Audio or video recording
    • G11B2020/10546Audio or video recording specifically adapted for audio data
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • G11B2020/1062Data buffering arrangements, e.g. recording or playback buffers

Abstract

The invention provides an audio defect positioning method, an audio defect positioning device and terminal equipment, which are suitable for the technical field of data processing, and the method comprises the following steps: receiving an audio detection instruction, and reading a plurality of audio caches corresponding to a plurality of operations in the local stratum respectively based on audio data information contained in the audio detection instruction; sequentially analyzing the plurality of audio caches according to the execution sequence of the plurality of operations until finding out the first audio cache with audio defects; and judging the operation responsible for processing the audio data corresponding to the first audio cache with the audio defect as the operation generating the audio defect. The embodiment of the invention realizes the rapid and accurate positioning of the specific transmission processing operation of the audio data defect in the local stratum of the android system.

Description

Audio defect positioning method and device and terminal equipment
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to an audio defect positioning method and terminal equipment.
Background
When the android system plays audio data, the application program transmits the audio data to the local layer (Native layer) of the android system for processing and transmission, and interacts with audio hardware, so that the audio data can be played. Specifically, an android local framework API (Audio track) in a local layer performs application data interactive operation, receives audio data of the application, transmits the received audio data to an audio manager (Audio Flanger) in the local layer, performs audio processing operations such as resampling, sound effect and channel conversion on the audio data by the audio manager, transmits the processed audio data to an audio hardware abstraction layer, performs hardware device data interactive operation on the audio hardware abstraction layer and the audio hardware device, and transmits the received audio data to the audio hardware device to play the audio data.
In practical application, it is found that problems may occur in each transmission processing operation of the local layer, and these problems may cause a frame loss or a fragment loss of audio data, so that an intermittent jam occurs when audio hardware equipment plays audio data finally, and detailed data of the transmission processing operation of the local layer is not recorded in an android log in the prior art, so that even if an intermittent jam occurs in audio data playing in practical application, the prior art cannot analyze the local layer, and determine a specific transmission processing operation in which audio data has a defect, and therefore, there is an urgent need in the prior art to accurately locate the operation in which audio data has a defect in each transmission processing operation of the local layer when an intermittent jam occurs in audio data playing.
Disclosure of Invention
In view of this, embodiments of the present invention provide an audio defect positioning method and a terminal device, so as to solve the problem that, in the prior art, when the audio data is played with intermittent jamming and the like, the local layer cannot be analyzed to determine the specific transmission processing operation that the audio data has a defect.
A first aspect of an embodiment of the present invention provides an audio defect location method, including:
receiving an audio detection instruction, and reading a plurality of audio caches corresponding to a plurality of operations in a local stratum respectively based on audio data information contained in the audio detection instruction;
sequentially analyzing the plurality of audio caches according to the execution sequence of the plurality of operations until finding out the first audio cache with audio defects;
and judging the operation which is responsible for processing the audio data corresponding to the first audio cache with the audio defect as the operation generating the audio defect.
A second aspect of an embodiment of the present invention provides an audio defect locating apparatus, including:
the cache reading module is used for receiving an audio detection instruction and reading a plurality of audio caches corresponding to a plurality of operations in the local stratum respectively based on audio data information contained in the audio detection instruction;
the cache analysis module is used for sequentially analyzing the plurality of audio caches according to the execution sequence of the plurality of operations until finding out the first audio cache with audio defects;
and the defect positioning module is used for judging the operation for processing the audio data corresponding to the first audio cache with the audio defect as the operation for generating the audio defect.
A third aspect of the embodiments of the present invention provides a terminal device, where the terminal device includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the steps of the audio defect locating method when executing the computer program.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the method comprises the steps of caching audio data obtained by each operation of a local layer in advance to obtain a plurality of corresponding audio caches, analyzing the audio cache data corresponding to each operation of the local layer in sequence when the audio data are played in the presence of intermittent blocking and the like, determining the audio cache with audio defects, and finally determining the operation corresponding to the audio cache with audio defects, so that whether the audio data generate defects after each transmission processing operation of the local layer can be quickly and accurately identified, and the quick and accurate positioning of the specific transmission processing operation of the audio data generating defects in the local layer of the android system is realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of an audio defect location method according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart illustrating an implementation of a method for audio defect location according to a second embodiment of the present invention;
FIG. 3 is a schematic flowchart illustrating an implementation of a method for audio defect location according to a third embodiment of the present invention;
FIG. 4 is a schematic flowchart illustrating an implementation of a method for audio defect location according to a fourth embodiment of the present invention;
fig. 5 is a schematic flow chart illustrating an implementation of the audio defect locating method according to the fifth embodiment of the present invention;
fig. 6 is a schematic flow chart illustrating an implementation of an audio defect location method according to a sixth embodiment of the present invention;
fig. 7 is a schematic flow chart of an implementation of the audio defect locating method according to a seventh embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an audio defect locating apparatus according to an eighth embodiment of the present invention;
fig. 9 is a schematic diagram of a terminal device according to a ninth embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
For the convenience of understanding the present invention, the embodiment of the present invention is briefly described here, and since there is a possibility that problems may occur in operation steps such as transmission processing of the local layer, the audio data has a defect of frame loss or fragment loss, and the related data of each operation of the local layer is not recorded in the prior art, even if there is a possibility that a problem may occur in the local layer, accurate positioning of the operation having the problem cannot be achieved in the prior art, and thus, targeted processing cannot be achieved. In order to realize accurate positioning of problematic operations, a cache mechanism is arranged in the local layer in the embodiment of the invention, namely, audio cache is carried out on audio data processed by each operation in the local layer, and when a user needs to carry out positioning of problematic operations, the audio caches are analyzed to determine audio caches with defects, so that positioning of the problematic operations is realized.
In the embodiment of the present invention, the execution main body for performing audio defect operation positioning may be an android device itself, or other terminal devices, and when the execution main body is another terminal device, the execution main body establishes a data connection with the android device, and reads a plurality of audio caches respectively corresponding to a plurality of operations in the local layer in the android device, which is described below by taking the execution main body as the android device as an example, and details are as follows:
fig. 1 shows a flowchart of an implementation of an audio defect location method according to an embodiment of the present invention, which is detailed as follows:
s101, receiving an audio detection instruction, and reading a plurality of audio caches corresponding to a plurality of operations in the local layer respectively based on audio data information contained in the audio detection instruction.
In the embodiment of the invention, the audio detection instruction is used for indicating the android device to perform audio defect operation positioning. In the embodiment of the invention, the audio data processed by each operation in the local layer is cached in advance, and when the local layer needs to be analyzed to determine the operation that the audio data has defects, a user only needs to determine the audio data (namely the audio data with defects) needing to be analyzed and input the corresponding audio detection instruction containing the information of the audio data selected by the user. The audio data information may be a name of the audio data, or may be other audio attribute information that can determine the audio data. The operations specifically included in the plurality of operations may be all operations included in the local layer or may be partial operations included in the local layer, for example, application data interaction operations in charge of the local layer AudioTrack, audio processing operations in charge of the AudioFlinger, and hardware device data interaction operations in charge of the hardware abstraction layer, which are set by a technician according to actual requirements.
When an audio detection instruction is received, it is shown that there may be an operation problem in the local layer that causes a defect in the audio data, and at this time, in the embodiment of the present invention, an audio cache corresponding to the local layer operation is read for analysis, and since there are many audio data processed by the local layer, each operation may correspond to a plurality of different audio caches, therefore, in the embodiment of the present invention, an audio cache of the audio data that a user needs to analyze is found from the stored audio caches corresponding to the local layer operation according to the audio data information in the audio detection instruction. Wherein each operation corresponds to an audio buffer.
And S102, sequentially analyzing the plurality of audio caches according to the execution sequence of the plurality of operations until finding out the first audio cache with audio defects.
When the audio data corresponding to a certain operation has a defect, the audio data received in the subsequent operation necessarily has a defect, and therefore, after the audio cache corresponding to each operation is determined, the embodiment of the invention sequentially analyzes the audio caches corresponding to the operations according to the actual execution sequence of the operations in the layer, and searches the first audio cache with the audio defect, thereby avoiding subsequent repeated useless operations. The specific audio defect analysis method may be set by a technician, including but not limited to checking a blank audio data segment in the audio buffer, or processing with reference to the seventh embodiment and the eighth embodiment of the present invention.
And S103, judging the operation for processing the audio data corresponding to the audio cache with the first audio defect as the operation for generating the audio defect.
It should be understood that, in the embodiment of the present invention, the audio data buffering for each operation includes at least two optional buffering schemes, 1, for each operation, the audio data received by the operation is buffered. 2. For each operation, the audio data obtained after the processing operation is completed is buffered. The specific selection of the caching scheme is not limited, and technicians can set the caching scheme according to actual requirements, but the audio buffering opportunities of the two buffering schemes are different, so that the operation generated by the audio buffering actually corresponding to the audio defect is different, for the case of the scheme 1, since it is the audio data received at each operation step that is correspondingly buffered, that is, the last operation is the operation responsible for processing the audio data corresponding to the audio buffer, and when the audio buffer has an audio defect, it indicates that the last operation is the operation that generates the audio defect, for the scheme 2, since the audio data obtained after each operation step is processed by itself is correspondingly buffered, therefore, the operation is responsible for processing the audio data corresponding to the audio buffer, and when the audio buffer has an audio defect, the operation is responsible for generating the audio defect.
For example, assuming that an operation a is responsible for performing a processing on audio data, and an operation B is responsible for performing B processing on the audio data after the a processing, for scheme 1, the operation B buffers the audio data obtained after the a processing by the previous operation a, when the audio buffer of the operation B buffer is defective, it is indicated that the operation a responsible for performing a processing on the audio data corresponding to the audio buffer is an operation that generates an audio defect, and for scheme 2, the operation a buffers the audio data obtained after the a processing, and the operation B buffers the audio data obtained after the B processing, so that when the audio buffer of the operation B buffer is defective, it is indicated that the operation B responsible for performing B processing on the audio data corresponding to the audio buffer is an operation that generates an audio defect.
As can be seen from the above description, when the first audio cache with audio defect is found, it is described that the operation responsible for processing the audio data corresponding to the audio cache has a problem, so the embodiment of the present invention may directly determine that the operation responsible for processing the audio data corresponding to the audio cache is the operation that generates the audio defect, for example, in the above example, if the audio cache of the cache B is defective, when the scheme 1 is adopted for caching, the operation a may be directly determined as the operation that generates the audio defect, and when the scheme 2 is adopted for caching, the operation B may be directly determined as the operation that generates the audio defect.
According to the embodiment of the invention, the audio data obtained by each operation of the local layer is cached in advance to obtain the corresponding multiple audio caches, when the audio data is played in an intermittent blocking state and the like, the audio cache data corresponding to each operation of the local layer is sequentially analyzed to determine the audio cache with the audio defect, and finally, the operation corresponding to the audio cache with the audio defect is determined, so that whether the audio data has the defect after each transmission processing operation of the local layer can be quickly and accurately identified, and the quick and accurate positioning of the specific transmission processing operation of the audio data with the defect in the local layer of the android system is realized.
As a specific implementation manner of performing audio data caching on a local layer operation in the first embodiment of the present invention, a plurality of operations in the second embodiment of the present invention include: as shown in fig. 2, before receiving an audio detection instruction, when the local layer processes audio data to play the audio data, the second embodiment of the present invention includes:
s201, receiving audio data transmitted by an application program, controlling a local layer to sequentially execute application program data interaction operation, audio processing operation and hardware equipment data interaction operation on the audio data to realize playing of the audio data, and caching the audio data received by each operation to obtain audio caches corresponding to each operation.
In the embodiment of the present invention, the caching scheme 1 in the first embodiment of the present invention is adopted as a caching mechanism corresponding to each operation, that is, for each operation, the received audio data after the processing of the last operation is completed is cached. In the android system, AudioTrack is an example of a Java layer application program in a local layer, audioFlinge serves locally, and the audioFlinger manages a plurality of server-side playing threads for processing playing data; in the embodiment of the present invention, the audio data is cached in the audio data playing process for the application program data interactive operation responsible for the AudioTrack, the audio processing operation responsible for the audioFlinger, and the hardware device data interactive operation responsible for the hardware abstraction layer, so as to realize the identification and positioning of whether the three operations have problems.
As another embodiment of the present invention, the buffering scheme 2 in the first embodiment of the present invention may be used as a buffering mechanism corresponding to each operation, that is, for each operation, audio data after its own processing is completed is buffered.
As a specific implementation manner of performing audio data caching on each operation in the second embodiment of the present invention, as shown in fig. 3, the third embodiment of the present invention includes:
s301, receiving audio data transmitted by the application program, controlling the local layer to execute the data interaction operation of the application program, and caching the received audio data to obtain an audio cache corresponding to the data interaction operation of the application program.
S301, controlling the local layer to perform audio processing operation on the audio data after the application program data interactive operation is performed, and caching the audio data after the application program data interactive operation is performed to obtain an audio cache corresponding to the audio processing operation.
S301, controlling the local layer to execute hardware equipment data interaction operation, transmitting the audio data subjected to the audio processing operation to corresponding audio hardware equipment, and caching the audio data subjected to the audio processing operation to obtain audio cache corresponding to the hardware equipment data interaction operation.
In the embodiment of the invention, when the local layer performs application program data interaction operation, audio processing operation and hardware equipment data interaction operation on the audio data, the audio data received by each step of operation cache after the last operation processing is completed is cached, so that the audio cache corresponding to each step of operation is obtained.
As a fourth embodiment of the present invention, in consideration that in an actual situation, storage resources of an android device are limited, and audio data playing itself is a more frequent behavior, the fourth embodiment of the present invention limits storage resources occupied by an audio data cache to save the storage resources of the android device, as shown in fig. 4, the fourth embodiment of the present invention includes:
s401, caching the audio data to a corresponding local cache file, and judging whether the file volume of the local cache file is larger than a preset volume threshold value.
In the embodiment of the invention, the audio data cached each time is stored in a local cache file, if the local cache file exists during caching, the audio data is directly cached in the local cache file according to the time sequence from the beginning to the end, and if the local cache file does not exist, a local cache file is newly established and the audio data is cached in the local cache file according to the time sequence from the beginning to the end. In order to limit the memory resource occupied by the cache, in the embodiment of the invention, a technical person presets a volume threshold of the upper limit of the volume of the cache file, and detects whether the local cache file exceeds the volume threshold after each audio cache. The specific value of the preset threshold can be set by a technician according to actual needs, and preferably, can be set to 240 megabytes.
S402, if the file volume of the local cache file is larger than the preset volume threshold, deleting the audio cache contained in the local cache file according to the sequence of the cache time from first to last until the file volume of the local cache file is smaller than or equal to the preset volume threshold.
When the file volume of the local cache file is larger than the preset volume threshold, which indicates that the cached data volume is too large and the storage resources are too much occupied, the embodiment of the present invention deletes the audio cache in the local cache file according to the time sequence of caching, that is, only the latest audio cache is reserved until the file volume of the deleted local cache file is smaller than or equal to the volume threshold.
As another embodiment of the present invention for limiting the storage resource occupied by the audio cache, a plurality of local cache files may also be set to store the audio cache, and at this time, in the embodiment of the present invention, a corresponding volume threshold is set for each local cache file, and when the volume of the local cache file is greater than the volume threshold, the old audio cache is deleted.
As a fifth embodiment of the present invention, in consideration that in an actual situation, storage resources of an android device are limited, and audio data playing itself is a more frequent behavior, the fifth embodiment of the present invention restricts storage resources occupied by an audio data cache to save the storage resources of the android device, as shown in fig. 5, the fifth embodiment of the present invention includes:
s501, caching the audio data into a corresponding cache folder, and judging whether the volume of a file containing the audio cache in the cache folder is larger than a preset volume threshold value.
S502, if the volume of the file containing the audio cache in the cache folder is larger than the preset volume threshold, deleting the audio cache in the cache folder according to the sequence of the cache time from first to last until the audio cache size of the local cache file is smaller than or equal to the preset volume threshold.
As another scheme of the storage resource limitation, in the embodiment of the present invention, a fixed directory for storing audio cache files is set, that is, all audio caches are stored in the same cache folder, and after audio data is cached, whether the total file volume of all audio cache files in the cache folder exceeds a preset volume threshold is detected, and if the total file volume exceeds the preset volume threshold, the audio caches are deleted according to the time sequence of caching, that is, only the latest audio cache is reserved until the total volume of the audio cache files contained in the cache folder after deletion is less than or equal to the volume threshold. The specific value of the volume threshold can be set by the technician, and preferably, can be set to 240 megabytes.
As an embodiment of the present invention, in consideration of the fact that the storage resource of the android device is limited in the actual situation, and the audio data playing itself is a more frequent behavior, therefore, in order to save the storage resource occupied by the audio cache, on the basis of the first to fifth embodiments of the present invention, the embodiments of the present invention include:
and compressing the audio data, and caching the compressed audio data to obtain a corresponding audio cache. And/or performing file compression processing on the audio cache obtained by caching.
In the embodiment of the invention, technicians can select to compress the audio data and/or the audio cache according to actual requirements, so that the finally stored audio caches are all compressed files, and the volume of the audio cache obtained without any compression processing is smaller and less storage resources are occupied.
As a specific implementation manner of performing defect analysis on an audio buffer in the first embodiment of the present invention, the duration and amplitude of the audio buffer are analyzed to identify whether there is a defect such as a stuck-on break, as shown in fig. 6, a sixth embodiment of the present invention includes:
s601, analyzing the duration and the amplitude of the audio buffer, and judging whether audio data segments with the duration larger than a preset duration threshold value and the amplitudes smaller than a preset amplitude threshold value exist.
S602, if the audio data segment exists, judging that the audio cache has audio defect.
When the defects of pause interruption and the like exist, it is indicated that at least one section of data in the audio data has extremely small amplitude in a continuous period of time, for example, the amplitude of continuous 1 second is 0, so the embodiment of the invention analyzes the duration and the amplitude of the audio cache to find whether an audio data section with extremely small amplitude in a continuous period of time exists in the audio cache, wherein the specific preset time threshold value and the preset amplitude threshold value can be set by a technician.
As a specific implementation manner of performing defect analysis on an audio buffer in the first embodiment of the present invention, the duration of the audio buffer is analyzed to identify whether there are defects such as frame loss, as shown in fig. 7, a seventh embodiment of the present invention includes:
s701, acquiring a first audio time length of audio data corresponding to the audio cache, counting a second audio time length of the audio cache, and judging whether the first audio time length is equal to the second audio time length.
S702, if the first audio time length is not equal to the second audio time length, judging that the audio cache has audio defect.
Although the audio data can not have extremely small continuous amplitude when the frame loss defect occurs, the lost audio data frame can directly cause the audio time length to become small, so the embodiment of the invention can count the actual audio time length of the audio cache and the corresponding theoretical audio time length of the audio data (the actual audio time length is recorded in the audio data, and the actual audio time length is also recorded in a cache manner and directly read when the audio data is cached), and compare the two time lengths, if the two time lengths are not equal, the frame loss situation occurs.
Fig. 8 shows a block diagram of an audio defect locating apparatus according to an embodiment of the present invention, which corresponds to the method of the above embodiment, and only shows the relevant parts according to the embodiment of the present invention for convenience of description. The audio defect locating device illustrated in fig. 8 may be an executive body of the audio defect locating method provided in the first embodiment.
Referring to fig. 8, the audio defect locating apparatus includes:
the cache reading module 81 is configured to receive an audio detection instruction, and read a plurality of audio caches corresponding to a plurality of operations in the local layer, based on audio data information included in the audio detection instruction.
And the buffer analysis module 82 is configured to sequentially analyze the plurality of audio buffers according to the execution sequence of the plurality of operations until finding a first audio buffer with an audio defect.
And the defect location module 83 is configured to determine the operation that is responsible for processing the audio data corresponding to the first audio cache with the audio defect as the operation that generates the audio defect.
Further, the audio defect locating device further comprises:
and the audio cache module is used for receiving the audio data transmitted by the application program, controlling the local layer to sequentially execute the application program data interaction operation, the audio processing operation and the hardware equipment data interaction operation on the audio data so as to realize the playing of the audio data, and caching the audio data received by each operation to obtain the audio cache corresponding to each operation.
Further, the audio buffer module comprises:
receiving the audio data transmitted by an application program, controlling the local layer to execute the data interaction operation of the application program, and caching the received audio data to obtain the audio cache corresponding to the data interaction operation of the application program;
controlling the local layer to perform the audio processing operation on the audio data after the application program data interactive operation is performed, and caching the audio data after the application program data interactive operation is performed to obtain the audio cache corresponding to the audio processing operation;
and controlling the local layer to execute the hardware equipment data interaction operation, transmitting the audio data subjected to the audio processing operation to corresponding audio hardware equipment, and caching the audio data subjected to the audio processing operation to obtain the audio cache corresponding to the hardware equipment data interaction operation.
Further, the audio buffer module further includes:
and caching the audio data to a corresponding local cache file, and judging whether the file volume of the local cache file is larger than a preset volume threshold value.
If the file volume of the local cache file is larger than the preset volume threshold, deleting the audio cache contained in the local cache file according to the sequence of the cache time from first to last until the file volume of the local cache file is smaller than or equal to the preset volume threshold.
Further, the audio buffer module further includes:
and caching the audio data into a corresponding cache folder, and judging whether the file volume containing the audio cache in the cache folder is larger than a preset volume threshold value or not.
If the file volume of the audio cache contained in the cache folder is larger than the preset volume threshold, deleting the audio cache contained in the cache folder according to the sequence of the cache time from first to last until the audio cache size of the local cache file is smaller than or equal to the preset volume threshold.
Further, the audio buffer module further includes:
and compressing the audio data, and caching the compressed audio data to obtain the corresponding audio cache. And/or
And carrying out file compression processing on the audio cache obtained by caching.
Further, the cache analysis module 82 includes:
and analyzing the duration and the amplitude of the audio cache, and judging whether audio data segments with the duration larger than a preset duration threshold value and the amplitudes smaller than a preset amplitude threshold value exist.
And if the audio data segment exists, judging that the audio cache has audio defects.
Further, the cache analysis module 82 includes:
and acquiring a first audio time length of the audio data corresponding to the audio cache, counting a second audio time length of the audio cache, and judging whether the first audio time length is equal to the second audio time length.
And if the first audio frequency duration is not equal to the second audio frequency duration, judging that the audio frequency cache has audio frequency defects.
The process of implementing each function by each module in the audio defect positioning device provided in the embodiment of the present invention may specifically refer to the description of the first embodiment shown in fig. 1, and is not described herein again.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It will also be understood that, although the terms first, second, etc. may be used herein to describe various elements in some embodiments of the invention, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first table may be named a second table, and similarly, a second table may be named a first table, without departing from the scope of various described embodiments. The first table and the second table are both tables, but they are not the same table.
Fig. 9 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 9, the terminal device 9 of this embodiment includes: a processor 90, a memory 91, said memory 91 having stored therein a computer program 92 executable on said processor 90. The processor 90, when executing the computer program 92, implements the steps in the various audio defect localization method embodiments described above, such as the steps 101 to 103 shown in fig. 1. Alternatively, the processor 90, when executing the computer program 92, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 81 to 83 shown in fig. 8.
The terminal device 9 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 90, a memory 91. It will be understood by those skilled in the art that fig. 9 is only an example of the terminal device 9, and does not constitute a limitation to the terminal device 9, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may further include an input transmitting device, a network access device, a bus, etc.
The Processor 90 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or a memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 9. Further, the memory 91 may also include both an internal storage unit and an external storage device of the terminal device 9. The memory 91 is used for storing the computer program and other programs and data required by the terminal device. The memory 91 may also be used to temporarily store data that has been transmitted or is to be transmitted.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (9)

1. An audio defect localization method, comprising:
receiving audio data transmitted by an application program, controlling a local layer to sequentially execute application program data interaction operation, audio processing operation and hardware equipment data interaction operation on the audio data so as to realize the playing of the audio data, and caching the audio data received by each operation to obtain audio caches corresponding to each operation;
receiving an audio detection instruction, and reading a plurality of audio caches corresponding to a plurality of operations in a local stratum respectively based on audio data information contained in the audio detection instruction;
sequentially analyzing the plurality of audio caches according to the execution sequence of the plurality of operations until finding out the first audio cache with audio defects;
and judging the operation which is responsible for processing the audio data corresponding to the first audio cache with the audio defect as the operation generating the audio defect.
2. The audio defect localization method according to claim 1, wherein the receiving the audio data transmitted by an application, controlling the local layer to sequentially perform the application data interaction operation, the audio processing operation, and the hardware device data interaction operation on the audio data to realize playing of the audio data, and caching the audio data received by each operation to obtain the audio cache corresponding to each operation, comprises:
receiving the audio data transmitted by an application program, controlling the local layer to execute the data interaction operation of the application program, and caching the received audio data to obtain the audio cache corresponding to the data interaction operation of the application program;
controlling the local layer to perform the audio processing operation on the audio data after the application program data interactive operation is performed, and caching the audio data after the application program data interactive operation is performed to obtain the audio cache corresponding to the audio processing operation;
and controlling the local layer to execute the hardware equipment data interaction operation, transmitting the audio data subjected to the audio processing operation to corresponding audio hardware equipment, and caching the audio data subjected to the audio processing operation to obtain the audio cache corresponding to the hardware equipment data interaction operation.
3. The audio defect localization method of claim 1, wherein the buffering the audio data received by each of the operations to obtain the audio buffer corresponding to each of the operations respectively comprises:
caching the audio data to a corresponding local cache file, and judging whether the file volume of the local cache file is larger than a preset volume threshold value or not;
if the file volume of the local cache file is larger than the preset volume threshold, deleting the audio cache contained in the local cache file according to the sequence of the cache time from first to last until the file volume of the local cache file is smaller than or equal to the preset volume threshold.
4. The audio defect localization method of claim 1, wherein the buffering the audio data received by each of the operations to obtain the audio buffer corresponding to each of the operations respectively comprises:
caching the audio data into a corresponding cache folder, and judging whether the file volume containing the audio cache in the cache folder is larger than a preset volume threshold value or not;
if the file volume of the audio cache contained in the cache folder is larger than the preset volume threshold, deleting the audio cache contained in the cache folder according to the sequence of the cache time from first to last until the audio cache size of the local cache file is smaller than or equal to the preset volume threshold.
5. The audio defect localization method of any of claims 1 to 4, wherein the process of buffering the audio data to obtain the corresponding audio buffer comprises:
compressing the audio data, and caching the compressed audio data to obtain the corresponding audio cache; and/or
And carrying out file compression processing on the audio cache obtained by caching.
6. The audio defect localization method of claim 1, wherein the analyzing the plurality of audio buffers in sequence according to the execution order of the plurality of operations, the analyzing of each audio buffer comprising:
analyzing the duration and the amplitude of the audio cache, and judging whether audio data segments with the duration larger than a preset duration threshold value and the amplitudes smaller than a preset amplitude threshold value exist;
and if the audio data segment exists, judging that the audio cache has audio defects.
7. The audio defect localization method of claim 1 or 6, wherein the analyzing the plurality of audio buffers in sequence according to the execution sequence of the plurality of operations, the analyzing of each audio buffer comprises:
acquiring a first audio time length of audio data corresponding to the audio cache, counting a second audio time length of the audio cache, and judging whether the first audio time length is equal to the second audio time length;
and if the first audio frequency duration is not equal to the second audio frequency duration, judging that the audio frequency cache has audio frequency defects.
8. An audio defect locating device, comprising:
the cache reading module is used for receiving audio data transmitted by an application program, controlling a local layer to sequentially execute application program data interaction operation, audio processing operation and hardware equipment data interaction operation on the audio data so as to realize playing of the audio data, and caching the audio data received by each operation to obtain the audio caches corresponding to the operations respectively; receiving an audio detection instruction, and reading a plurality of audio caches corresponding to a plurality of operations in a local stratum respectively based on audio data information contained in the audio detection instruction;
the cache analysis module is used for sequentially analyzing the plurality of audio caches according to the execution sequence of the plurality of operations until finding out the first audio cache with audio defects;
and the defect positioning module is used for judging the operation for processing the audio data corresponding to the first audio cache with the audio defect as the operation for generating the audio defect.
9. A terminal device, characterized in that the terminal device comprises a memory, a processor, a computer program being stored on the memory and being executable on the processor, the processor implementing the steps of the method according to any of claims 1 to 7 when executing the computer program.
CN201811591010.1A 2018-12-20 2018-12-20 Audio defect positioning method and device and terminal equipment Active CN111354383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811591010.1A CN111354383B (en) 2018-12-20 2018-12-20 Audio defect positioning method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811591010.1A CN111354383B (en) 2018-12-20 2018-12-20 Audio defect positioning method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN111354383A CN111354383A (en) 2020-06-30
CN111354383B true CN111354383B (en) 2021-07-27

Family

ID=71194241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811591010.1A Active CN111354383B (en) 2018-12-20 2018-12-20 Audio defect positioning method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111354383B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112786070B (en) * 2020-12-28 2024-03-15 Oppo广东移动通信有限公司 Audio data processing method and device, storage medium and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363514B1 (en) * 1998-07-14 2002-03-26 Mitsubishi Denki Kabushiki Kaisha Sound reproducing system and method capable of decoding audio data even in case of failure of detecting syncword
CN103647935A (en) * 2013-11-19 2014-03-19 长沙中联重科环卫机械有限公司 Method for storing video data and video monitoring device
CN104394475A (en) * 2014-11-28 2015-03-04 乐视致新电子科技(天津)有限公司 Streaming media file playing method and media player
CN105472417A (en) * 2015-11-24 2016-04-06 腾讯科技(深圳)有限公司 Method of acquiring video player abnormity and apparatus thereof
CN105898555A (en) * 2015-12-28 2016-08-24 乐视致新电子科技(天津)有限公司 Audio abnormity positioning method and device
CN106603787A (en) * 2016-11-29 2017-04-26 努比亚技术有限公司 Terminal testing method, device and terminal
CN107241650A (en) * 2017-08-09 2017-10-10 四川长虹电器股份有限公司 A kind of method of quick positioning playing Caton phenomenon reason
CN107765922A (en) * 2017-10-31 2018-03-06 努比亚技术有限公司 Card screen detection is with solving method, mobile terminal and computer-readable recording medium
CN107992282A (en) * 2017-11-29 2018-05-04 珠海市魅族科技有限公司 Audio data processing method and device, computer installation and readable storage devices

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017081874A1 (en) * 2015-11-13 2017-05-18 株式会社日立国際電気 Voice communication system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363514B1 (en) * 1998-07-14 2002-03-26 Mitsubishi Denki Kabushiki Kaisha Sound reproducing system and method capable of decoding audio data even in case of failure of detecting syncword
CN103647935A (en) * 2013-11-19 2014-03-19 长沙中联重科环卫机械有限公司 Method for storing video data and video monitoring device
CN104394475A (en) * 2014-11-28 2015-03-04 乐视致新电子科技(天津)有限公司 Streaming media file playing method and media player
CN105472417A (en) * 2015-11-24 2016-04-06 腾讯科技(深圳)有限公司 Method of acquiring video player abnormity and apparatus thereof
CN105898555A (en) * 2015-12-28 2016-08-24 乐视致新电子科技(天津)有限公司 Audio abnormity positioning method and device
CN106603787A (en) * 2016-11-29 2017-04-26 努比亚技术有限公司 Terminal testing method, device and terminal
CN107241650A (en) * 2017-08-09 2017-10-10 四川长虹电器股份有限公司 A kind of method of quick positioning playing Caton phenomenon reason
CN107765922A (en) * 2017-10-31 2018-03-06 努比亚技术有限公司 Card screen detection is with solving method, mobile terminal and computer-readable recording medium
CN107992282A (en) * 2017-11-29 2018-05-04 珠海市魅族科技有限公司 Audio data processing method and device, computer installation and readable storage devices

Also Published As

Publication number Publication date
CN111354383A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN108717393B (en) Application program testing method and mobile terminal
CN107516510B (en) Automatic voice testing method and device for intelligent equipment
US9466310B2 (en) Compensating for identifiable background content in a speech recognition device
CN109558331B (en) Application program defect detection method, device, equipment and storage medium
US20120054724A1 (en) Incremental static analysis
CN111354383B (en) Audio defect positioning method and device and terminal equipment
CN104601535A (en) Video processing method and system
CN110059064B (en) Log file processing method and device and computer readable storage medium
US9811080B2 (en) Measuring performance of an appliance
CN113728655B (en) Method for monitoring the use of at least one application executing in an operating system, corresponding device, computer program product and computer-readable carrier medium
US20150154103A1 (en) Method and apparatus for measuring software performance
CN111143092B (en) Fault recording data processing method, system and terminal equipment
CN107515724B (en) Method and apparatus for reproducing input and output of storage system
CN111324576B (en) Recording data storage method and device, storage medium and terminal equipment
US20150312369A1 (en) Checkpoints for media buffering
EP3598738A1 (en) Video synthesis method, apparatus and device, and video playing method, apparatus and device
CN104581398B (en) Data cached management system and method
CN110769316B (en) Method, device, equipment and storage medium for calculating first frame time
CN114840421A (en) Log data processing method and device
CN114268831A (en) Video editing method and device
US11055217B2 (en) Using additional intermediate buffer queues to identify interleaved media data to be read together
WO2021092784A1 (en) Data writing, consistency checking and reading method and apparatus
CN108228829B (en) Method and apparatus for generating information
CN108335706B (en) Seamless playing method of multimedia file, terminal equipment and storage medium
CN105516548A (en) File pre-reading method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant