Audio stuck detection method and device, computer equipment and storage medium
1. An audio stuck detection method, the method comprising:
acquiring time information for calling an audio decoding function in the running process of an application program to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
determining the single-frame audio processing time corresponding to the audio decoding function according to the time information of calling the audio decoding function twice;
and performing audio jam detection on the application program to be detected based on the single-frame audio processing time, and determining whether the application program to be detected is subjected to audio jam.
2. The audio stuck detection method according to claim 1, wherein before acquiring the time information for calling the audio decoding function during the running process of the application to be detected, the method comprises:
injecting a time recording function into the corresponding position of the audio decoding function in the application program to be detected through a hook function;
the acquiring the time information of calling the audio decoding function in the running process of the application program to be detected comprises the following steps: and in the running process of the application program to be detected, when the audio decoding function is called, obtaining current time information based on the time recording function, and obtaining time information for calling the audio decoding function.
3. The audio stuck detection method according to claim 2, wherein before said injecting the time recording function at the corresponding position of the audio decoding function in the application to be detected by the hook function, further comprising:
acquiring an application program identifier of an application program to be detected;
acquiring the name of an audio decoding function in the application program to be detected according to the application program identifier;
the injecting a time recording function into the corresponding position of the audio decoding function in the application program to be detected through the hook function includes: searching the corresponding position of the audio decoding function in the application program to be detected based on the audio decoding function name; and injecting the time recording function at the corresponding position of the audio decoding function through a hook function.
4. The audio stuck detection method according to claim 3, wherein said obtaining the application identifier of the application to be detected comprises:
receiving an audio stuck detection request;
and acquiring the application program identifier of the application program to be detected according to the audio blockage detection request.
5. The audio stuck detection method of claim 4, wherein after receiving the audio stuck detection request, further comprising:
and responding to the audio card pause detection request, pulling up the application program to be detected, and enabling the application program to be detected to enter an operation state.
6. The audio stuck detection method according to claim 3, wherein said obtaining the name of the audio decoding function in the application to be detected according to the application identifier comprises:
sending a function acquisition request to a server based on the application program identifier;
and receiving the audio decoding function name fed back by the server based on the function acquisition request.
7. The audio stuck detection method according to any one of claims 1 to 6, wherein said performing audio stuck detection on the application program to be detected based on the single-frame audio processing time to determine whether audio stuck occurs to the application program to be detected comprises:
acquiring the single-frame audio processing time within a preset time period;
and performing audio pause detection on the single-frame audio processing time in the preset time period through an audio pause detection model, and determining whether the application program to be detected is paused in the preset time period and the pause type.
8. An audio stuck detection device, the device comprising:
the time information acquisition module is used for acquiring the time information for calling the audio decoding function in the running process of the application program to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
the single-frame time determining module is used for determining the single-frame audio processing time corresponding to the audio decoding function according to the time information of calling the audio decoding function twice;
and the audio jam detection module is used for carrying out audio jam detection on the application program to be detected based on the single-frame audio processing time and determining whether the application program to be detected is jammed in audio.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Background
The pause phenomenon is a phenomenon occurring in electronic devices such as mobile phones and notebook computers, and generally occurs in various operations of the electronic devices, such as playing a picture card when playing a game, or listening to a song, or watching a video and playing an audio. The cause of the stuck in the application program in the using process may be related to the device, the network of the device or the application program itself, and the application program developer may perform stuck detection on the application program in order to reduce the stuck in the application program in the using process caused by the application program itself.
The audio jam detection for the application program generally relates to a sending end and a receiving end, and determines whether the test audio is jammed and the jam condition by sending the test audio to the receiving end at the sending end and comparing the original test audio sent at the sending end with the test audio received at the receiving end. However, this method needs to be performed at the sending end and the receiving end simultaneously, and the operation flow in the detection process is complicated.
Disclosure of Invention
In view of the above, it is desirable to provide an audio stuck detection method, an apparatus, a computer device and a storage medium, which can simplify the operation flow in the audio stuck detection process.
An audio stuck detection method, the method comprising:
acquiring time information for calling an audio decoding function in the running process of an application program to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
determining the single-frame audio processing time corresponding to the audio decoding function according to the time information of calling the audio decoding function twice;
and performing audio jam detection on the application program to be detected based on the single-frame audio processing time, and determining whether the application program to be detected is subjected to audio jam.
An audio stuck detection apparatus, the apparatus comprising:
the time information acquisition module is used for acquiring the time information for calling the audio decoding function in the running process of the application program to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
the single-frame time determining module is used for determining the single-frame audio processing time corresponding to the audio decoding function according to the time information of calling the audio decoding function twice;
and the audio jam detection module is used for carrying out audio jam detection on the application program to be detected based on the single-frame audio processing time and determining whether the application program to be detected is jammed in audio.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring time information for calling an audio decoding function in the running process of an application program to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
determining the single-frame audio processing time corresponding to the audio decoding function according to the time information of calling the audio decoding function twice;
and performing audio jam detection on the application program to be detected based on the single-frame audio processing time, and determining whether the application program to be detected is subjected to audio jam.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring time information for calling an audio decoding function in the running process of an application program to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
determining the single-frame audio processing time corresponding to the audio decoding function according to the time information of calling the audio decoding function twice;
and performing audio jam detection on the application program to be detected based on the single-frame audio processing time, and determining whether the application program to be detected is subjected to audio jam.
According to the audio jamming detection method, the audio jamming detection device, the computer equipment and the storage medium, in the running process of the application program to be detected, the time information for calling the audio decoding function is obtained, wherein the audio decoding function is called, namely the function called when the application program decodes the audio at the receiving end; further, single-frame audio processing time is obtained according to the time information of the two adjacent calls of the audio decoding function, and whether the audio after the audio decoding in the application program to be detected is blocked or not can be determined according to the single-frame audio processing time in the application program to be detected. According to the method, the calling time information of the audio decoding function is detected only in the running process of the application program to be detected, namely, the audio jamming detection of the application program to be detected can be completed only by operating the receiving end of the audio, and the operation flow of the audio jamming detection process is simplified.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of an audio stuck detection method;
FIG. 2 is a flow diagram illustrating an exemplary method for audio stuck detection;
FIG. 3(1) is a diagram illustrating a glitch-stuck type single frame audio processing time in one embodiment;
FIG. 3(2) is a diagram illustrating a single frame audio processing time of a continuous pause type in one embodiment;
FIG. 3(3) is a diagram illustrating a duration of a single frame audio processing time of the hold-on type in an embodiment;
FIG. 4 is a flow chart illustrating an audio stuck detection method according to another embodiment;
FIG. 5(1) is a diagram illustrating a header injection time recording function before and after an audio decoding function of an application to be tested in an embodiment;
FIG. 5(2) is a diagram illustrating jumps in the execution of an audio decoding function after the injection of a time function in one embodiment;
FIG. 6 is a flow chart illustrating an audio stuck detection method according to another embodiment;
FIG. 7 is a diagram illustrating a result of a stuck detection at a front end of a server in an embodiment;
FIG. 8 is a diagram illustrating the physical structure involved in the audio stuck detection method in one embodiment;
FIG. 9(1) is a schematic diagram of an interface of a Kalton meter tool in an embodiment;
FIG. 9(2) is a schematic interface diagram of an application to be detected added in an embodiment;
FIG. 9(3) is a diagram illustrating a morton meter tool interface after an application to be detected is added in an embodiment;
FIG. 9(4) is a schematic diagram illustrating a scenario interface of an application to be detected in an embodiment;
FIG. 10 is a flow diagram illustrating a method for audio stuck detection in one embodiment;
FIG. 11 is a block diagram of an embodiment of an audio stuck detection device;
FIG. 12 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The audio stuck detection method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the terminal 101 and the terminal 102 communicate with each other through a network to transmit audio. Acquiring time information for calling an audio decoding function in the running process of an application program to be detected of the terminal 102, wherein the audio decoding function is called, namely the function called when the application program decodes audio at a receiving end; and obtaining single-frame audio processing time according to the time information of the two adjacent calls of the audio decoding function, and determining whether the audio after audio decoding in the application program to be detected is blocked or not according to the single-frame audio processing time in the application program to be detected. The terminals 101 and 102 may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In other embodiments, the audio stuck detection method may also be applied in the application scenarios of the terminal 101, the terminal 102, and the server. The terminal 101 and the terminal 102 communicate with each other through a network to transmit audio, and the terminal 102 as a tested terminal communicates with a server through the network. In this embodiment, in the running process of the application program to be detected of the terminal 102, time information for calling an audio decoding function is obtained, where the audio decoding function is called, that is, a function called by the application program when the application program decodes an audio at a receiving end; and obtaining single-frame audio processing time according to the time information of the two adjacent calls of the audio decoding function, and determining whether the audio after audio decoding in the application program to be detected is blocked or not according to the single-frame audio processing time in the application program to be detected. The terminal 102 obtains an audio decoding function corresponding to the application program to be detected from the server. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers. In some embodiments, a server may be one node in a blockchain.
The application provides an audio jam detection method, which is used for detecting whether the audio of an application program is jammed or not and relates to the voice technology. Key technologies for Speech Technology (Speech Technology) are automatic Speech recognition Technology (ASR) and Speech synthesis Technology (TTS), as well as voiceprint recognition Technology. The computer can listen, see, speak and feel, and the development direction of the future human-computer interaction is provided, wherein the voice becomes one of the best viewed human-computer interaction modes in the future.
In one embodiment, as shown in fig. 2, an audio stuck detection method is provided, which is exemplified by applying the method to the terminal 102 in fig. 1, and includes steps S210 to S230.
Step S210, acquiring time information for calling the audio decoding function during the running process of the application program to be detected.
The application program to be detected is an application program which needs to be subjected to audio frequency blockage detection. And the audio decoding function is used for decoding the audio in the application program to be detected. The transmission process of the audio comprises the following steps: the method comprises the steps of encoding original audio at a sending end, sending the encoded audio to a receiving end by the sending end, decoding the received audio by the receiving end, and then playing the decoded audio. The receiving end decodes the audio, namely, an audio decoding function needs to be called. In one embodiment, the application to be detected is a game-like application.
The audio decoding functions used by different applications to decode audio may not be the same; further, in one embodiment, the audio decoding function employed by the application is associated with the audio format supported by the application, and the audio format supported by the application is associated with a development tool used in developing the application, which in one embodiment is an engine. For example, in a specific embodiment, based on a game class application developed by the unity3d engine, the corresponding audio format is Opus, and the audio decoding function corresponding to Opus is Opus _ decode (). Wherein, unity is a real-time 3D interactive content creation and operation platform, which can be used for game development; opus is a format for lossy sound coding, developed by xiph. org foundation, and later standardized by IETF (The Internet Engineering Task Force), aiming to include sound and speech in a single format, replacing Speex (an audio compression format) and Vorbis (an audio compression format), and suitable for low-delay instantaneous sound transmission over networks, The standard format being defined in RFC 6716 documents. In other embodiments, the audio decoding function may be other audio decoding functions.
In this embodiment, in the running process of the application program to be detected, when the received audio needs to be decoded, an audio decoding function is called to decode the audio; and monitoring the application program to be detected, and acquiring time information for calling the audio decoding function when the application program to be detected calls the audio decoding function.
The obtaining of the time information for calling the audio decoding function may be implemented in any manner. In one embodiment, by injecting a time recording function at a position corresponding to the audio decoding function in advance, when the audio decoding function is called, the time recording function records the time when the audio decoding function is called. Further, injecting the time recording function at the corresponding position of the audio decoding function in advance can be realized by a Hook function (Hook). The specific process of injecting the time recording function into the position corresponding to the audio decoding function through the hook function will be described in detail in the following embodiments, which are not described herein again.
Step S220, according to the time information of the two adjacent calls of the audio decoding function, determining the single-frame audio processing time corresponding to the audio decoding function.
In one embodiment, an audio decoding function needs to be called once for decoding a frame of audio, and if the audio decoding corresponding to the current frame is completed, the audio decoding function needs to be called again for performing audio decoding processing on the next frame of audio; therefore, the time corresponding to the single-frame audio decoding can be determined by calling the time information of the audio decoding function twice. In this embodiment, the interval time between two adjacent calls to the audio decoding function, i.e. the time taken for decoding the previous frame of audio, is recorded as the processing time of a single frame of audio, specifically the processing time of the previous frame of audio.
Step S230, performing audio jam detection on the application to be detected based on the single-frame audio processing time, and determining whether the application to be detected is subjected to audio jam.
In the case that the audio decoding is normal, the processing time of a single frame of audio should be constant, and if the processing time of a single frame of audio is long, it may indicate that the decoding of the frame of audio is stuck. In one embodiment, performing audio stuck detection on an application to be detected based on single-frame audio processing time, and determining whether the application to be detected is subjected to audio stuck includes: comparing the single-frame audio processing time with a preset time threshold value to determine whether the application program to be detected is subjected to audio jamming; the preset time threshold is used for representing the processing time of the single-frame audio under the normal condition, and can be set to any value according to the actual condition. In other embodiments, the audio jam detection is performed on the application program to be detected based on the single-frame audio processing time, and whether the audio jam occurs in the imaging of the application to be detected is determined, which may also be implemented in other manners.
Further, if the audio pause of the application program to be detected needs to be detected in more detail, the processing time of the single-frame audio within a period of time can be detected; in one embodiment, performing audio stuck detection on an application to be detected based on single-frame audio processing time, and determining whether the application to be detected is subjected to audio stuck includes: acquiring single-frame audio processing time in a preset time period, and determining whether the application program to be detected is blocked in the preset time period according to the single-frame audio processing time in the preset time period.
It can be understood that the fact that the single-frame audio processing time is greater than the preset time threshold only indicates that the frame audio is stuck, and whether the audio of the application to be detected is stuck within the preset time period can be determined by detecting the single-frame audio processing time within the preset time period.
Further, audio pause detection is performed according to the single-frame audio processing time in the preset time period, and pause related information can be determined when the application program to be detected is paused. Wherein the relevant information of the pause indicates the relevant information when the pause occurs; in one embodiment, the morton related information may include the type of morton, the duration of the morton, the proportion of audio of the morton within a preset time period, and the like. The preset time period may be set according to actual conditions, for example, 30 seconds, 1 minute, and 2 minutes, or may also be set as the total audio time period, for example, the audio is a voice with a time period of 5 seconds, and the preset time period is 5 seconds.
In one embodiment, the stuck type includes: glitch stuck type, continuous stuck type. The glitch stuck indicates that the stuck problem is caused by the sudden increase of the single-frame audio processing time and the exceeding of a certain threshold; fig. 3(1) is a schematic diagram showing the processing time of a glitch-stuck type single-frame audio in one embodiment. Continuous inching indicates that the inching and falling of the single-frame audio processing time of more than two continuous frames occur within a certain time slice range and exceed a certain threshold value to cause the inching problem; fig. 3(2) is a schematic diagram showing the processing time of a single frame audio of a continuous pause type in one embodiment. The continuous pause indicates that in a certain time slice range, the single-frame audio processing time is suddenly increased and exceeds a certain threshold value, and continuous multiframes are not recovered, so that the pause problem is caused; fig. 3(3) is a schematic diagram showing the duration of a single-frame audio processing time of the continuous pause type in one embodiment. The stuck duration represents the time of the audio duration for which the stuck occurs; the proportion of the jammed audio in the preset time period represents the proportion of the jammed audio in the total time length of the detected audio.
Further, whether the application to be detected is subjected to audio pause or not can be detected through a corresponding audio detection pause model, in this embodiment, a single-frame audio processing time within a preset time period is input into the corresponding audio pause detection model, whether the application to be detected is subjected to audio pause or not is output, and when it is determined that the application to be detected is subjected to audio pause, relevant information of the application to be detected is output.
In one embodiment, performing audio stuck detection on an application to be detected based on single-frame audio processing time, and determining whether the application to be detected is subjected to audio stuck includes: acquiring single-frame audio processing time within a preset time period; and performing audio pause detection on the single-frame audio processing time in the preset time period through an audio pause detection model, and determining whether the application program to be detected is paused in the preset time period and the pause type.
Further, in one embodiment, the audio stuck detection model may be set according to the stuck type, for example, the audio stuck detection model includes: the system comprises a burr audio stuck detection model, a continuous audio stuck detection model and a continuous audio stuck detection model. In a specific embodiment, after acquiring the single-frame audio processing time within the preset time period, the single-frame audio processing time within the preset time period is input into a glitch audio stuck detection model to determine whether the audio within the preset time period is glitch-stuck or not, and then the single-frame audio processing time within the preset time period is input into a continuous audio stuck detection model or a continuous audio stuck detection model to determine whether the audio within the preset time period is continuously stuck or continuously stuck. In another embodiment, the single-frame audio processing time within the preset time period may also be simultaneously input into the glitch audio stuck detection model, the continuous audio stuck detection model and the continuous audio stuck detection model respectively, so as to determine whether the audio is glitch stuck, continuous stuck or continuous stuck.
In one embodiment, a corresponding threshold value needs to be set in the audio stuck detection model to determine whether stuck occurs. Further, in one embodiment, the threshold setting for the audio stuck detection model comprises the steps of: setting a plurality of candidate thresholds of an audio stuck detection model, obtaining sample audio, detecting the sample audio by taking each candidate threshold as the threshold of the audio stuck detection model respectively to obtain a sample detection result, and determining whether the sample audio is stuck by the candidate thresholds; meanwhile, sending the sample audio to a plurality of users for audition, and acquiring audition results of the users, wherein the users specifically listen for the sample audio whether to be blocked or not; determining the accuracy of the judgment result of each candidate threshold value by combining the audition result and the sample detection result to obtain the accuracy and the missing report rate corresponding to each candidate threshold value; and selecting the optimal candidate threshold as the threshold corresponding to the audio stuck detection model according to the accuracy rate and the candidate threshold of the missing report rate.
In one embodiment, the sample audio includes more than three. In a specific embodiment, the calculation method of the accuracy and the missing report rate is as follows: the accuracy rate is Y/X; and the rate of missing report is Y/Z. Wherein, X represents: only the sample detection result is the number of the sample audios which are stuck; y represents: the sample detection result is the sample audio frequency quantity of the sample which is stuck and the audition result is stuck (namely the sample audio frequency quantity of the sample which can be perceived by people); z represents: only the number of sample tones that resulted in a stuck is audited.
Further, in an embodiment, selecting an optimal candidate threshold as a threshold corresponding to the audio stuck detection model according to the candidate thresholds of the accuracy and the false negative rate includes: and selecting a candidate threshold with the accuracy rate exceeding a preset accuracy rate threshold and the rate of missing report being lower than the preset rate of missing report threshold as the threshold of the audio frequency stuck checking model. Furthermore, the preset accuracy threshold and the preset false-positive rate threshold may be set according to actual situations, for example, the preset accuracy threshold is set to 90% or 95%, the false-positive rate is set to 5% or 10%, and the like. If the candidate thresholds meeting the preset accuracy threshold and the preset missed-report rate threshold include a plurality of thresholds, the higher the accuracy is, the lower the missed-report rate is, the better the accuracy is.
In one embodiment, the thresholds set for different audio stuck detection models may be the same or different. In a specific embodiment, different candidate thresholds are respectively set for different audio stuck detection models, and corresponding thresholds are determined for different audio stuck detection models by the threshold determination method. In a specific embodiment, the threshold determined by the method for determining a threshold includes: the threshold for the glitch audio stuck detection model is 340ms (milliseconds), the threshold for the continuous audio stuck detection model is 650ms, and the threshold for the continuous audio stuck detection model is 70 ms.
In this embodiment, treat through audio frequency card pause detection model and treat that the application carries out audio frequency card pause detection, whether not only can output the audio frequency blocks, can also output the relevant information that the audio frequency blocked, the audio frequency that is convenient for relevant personnel treat the detection application blocks further and knows. Further, in this embodiment, different candidate threshold values are set for the audio stuck detection model, and the sample audio is used to detect the candidate threshold values, so as to determine an optimal threshold value for the audio stuck detection model, and the listening experience of the user on the sample audio is combined in the process of determining the threshold value, so that the determined threshold value of the audio stuck detection model better conforms to the human ear perception, that is, the detection of the audio stuck detection model on the audio stuck detection model more conforms to the human ear perception, and the judgment is more accurate.
The audio jamming detection method comprises the steps of acquiring time information for calling an audio decoding function in the running process of an application program to be detected, wherein the audio decoding function is called, namely the function called when the application program decodes audio at a receiving end; further, single-frame audio processing time is obtained according to the time information of the two adjacent calls of the audio decoding function, and whether the audio after the audio decoding in the application program to be detected is blocked or not can be determined according to the single-frame audio processing time in the application program to be detected. According to the method, the calling time information of the audio decoding function is detected only in the running process of the application program to be detected, namely, the audio jamming detection of the application program to be detected can be completed only by operating the receiving end of the audio, and the operation flow of the audio jamming detection process is simplified.
In one embodiment, as shown in fig. 4, before acquiring the time information for calling the audio decoding function during the running process of the application to be detected, the method includes: step S410, injecting a time recording function at a position corresponding to the audio decoding function in the application program to be detected through the hook function.
Wherein the hook function (hook): a computer technology, under the condition without source code, the execution flow of the target function is modified through the assembled jump instruction; the method is a part of a Windows message processing mechanism, and by setting a hook, an application program can filter all messages and events at a system level and access messages which cannot be accessed under normal conditions.
In this embodiment, the time recording function is injected to a corresponding position of the audio decoding function in the application program to be detected through the hook function, so that when the application program to be detected calls the audio decoding function, the time recording function is executed to obtain the time information of the current time. Further, in an embodiment, injecting a time recording function at a corresponding position of the audio decoding function in the application to be detected through a hook function includes: the time recording function is injected at the head of the audio decoding function by the hook function.
In a specific embodiment, the time recording function is time _ record (). Fig. 5(1) is a schematic diagram of before and after injecting a time recording function into a header of an audio decoding function of an application to be detected in a specific embodiment. Fig. 5(2) shows a schematic diagram of jumping when performing an audio decoding function after injecting a time function in an embodiment.
Referring to fig. 4, in the present embodiment, in the running process of the application to be detected, acquiring the time information for calling the audio decoding function includes step S211: in the running process of the application program to be detected, when the audio decoding function is called, the current time information is obtained based on the time recording function, and the time information for calling the audio decoding function is obtained.
In the above steps, the time recording function is injected to the corresponding position of the audio decoding function of the application program to be detected through the hook function, and in the running process of the application program to be detected, once the audio decoding function is called, the time recording function is executed, so that the time information of the current moment is obtained, and the time information represents the time for calling the audio decoding function.
In this embodiment, a time recording function is injected into the application program to be detected in advance through the hook function, when the application program to be detected runs, time information of the current moment, namely time for calling the audio decoding function, can be obtained through the time recording function when the audio decoding function is called, and the source code of the application program to be detected does not need to be obtained through the hook function, so that the calling information of the audio decoding function in the running process of the application program to be detected can be obtained, and the method is simple to implement, convenient and fast.
In one embodiment, as shown in fig. 6, before injecting the time recording function at the corresponding position of the audio decoding function in the application to be detected by the hook function, steps S610 to S620 are further included.
Step S610, acquiring an application identifier of the application to be detected.
The application program identifier is a unique identifier of the application program, and can be used for distinguishing the application program. In a specific embodiment, the application identifier of the application to be detected is an apk package name (Android application package) of the application to be detected. In other embodiments, the application identification may also be custom set.
In one embodiment, the application identification of the application to be detected may be input by a user. When a user wants to perform audio jam check on a certain application program, an audio jam detection request can be initiated, and the application program identification of the application program to be detected is input to the terminal through the audio jam detection request. In one embodiment, obtaining the application identifier of the application to be detected includes: receiving an audio stuck detection request; and acquiring the application program identifier of the application program to be detected according to the audio pause detection request.
In one embodiment, the audio stuck detection request for the application to be detected may be initiated in an audio stuck detection tool, such as a stuck meter tool; in this embodiment, the audio stuck detection method can be integrated as a stuck meter tool. The mortgage tool is a performance detection tool for performing mortgage detection, identification and positioning analysis on an application program in a terminal. In a specific embodiment, a user opens a morton meter tool in a terminal, starts the morton detection by clicking in the morton meter detection tool, selects an application program to be detected, and initiates an audio morton detection request to the terminal. And when the terminal receives the audio card pause detection request, analyzing the audio card pause detection request to obtain the application program identifier of the application program to be detected.
And step S620, acquiring the name of the audio decoding function in the application program to be detected according to the application program identifier.
Since different audio decoding functions that may be used by different applications during audio decoding are different, in this embodiment, the corresponding audio decoding function name is obtained by using the obtained application identifier of the application to be detected.
In one embodiment, after the application program identifier of the application program to be detected is obtained, a function obtaining request is sent to the server based on the application program identifier of the application program to be detected, and then the receiving server returns the corresponding audio decoding function name based on the application program identifier carried in the function obtaining request. The function obtaining request carries an application program identifier, and the function obtaining request is used for searching and feeding back an audio decoding function corresponding to the application program to be detected to the request server.
In one embodiment, a number of application identifications are stored in the server in a mapping relationship to the audio decoding function used; and the terminal sends the application program identifier to the server, and after receiving the application program identifier, the server searches for the audio decoding function name corresponding to the application program identifier according to the application program identifier and feeds the audio decoding function name back to the terminal. In one embodiment, assume that the following mapping is stored in the server: application 1-audio decoding function opus _ decode (), application 2-audio decoding function opus _ decode (), …; the terminal sends the application program identifier to the server, after the server receives the application program identifier 1 of the application program 1 sent by the terminal, the server searches for a corresponding audio decoding function opus _ decode () in the mapping relation through the application program identifier 1, and feeds back the name of the audio decoding function opus _ decode () to the terminal. Similarly, when the terminal sends the application program identifier 2 of the application program 2, the server searches for the corresponding audio decoding function name according to the application program identifier 2 and feeds the audio decoding function name back to the terminal.
In another embodiment, the server stores the mapping relationship between the development tools corresponding to a plurality of application programs and the used audio decoding function; in this embodiment, the terminal sends the application identifier to the server, and after receiving the application identifier, the server determines a corresponding development tool according to the application, searches for a corresponding audio decoding function based on the development tool, and feeds back the decoding function to the terminal. In one embodiment, the server stores the following mapping relationships: development tool unit 3 d-audio decoding function opus _ decode (), development tool a-audio decoding function x, development tool B-audio decoding function y, …; the terminal sends the application program identifier 1 of the application program 1 to the server, the server analyzes and determines that the development tool corresponding to the application program 1 is unity3d, obtains the audio decoding function corresponding to the development tool unity3d as opus _ decode () by searching the mapping relation table, and feeds back the name of the decoding function opus _ decode () to the terminal. Similarly, when the terminal sends the application program identifier 2 of the application program 2, the server determines the corresponding development tool according to the application program identifier 2, and further searches for the corresponding audio decoding function name and feeds the corresponding audio decoding function name back to the terminal.
In another embodiment, after the application program identifier of the application program to be detected is obtained, the terminal itself may also search for the corresponding audio decoding function according to the application program identifier of the application program to be detected, or the terminal itself determines the corresponding development tool according to the application program identifier of the application program to be detected, and then searches for the corresponding audio decoding function according to the development tool. It is to be understood that, in other embodiments, after acquiring the application identifier of the application to be detected, the terminal may also acquire the audio decoding function in other manners.
Further, with reference to fig. 6, in the present embodiment, injecting a time recording function in a position corresponding to an audio decoding function in an application to be detected through a hook function includes step S411: based on the name of the audio decoding function, the corresponding position of the audio decoding function is searched in the application program to be detected, and a time recording function is injected into the corresponding position of the audio decoding function through a hook function.
In this embodiment, when the time recording function is injected at the position corresponding to the audio decoding function through the hook function, the corresponding position is searched in the application program to be detected according to the obtained name of the audio decoding function, so as to implement injection of the time recording function.
Further, in an embodiment, after receiving the audio stuck detection request, the method further includes: and responding to the audio jamming detection request, pulling up the application program to be detected, and enabling the application program to be detected to enter an operation state.
When an audio stuck detection request is received, the application program identifier of the application program to be detected is obtained according to the audio stuck detection request, the application program to be detected is pulled up based on the audio stuck detection request, and when the application program to be detected enters the running state, the audio stuck detection can be started.
In a specific embodiment, when actually performing audio stuck detection, specifically, the application program to be detected is pulled up by a stuck meter tool, so that the application program to be detected enters an operating state, and then enters a scene of the application program to be detected, and whether the audio stuck occurs in the application program to be detected can be detected.
In another embodiment, in response to the audio stuck detection request, the application to be detected is pulled up in the virtual machine, so that the application to be detected enters a running state. A Virtual Machine (Virtual Machine) refers to a complete computer system which has complete hardware system functions and is simulated by software and runs in a completely isolated environment. In this embodiment, the audio stuck detection method implemented in the virtual machine can implement audio stuck detection on a release version (release version) test packet in a non-root terminal, and provides great convenience for testers. Root, also known as Root user, is the only super user in Unix (e.g., Solaris, AIX, BSD) and Unix-like systems (e.g., Linux, QNX, etc.), and Android and iOS mobile device systems, and is named because it can perform read-write and execute operations on the Root directory. It is equivalent to SYSTEM (XP and below)/TrustedInstaller (Vista and above) users in Windows SYSTEMs. The Root terminal has the highest authority in the system, such as starting or stopping a process, deleting or adding a user, adding or disabling hardware, adding a file or deleting all files, and the like.
In one embodiment, after audio jam detection is performed on an application to be detected based on single-frame audio processing time, whether audio jam detection results such as audio jam and jam types occur to the application to be detected is determined, the audio jam detection results are sent to a server to be stored, and the audio jam detection results can be displayed at the front end of the server. Fig. 7 is a schematic diagram showing the result of the stuck detection at the front end of the server.
In one embodiment, the audio stuck detection method can be applied to the physical architecture diagram shown in fig. 8. The hardware environment related to the audio stuck detection method comprises the following steps: an ARM architecture processor (katom meter client), an X86 architecture processor (katom meter server, DB (Data Base) server, WEB (World Wide WEB) platform); the software environment related to the audio stuck detection method may include: android/ios platform (Kantometer client tool), windows xp and operating systems above (Kantometer server, DB server, WEB platform). The card-ton meter tool can be composed of an APK client, a WEB server and a DB database in terminal equipment. The above is merely an example, and this is not limited in this embodiment. The APK (Android application package) is an application package file format used by an Android operating system, and is used for distributing and installing mobile applications and middleware.
Further, in one embodiment, the scene of the application to be detected includes more than two detection modes, wherein one detection mode is a battle scene detection mode. In this embodiment, after the application to be detected is pulled up and the running process of the application to be detected is executed, the detection mode selection instruction is received, and when the detection mode selection instruction is the battle scene detection mode selection instruction, the step of obtaining the time information for calling the audio decoding function is performed. In one embodiment, the scene of the application to be detected further comprises a non-combat scene detection mode; the battle scene detection mode comprises the steps of detecting the audio jamming of an application program to be detected; the non-combat scene detection mode comprises the step of detecting the picture jamming and the like of the application program to be detected, and can detect whether the picture of the non-combat scene of the application program to be detected is jammed or not. The detection aiming at the non-combat scene detection mode can be realized in any mode.
In the related art, most of the detection on audio frequency blockage is an audio frequency blockage detection scheme for non-game application programs, and the audio frequency blockage detection scheme for the application scenes generally needs to store original detected audio at a local test initiating end, output receiving end audio transmitted through a cloud end at a receiving end after the detected audio is played at the initiating end, and then compare the original audio frequency with the audio frequency of the receiving end to obtain the blockage condition of the audio frequency. However, this stuck-at detection scheme is not suitable for use in game-like applications because the input content of the voice function of a game-like application is usually not fixed, rather than fixed playback testing a certain piece of audio under test. Therefore, the audio jam detection method can be applied to game application programs to detect whether the game voice is jammed or not.
The application provides an application scenario, and the application scenario applies the audio stuck detection method. In this embodiment, the application to be detected is taken as a game application as an example; specifically, the application of the audio stuck detection method in the application scenario is as follows:
the input of the audio stuck detection method is as follows: a game client program; and (3) treatment: automatically acquiring an audio decoding function during voice communication in a game, and performing voice pause detection on a voice scene; and (3) outputting: and prompting the game audio card pause, and displaying the audio card pause information summary and the detail information of the single card pause by the platform.
The specific process is as follows: starting a game through a morton meter to obtain a current game APK packet name, initializing the game in virtual app, sending a corresponding audio decoding function (such as opus _ decode ()) by a server according to different game APK packet names, making hook by a tool APK end according to the audio decoding function sent by the server to obtain audio decoding frame time consumption data (namely the single-frame audio processing time), then sending the audio decoding frame time consumption data to an audio morton identification model in real time for identification processing, and once a voice morton occurs. The prompt of voice card pause can be carried out at the tool end, and then the voice card pause data is reported to the server end for information summarization.
The method is applied to an actual scene, and combines the processing process of personnel, and comprises the following steps:
a relevant person opens a mortgage counting tool at a tested terminal, selects an application program to be detected, which needs to be subjected to audio mortgage detection, from the mortgage counting tool, as shown in fig. 9(1), which is an interface schematic diagram of the mortgage counting tool in a specific embodiment, adds the application program to be detected in a test list in the interface, enters an interface schematic diagram shown in fig. 9(2), selects an application program 6 to be detected in the interface, and adds an interface of the mortgage counting tool after the application program to be detected as shown in fig. 9 (3); selecting to start the application program to be detected in the interface shown in fig. 9(3), that is, sending an audio stuck detection request to the terminal; after the terminal receives the audio detection request, the application program to be detected is pulled up in the morton meter tool based on the audio detection request, and the application program to be detected enters a scene of the application program to be detected.
As shown in fig. 9(4), the relevant person selects a scene detection mode, wherein the audio morton detection method can be applied to battle scene detection of a game. Meanwhile, a function acquisition request is sent to the server based on the application program identifier 6 of the application program (application program 6) to be detected carried in the audio detection request, and an audio decoding function opus _ decode () corresponding to the application program (application program 6) to be detected is acquired from the server.
After the application program to be detected is pulled up, a time recording function time _ record () is injected into the position corresponding to the opus _ decode () in the application program to be detected through a hook function. In a specific embodiment, the time recording function time _ record () is injected for the header of the opus _ decode (). In this embodiment, the game audio formats are Opus, the transmitting end encodes the audio through Opus _ encode (), and the receiving end decodes the audio through Opus _ decode (). In other embodiments, if the audio format of the application to be detected is other format, the corresponding audio decoding function is other function.
And when a battle scene detection mode selection instruction is received in the application program to be detected, entering an audio stuck detection process. Monitoring the running process of the application program to be detected, recording the current time as the time information of calling the opus _ decode () based on time _ record () when calling the audio decoding function opus _ decode (), and obtaining the single-frame audio processing time according to the time information of calling the opus _ decode () twice. That is, the interval of two audio frame codes is calculated at the receiving end through hook opus _ code (), so as to obtain the time consumption of decoding each frame of audio, and the specific process is as follows: firstly, hook is carried out on the opus _ decode () function, a time recording function time _ record () is added, when the opus _ decode () function is executed for the first time, the time _ record () function is actually skipped to be executed firstly, and the time1 of executing the opus _ decode () is recorded; the time2 of the opus _ decode () function is recorded the second time it is executed; thus, the time to execute opus _ decode () for the first time is: time2-time1, which is the time it takes to decode each frame of audio.
The method comprises the steps of obtaining single-frame audio processing time within preset time, inputting an audio pause detection model, and determining whether an application program to be detected is paused or not and pause related information, such as pause type, pause duration and the like. The audio stuck detection model comprises a burr audio stuck detection model, a continuous audio stuck detection model and a continuous audio stuck detection model; for each audio stuck detection model, a plurality of sets of candidate thresholds are respectively set, the accuracy and the false negative rate of each set of candidate thresholds are determined by using the sample audio and the listening result of the user to the sample audio, and the most suitable candidate threshold is selected as the threshold of the audio stuck detection model based on the accuracy and the false negative rate, as shown in fig. 10, which is a schematic diagram of the threshold determination flow of the audio stuck detection model.
After audio detection is carried out, the recognized audio card is recorded, and after detection is finished, the card detection record can be checked locally.
The audio stuck detection method can quickly and accurately detect the audio stuck of the application program to be detected, such as a game application program developed based on an unity3d engine, and the method is based on a scheme of a virtual machine, so that the test package of the release version can be tested on a non-root terminal, and great convenience is provided for testing related personnel.
It should be understood that, although the steps in the flowcharts involved in the above embodiments are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in each flowchart involved in the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 11, there is provided an audio stuck detection apparatus, which may be a part of a computer device using a software module or a hardware module, or a combination of the two, the apparatus specifically includes: a time information obtaining module 1110, a single frame time determining module 1120, and an audio stuck detection module 1130, wherein:
the time information obtaining module 1110 is configured to obtain time information for calling an audio decoding function in an operation process of the application to be detected; the audio decoding function is used for decoding the audio in the application program to be detected;
a single-frame time determining module 1120, configured to determine, according to time information of two adjacent calls to the audio decoding function, a single-frame audio processing time corresponding to the audio decoding function;
the audio jam detection module 1130 is configured to perform audio jam detection on the application to be detected based on the single-frame audio processing time, and determine whether the application to be detected is jammed in audio.
The audio stuck detection device acquires time information for calling an audio decoding function in the running process of an application program to be detected, wherein the audio decoding function is called, namely the function called by the application program when the application program decodes audio at a receiving end; further, single-frame audio processing time is obtained according to the time information of the two adjacent calls of the audio decoding function, and whether the audio after the audio decoding in the application program to be detected is blocked or not can be determined according to the single-frame audio processing time in the application program to be detected. According to the device, the calling time information of the audio decoding function is detected only in the running process of the application program to be detected, namely, the audio jamming detection of the application program to be detected can be completed only by operating the receiving end of the audio, so that the operation flow of the audio jamming detection process is simplified.
In one embodiment, the above apparatus further comprises: the function injection module is used for injecting a time recording function into a position corresponding to an audio decoding function in the application program to be detected through a hook function; the time information obtaining module 1110 is further configured to: in the running process of the application program to be detected, when the audio decoding function is called, the current time information is obtained based on the time recording function, and the time information for calling the audio decoding function is obtained.
In one embodiment, the above apparatus further comprises: the program name acquisition module is used for acquiring an application program identifier of the application program to be detected; the function name acquisition module is used for acquiring the name of the audio decoding function in the application program to be detected according to the application program identifier; the function injection module is further configured to: based on the name of the audio decoding function, the corresponding position of the audio decoding function is searched in the application program to be detected, and a time recording function is injected into the corresponding position of the audio decoding function through a hook function.
In one embodiment, the program name obtaining module of the apparatus includes: a request receiving unit for receiving an audio stuck detection request; and the analysis unit is used for acquiring the application program identifier of the application program to be detected according to the audio stuck detection request.
In one embodiment, the above apparatus further comprises: and the program pull-up module is used for responding to the audio jamming detection request, pulling up the application program to be detected and enabling the application program to be detected to enter the running state.
In an embodiment, the function name obtaining module of the apparatus includes: a sending unit, configured to send a function acquisition request to a server based on the application identifier; and the receiving unit is used for receiving the audio decoding function name fed back by the server based on the function acquisition request.
In one embodiment, the audio stuck detection module 1130 of the apparatus includes: the time acquisition unit is used for acquiring the single-frame audio processing time in a preset time period; and the pause detection unit is used for carrying out audio pause detection on the single-frame audio processing time in the preset time period through the audio pause detection model, and determining whether the application program to be detected is paused in the preset time period and the pause type.
For a specific embodiment of the audio stuck detection apparatus, reference may be made to the above embodiments of the audio stuck detection method, which are not described herein again. The modules in the audio stuck detection device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an audio stuck detection method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 12 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.