A device testing method and terminal

CN116744204BActive Publication Date: 2026-08-14BEIJING HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本申请提供了一种器件检测方法和终端,可以用于终端在确定屏幕发声器损坏时,不再使用屏幕发声器播放音频信号,以解决因屏幕发声器损坏导致其播放的音频信号质量差的问题

Benefits of technology

[0056] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116744204B_ABST
    Figure CN116744204B_ABST
Patent Text Reader

Abstract

A device detection method and terminal are disclosed. This method can be used to detect whether a screen speaker has been damaged. If the terminal determines that the screen speaker is damaged, several methods can be used to mitigate the adverse effects caused by the damage (such as the aforementioned effects of noise during audio signal playback).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal and audio processing technology, and in particular to a device detection method and a terminal. Background Technology

[0002] As mobile devices continue to evolve, users are demanding higher screen-to-body ratios. Currently, most devices are full-screen, meaning the entire front of the device is screen. When a device is full-screen, the earpiece can only be placed on the side. Since users typically hold the screen towards their ear when listening to audio, rather than the side with the earpiece, this placement can cause sound leakage and unclear audio.

[0003] To address the aforementioned issues of sound leakage and unclear audio, and to improve the quality of audio signals played on the terminal, a speaker other than the earpiece can be added. This additional speaker can be located inside the terminal's screen and can also be called a screen speaker. When playing audio signals, this screen speaker is typically directed towards the ear, thus mitigating the aforementioned problems of sound leakage and unclear audio. Summary of the Invention

[0004] This application provides a device detection method and terminal, which can be used to stop using the screen speaker to play audio signals when the terminal determines that the screen speaker is damaged, so as to solve the problem of poor audio signal quality caused by the damage of the screen speaker.

[0005] In a first aspect, this application provides a device detection method applied to a terminal including a first speaker and a second speaker. The method includes: after displaying a call application interface, playing a first audio signal through the first speaker and playing a second audio signal through the second speaker; wherein the first audio signal is an audio signal played by the terminal through the first speaker during a first time period; the second audio signal is an audio signal played by the terminal through the second speaker during the first time period; acquiring multiple frames of the first audio signal to obtain a first audio signal sequence; determining that the first speaker is damaged based on the first audio signal sequence; and playing an audio signal through the second speaker during a second time period, without playing the first audio signal through the first speaker again; wherein the second time period is after the first time period.

[0006] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker.

[0007] In conjunction with the first aspect, playing the second audio signal through the second speaker specifically includes: increasing the energy of the second audio signal; and playing the second audio signal with increased energy through the second speaker.

[0008] In the above embodiments, when the terminal does not use the screen speaker to play audio signals, the volume of the audio signal played through the earpiece can be increased, thereby increasing the energy of the audio signal played through the earpiece. In this way, even without using the screen speaker, the user can still hear clearly; the sound will not be quieter due to the screen speaker not playing audio signals, thus preventing unclear audio.

[0009] In conjunction with the first aspect, after determining that the first speaker is damaged based on the first audio signal sequence, the method further includes: displaying a first interface, the first interface including prompt information, the prompt information being used to notify the user that the first speaker has been damaged.

[0010] In the above embodiments, the first interface may refer to the following: Figure 12 or Figure 13 The exemplary user interface shown in the diagram can display a prompt message such as: "The screen speaker is damaged and has switched to earpiece sound. Please go to a nearby online repair shop for repair as soon as possible." After seeing this prompt message, the user can determine that the screen speaker is not working because the hardware itself is damaged, rather than because of a system problem, and can then proceed with targeted repairs.

[0011] In conjunction with the first aspect, the first speaker is placed inside the screen of the terminal, and the second speaker is placed on the side of the terminal; wherein the first audio signal played by the first speaker is transmitted to the ear through the bone structure, and the second audio signal played by the second speaker is transmitted to the ear through the air.

[0012] In the above embodiments, the screen speaker is placed inside the screen of the terminal, and the earpiece is placed on the side of the terminal, which enables the terminal to achieve clear sound pickup while realizing a full-screen display, and also reduces sound leakage.

[0013] In conjunction with the first aspect, obtaining a first audio signal sequence by acquiring multiple frames of the first audio signal specifically includes: adding a pilot signal to each frame of the first audio signal to obtain the first audio signal sequence; wherein, the pilot signal is an audio signal with a frequency greater than a frequency threshold and an energy less than a first energy threshold.

[0014] In the above embodiments, the first audio signal sequence can be the downlink audio signal sequence mentioned below. The pilot signal added to the first audio signal sequence is to facilitate filtering the feedback signal of the first audio signal sequence to obtain the detection signal. Since the frequency of the pilot signal is usually higher than the frequency of the audio signal corresponding to the voice information, the information of audio signals with frequencies lower than the pilot signal in the feedback signal corresponding to the first audio signal sequence can be filtered out with the frequency of the pilot signal as a reference, thereby obtaining the detection signal. In this way, the filtering process can be simplified.

[0015] In conjunction with the first aspect, the frequency threshold is greater than the frequency of the first audio signal, and the first energy threshold is close to or equal to -30dB.

[0016] In the above embodiments, if the frequency of the pilot signal is greater than the frequency of the first audio signal, the detection signal can be easily obtained from the filtered feedback signal.

[0017] In conjunction with the first aspect, the first audio signal sequence includes a first audio signal after adding pilot signals to H frames, including a third audio signal; the third audio signal is a first audio signal after adding pilot signals to a frame, characterized in that determining the first speaker is damaged based on the first audio signal sequence specifically includes: after playing the first audio signal sequence through the first speaker, acquiring a detection signal sequence; the detection signal sequence includes K frame detection signals, including a first detection signal, the first detection signal being a feedback signal corresponding to a silent audio signal in the third audio signal; the silent audio signal in the third audio signal is an audio signal with energy less than or equal to a second energy threshold and a frequency equal to or greater than the frequency threshold, the second energy threshold being greater than or equal to the first energy threshold; determining each of the detection signal sequences The admittance value corresponding to the frame detection signal includes the admittance value corresponding to the first detection signal, which is used to indicate the first admittance value of the first speaker when playing a silent audio signal in the third audio signal. The first admittance value is used to indicate the ability of the first speaker to pass the silent audio signal in the third audio signal. The average admittance value corresponding to the detection signal sequence is determined. The average admittance value corresponding to the detection signal sequence is the average value of the admittance values ​​corresponding to the K-frame detection signals. If the average admittance value corresponding to the determined detection signal sequence is not within the normal admittance value range, the screen speaker is determined to be damaged. The normal admittance value range is the range of admittance values ​​of the first speaker when the first speaker is playing the silent audio signal under normal conditions.

[0018] In the above embodiment, the terminal can obtain the detection signal sequence from the feedback signal sequence corresponding to the target audio signal sequence played by the screen speaker, and then determine whether the average admittance value of the detection signal sequence is within the normal admittance value range. If it is within the normal admittance value range, it can be determined that the screen speaker is normal; if it is not within the normal admittance value range, it can be determined that the screen speaker is damaged.

[0019] In conjunction with the first aspect, after playing the first audio signal sequence through the first speaker, obtaining a detection signal sequence specifically includes: after playing the first audio signal sequence through the first speaker, obtaining a first feedback signal sequence corresponding to the first audio signal; the first feedback signal sequence includes an H-frame feedback signal, which includes a first feedback signal, the first feedback signal being a feedback signal corresponding to the third audio signal, the first feedback signal including current information and voltage information corresponding to when the first speaker plays the third audio signal, and the first feedback signal carrying information about the third audio signal; the third audio signal also includes a non-silent audio signal, the non-silent audio signal being an audio signal whose energy is greater than or equal to a third energy threshold and whose frequency is... The first feedback signal sequence is filtered to obtain a prediction signal sequence. The prediction signal sequence includes S frames of prediction signals, where S is less than or equal to H. The prediction signal sequence includes a first prediction signal, which is a first feedback signal obtained by filtering the first feedback signal and removing information of non-silent audio signals from the first feedback signal. The admittance value corresponding to each frame of prediction signal in the prediction signal sequence is determined. All prediction signals in the prediction signal sequence whose corresponding admittance value is less than the admittance value of the silence frame are determined as a detection signal sequence. The admittance value of the silence frame is the maximum admittance value of the first speaker when the first speaker plays the silent audio signal.

[0020] In the above embodiment, if the detection signal sequence carries information that it is a silent audio signal, then using the average admittance value corresponding to the detection signal sequence to represent the admittance value of the screen speaker when playing a silent audio signal is more accurate. When the average admittance value is not within the normal admittance value range, it can be determined that the screen speaker is damaged. This process is not affected by the energy of the voice signal, thus improving the accuracy of the calculation results.

[0021] In conjunction with the first aspect, the first feedback signal sequence is filtered to obtain a prediction signal sequence; the prediction signal sequence includes S frames of prediction signals, specifically including: filtering a portion of the feedback signals in the first feedback signal sequence to obtain the prediction signal sequence; wherein, the portion of the feedback signals is the S frames of feedback signals with later acquisition times in the first feedback signal sequence, and the prediction signal sequence includes the S frames of filtered feedback signals, where S is less than H; or, all the feedback signals in the first feedback signal sequence are filtered to obtain the prediction signal sequence, and the prediction signal sequence includes the S frames of filtered feedback signals, where S is equal to H.

[0022] In the above embodiments, the feedback signal acquired earlier may carry noise information due to circuit instability. This noise has a higher frequency than the pilot signal and cannot be filtered out during the feedback signal filtering process. Consequently, the filtered downlink prediction signal will still contain this noise information, resulting in an overestimation of the admittance value of the filtered downlink prediction signal, rendering it unreliable and unnecessary for subsequent calculations. This initial stage also affects the stability of the pilot signal. Therefore, excluding the earlier feedback signal during the calculation process can improve the accuracy of the calculation results.

[0023] In conjunction with the first aspect, the normal admittance range is predetermined and set in the terminal. The process of determining the normal admittance range includes: playing the second audio signal sequence through M samples under normal conditions using the first speaker; acquiring the second feedback signal sequence corresponding to each of the M samples when playing the second audio signal sequence, thus obtaining the second feedback signal sequence corresponding to the M samples; and determining the prediction signal sequence for silence corresponding to the M samples based on the second feedback signal sequence corresponding to the M samples. The M samples include a first sample, and the prediction signal sequence for silence corresponding to the first sample includes prediction signals for silence from multiple frames. The signal includes a first prediction signal for silence; the first prediction signal for silence is a filtered feedback signal that satisfies a first condition after filtering the second feedback signal sequence corresponding to the first sample, wherein the first condition is that the admittance value corresponding to the filtered feedback signal is less than or equal to an admittance threshold; reference admittance values ​​corresponding to the M samples are determined based on the prediction signal sequences for silence corresponding to the M samples, wherein the reference admittance value of the first sample is the average of the admittance values ​​corresponding to all prediction signals for silence in the prediction signal sequence for silence corresponding to the first sample; and the normal admittance value range is determined based on the reference admittance values ​​corresponding to the M samples.

[0024] In the above embodiments, the range of normal admittance values ​​is determined by testing a large number of samples of the screen speaker, which has universality.

[0025] In conjunction with the first aspect, determining the normal admittance range based on the reference admittance values ​​corresponding to the M samples specifically includes: determining the maximum value and the minimum value among the reference admittance values ​​corresponding to the M samples; and determining the normal admittance range as the range from the minimum value to the maximum value among the reference admittance values.

[0026] In conjunction with the first aspect, the silence frame admittance value is predetermined and then set in the terminal. The process of determining the silence frame admittance value includes: determining the average reference admittance value of M samples of the first speaker under different conditions, the different conditions including a normal condition and at least one abnormal condition; the average reference admittance value of the M samples under the normal condition is the average of the reference admittance values ​​corresponding to the M samples under the normal condition; the average reference admittance value of the M samples under the abnormal condition is the average of the reference admittance values ​​corresponding to the M samples under the abnormal condition; and determining the silence frame admittance value based on the average reference admittance value of the M samples of the first speaker under different conditions.

[0027] In the above embodiments, the terminal determines the admittance value of the silent frame by testing a large number of samples under different conditions using the screen speaker, which has universality.

[0028] In conjunction with the first aspect, determining the silence frame admittance value based on the average reference admittance value of M samples of the first speaker under different conditions specifically includes: determining the maximum value among the average reference admittance values ​​of M samples of the first speaker under different conditions as the silence frame admittance value.

[0029] Secondly, this application provides a terminal, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the terminal to perform: after displaying a call application interface, playing a first audio signal through a first speaker, and playing a second audio signal through a second speaker; wherein, the first audio signal is an audio signal played by the terminal through the first speaker during a first time period; the second audio signal is an audio signal played by the terminal through the second speaker during the first time period; acquiring multiple frames of the first audio signal to obtain a first audio signal sequence; determining that the first speaker is damaged based on the first audio signal sequence; and playing an audio signal through the second speaker during a second time period, without playing the first audio signal through the first speaker again; wherein, the second time period is after the first time period.

[0030] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker.

[0031] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to: increase the energy of the second audio signal; and play the increased energy second audio signal through the second speaker.

[0032] In the above embodiments, when the terminal does not use the screen speaker to play audio signals, the volume of the audio signal played through the earpiece can be increased, thereby increasing the energy of the audio signal played through the earpiece. In this way, even without using the screen speaker, the user can still hear clearly; the sound will not be quieter due to the screen speaker not playing audio signals, thus preventing unclear audio.

[0033] In conjunction with the second aspect, the one or more processors are also configured to invoke computer instructions to cause the terminal to: display a first interface, the first interface including a prompt message for informing the user that the first speaker has been damaged.

[0034] In the above embodiments, the first interface may refer to the following: Figure 12 or Figure 13 The exemplary user interface shown in the diagram can display a prompt message such as: "The screen speaker is damaged and has switched to earpiece sound. Please go to a nearby online repair shop for repair as soon as possible." After seeing this prompt message, the user can determine that the screen speaker is not working because the hardware itself is damaged, rather than because of a system problem, and can then proceed with targeted repairs.

[0035] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: adding a pilot signal to each frame of the first audio signal to obtain the first audio signal sequence; wherein the pilot signal is an audio signal with a frequency greater than a frequency threshold and an energy less than a first energy threshold.

[0036] In the above embodiments, the first audio signal sequence can be the downlink audio signal sequence mentioned below. The pilot signal added to the first audio signal sequence is to facilitate filtering the feedback signal of the first audio signal sequence to obtain the detection signal. Since the frequency of the pilot signal is usually higher than the frequency of the audio signal corresponding to the voice information, the information of audio signals with frequencies lower than the pilot signal in the feedback signal corresponding to the first audio signal sequence can be filtered out with the frequency of the pilot signal as a reference, thereby obtaining the detection signal. In this way, the filtering process can be simplified.

[0037] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: after playing the first audio signal sequence through the first speaker, acquiring a detection signal sequence; the detection signal sequence includes K frame detection signals, including a first detection signal, the first detection signal being a feedback signal corresponding to a silent audio signal in the third audio signal; the silent audio signal in the third audio signal is an audio signal with energy less than or equal to a second energy threshold and a frequency equal to or greater than the frequency threshold, the second energy threshold being greater than or equal to the first energy threshold; determining the admittance value corresponding to each frame detection signal in the detection signal sequence, including the admittance value corresponding to the first detection signal, the first detection signal... The corresponding admittance value is used to indicate the first admittance value of the first speaker when playing a silent audio signal in the third audio signal. The first admittance value is used to indicate the ability of the first speaker to pass the silent audio signal in the third audio signal. The average admittance value corresponding to the detection signal sequence is determined. The average admittance value corresponding to the detection signal sequence is the average value of the admittance values ​​corresponding to the K-frame detection signals. If it is determined that the average admittance value corresponding to the determined detection signal sequence is not within the normal admittance value range, the screen speaker is determined to be damaged. The normal admittance value range is the range of admittance values ​​of the first speaker when the first speaker is playing the silent audio signal under normal conditions.

[0038] In the above embodiment, the terminal can obtain the detection signal sequence from the feedback signal sequence corresponding to the target audio signal sequence played by the screen speaker, and then determine whether the average admittance value of the detection signal sequence is within the normal admittance value range. If it is within the normal admittance value range, it can be determined that the screen speaker is normal; if it is not within the normal admittance value range, it can be determined that the screen speaker is damaged.

[0039] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: after playing the first audio signal sequence through the first speaker, acquiring a first feedback signal sequence corresponding to the first audio signal; the first feedback signal sequence includes an H-frame feedback signal, which includes the first feedback signal, the first feedback signal being a feedback signal corresponding to the third audio signal, the first feedback signal including current information and voltage information corresponding to the first speaker playing the third audio signal, and the first feedback signal carrying information about the third audio signal; the third audio signal also includes a non-silent audio signal, the non-silent audio signal being a third audio signal with energy greater than or equal to a third energy threshold and a frequency less than the specified frequency. The first feedback signal sequence is filtered to obtain a prediction signal sequence, wherein the prediction signal sequence includes S frames of prediction signals, where S is less than or equal to H; the prediction signal sequence includes a first prediction signal, which is a first feedback signal obtained by filtering the first feedback signal and removing information of non-silent audio signals from the first feedback signal; the admittance value corresponding to each frame of prediction signal in the prediction signal sequence is determined; all prediction signals in the prediction signal sequence whose corresponding admittance value is less than the admittance value of the silence frame are determined as a detection signal sequence, wherein the admittance value of the silence frame is the maximum admittance value of the first speaker when the first speaker plays the silent audio signal.

[0040] In the above embodiment, if the detection signal sequence carries information that it is a silent audio signal, then using the average admittance value corresponding to the detection signal sequence to represent the admittance value of the screen speaker when playing a silent audio signal is more accurate. When the average admittance value is not within the normal admittance value range, it can be determined that the screen speaker is damaged. This process is not affected by the energy of the voice signal, thus improving the accuracy of the calculation results.

[0041] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: filtering a portion of the feedback signals in the first feedback signal sequence to obtain a prediction signal sequence; wherein the portion of the feedback signals is the S-frame feedback signals acquired later in the first feedback signal sequence, and the prediction signal sequence includes the S-frame filtered feedback signals, where S is less than H; or, filtering all the feedback signals in the first feedback signal sequence to obtain a prediction signal sequence, wherein the prediction signal sequence includes the S-frame filtered feedback signals, where S is equal to H.

[0042] In the above embodiments, the feedback signal acquired earlier may carry noise information due to circuit instability. This noise has a higher frequency than the pilot signal and cannot be filtered out during the feedback signal filtering process. Consequently, the filtered downlink prediction signal will still contain this noise information, resulting in an overestimation of the admittance value of the filtered downlink prediction signal, rendering it unreliable and unnecessary for subsequent calculations. This initial stage also affects the stability of the pilot signal. Therefore, excluding the earlier feedback signal during the calculation process can improve the accuracy of the calculation results.

[0043] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: playing the second audio signal sequence through M samples under normal conditions using the first speaker; acquiring the second feedback signal sequence corresponding to each of the M samples when playing the second audio signal sequence, thereby obtaining the second feedback signal sequence corresponding to the M samples; and determining the prediction signal sequence of silence corresponding to the M samples based on the second feedback signal sequence corresponding to the M samples; wherein the M samples include a first sample, and the prediction signal sequence of silence corresponding to the first sample includes prediction signals of silence for multiple frames, including the first... A prediction signal for silence; the first prediction signal for silence is a filtered feedback signal that satisfies a first condition after filtering the second feedback signal sequence corresponding to the first sample, wherein the first condition is that the admittance value corresponding to the filtered feedback signal is less than or equal to the admittance threshold; a reference admittance value corresponding to each of the M samples is determined based on the prediction signal sequences for silence, wherein the reference admittance value of the first sample is the average of the admittance values ​​corresponding to all prediction signals for silence in the prediction signal sequence for silence corresponding to the first sample; the normal admittance value range is determined based on the reference admittance values ​​corresponding to the M samples.

[0044] In the above embodiments, the range of normal admittance values ​​is determined by testing a large number of samples of the screen speaker, which has universality.

[0045] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: determining the maximum value and the minimum value among the reference admittance values ​​corresponding to the M samples; and determining the normal admittance value range to be from the minimum value to the maximum value among the reference admittance values.

[0046] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: determining the average reference admittance value of M samples of the first speaker under different conditions, the different conditions including a normal condition and at least one abnormal condition; the average reference admittance value of the M samples under the normal condition is the average of the reference admittance values ​​corresponding to the M samples under the normal condition; the average reference admittance value of the M samples under the abnormal condition is the average of the reference admittance values ​​corresponding to the M samples under the abnormal condition; and determining the silence frame admittance value based on the average reference admittance value of the M samples of the first speaker under different conditions.

[0047] In the above embodiments, the terminal determines the admittance value of the silent frame by testing a large number of samples under different conditions using the screen speaker, which has universality.

[0048] In conjunction with the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the terminal to perform: determining the maximum value among the average reference admittance values ​​of the first speaker in M ​​samples under different conditions as the silence frame admittance value.

[0049] Thirdly, embodiments of this application provide a terminal, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the terminal to perform the method as described in the first aspect or any embodiment of the first aspect.

[0050] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker.

[0051] Fourthly, embodiments of this application provide a chip system applied to a terminal. The chip system includes one or more processors, which are used to invoke computer instructions to cause the terminal to perform the method described in the first aspect or any embodiment of the first aspect.

[0052] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker.

[0053] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a terminal, cause the terminal to perform the method described in the first aspect or any embodiment of the first aspect.

[0054] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker.

[0055] In a sixth aspect, embodiments of this application provide a computer-readable storage medium that, when the instructions are executed on a terminal, causes the terminal to perform the method as described in the first aspect or any embodiment of the first aspect.

[0056] In the above embodiments, the first speaker can be a screen speaker, and the second speaker can be a handset. During a user call, the terminal can use the screen speaker to play an audio signal. Based on the audio signal, it can be determined whether the screen speaker is damaged. If it is damaged, the screen speaker can be discontinued from playing the audio signal, and only the handset can be used to play the audio signal. This solves the problem of noise or distortion in the played audio signal caused by a damaged screen speaker. Attached Figure Description

[0057] Figure 1a as well as Figure 1b A schematic diagram of a scheme in which two speakers are set in the terminal is shown;

[0058] Figure 2 A schematic diagram illustrating the process of adding pilot signals to a preprocessed audio signal to obtain the target audio signal;

[0059] Figure 3 A schematic diagram of filtering the feedback signal is shown;

[0060] Figure 4 A schematic diagram illustrating the detection of the screen speaker to obtain a detection signal in a call scenario;

[0061] Figure 5 This is a schematic flowchart illustrating the detection of a screen speaker using a device detection method in an embodiment of this application.

[0062] Figure 6 This is another schematic flowchart illustrating the detection of a screen speaker using a device detection method in this application embodiment;

[0063] Figure 7 A schematic flowchart is shown for determining the normal admittance range of a terminal.

[0064] Figure 8 A schematic flowchart for the terminal to obtain the reference admittance value corresponding to the first sample of the screen speaker;

[0065] Figure 9 A schematic flowchart is shown to illustrate how a terminal determines the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions based on the admittance value corresponding to the N frames of reference prediction signals.

[0066] Figure 10 This diagram illustrates the differential admittance value obtained by performing differential operations on the reference prediction signal.

[0067] Figure 11 A schematic flowchart is shown for determining the admittance value of a silence frame by a terminal.

[0068] Figure 12 This illustrates a user interface when a terminal displays a notification message to the user that the screen speaker is damaged;

[0069] Figure 13 This illustrates another user interface when the terminal displays a prompt message to notify the user that the screen speaker is damaged;

[0070] Figures 14a-14c This illustrates a set of exemplary user interfaces when a user triggers the terminal to detect the screen speaker via settings.

[0071] Figure 15 This is a schematic diagram of the terminal structure provided in the embodiments of this application. Detailed Implementation

[0072] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0073] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0074] In one design, the terminal incorporates two sound transmitters: an earpiece and a screen speaker. The earpiece is positioned on the side of the terminal, while the screen speaker is located inside the screen. The terminal processes audio signals sent from other terminals, generating two audio signals. One audio signal is then played through the earpiece, while the other is played through the screen speaker. The terminal can control the energy levels of these two audio signals in different environments, enabling clear sound pickup and reduced sound leakage for the user. The audio signal played through the screen speaker is transmitted to the ear via bone conduction, while the audio signal played through the earpiece is transmitted to the ear through the air.

[0075] However, screen speakers can be damaged by various factors, such as prolonged use or external force. When a screen speaker is damaged, it can cause noise when playing audio signals, and the audio signal may also be distorted. This results in the user hearing noise or distortion in the audio signal, reducing the quality of the audio signal played by the device. If this occurs during a call, it will also affect call quality.

[0076] Figure 1a as well as Figure 1b A schematic diagram of a scheme in which two speakers are set in the terminal is shown.

[0077] in, Figure 1a This is a schematic diagram showing two sound generators producing sound normally. Figure 1aAs shown, a user is holding the terminal for a call, with the terminal pressed against their ear. At this time, the terminal can play one audio signal (audio signal 1) through the earpiece and another audio signal (audio signal 2) through the screen speaker. The terminal can reduce the volume of audio signal 1 (making it sound quieter in decibels), thus reducing sound leakage, and simultaneously compensate by playing audio signal 2, ensuring clearer sound for the user.

[0078] Figure 1b This is a diagram illustrating what happens when the screen speaker malfunctions. Figure 1b As shown, a user is making a call using the terminal. The terminal can play one audio signal (audio signal 1) through the earpiece and another audio signal (audio signal 2) through the screen speaker. However, due to damage to the screen speaker, noise is generated, causing the audio signal played by the screen speaker to carry noise. Upon hearing the noise, the user no longer holds the terminal close to their ear to reduce its impact. This, combined with the noise and the terminal being too far from the ear, makes it difficult for the user to hear clearly.

[0079] To address the problems mentioned in the aforementioned solutions, this application proposes a device detection method that can be used to detect whether the screen speaker has been damaged. If the terminal determines that the screen speaker has been damaged, several methods can be used to mitigate the adverse effects caused by the damage (such as the aforementioned issue of noise during audio signal playback).

[0080] When a terminal determines that the screen speaker is damaged, the methods it may take include, but are not limited to, the following.

[0081] Method 1: The terminal no longer plays audio signals through the screen speaker, but only uses the earpiece to play audio signals, while increasing the energy of the audio signal played through the earpiece so that users can hear the sound clearly.

[0082] Method 2: The terminal can display a prompt message to notify the user that the screen speaker is damaged, and can also suggest that the user go to a nearby service center to repair the screen speaker.

[0083] It should be understood that the terminal can also combine method 1 and method 2 to solve the adverse effects caused by the damage of the screen speaker, and other methods can also be adopted. This application embodiment does not limit this.

[0084] The following describes the principles and related concepts involved in detecting the screen speaker in the embodiments of this application.

[0085] It should be understood that, under normal operating conditions, when the screen speaker converts a muted audio signal into an electrical signal (analog electrical signal) for playback, the admittance value of the screen speaker can be fixed within a certain range, which will be referred to as the normal admittance range below. This admittance value reflects the screen speaker's ability to pass through the muted audio signal; the larger the admittance value, the easier it is for the screen speaker to pass through the muted audio signal, and the smaller the admittance value, the more difficult it is for the screen speaker to pass through the muted audio signal.

[0086] The muted audio signal is an audio signal with energy less than or equal to an energy threshold and frequency greater than a frequency threshold, and it may not carry speech information. The admittance value of the screen speaker when passing through the muted audio signal can be calculated using the feedback signal corresponding to the muted audio signal. The calculated admittance value corresponds to the feedback signal (the calculation process can be referred to in the description on 107 below). The feedback signal corresponding to the muted audio signal can also be called the detection signal. The admittance value calculated using the detection signal can be referred to as the admittance value corresponding to the detection signal in the following text. The admittance value corresponding to the detection signal can represent the admittance value of the screen speaker when passing through the muted audio signal, and can also be referred to as the admittance value corresponding to the muted audio signal.

[0087] It should be understood that, in some possible cases, the frequency of a signal (including audio signals and feedback signals, etc.) can be understood as the maximum frequency of a given point after conversion to the frequency domain. Voice information includes the user's voice, ambient sounds, and information from other sounds.

[0088] However, under normal circumstances, the screen speaker usually plays an audio signal carrying voice information (also known as the target audio signal). The muted audio signal can be included in the audio signal carrying voice information. Therefore, the feedback signal corresponding to the muted audio signal can be obtained from the target audio signal played by the screen speaker.

[0089] Based on the above description, in one possible implementation, the terminal can obtain a detection signal from the feedback signal corresponding to the target audio signal played by the screen speaker. Then, it determines whether the admittance value corresponding to the detection signal is within the normal admittance range. If it is within the normal admittance range, the screen speaker is considered normal; if it is outside the normal admittance range, the screen speaker is considered damaged. The detection signal is a filtered feedback signal obtained after filtering the feedback signal, and the admittance value corresponding to this detection signal is less than the admittance value of the silence frame.

[0090] The target audio signal involved in the aforementioned implementation is a single frame of target audio signal. To more accurately determine whether the screen speaker is functioning correctly, in another possible implementation, the terminal can obtain a detection signal sequence from the feedback signal sequence corresponding to the target audio signal sequence played by the screen speaker. Then, it determines whether the average admittance value of the detection signal sequence is within the normal admittance range. If it is within the normal admittance range, the screen speaker is considered functioning correctly; otherwise, it is considered damaged. The target audio signal sequence includes at least Q frames of target audio signal, where Q is a positive integer greater than or equal to 2. The feedback signal sequence includes the feedback signal corresponding to the Q frames of target audio signal. The detection signal sequence includes R frames of detection signal, where R is less than or equal to Q. This detection signal sequence is obtained by filtering the feedback signal sequence, and consists of all filtered feedback signals whose admittance values ​​are less than the admittance value of the silent frame.

[0091] The following describes the relevant concepts involved in the above implementation, including target audio signal, feedback signal, detection signal, normal admittance range, and silent frame admittance value. For ease of understanding, the signals mentioned in the description, including target audio signal, feedback signal, detection signal, pilot signal, and preprocessed audio signal, can refer to one or more frames of signal unless otherwise specified; that is, they can refer to both a signal sequence and a single frame. For example, mentioning target audio signal can refer to either a target audio signal sequence or a single frame of target audio signal.

[0092] 1. Target audio signal

[0093] The target audio signal (including a single frame of target audio signal and a sequence of target audio signals) is the audio signal after a pilot signal has been added to the preprocessed audio signal. The pilot signal refers to one or more frames of audio signal with high frequency and low energy. "High frequency" means the frequency of the pilot signal is greater than a first frequency threshold, which is typically greater than the frequency of the user's voice and can range from 18 kHz to above. "Low energy" means the energy of the pilot signal is less than a first energy threshold (which is very small, such as -30 dB), indicating that the pilot signal is silent or nearly silent and may not carry any speech information. The preprocessed audio signal usually carries speech information, which indicates the sound. Therefore, the target audio signal is the audio signal after the pilot signal has been added to the preprocessed audio signal.

[0094] Figure 2 This is a schematic diagram illustrating how to add pilot signals to a preprocessed audio signal to obtain the target audio signal.

[0095] It should be understood that, for the sake of ease of observation and understanding, Figure 2The spectrogram is used to represent audio signals (including preprocessed audio signals, pilot signals, and target audio signals). The spectrogram of an audio signal can represent the audio signal in the frequency domain, which can be obtained by Fourier transforming the audio signal in the time domain.

[0096] Figure 2 The preprocessed audio signal shown in (a) is the audio signal before the pilot signal is added. Figure 2 (b) shows the pilot signal. Figure 2 The pilot signal shown in (b) is added Figure 2 In the preprocessed audio signal shown in (a), we can obtain... Figure 2 The target audio signal is shown in (c) in the diagram.

[0097] The following is based on Figure 2 The spectrogram of the audio signal shown in the figure serves as an example to illustrate the preprocessed audio signal, pilot signal, and target audio signal.

[0098] like Figure 2 As shown in (a), the horizontal axis of the spectrogram of the preprocessed audio signal represents time, and the vertical axis represents frequency. Figure 2 The preprocessed audio signal shown is a 1-second audio signal. If the duration of one frame of the preprocessed audio signal is 10ms, then the preprocessed audio signal can include 100 frames of preprocessed audio signals. For example, the content in region 101 can be represented as one frame of preprocessed audio signal. The following description is based on one frame of preprocessed audio signal; other preprocessed audio signals can be referred to in the relevant description.

[0099] A preprocessed audio signal frame can include D (integer powers of 2) frequency points. Each frequency point can include time, frequency, and energy. The time of a frequency point represents its time in the preprocessed audio signal frame; the frequency represents the frequency of the audio signal corresponding to that frequency point; and the energy represents the energy of the audio signal corresponding to that frequency point. The unit of energy is decibel (dB), representing the decibel level of the audio information corresponding to that frequency point. The brightness of the color at each frequency point in the spectrogram represents its energy level. Figure 2 The brightness of each frequency point can be represented by its degree of approach to white. The closer it is to white, the greater the energy of the audio signal contained in that frequency point. The sum of the energy of all the frequency points included in a frame of audio signal can represent the energy level of that frame of audio signal. For example, if the frequency points included in region 101a are closer to white than the frequency points included in region 101b, this means that the frequency points included in region 101a are brighter than the frequency points included in region 101b, and therefore the frequency points included in region 101a have greater energy than the frequency points included in region 101b.

[0100] Based on the foregoing description, combined with Figure 2 As shown in (b), all frequency points in the pilot signal are dark, indicating that the energy of the pilot signal is very small, meaning that the pilot signal may not carry speech information. The frequency of the pilot signal is 19 kHz, which is relatively high compared to the preprocessed audio signal.

[0101] Based on the foregoing description, combined with Figure 2 As shown in (c), the target audio signal can include information from the preprocessed audio signal, such as speech information, and can also include pilot signal information. Generally speaking, the preprocessed audio signal has higher energy because it carries speech information, while the pilot signal has lower energy. For example, region 102 is a schematic diagram of the energy level of the pilot signal, and region 103 is a schematic diagram of the energy level of the preprocessed audio signal. Comparing the two, it can be seen that the frequency points of the pilot signal are darker and have lower energy.

[0102] In addition to the method described above of adding pilot signals to the preprocessed audio signal in the frequency domain to obtain the target audio signal, the terminal can also add pilot signals in the time domain to the preprocessed audio signal in the time domain to obtain the target audio signal in the time domain. The audio signal in the time domain can be represented by A sampling points. Each sampling point can include time and amplitude. Time represents the time when the sampling point was acquired, and amplitude represents the voltage magnitude of the audio signal corresponding to that sampling point, or it can represent the energy magnitude or decibel level of the audio signal.

[0103] 2. Feedback signal

[0104] The feedback signal is the current and voltage signal (generated by the power amplifier) ​​generated when the target audio signal drives the power amplifier connected to the screen speaker during the playback of the target audio signal. This feedback signal includes information about the target audio signal (information about the pre-processed audio signal and the pilot signal). The current signal may include the current information corresponding to the target audio signal when the screen speaker plays the target audio signal, and the voltage signal may include the voltage information corresponding to the target audio signal when the screen speaker plays the target audio signal. Therefore, the admittance value corresponding to this feedback signal reflects the admittance value corresponding to the screen speaker playing the target audio signal. This feedback signal can be called the feedback signal corresponding to the target audio signal, and it carries information about the target audio signal.

[0105] The admittance value of the screen speaker when playing the target audio signal reflects its ability to transmit electrical signals. A stronger ability to transmit electrical signals results in a larger admittance value, and a weaker ability results in a smaller admittance value. When a screen speaker is damaged, its ability to transmit electrical signals may increase or decrease compared to normal operation. For example, if the screen speaker is damaged due to an open circuit, its ability to transmit electrical signals will decrease, resulting in a smaller admittance value (compared to normal). Conversely, if the screen speaker is damaged due to a short circuit, its ability to transmit electrical signals will increase, resulting in a larger admittance value (compared to normal).

[0106] 3. Detection signal

[0107] The detection signal is the filtered feedback signal, obtained after filtering the feedback signal, with an admittance value less than the admittance value of the silence frame. For a description of the silence frame admittance value, please refer to the following description; it will not be repeated here.

[0108] The purpose of filtering is to remove feedback signals corresponding to non-silent audio signals from the feedback signal, while retaining feedback signals corresponding to silent audio signals (in some cases, the feedback signal corresponding to a silent audio signal can also be considered a detection signal). Therefore, the admittance value corresponding to this detection signal can reflect the admittance value when the screen speaker plays a silent audio signal. In some possible cases, the silent audio signal can be the pilot signal in the target audio signal, and the non-silent audio signal can be any audio signal in the target audio signal other than the pilot signal. Specifically, the silent audio signal is an audio signal in the target audio signal whose energy is less than or equal to a second energy threshold and whose frequency is greater than or equal to a first frequency threshold (this first frequency threshold is the frequency threshold of the aforementioned pilot signal). If the second energy threshold is very small (it can be greater than or equal to the first energy threshold), then the energy of the silent audio signal is very small and may not carry any voice information. The non-silent audio signal is an audio signal in the target audio signal whose energy is greater than or equal to a third energy threshold and whose frequency is less than a first frequency threshold (the first frequency threshold is the frequency threshold of the pilot signal mentioned above). The third energy threshold can be greater than or equal to the second energy threshold mentioned above. This indicates that the non-silent target audio signal carries more (relative to the silent audio signal) speech information and has higher energy (relative to the silent audio signal). Because the non-silent audio signal has higher energy, when the screen speaker plays the non-silent audio signal, the energy in the feedback signal corresponding to the non-silent audio signal is also higher. Therefore, the admittance value (hereinafter referred to as admittance value 1) of the feedback signal corresponding to the non-silent target audio signal will be interfered with by the energy of the non-silent audio signal (i.e., the energy carried in the speech information), and cannot truly reflect the influence of the screen speaker on the admittance value (because when the admittance value 1 is too large and outside the normal admittance value range, it is uncertain whether it is caused by a damaged screen speaker or by the energy of the target audio signal).

[0109] Figure 3 A schematic diagram of filtering the feedback signal is shown.

[0110] like Figure 3 As shown, spectrogram 1 can represent the feedback signal. Spectrum Figure 2This can represent the feedback signal after filtering. The feedback signal (before filtering) carries information from the target signal, including information from the pilot signal and information from the preprocessed audio signal. For example, the feedback signal before filtering carries information from the pilot signal in region 201 and information from the preprocessed audio signal in region 202. After filtering the feedback signal, a filtered feedback signal can be obtained. One filtering method is to use the frequency of the pilot signal as a reference and filter out audio signals with frequencies lower than the pilot signal in the feedback signal. These audio signals with frequencies lower than the pilot signal usually carry most of the speech information. After filtering, a filtered feedback signal can be obtained. This filtered feedback signal retains the pilot signal. However, when there is speech information with frequencies higher than the pilot signal in the preprocessed audio signal, it is not possible to filter the feedback signal to ensure that it does not carry any speech information. That is, besides the pilot signal, it will still carry some speech information. For example, spectrograms. Figure 2 Region 204 contains the pilot signal included in the filtered feedback signal, while region 203 contains the speech information that remains in the filtered feedback signal. When the energy of the speech information in region 203 is too high, it is unsuitable as a detection signal because the energy of this speech information will affect the admittance value, thus affecting the judgment of whether the screen speaker is functioning properly. Therefore, the terminal can determine the filtered feedback signal with lower energy as the detection signal. One indicator for measuring the energy of a filtered feedback signal is the silence frame admittance value. A lower silence frame admittance value indicates that the speech information carried in the filtered feedback signal has lower energy (if the energy is higher, the admittance value will also be higher).

[0111] Based on the foregoing description, it should be understood that spectrograms Figure 2The feedback signals included in regions 203 and 204 can be referred to as filtered feedback signals (hereinafter referred to as feedback signal 1). The frequency of the filtered feedback signal is greater than a first frequency threshold (the first frequency threshold is the frequency threshold of the aforementioned pilot signal). When the energy corresponding to feedback signal 1 is equal to the first energy threshold, the information carried in the feedback signal is the information of the aforementioned pilot signal, and it can be used as a detection signal. When the energy corresponding to feedback signal 1 is greater than the first energy threshold but less than or equal to the second energy threshold, the feedback signal 1 may include some other speech information in addition to the pilot signal information. However, the energy of this part of the speech information is very small, so feedback signal 1 can be regarded as the feedback signal corresponding to the aforementioned silent audio signal, and it can also be used as a detection signal. However, when the energy corresponding to feedback signal 1 is greater than or equal to the third energy threshold, the feedback signal 1 includes some other speech information in addition to the pilot signal information, and the energy of this part of the speech information is relatively large. Therefore, feedback signal 1 can be regarded as the feedback signal corresponding to the aforementioned non-silent audio signal and cannot be used as a detection signal. When the energy corresponding to the feedback signal 1 is greater than the second energy threshold and less than the third energy threshold, the feedback signal 1 includes not only the pilot signal information but also some other voice information. Therefore, the feedback signal 1 can be regarded as the feedback signal corresponding to the aforementioned non-silent audio signal and cannot be used as a detection signal. Alternatively, it can be regarded as the feedback signal corresponding to the aforementioned silent audio signal and can be used as a detection signal. This application embodiment does not limit this.

[0112] 4. Normal admittance range

[0113] The normal admittance range is the range of admittance values ​​of the feedback signal (detection signal) corresponding to the silent audio signal in the target audio signal when the screen speaker is playing the target audio signal under normal conditions. In some cases, the silent audio signal can be a pilot signal in the target audio signal. The energy of the silent audio signal is less than or equal to a second energy threshold (which is very small, around -30dB) and the frequency is greater than or equal to a first frequency threshold (which is the frequency threshold of the pilot signal mentioned above). This indicates that the silent audio signal carries very little (close to no) or no speech information. The feedback signal corresponding to the silent audio signal can also be regarded as a detection signal. For a detailed description of the detection signal, please refer to the aforementioned description of the detection signal, which will not be repeated here.

[0114] The normal admittance range is related to the screen speaker, so this normal admittance range can also be called the admittance range corresponding to the screen speaker.

[0115] In one possible implementation, the terminal can test multiple samples from the screen speaker under normal conditions to determine the reference admittance values ​​corresponding to different samples. Then, the terminal can select the largest and smallest reference admittance values ​​from the reference admittance values ​​corresponding to different samples, and use the range between the smallest and largest reference admittance values ​​as the normal admittance value range. The reference admittance value corresponding to a single sample of the screen speaker can be used to represent the range of admittance values ​​for that sample when a silent audio signal is transmitted under normal conditions. A detailed description of this process can be found in the following description of steps S301-S304, which will not be repeated here.

[0116] 5. Silent Frame Admittance

[0117] The silence frame admittance value describes the maximum admittance value corresponding to the feedback signal (detection signal) generated by a silent audio signal in the target audio signal when the screen speaker plays the target audio signal, regardless of whether the screen speaker is functioning properly. In other words, if the admittance value of the feedback signal corresponding to a frame of audio signal is greater than the silence frame admittance value, it indicates that the frame of audio signal is not a silent audio signal. The feedback signal corresponding to a silent audio signal can be interpreted as the aforementioned detection signal.

[0118] Since the mute frame admittance value is related to the screen speaker, it can also be called the mute frame admittance value corresponding to the screen speaker.

[0119] The process by which the terminal determines the admittance value of the silence frame can be referred to in the following description of steps S601-S604, which will not be repeated here.

[0120] Based on the above principles and related concepts, the process by which the terminal obtains the detection signal sequence from the feedback signal sequence corresponding to the target audio signal sequence played by the screen speaker is described below (for a detailed description of this process, please refer to the description of step S107 below).

[0121] First, the terminal can add a high-frequency, low-energy pilot signal to the target audio signal sequence. "High frequency" means the pilot signal's frequency is greater than a first frequency threshold, and "low energy" means the pilot signal's energy is less than a first energy threshold (this first energy threshold is very small, around -30dB). Then, the feedback signal sequence corresponding to the target audio signal sequence after adding the pilot signal is filtered to remove audio signals with frequencies lower than the pilot signal, resulting in a filtered feedback signal sequence. This filtered feedback signal sequence retains information about the pilot signal and audio signals with frequencies higher than the pilot signal. Finally, all filtered feedback signals with admittance values ​​less than the admittance value of the silence frame are selected from this filtered feedback signal sequence as the detection signal sequence.

[0122] In summary, the energy of the detection signal is relatively small. Therefore, the admittance value determined by the detection signal will not be affected by the energy of the non-silent audio signal. It can accurately reflect the admittance value corresponding to the silent audio signal in the target audio signal when the screen speaker is playing the target audio signal. When the admittance value corresponding to the detection signal is not within the normal admittance range, it can be determined that there is a problem with the screen speaker.

[0123] It should be understood that the principle of determining whether the screen speaker has failed by comparing the average admittance value determined by the detection signal sequence with the normal admittance value range can be referred to the above description, and will not be repeated here.

[0124] As described above, in this embodiment, to determine whether the screen speaker is functioning properly, the parameters required include the aforementioned detection signal, the silence frame admittance value, and the normal admittance range. Since the calculation result of a single detection signal frame is random, this embodiment focuses on discussing the process of using a detection signal sequence to detect the screen speaker and determine whether it is functioning properly.

[0125] The silence frame admittance value and the normal admittance value range are the result of estimation using a large amount of data, a process that will be described in detail below. It can be assumed that the terminal has already obtained the silence frame admittance value and the normal admittance value range corresponding to the screen speaker, and then combines this with the detection signal sequence to detect the screen speaker.

[0126] The scenarios in which the terminal acquires the detection signal sequence include, but are not limited to, the following:

[0127] Call Scenario: The terminal displays an incoming call notification and responds to operations on the answer control (e.g., a click). The terminal can communicate with other terminals through this call-related application. Users can start a call through the terminal. During the call, the terminal continuously acquires downlink audio signals to be processed, obtaining a downlink audio signal sequence. This downlink audio signal is the audio signal received by the terminal from other terminals. The terminal can process this downlink audio signal to obtain a downlink audio signal sequence (processed; unless otherwise specified, all downlink audio signal sequences mentioned below are processed). Then, the terminal can add a pilot signal to this downlink audio signal sequence and play the downlink audio signal sequence with the added pilot signal using the screen speaker to obtain a feedback signal sequence (hereinafter referred to as the downlink feedback signal sequence). This downlink feedback signal sequence is then filtered to obtain a filtered downlink feedback signal sequence. All filtered downlink feedback signals in this filtered downlink feedback signal sequence with admittance values ​​less than the admittance value of the silence frame are identified as detection signals.

[0128] Music playback scenario: When a terminal opens a music application, in response to an operation on the playback control (such as a click), the terminal can use the screen speaker to play audio data (music). This audio data can be converted into an audio signal sequence and played through the screen speaker, replacing the downlink audio signal sequence in the aforementioned scenario 1. The terminal can use this audio signal sequence (obtained from the audio data conversion) to obtain a detection signal. This process can be referred to the aforementioned description of scenario 1, and will not be repeated here.

[0129] It should be understood that detection signals can be acquired in other scenarios besides those described above, and this application embodiment does not limit this to such scenarios. The following description uses a call scenario as an example to illustrate the process of screen detection on the terminal. This description can be used as a reference for other scenarios, and will not be repeated in this application embodiment.

[0130] Figure 4 This diagram illustrates the detection of the screen speaker to obtain a detection signal in a call scenario.

[0131] like Figure 4 As shown, during a user's call, the terminal continuously acquires downlink audio signals to be processed, obtaining a sequence of downlink audio signals to be processed. The call algorithm then processes this downlink audio signal sequence to obtain two processed downlink audio signal sequences. The call algorithm may include noise reduction algorithms, timbre adjustment algorithms (such as equalizer (EQ) algorithms), and volume adjustment algorithms (such as dynamic range control (DRC) algorithms).

[0132] For one processed downlink audio signal sequence, the terminal can amplify its power using a first power amplifier to drive the earpiece to play that processed downlink audio signal sequence. For the other processed downlink audio signal sequence (hereinafter referred to as the downlink audio signal), the terminal can add a pilot signal to the downlink audio signal sequence using a device detection algorithm, obtaining a downlink audio signal sequence with the added pilot signal. Then, the terminal can amplify its power using a second power amplifier to drive the screen speaker to play the downlink audio signal sequence with the added pilot signal. During the playback of the downlink audio signal sequence with the added pilot signal, the screen speaker can use the downlink audio signal with the added pilot signal to drive the second power amplifier to obtain a feedback signal sequence. This feedback signal sequence is the aforementioned downlink feedback signal sequence, which will be referred to as the downlink feedback signal sequence below. Then, the terminal can use the downlink feedback signal sequence as input parameters for the device detection algorithm. The algorithm filters the downlink feedback signal sequence and determines the detection signal sequence based on the silence frame admittance value and the filtered feedback signal sequence. The average admittance value of the detection signal sequence is calculated and then compared with the normal admittance range. If the average admittance value is within the normal admittance range, the terminal determines that the screen speaker is normal; otherwise, it determines that the screen speaker is damaged.

[0133] After the terminal determines whether the screen speaker is damaged through the device detection algorithm, it can output the detection result to the failure controller. After determining that the screen speaker is damaged, the failure controller can formulate a strategy to solve the problems caused by the screen speaker damage (such as noise). This strategy includes notifying the terminal to disconnect the screen speaker. Specifically, the terminal can use the call algorithm to process the downlink audio signal to be processed and output only one downlink audio signal. The volume of the downlink audio signal is increased and then driven by the first power amplifier to play the audio signal through the earpiece. This prevents the screen speaker from playing the downlink audio signal, thereby reducing the adverse effects caused by the screen speaker damage, such as fluctuating audio signal volume or noise.

[0134] It should be understood that the function of the aforementioned device detection algorithm is to detect whether the screen speaker is damaged. It can be implemented by hardware, software, or a combination thereof, and this application embodiment does not limit this. The function of the aforementioned failure controller is to formulate a strategy to solve the problems caused by the screen speaker damage after the screen speaker is damaged. It can also be implemented by hardware, software, or a combination thereof, and this application embodiment does not limit this.

[0135] Figure 5 This is a schematic flowchart illustrating the detection of a screen speaker using a device detection method in an embodiment of this application.

[0136] In some embodiments, the terminal may acquire an audio signal (downlink audio signal) over a period of time during communication with other terminals via a call-type application to obtain a downlink audio signal sequence, acquire a detection signal sequence (downlink detection signal sequence) based on the downlink audio signal sequence, and determine whether the screen speaker is functioning properly based on the downlink detection signal sequence. A detailed description of this process can be found in the following description of steps S101-S110.

[0137] S101. The terminal determines the silent frame admittance value and the normal admittance value range corresponding to the screen speaker;

[0138] For a description of the admittance value of the silent frame and the range of the normal admittance value, please refer to the aforementioned content, which will not be repeated here.

[0139] The normal admittance range and the silence frame admittance value involved in the process of the terminal detecting the screen speaker can be preset in the terminal for the purpose of detecting the screen speaker. The terminal can update the preset normal admittance range and silence frame admittance value.

[0140] The process of the terminal determining the normal admittance value range can be referred to in the subsequent description of steps S301-S304, and the process of the terminal determining the silence frame admittance value can be referred to in the subsequent description of steps S601-S604, which will not be repeated here.

[0141] S102. The terminal acquires a downlink audio signal sequence, which includes H-frame downlink audio signals.

[0142] The downlink audio signal sequence can be an H-frame downlink audio signal obtained after processing a preprocessed downlink audio signal sequence (e.g., using a call algorithm), which carries voice information that can be used to indicate sound. This downlink audio signal sequence can be used to acquire a feedback signal in step S104 below. The preprocessed downlink audio signal sequence is a multi-frame audio signal continuously acquired during a call when the terminal communicates with other terminals through a call-type application.

[0143] The process of processing the preprocessed audio signal sequence to obtain the downlink audio signal sequence can be referred to the aforementioned process. Figure 4 The relevant descriptions will not be repeated here.

[0144] The downlink audio signal sequence may include H-frame downlink audio signals. The duration of a single downlink audio frame can be determined by the processing capability of the terminal, and is generally between 10ms and 50ms, such as 10ms, 20ms, 30ms, or multiples of 10ms.

[0145] It should be understood that a terminal can obtain a downlink audio signal sequence by acquiring downlink audio signals over a period of time at the first moment during communication with other terminals through a call-type application.

[0146] The time period can be set to 1 second or 2 seconds, etc., and its length does not constitute a limitation on the embodiments of this application. The specific number of downlink audio signal frames related to the time period in the downlink audio signal sequence is as follows: for example, when the time period is 1 second and one frame of downlink audio signal is 10 ms, 100 frames of downlink audio signal can be obtained to obtain the downlink audio signal sequence, and the H mentioned above is 100.

[0147] The first moment can be any moment during which the terminal communicates with other terminals through a call-type application, such as the moment when communication begins (starting moment), or a later moment. This application does not limit this.

[0148] S103. The terminal adds a pilot signal to each frame of downlink audio signal to obtain a downlink audio signal sequence after adding the pilot signal, including the downlink audio signal after adding the pilot signal to the H frame.

[0149] The pilot signal is one or more frames of audio signal with high frequency and low energy. High frequency means that the frequency of the pilot signal is greater than a first frequency threshold. This first frequency threshold is usually greater than the frequency of the sound when the user speaks, and the value range can be 18kHz and above. Low energy means that the energy of the pilot signal is less than a first energy threshold (this first energy threshold is very small, close to -30dB). This means that the pilot signal is silent or close to silent and may not carry voice information.

[0150] Since the downlink audio signal carries voice information (which can indicate the sound when the user speaks), the frequency of the audio signals included in the downlink audio signal can usually be lower than the frequency of the pilot signal. Therefore, in the subsequent step S105, when filtering the downlink feedback signal corresponding to the downlink audio signal after adding the pilot signal, the frequency of the pilot signal can be used as a reference to filter out audio signals with frequencies lower than the pilot signal. In this way, a downlink prediction signal carrying a small amount of voice information or no voice information can be obtained. In some possible cases, a downlink prediction signal containing only the information of the pilot signal can be obtained. A detailed description of this process can be found in the following description of step S105, which will not be repeated here.

[0151] The downlink audio signal involved in step S103 can be regarded as the preprocessed audio signal mentioned above, and the downlink audio signal sequence with added pilot signal can be regarded as the target audio signal mentioned above. The process of the terminal adding pilot signal to each frame of downlink audio signal to obtain the downlink audio signal sequence with added pilot signal can refer to the aforementioned... Figure 2 The description of the relevant content will not be repeated here.

[0152] S104. The terminal plays the downlink audio signal sequence after the pilot signal is added through the screen speaker, obtains the downlink feedback signal corresponding to the downlink audio signal after the pilot signal is added for each frame, and obtains the downlink feedback signal sequence. The downlink feedback signal sequence includes H-frame downlink feedback signals. Any frame downlink feedback signal can be represented as a current signal and a voltage signal, including information of the pilot signal and information of the downlink audio signal.

[0153] The downlink feedback signal sequence includes the H-frame downlink feedback signal.

[0154] The following example illustrates how a frame of feedback signal is obtained from a downlink audio signal after adding a pilot signal. The process of obtaining a downlink feedback signal sequence from a downlink audio signal sequence after adding a pilot signal can be referred to in this description.

[0155] The downlink feedback signal is a current signal and a voltage signal (generated by the power amplifier) ​​generated when the screen speaker converts the downlink audio signal (with the pilot signal added) into an electrical signal (analog electrical signal) for playback. This downlink audio signal, after being converted into a pilot signal, drives the power amplifier connected to the screen speaker. The current signal may include current information corresponding to the screen speaker playing the downlink audio signal with the pilot signal added, and the voltage signal may include voltage information corresponding to the screen speaker playing the downlink audio signal with the pilot signal added. Therefore, the admittance value corresponding to the downlink feedback signal reflects the admittance value of the screen speaker when playing the downlink audio signal with the pilot signal added. This admittance value reflects the screen speaker's ability to handle the electrical signal and can be used to detect whether the screen speaker is functioning correctly. For a description of the admittance value, please refer to the aforementioned related content; it will not be repeated here.

[0156] Specifically, when the terminal plays the downlink audio signal with the added pilot signal through the screen speaker, it converts the downlink audio signal with the added pilot signal into an electrical signal (analog electrical signal) for playback. This electrical signal can be referred to as the electrical signal generated by the downlink audio signal with the added pilot signal. During playback, the electrical signal generated by the downlink audio signal with the added pilot signal can drive a power amplifier connected to the screen speaker. Then, the power amplifier samples the electrical signal generated by the downlink audio signal with the added pilot signal for each frame to obtain a downlink feedback signal. This downlink feedback signal can include information about the downlink audio signal with the added pilot signal (including information about the pilot signal and the downlink audio signal). The downlink feedback signal can include a current signal (digital current signal) and a voltage signal (digital voltage signal). The current signal included in the feedback signal can be represented by B sampling points. Each sampling point can include time and current value, where time represents the time of acquiring the sampling point, and current value represents the magnitude of the current corresponding to the electrical signal at that sampling point. The voltage signal included in the feedback signal can be represented by B sampling points. Each sampling point can include time and voltage value, where time represents the time when the sampling point was acquired, and voltage value represents the voltage magnitude of the electrical signal corresponding to that sampling point. The electrical signal corresponding to this sampling point is the electrical signal generated by the screen speaker playing the downlink audio signal.

[0157] Let the feedback signal sequence be signal(i)=[I′ i1 , I′ i2 , I′ i3 …I′ iB , V′ i1 , V′ i2 , V′ i3 …V′ iB ], i = {i∈N+|1≤i≤H}. Where signal(i) represents the feedback signal of the i-th frame; [I′ i1 , I′ i2 , I′ i3 …I′ iB ] represents the current signal included in the feedback signal of the i-th frame, I′ ij [V′] represents the current value at the j-th sampling point in the current signal included in the i-th frame feedback signal; i1 , V′ i2 , V′ i3 …V′ iB ] represents the voltage signal included in the feedback signal of the i-th frame, I′ ij This represents the voltage value of the j-th sampling point in the voltage signal included in the i-th frame feedback signal.

[0158] S105. The terminal filters part or all of the downlink feedback signals in the downlink feedback signal sequence to obtain a downlink prediction signal sequence. The downlink prediction signal sequence includes S frames of downlink prediction signals. Any frame of downlink prediction signal can be represented as a current signal and a voltage signal, including information about the pilot signal, where S is less than or equal to H.

[0159] The following example illustrates how filtering a single frame of downlink feedback signal can yield a single frame of downlink prediction signal. The process of filtering part or all of the downlink feedback signal sequence to obtain the downlink prediction signal sequence can be found in this description.

[0160] The downlink prediction signal is the filtered downlink feedback signal.

[0161] In step S105, the purpose of filtering is to remove information from the feedback signal other than the pilot signal, obtaining a downlink prediction signal. This downlink prediction signal contains only information from the pilot signal, and thus has low energy because it does not carry voice information. It can be used as a detection signal to determine whether the screen speaker is damaged. However, in practical applications, there are still cases where the downlink prediction signal includes some other information (such as some downlink audio signal information) in addition to the pilot signal information. In such cases, the admittance value corresponding to the prediction signal can be calculated in step S105. The admittance value corresponding to the prediction signal is compared with the silence frame admittance value. If the admittance value corresponding to the prediction signal is less than the silence frame admittance value, then the downlink prediction signal can be used as a detection signal to determine whether the screen speaker is damaged. For a description of the silence frame admittance value, please refer to the foregoing content and the relevant description in step S107 below.

[0162] The process of filtering the downlink feedback signal to obtain the filtered downlink feedback signal (downlink prediction signal) can be referred to the aforementioned... Figure 3 The description of the relevant content will not be repeated here.

[0163] In one possible scenario, whether the terminal filters part or all of the downlink feedback signal sequence depends on the start time of acquiring the preprocessed downlink audio signal, which is the first time mentioned above.

[0164] If this first moment is the starting moment of the terminal communicating with other terminals through a call-type application, then the terminal can filter a portion of the downlink feedback signal in the downlink feedback signal sequence. This portion of the downlink feedback signal is the feedback signal with a later sampling time; that is, the downlink feedback signal before the first C frames in the H-frame downlink feedback signal is not processed, only the downlink feedback signal after the last HC frame is processed, at which point S equals HC. This is because factors such as circuit instability in the initial stage will affect the process of generating the feedback signal using the preprocessed audio signal, causing fluctuations (increases or decreases) in the admittance value calculated from the downlink prediction signal obtained after filtering the first C-frame feedback signal. For example, the feedback signal generated from the preprocessed audio signal obtained in the initial stage may carry noise information caused by circuit instability. The frequency of this noise information is higher than the frequency of the pilot signal and cannot be filtered out when filtering the feedback signal. Therefore, the downlink prediction signal obtained after filtering will still contain this noise information, resulting in a larger admittance value corresponding to the downlink prediction signal after filtering. If this value is not of reference value, it does not need to be calculated again in subsequent steps. This initial stage will also affect the stability of the pilot signal.

[0165] If the first moment is a moment after the start of the terminal communicating with other terminals through a call-type application, and the process of generating feedback signals using preprocessed audio signals is not affected by unstable factors such as circuits, then the terminal can filter all downlink feedback signals in the downlink feedback signal sequence. In this case, S equals H.

[0166] Let the downlink prediction signal sequence be Psignal(i) = [Ii1, Ii2, Ii3…IiB, Vi1, Vi2, Vi3…ViB], i = {i∈N+|1≤i≤S}, where S is less than or equal to H. Here, Psignal(i) represents the downlink prediction signal of the i-th frame; [Ii1, Ii2, Ii3…IiB] represents the current signal included in the downlink prediction signal of the i-th frame, Iij represents the current value at the j-th sampling point of the current signal included in the downlink prediction signal of the i-th frame; [Vi1, Vi2, Vi3…ViB] represents the voltage signal included in the downlink prediction signal of the i-th frame, Vij represents the voltage value at the j-th sampling point of the voltage signal included in the downlink prediction signal of the i-th frame.

[0167] S106. For the downlink prediction signal of the S-frame, the terminal determines the admittance value corresponding to each downlink prediction signal in the downlink prediction signal of the S-frame.

[0168] The admittance value corresponding to each frame of downlink prediction signal can include information about the current value and voltage value corresponding to that frame of downlink prediction signal. It can reflect the admittance value of the screen speaker when the audio signal that generates the downlink prediction signal passes through the screen speaker.

[0169] The following description uses the example of the terminal determining the admittance value corresponding to a frame of downlink prediction signal. The process of determining the admittance value corresponding to other frames of downlink prediction signals can refer to this process.

[0170] In some embodiments, the admittance value corresponding to a frame of downlink prediction signal can be the ratio of the current value to the voltage value corresponding to that frame of downlink prediction signal. Specifically, the current value corresponding to a frame of downlink prediction signal includes information about the current values ​​of all sampling points in the current signal corresponding to that frame of downlink prediction signal; the voltage value corresponding to a frame of downlink prediction signal includes information about the voltage values ​​of all sampling points in the voltage signal corresponding to that frame of downlink prediction signal.

[0171] The formula for determining the current value corresponding to the downlink prediction signal of the frame by the terminal can be found in the following formula (1):

[0172]

[0173] In formula (1), i represents the i-th frame downlink prediction signal in the downlink prediction signal sequence; I Psignal(i) This represents the current value corresponding to the downlink prediction signal in the i-th frame. ij This represents the current value at the j-th sampling point in the current signal included in the downlink prediction signal of the i-th frame. B represents the frame length of the downlink prediction signal of the i-th frame, that is, there are B sampling points in the current signal included in the downlink prediction signal of the i-th frame.

[0174] The relevant formula for the terminal to determine the voltage value corresponding to the downlink prediction signal of this frame can be found in the following formula (2):

[0175]

[0176] In formula (2), i represents the i-th frame downlink prediction signal in the downlink prediction signal sequence; V Psignal(i) V represents the voltage value corresponding to the downlink prediction signal in the i-th frame. ij This represents the voltage value of the j-th sampling point in the voltage signal included in the downlink prediction signal of the i-th frame. B represents the frame length of the downlink prediction signal of the i-th frame, that is, there are B sampling points in the voltage signal included in the downlink prediction signal of the i-th frame.

[0177] The relevant formula for the terminal to determine the admittance value corresponding to the downlink prediction signal of this frame can be referred to the following formula (3):

[0178]

[0179] In other embodiments, to enhance the robustness of the admittance value corresponding to the downlink prediction signal of a given frame to the admittance values ​​corresponding to downlink prediction signals of other frames, thereby reducing the inaccuracy of the admittance value due to factors such as circuit instability, the admittance value corresponding to a downlink prediction signal of one frame can be associated with the admittance value corresponding to the downlink prediction signal of the previous frame, and used as the admittance value corresponding to the downlink prediction signal of the current frame. The association means that the admittance value corresponding to the downlink prediction signal of one frame can be a combination of the admittance values ​​corresponding to the downlink prediction signals of the previous frame and the admittance value corresponding to the downlink prediction signal of the current frame. During the combination process, a first weight (denoted as 'a') can be set for the admittance value corresponding to the downlink prediction signal of the current frame, and a second weight (denoted as 1-a) can be set for the admittance value corresponding to the downlink prediction signal of the previous frame. Typically, the sum of the first weight and the second weight is 1.

[0180] The relevant formula for the terminal to determine the admittance value corresponding to the downlink prediction signal of the frame can be found in the following formula (4):

[0181] G Psignal(i) = (1-a)×G Psignal(i-1) +a×G Psignal(i) Formula (4)

[0182] In formula (4), i indicates that the downlink prediction signal of this frame is the i-th frame downlink prediction signal in the downlink prediction signal sequence, and (i-1) indicates the downlink prediction signal of the frame preceding the i-th frame downlink prediction signal. This can be a downlink prediction signal that differs from the i-th frame downlink prediction signal in terms of acquisition time by V frames, where V is a positive integer greater than or equal to 1. Typically, V = 1 is taken. The following explanation uses V = 1 as an example; other cases can be referred to in this description. G on the left side of the equal sign... Psignal(i) G represents the admittance value corresponding to the downlink prediction signal in the i-th frame. Psignal(i) This represents the admittance value prior to the association of the downlink prediction signal in the i-th frame (where a is the weight of the admittance value prior to the association). This admittance value prior to the association can be determined using the aforementioned formulas (1), (2), and (3). G on the right side of the equals sign... Psiqnal(i-1) This represents the admittance value corresponding to the downlink prediction signal of the previous frame of the i-th frame (1-a is the weight of this admittance value).

[0183] It should be understood that in formula (4), the formula is not applicable when i = 1. When i = 1, the admittance value corresponding to the downlink prediction signal of the first frame can be calculated directly using the formulas (1), (2) and (3) mentioned above.

[0184] S107. The terminal determines the K-frame downlink prediction signal whose admittance value is less than or equal to the admittance value of the silent frame in the downlink prediction signal of the S-frame, and uses it as the downlink detection signal sequence to determine whether the average admittance value corresponding to the downlink detection signal sequence is within the normal admittance value range.

[0185] The normal admittance range is the range of admittance values ​​of the screen speaker when it is playing a silent audio signal under normal conditions.

[0186] The mute frame admittance value is the maximum admittance value of the screen speaker when it plays a mute audio signal.

[0187] When the screen speaker plays a muted audio signal, the admittance value of the screen speaker can be represented by the admittance value of the feedback signal corresponding to the muted audio signal. The feedback signal corresponding to the muted audio signal is the downlink detection signal, which can be used. The muted audio signal is an audio signal with energy less than or equal to a second energy threshold and a frequency greater than or equal to a first frequency threshold (the first frequency threshold is the frequency threshold of the pilot signal mentioned above). The second energy threshold can be greater than or equal to the first energy threshold mentioned above. When the second energy threshold is equal to the first energy threshold, it means that the downlink prediction signal obtained by filtering the feedback signal in step S105 only includes the information of the pilot signal and can then be used as the downlink detection signal. When the second energy threshold is greater than the first energy threshold, it means that the downlink prediction signal obtained by filtering the feedback signal in step S105 includes information of other audio signals in addition to the information of the pilot signal. The downlink prediction signal can only be used as the downlink detection signal when the energy of the other audio signals is less than or equal to the difference between the second energy threshold and the first energy threshold. In this embodiment of the application, when the second energy threshold is equal to the first energy threshold, the aforementioned pilot signal can be regarded as a silent audio signal.

[0188] As described above, when the admittance value corresponding to a downlink prediction signal frame is less than or equal to the admittance value of a silent frame, it indicates that the audio signal information included in that downlink detection signal frame is silent audio signal information, and that downlink prediction signal frame can be used as a detection signal to determine whether the screen speaker is functioning properly. Conversely, when the admittance value corresponding to a downlink prediction signal frame is greater than the admittance value of a silent frame, it indicates that the audio signal information included in that downlink detection signal frame is not silent audio signal information, and that downlink prediction signal frame cannot be used as a detection signal to determine whether the screen speaker is functioning properly.

[0189] The terminal determines the K-frame downlink prediction signal whose admittance value is less than or equal to the admittance value of the silent frame in the downlink prediction signal of the S-frame as the downlink detection signal sequence. Let the downlink detection signal sequence be Dsignal(i) = [Ii1, Ii2, Ii3…IiB, Vi1, Vi2, Vi3…ViB], i = {i∈N+|1≤i≤K}, where K is less than or equal to S. Here, Dsignal(i) represents the downlink detection signal of the i-th frame; [Ii1, Ii2, Ii3…IiB] represents the current signal included in the downlink detection signal of the i-th frame, Iij represents the current value at the j-th sampling point in the current signal included in the downlink detection signal of the i-th frame; [Vi1, Vi2, Vi3…ViB] represents the voltage signal included in the downlink detection signal of the i-th frame, V... ij This represents the voltage value of the j-th sampling point in the voltage signal included in the downlink detection signal of the i-th frame.

[0190] The terminal determines the average admittance value of the downlink detection signal sequence and whether the average admittance value of the downlink detection signal sequence is within the normal admittance range.

[0191] The formula for determining the average admittance value of the downlink detection signal sequence can be found in the following formula (5).

[0192]

[0193] In formula (5), fG Dsignal G represents the average admittance value of the downlink detection signal sequence. Dsignal(i) Let K represent the admittance value corresponding to the downlink detection signal in the i-th frame, and K represent that there are K frames of downlink detection signals.

[0194] If the average admittance value of the downlink detection signal sequence is not within the normal admittance value range, the terminal executes the following step S108: determine that the screen speaker is abnormal; if the average admittance value of the downlink detection signal sequence is within the normal admittance value range, the terminal executes the following step S110: determine that the screen speaker is normal.

[0195] It should be understood that step S107 is optional. After step S106, the terminal can determine the K-frame downlink prediction signal in the S-frame downlink prediction signal whose admittance value is less than the admittance value of the silence frame, and use it as the downlink detection signal sequence. Then, it determines whether the K value is greater than the preset number of silence frames. If the K value is greater than or equal to the preset number of silence frames, the terminal can determine whether the screen speaker is working properly based on the downlink detection signal sequence. If the K value is less than or equal to the preset number of silence frames, it can be considered that the downlink detection signal sequence includes too few downlink detection signals, and the calculated average admittance value is not of reference value. The terminal cannot determine whether the screen speaker is working properly based on the downlink detection signal. Instead, it can wait for the next call to obtain the downlink audio signal sequence, and then obtain the downlink detection signal sequence based on the downlink audio signal sequence to determine whether the screen speaker is working properly.

[0196] The preset number of silent frames can be set to a value of [value]. The steps can be adjusted according to the actual situation; the process of the terminal obtaining the K-frame downlink detection signal can be referred to the relevant description in the aforementioned step S107, and will not be repeated here.

[0197] S108. The terminal has determined that the screen speaker is damaged.

[0198] If the average admittance value of the downlink detection signal sequence is not within the normal admittance range, the terminal may determine that the screen speaker is malfunctioning by further including: if the average admittance value of the downlink detection signal sequence is greater than all admittance values ​​within the normal admittance range, then the screen speaker is determined to be a Type I malfunction. This Type I malfunction causes the admittance value of the screen speaker to increase when playing a silent audio signal, and this Type I malfunction may include a short circuit in the screen speaker. If the average admittance value of the downlink detection signal sequence is less than all admittance values ​​within the normal admittance range, then the screen speaker is determined to be a Type II malfunction. This Type II malfunction causes the admittance value of the screen speaker to decrease when playing a silent audio signal, and this Type II malfunction may include an open circuit in the screen speaker.

[0199] S109. The terminal disconnects the screen speaker and increases the volume of the audio signal played through the earpiece.

[0200] Step S109 is optional.

[0201] In step S109, the terminal no longer plays audio signals through the screen speaker, but only plays audio signals through the earpiece, while increasing the energy of the audio signal played through the earpiece so that the user can hear clearly.

[0202] It should be understood that if the terminal determines that the screen speaker is damaged, it can also resolve the impact of the screen speaker damage in other ways. For example, the terminal can display a prompt message to notify the user that the screen speaker is damaged, and can also suggest that the user go to a nearby service center to repair the screen speaker.

[0203] S110. The terminal confirms that the screen speaker is working properly.

[0204] Figure 6 This is another schematic flowchart illustrating the detection of a screen speaker using a device detection method in an embodiment of this application.

[0205] In some embodiments, the terminal may begin acquiring downlink audio signals at a second moment during communication with other terminals via a call-type application. This downlink audio signal is processed to obtain one frame of downlink detection signal. This process may end at a third moment. Then, the terminal calculates the average admittance value corresponding to all downlink detection signals acquired from the second to the third moment, and determines whether the screen speaker is functioning correctly based on this average admittance value. The second moment may be the same as the aforementioned first moment, and the third moment may differ from the second moment by F frames of downlink audio signals. F can be 100, 200 frames, etc., and can be adjusted according to actual circumstances, without limiting the embodiments of this application. The following describes in detail the process of the terminal detecting whether the screen speaker is functioning correctly, taking the second moment as the moment the call-type application is started and F as 100 frames as an example.

[0206] For a detailed description of the process, please refer to the following description of steps S201-S213.

[0207] S201. The terminal opens a call-related application.

[0208] At the second moment, the terminal displays an incoming call notification and responds to the operation on the answer control (such as a click operation). The terminal can communicate with other terminals through this call application, and the user can start a call through the terminal.

[0209] S202. The terminal acquires the downlink audio signal of the i-th frame.

[0210] After the terminal opens a call application, it can obtain the downlink audio signal of the i-th frame. For details about the downlink audio signal and the acquisition process, please refer to the above description of step S102, which will not be repeated here.

[0211] S203. The terminal determines whether i is less than or equal to the first statistical threshold, where the initial value of i is 1.

[0212] The first statistical threshold is used to control how many frames of downlink audio signal the terminal acquires to generate a downlink detection signal sequence in order to complete the detection of the screen speaker. The first statistical threshold is the number of frames K of the downlink audio signal between the third time and the second time mentioned above. The first statistical threshold can be 100, 200 frames, etc., and can be adjusted according to the actual situation, which does not constitute a limitation on the embodiments of this application.

[0213] Step S203 describes how the terminal can acquire the downlink audio signal of the first K frames (first statistical threshold) after the call-type application is started to determine whether the screen speaker is damaged. When the downlink audio signal acquired by the terminal reaches K frames, the terminal can execute the following step S204. After the terminal has acquired the K-frame downlink audio signal, it can execute the following step S208 to determine whether the screen speaker is normal based on the detection signal obtained from the K-frame downlink audio signal.

[0214] S204. The terminal adds a pilot signal to the downlink audio signal in the i-th frame to obtain the downlink audio signal after adding the pilot signal in the i-th frame.

[0215] The description of step S204 can be found in the previous description of step S103, and will not be repeated here.

[0216] S205. The terminal determines whether i is greater than the second statistical threshold and sets i = i + 1.

[0217] The second statistical threshold can be set to 5 or 10, etc., and can be adjusted according to the actual situation. This application embodiment does not limit this.

[0218] Step S205 is optional. In other embodiments, the terminal may not be certain whether i is greater than the second statistical threshold and may directly set i = i + 1.

[0219] During the initial period (e.g., 0s-0.1s) when the terminal begins to communicate with other terminals through a call-type application, the admittance value of the screen speaker may fluctuate due to factors such as circuit instability. At this time, the acquired downlink audio signal is not suitable for generating a downlink detection signal to detect whether the screen speaker is damaged. Therefore, if i is not greater than the second statistical threshold, the i-th frame downlink audio signal is not processed, and the terminal re-executes step S202 to acquire the next frame downlink audio signal.

[0220] If the terminal determines that i is greater than the second statistical threshold, the following step S206 can be executed.

[0221] S206. The terminal determines whether the admittance value corresponding to the downlink prediction signal of the i-th frame after the pilot signal is added to the i-th frame is less than or equal to the admittance value of the silent frame.

[0222] The terminal can obtain the downlink prediction signal of the i-th frame based on the downlink audio signal after the pilot signal is added to the i-th frame. This process can be referred to the relevant descriptions in steps S104 and S105 above, and will not be repeated here.

[0223] Then, the terminal determines whether the admittance value corresponding to the downlink prediction signal of the i-th frame after the pilot signal is added is less than the admittance value of the silent frame. The process by which the terminal determines the admittance value corresponding to the downlink prediction signal of the i-th frame can be referred to the aforementioned description of step S106. The description of whether the admittance value corresponding to the downlink prediction signal of the i-th frame is less than or equal to the admittance value of the silent frame can be referred to the aforementioned description of the relevant content in step S107.

[0224] If the terminal determines that the admittance value of the downlink prediction signal corresponding to the downlink audio signal after the addition of the pilot signal in the i-th frame is greater than or equal to the admittance value of the silent frame, the terminal may execute the following step S213.

[0225] If the terminal determines that the admittance value of the downlink prediction signal corresponding to the downlink audio signal after the addition of the pilot signal in the i-th frame is less than or equal to the admittance value of the silent frame, the terminal may execute the following step S207.

[0226] S207. The terminal uses the downlink prediction signal of the i-th frame as the downlink detection signal of the i-th frame, and makes the total admittance equal to the admittance value corresponding to the downlink detection signal of the i-th frame plus the total admittance value, and the total number of silent frames equal to the total number of silent frames + 1, wherein the initial values ​​of the total admittance value and the total number of silent frames are 0.

[0227] In step S207, the terminal can calculate the total admittance value and the total number of silent frames. The total admittance value is the sum of the admittance values ​​corresponding to all detection signals obtained from the downlink audio signals of the first K frames, and the total number of silent frames is the total number of frames of all detection signals.

[0228] S208. The ratio of the total admittance value calculated by the terminal to the total number of silent frames is used as the average admittance value corresponding to all downlink detection signals in the downlink prediction signal of frame i.

[0229] S209. The terminal determines whether the average admittance value corresponding to all downlink detection signals in the downlink prediction signal of the i-frame is within the normal admittance value range.

[0230] Step S209 is similar to the process in step S107 above where the terminal determines whether the average admittance value corresponding to the downlink detection signal sequence is within the normal admittance value range. Please refer to the description of the relevant content in step S107, which will not be repeated here.

[0231] S210. The terminal determines that the screen speaker is damaged.

[0232] Step S210 is the same as step S108 described above, and can be referred to the description of step S108 above, which will not be repeated here.

[0233] S211. The terminal disconnects the screen speaker and increases the volume of the audio signal played by the second speaker.

[0234] Step S211 is the same as step S108 described above. Please refer to the description of step S109 described above. It will not be repeated here.

[0235] S212. The terminal confirms that the screen speaker is working properly.

[0236] It should be understood that the execution time of the aforementioned step S204 can be after step S205 and before step S206.

[0237] S213. The terminal does not process the downlink audio signal of the i-th frame.

[0238] The following describes the process by which the terminal determines the normal admittance range and the admittance value of the silent frame in the embodiments of this application.

[0239] The normal admittance range is the range of admittance values ​​of the screen speaker when it is playing a silent audio signal under normal conditions.

[0240] The mute frame admittance value is the maximum admittance value of the screen speaker when it plays a mute audio signal.

[0241] The descriptions of the normal admittance range and the silent frame admittance value can be found in the aforementioned descriptions, and will not be repeated here.

[0242] Figure 7 A schematic flowchart is shown for determining the normal admittance range of a terminal.

[0243] In one possible implementation, the terminal determines the normal admittance range as follows: It plays a reference audio signal sequence using different samples from the screen speaker under normal conditions to obtain a reference feedback signal sequence. This reference feedback signal sequence is then filtered to obtain a silent reference prediction signal sequence. The average admittance value corresponding to the silent reference prediction signal sequence under normal conditions is then determined. The terminal can use the average admittance value obtained from different samples from the screen speaker as the reference admittance value corresponding to that different sample. Then, the terminal can select the largest and smallest reference admittance values ​​from the reference admittance values ​​corresponding to the different samples, and use the range between the smallest and largest reference admittance values ​​as the normal admittance range.

[0244] The reference audio signal sequence includes N frames of reference audio signals, one of which is the audio signal used by the terminal to determine the normal admittance range. Its acquisition method and function are the same as the aforementioned downlink audio signals, and can be referred to the aforementioned description of downlink audio signals, which will not be repeated here. This reference audio signal sequence can be the same as the aforementioned downlink audio signal sequence.

[0245] The reference feedback signal sequence includes multiple frames of reference feedback signals, one of which is the feedback signal corresponding to the reference audio signal. The process of obtaining the reference feedback signal using the reference audio signal can be referred to the aforementioned description of obtaining the downlink feedback signal using the downlink audio signal, and will not be repeated here.

[0246] The silence reference prediction signal sequence includes X frames of silence reference prediction signals, where one frame of silence reference prediction signal is a filtered reference feedback signal (hereinafter referred to as the reference prediction signal) that satisfies a first condition. The first condition is that the admittance value corresponding to the filtered reference feedback signal is less than or equal to a first admittance threshold, which is typically around 0.12. This indicates that the silence reference prediction signal carries little or no speech information. In some cases, the silence reference prediction signal may only carry pilot signal information.

[0247] The reference admittance value corresponding to a sample of the screen speaker can be used to represent the range of admittance values ​​of the sample when the sample of the screen speaker passes through a silent audio signal under normal conditions.

[0248] The process of determining the normal admittance range for the terminal can be referred to in the following description of steps S301-S304.

[0249] S301. The terminal obtains the reference admittance value of the first sample corresponding to the screen speaker under normal conditions.

[0250] The first sample is a normal screen speaker.

[0251] The reference admittance value of the first sample can be used to represent the range of admittance values ​​of the sample under normal conditions when passing through a silent audio signal.

[0252] Figure 8 A schematic flowchart for obtaining the reference admittance value corresponding to the first sample of the screen speaker for the terminal.

[0253] The process by which the terminal obtains the reference admittance value of the first sample can be referred to the following description of steps S401-S406.

[0254] S401. The terminal acquires a reference audio signal sequence, which includes N frames of reference audio signals.

[0255] A reference audio signal is the audio signal used by the terminal to determine the normal admittance range.

[0256] When a terminal communicates with other terminals through a call-type application, it can acquire the reference audio signal sequence. This process is the same as the process by which the terminal acquires the downlink audio signal sequence in step S102 above, and can be referred to the relevant description of step S102 above, which will not be repeated here.

[0257] S402. The terminal adds a pilot signal to each frame of reference audio signal to obtain a reference audio signal sequence after adding the pilot signal, which includes N frames of reference audio signals after adding the pilot signal.

[0258] Step S402 is the same as step S103 described above, and can be referred to the description of step S103 described above, so it will not be repeated here.

[0259] S403. The terminal plays the reference audio signal sequence after adding the pilot signal through the first sample corresponding to the screen sound device under normal conditions, obtains the reference feedback signal corresponding to each frame of the reference audio signal after adding the pilot signal, and obtains the reference feedback signal sequence. The reference feedback signal sequence includes N frames of reference feedback signals. Any frame of reference feedback signal can be represented as a current signal and a voltage signal, including information of the pilot signal and information of the reference audio signal.

[0260] Step S403 is the same as step S104 described above, and can be referred to the description of step S104 above, so it will not be repeated here.

[0261] S404. The terminal filters each frame of the reference feedback signal to remove the information of the reference audio signal included in the reference feedback signal, and obtains a reference prediction signal sequence. The reference prediction signal sequence includes N frames of reference prediction signals. Any frame of reference prediction signal can be represented as a current signal and a voltage signal, including information of the pilot signal.

[0262] The reference prediction signal sequence includes N frames of reference prediction signals, where one frame of reference prediction signal is a filtered reference feedback signal.

[0263] The purpose of filtering the reference feedback signal is to remove information from the audio signals other than the pilot signal, resulting in a reference prediction signal that only contains information from the pilot signal. Such a reference prediction signal, lacking voice information and thus having low energy, can be used as a silent reference prediction signal to determine the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions. However, in practical applications, there are still cases where the reference prediction signal includes other information besides the pilot signal (e.g., some information from the downlink audio signal). This results in a higher energy level and a higher likelihood of generating harmonics, affecting the determination of the screen sound-emitting device's admittance value and making it unsuitable for calculating the reference admittance value. Therefore, the admittance value corresponding to the reference prediction signal can be calculated in step S406 below, and based on this admittance value, it can be determined whether the reference prediction signal is a silent reference prediction signal. A detailed description of this process can be found in the following description of step S406.

[0264] The process of filtering the reference feedback signal to obtain the reference prediction signal sequence is similar to the relevant content in step S105 above. Please refer to the description of step S105 above, and it will not be repeated here.

[0265] S405. The terminal determines the admittance value corresponding to each frame of the reference prediction signal in the reference prediction signal sequence, including N admittance values.

[0266] Step S405 is similar to the aforementioned step S106, and can be referred to the previous description of step S106, which will not be repeated here.

[0267] S406. The terminal determines the reference prediction signal for the silence of X frames in the reference prediction signal sequence based on the admittance value corresponding to the reference prediction signal of N frames, and determines the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions based on the reference prediction signal for the silence of X frames.

[0268] It should be understood that the reference prediction signal sequence may include a silent reference prediction signal for X frames and a non-silent reference prediction signal for Y frames.

[0269] In this context, the reference prediction signal for a frame of silence is a filtered reference feedback signal (reference prediction signal) that satisfies the first condition. The first condition is that the admittance value corresponding to the reference prediction signal is less than or equal to a first admittance threshold, which is typically around 0.12. This indicates that the reference prediction signal for silence carries little or no speech information.

[0270] A non-silent reference prediction signal is a filtered reference feedback signal (reference prediction signal) that satisfies the second condition. The second condition is that the admittance value corresponding to the reference prediction signal is greater than or equal to a second admittance threshold, which is greater than the aforementioned first admittance threshold. This indicates that the non-silent reference prediction signal carries more speech information than the silent reference prediction signal.

[0271] Therefore, the terminal can determine the reference prediction signal for the silence of X frames in the reference prediction signal sequence based on the admittance values ​​corresponding to the N frames of reference prediction signals, and then determine the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions based on the reference prediction signal for the silence of X frames. Figure 9 A schematic flowchart illustrating the process is shown.

[0272] like Figure 9 As shown, the purpose of steps S501-S502 is to remove Z frames of predicted audio signals whose admittance value changes are greater than the admittance value change threshold from the N frames of reference prediction signals, retaining the silent reference prediction signals and the non-silent reference prediction signals (assuming a total of W frames of reference prediction signals), where N = W + Z. The purpose of step S503 is to classify these W frames of reference prediction signals to obtain X frames of silent reference prediction signals and Y frames of non-silent reference prediction signals. In step S504, the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions can be determined based on the X frames of silent reference prediction signals.

[0273] The process can be referred to in the following description of steps S501-S504.

[0274] S501. The terminal performs differential calculations based on the admittance values ​​corresponding to the N-frame reference prediction signals to obtain the differential admittance values ​​corresponding to the N-1-frame reference prediction signals.

[0275] The terminal performs differential calculation on the admittance value corresponding to a frame of reference prediction signal by subtracting the admittance value of the current frame from the admittance value of the subsequent frame. The differential admittance value is then the difference between the admittance values ​​of the current and subsequent frames. The subsequent frame is a reference prediction signal acquired at a time difference of one frame.

[0276] Let the differential admittance value corresponding to the reference prediction signal in the i-th frame be diffG. Rsignal(i) Then, the terminal can determine the differential admittance value corresponding to the i-th frame reference prediction signal by referring to the following formula (6).

[0277] diffG Rsignal(i)=G Rsignal(i+1) -G Rsignal(i) Formula (6)

[0278] In formula (6), diffG Rsignal(i) G is the differential admittance value corresponding to the reference prediction signal in the i-th frame. Rsignal(i+1) The next frame of the reference prediction signal after the i-th frame of the reference prediction signal, G Rsignal(i) The i-th frame is the reference prediction signal.

[0279] The differential admittance value corresponding to a frame of reference prediction signal can reflect the change in the admittance value of that frame of reference prediction signal. When the differential admittance value of that frame of reference prediction signal is greater than or equal to the admittance value change threshold, that frame of reference prediction signal is not suitable for obtaining the reference prediction signal for silence due to the excessive change in the corresponding admittance value, which would reduce the accuracy of the calculation results. Therefore, in the downlink step S502, the differential admittance value of each frame of reference prediction signal is used to filter and determine the W frames of reference prediction signal with smaller admittance value changes for obtaining the reference prediction signal for silence. For details of this process, please refer to the following description of step S502.

[0280] S502. The terminal determines W frames of reference prediction signals in the N-1 frame reference prediction signals whose absolute values ​​corresponding to the differential admittance values ​​are less than or equal to the differential threshold, where W is less than or equal to N-1.

[0281] Figure 10 A schematic diagram is shown showing the differential admittance value obtained by differential operation on the reference prediction signal.

[0282] like Figure 10 As shown in (a) above, this illustrates the correspondence between the reference predicted signal sequence and the admittance value. Figure 10 As shown in (b) in the figure, this is the correspondence between the reference predicted signal sequence and the differential admittance value.

[0283] like Figure 10 As shown, the admittance value corresponding to the reference prediction signal included in region 401 changes relatively stably, therefore its corresponding differential admittance value is less than the admittance value change threshold. The admittance value corresponding to the reference prediction signal included in region 402 fluctuates significantly, therefore its corresponding differential admittance value is greater than the admittance value change threshold.

[0284] The terminal determines W frames of reference prediction signals in the N-1 frame reference prediction signals whose absolute values ​​corresponding to the differential admittance values ​​are less than or equal to the differential threshold, where W is less than or equal to N-1. Based on these W frames of reference prediction signals with relatively stable admittance values, they can be classified into two main categories: silent reference prediction signals and non-silent reference prediction signals. This process can be referred to in the following description of step S503.

[0285] S503. Based on the admittance value corresponding to the W frame reference prediction signal, cluster the signal into X frames of silent reference prediction signal and Y frames of non-silent reference prediction signal, where X+Y=W.

[0286] Based on the foregoing, the admittance value corresponding to a silent reference prediction signal is less than or equal to a first admittance threshold, while the admittance value of a non-silent reference prediction signal is greater than or equal to a second admittance threshold. When the first admittance threshold is less than or equal to the second admittance threshold, and the first admittance threshold is equal to the second admittance threshold, the terminal can determine that reference prediction signals less than the first admittance threshold are silent reference prediction signals, and reference prediction signals greater than the first admittance threshold are non-silent reference prediction signals.

[0287] The initial values ​​of the first admittance threshold and the second admittance threshold are preset. For example, the initial value of the first admittance threshold can be set to 0.12, and the initial value of the second admittance threshold can be set to 0.15, etc. They can be set according to the actual situation, and this application embodiment does not limit them.

[0288] The terminal can cluster the W-frame reference prediction signal based on the first admittance threshold and the second admittance threshold. The first admittance threshold is used as the initial cluster center for silent reference prediction signals, and the second admittance threshold is used as the initial cluster center for non-silent reference prediction signals, resulting in the first clustering result: dividing the W-frame reference prediction signal into two categories, one for silent reference prediction signal sequences and one for non-silent reference prediction signal sequences. The first and second admittance thresholds are then updated based on this first clustering result, resulting in updated first and second admittance thresholds. The W-frame reference prediction signal is then clustered again based on the updated first and second admittance thresholds, and so on. After multiple clusterings, when the difference between the updated first and second admittance thresholds obtained after Q adjacent clusterings is less than a preset threshold, the terminal can end the clustering, taking this clustering result as the final clustering result, dividing it into X frames of silent reference prediction signals and Y frames of non-silent reference prediction signals, where X + Y = W. For example, the terminal can use a clustering algorithm (such as K-means clustering or mean-shift clustering) to cluster the W-frame reference prediction signal based on the first admittance threshold and the second admittance threshold, dividing it into X-frame silent reference prediction signals and Y-frame non-silent reference prediction signals.

[0289] S504. The terminal determines the average admittance value corresponding to the reference prediction signal for the silence of the X frame, and uses it as the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions.

[0290] The average admittance value corresponding to the reference prediction signal for the X-frame silence is the average value of the admittance value corresponding to the reference prediction signal for the X-frame silence.

[0291] Let G be the reference prediction signal for the silence in the i-th frame. SRsignal(i) , where i={i∈N+|1≤i≤X}. Then the relevant formula for the terminal to determine the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions can be found in formula (7).

[0292]

[0293] In formula (7), fG normal (1) represents the reference admittance value of the first sample corresponding to the screen sound-emitting device under normal conditions. G SRsignal(i) This represents the reference prediction signal for the mute state in the i-th frame.

[0294] S302. The terminal obtains the reference admittance value of the second sample corresponding to the screen speaker under normal conditions.

[0295] The second sample is another normal screen speaker.

[0296] The reference admittance value of the second sample can be used to represent the range of admittance values ​​of the sample under normal conditions when passing through a silent audio signal.

[0297] Step S302 is similar to the aforementioned step S301, and can be referred to the previous description of step S301, which will not be repeated here.

[0298] S303. The terminal obtains the reference admittance value of the Mth sample corresponding to the screen speaker under normal conditions.

[0299] The Mth sample is another normal screen speaker.

[0300] The reference admittance value of the Mth sample can be used to represent the range of admittance values ​​of the sample under normal conditions when passing through a silent audio signal.

[0301] Step S303 is similar to step S301 described above, and can be referred to the description of step S301 above, so it will not be repeated here.

[0302] S304. The terminal determines the normal admittance range of the screen speaker under normal conditions based on the reference admittance values ​​of M samples corresponding to the screen speaker under normal conditions.

[0303] In some embodiments, the terminal may select the largest reference admittance value and the smallest reference admittance value from the reference admittance values ​​corresponding to different samples, and take the range between the smallest and largest reference admittance values ​​as the normal admittance value range.

[0304] Let the reference admittance value corresponding to different samples be fG. normal (i), i={i∈N+|1≤i≤M}. Among them, fG normal (i) represents the reference admittance value of the i-th sample corresponding to the screen speaker under normal conditions.

[0305] Let the normal admittance range be [fG] low fG high ], where fG low =min{fG normal (i)},fG high =max{fG normal (i)}, where i={i∈N+|1≤i≤M}.

[0306] In other embodiments, the terminal can select the largest and smallest reference admittance values ​​from the reference admittance values ​​corresponding to different samples. The range between the smallest reference admittance value minus a robust control factor and the largest reference admittance value plus a robust control factor is used as the normal admittance range. This robust control factor enables the normal admittance range to resist fluctuations and avoid instability in the normal admittance range.

[0307] The normal admittance range can then be expressed as [fG] low fG high ], where fG low =min{fG normal (i)}-Δθ,fG high =max{fG normal (i)}+Δθ, i={i∈N+|1≤i≤M}. Where Δθ represents the robust control factor for the normal admittance range.

[0308] Figure 11 A schematic flowchart is shown for determining the admittance value of a silence frame by a terminal.

[0309] The silence frame admittance value is the maximum admittance value of the screen speaker when it plays a silent audio signal. It describes the maximum admittance value corresponding to the feedback signal (detection signal) generated by the silent audio signal in the target audio signal when the screen speaker plays the target audio signal, regardless of whether the screen speaker is functioning properly. In other words, if the admittance value corresponding to the feedback signal generated by a frame of audio signal is greater than the silence frame admittance value, it indicates that the frame of audio signal is not a silent audio signal. The feedback signal corresponding to the silent audio signal can be interpreted as the aforementioned detection signal.

[0310] In one possible implementation, the terminal determines the silence frame admittance value by: testing multiple samples from the screen speaker under different conditions, determining the reference admittance value corresponding to different samples under different conditions, and for each condition, determining the average reference admittance value of different samples under one condition as the average reference admittance value of the screen speaker under that condition. Then, the terminal can select the largest average admittance value from the admittance values ​​of the screen speaker under these different conditions as the silence frame admittance value.

[0311] The different scenarios include normal conditions and multiple abnormal conditions (such as open circuits or short circuits in the screen speaker). The average reference admittance value can be the average of the reference admittance values ​​corresponding to different samples under this condition. The reference admittance value of a sample under different conditions is the same as that of a sample under normal conditions, which can reflect the range of admittance values ​​of a sample of the screen speaker when passing a silent audio signal under this condition. Therefore, the average reference admittance value of multiple samples under one condition can represent the average level of the screen speaker's ability to pass a silent audio signal under that condition.

[0312] The process by which the terminal determines the admittance value of the silence frame can be referred to in the following description of steps S601-S604.

[0313] S601. Obtain the average reference admittance of the screen speaker under normal conditions.

[0314] The terminal first determines the reference admittance values ​​of multiple samples of the screen speaker under normal conditions. For one of the samples, the process by which the terminal determines the reference admittance value of that sample under normal conditions can be referred to the aforementioned description of step S301, and will not be repeated here.

[0315] The terminal then determines the average of the reference admittance values ​​of multiple samples under normal conditions as the average reference admittance value of the screen speaker under normal conditions.

[0316] S602. Obtain the average reference admittance of the screen speaker under the first abnormal condition.

[0317] The first abnormal condition is one situation where the screen speaker is damaged, such as a short circuit in the screen speaker.

[0318] The terminal first determines reference admittance values ​​for multiple samples of the screen speaker under a first abnormal condition. For one of these samples, the reference admittance value under the first abnormal condition can be used to represent the range of admittance values ​​for that sample when a silent audio signal is transmitted under the first abnormal condition.

[0319] For one of the samples, the process by which the terminal determines the reference admittance value of the sample under the first abnormal condition can be referred to the aforementioned description of step S301, and will not be repeated here.

[0320] The terminal then determines the average of the reference admittance values ​​of multiple samples under the first abnormal condition as the average reference admittance value of the screen speaker under the first abnormal condition.

[0321] S603. Obtain the average reference admittance of the screen speaker under the Tth abnormal condition.

[0322] The Tth abnormal condition is another situation when the screen speaker is damaged, such as when the screen speaker has an open circuit.

[0323] The terminal first determines reference admittance values ​​for multiple samples of the screen speaker under the second abnormal condition. For one of these samples, the reference admittance value under the second abnormal condition can be used to represent the range of admittance values ​​for that sample when a silent audio signal is transmitted under the second abnormal condition.

[0324] For one of the samples, the process by which the terminal determines the reference admittance value of the sample under the second abnormal condition can be referred to the aforementioned description of step S301, and will not be repeated here.

[0325] The terminal then determines the average of the reference admittance values ​​of multiple samples under the second abnormal condition as the average reference admittance value of the screen speaker under the second abnormal condition.

[0326] S604. The terminal determines the largest average reference admittance value among all average reference admittance values ​​included in the screen speaker under normal conditions and T abnormal conditions as the mute frame admittance value.

[0327] In some embodiments, the terminal may select the largest average reference admittance value from all average reference admittance values ​​included by the screen speaker under different conditions (normal condition and T abnormal conditions) as the mute frame admittance value.

[0328] Let fG be the total average reference admittance of the screen speaker under different conditions. condition (i), i={i∈N+|1≤i≤T+1}. Among them, fG condition (i) represents the average reference admittance of the screen speaker in the i-th case.

[0329] Let the admittance of the silent frame be fG. slient Among them, fG slient =max{fG condition (i)}, where i={i∈N+|1≤i≤T+1}.

[0330] In other embodiments, the terminal may select the largest average reference admittance value from all average reference admittance values ​​included by the screen speaker under different conditions (normal condition and T abnormal conditions), and add a robust control factor to the largest average reference admittance value as the mute frame admittance value.

[0331] Let the admittance of the silent frame be fG. slient Among them, fG slient =max{fG condition (i)}+δ, where i={i∈N+|1≤i≤T+1}, and δ is the robust control factor for the silent frame admittance value. This robust control factor enables the silent frame admittance value to resist fluctuations and avoids instability of the silent frame admittance value.

[0332] It should be understood that, because the screen speaker's ability to pass a muted audio signal under different conditions was tested during the determination of the mute frame admittance value, and the largest average reference admittance value was selected as the mute frame admittance value, each condition contributed to the mute frame admittance value. Therefore, the mute frame admittance value can describe the screen speaker's ability to pass a muted audio signal regardless of whether the screen speaker is functioning properly.

[0333] It should be understood that in determining the normal admittance range, the reference audio signal sequence played by the terminal using different samples under normal conditions via the screen speaker can be a silent audio signal sequence or a pilot signal sequence. Then, the reference feedback signal sequence corresponding to this silent audio signal sequence or pilot signal sequence is obtained. The terminal can determine the silent reference prediction signal sequence without filtering or performing other operations on this reference feedback signal sequence. Instead, it can use this feedback signal sequence as the silent reference prediction signal sequence, calculate the average admittance value corresponding to this feedback signal sequence, and use it as the reference admittance value when the screen speaker plays a silent audio signal as a sample, thus determining the normal admittance range. That is, this process does not involve filtering the reference feedback signal sequence to obtain the silent reference prediction signal sequence.

[0334] In determining the admittance value of the silence frame, the terminal uses the reference audio signal sequence played by the screen speaker under different conditions. This reference audio signal sequence can be either a silence audio signal sequence or a pilot signal sequence. Then, the terminal obtains the reference feedback signal sequence corresponding to this silence audio signal sequence or pilot signal sequence. Instead of filtering this feedback signal sequence to determine the reference prediction signal sequence for silence, the terminal uses this feedback signal sequence as the reference prediction signal sequence for silence, calculates the average admittance value corresponding to this feedback signal sequence, and thus determines the average reference admittance value of the screen speaker under different conditions, and finally determines the silence frame admittance value. That is, this process does not involve filtering the reference feedback signal sequence to obtain the reference prediction signal sequence for silence.

[0335] The following describes the application scenarios of the device testing methods involved in the embodiments of this application.

[0336] Use Case 1: During communication between the terminal and other terminals through a call-type application, i.e. during a user call, the device detection method involved in the embodiments of this application can be used to determine whether the screen speaker is damaged.

[0337] In one possible scenario, after a terminal opens a call-related application, it can trigger the detection of the screen speaker, acquire the audio signal over a period of time (e.g., 1 second) to obtain the downlink audio signal sequence, and during the user's call, the terminal can determine whether the screen speaker is working properly based on the downlink audio signal sequence. This process can be referred to the description in the aforementioned related content.

[0338] If the screen speaker is confirmed to be damaged, the terminal can play audio signals without using the screen speaker, instead using only the earpiece, and amplify the power of the audio signal played through the earpiece to ensure clear sound for the user. Simultaneously, the terminal can display a notification message to inform the user that the screen speaker has been damaged.

[0339] Figure 12 This illustrates a user interface when a terminal displays a prompt message to notify the user that the screen speaker is damaged.

[0340] like Figure 12 As shown, user interface 10 is a user interface when the terminal opens a call application. When the terminal determines that the screen speaker is damaged, a prompt box 101 can be displayed in user interface 10. The prompt box 101 can include the prompt message: "The screen speaker is damaged and has been switched to earpiece sound. Please go to the nearest online store for repair as soon as possible."

[0341] Figure 13 This illustrates another user interface when the terminal displays a prompt message to notify the user that the screen speaker is damaged.

[0342] like Figure 13 As shown in (a), when the terminal determines that the screen speaker is damaged, a user interface 20 can be displayed. The user interface 20 may include a status bar 201, which may include a damage notification 201A. The damage notification 201A can be used to prompt the user that the screen speaker has been damaged.

[0343] In response to user actions in the status bar 201 (such as a swipe down), the terminal can display, as follows: Figure 13 User interface 21 is shown in (b) of the diagram.

[0344] like Figure 13 As shown in (b), the user interface 21 is an exemplary user interface involved when the notification page is displayed in the pull-down status bar 201. The user interface 21 may include a notification page 210. The notification page 210 may include detailed content related to any notification in the status bar 201. For example, area 211 may include detailed content related to the damage notification 201A. Area 211 may include a prompt message: "The screen speaker is damaged and has been switched to earpiece sound. Please go to the nearest online store for repair in time." This prompt message can inform the user that the screen speaker has been damaged.

[0345] Use Case 2: The terminal can be configured with a setting to detect the screen speaker. This setting provides the functionality to detect the screen speaker. Users can use this setting to trigger the detection of the screen speaker on the terminal. The detection signal sequence involved in this process can be pre-set in the terminal or obtained during communication with other terminals through call-type applications and then stored in memory.

[0346] It should be understood that in this usage scenario, the terminal can play the aforementioned silent audio signal sequence or pilot signal sequence instead of playing the downlink audio signal sequence carrying voice information through the screen speaker. That is, the silent audio signal sequence or pilot signal sequence is used as the aforementioned downlink audio signal sequence. Then, the feedback signal sequence corresponding to the silent audio signal sequence or pilot signal sequence is obtained. The terminal can use the feedback signal sequence as the detection signal sequence instead of filtering or performing other operations on the feedback signal sequence to determine the detection signal sequence. The average admittance value corresponding to the feedback signal sequence can be used as the admittance value when the screen speaker plays the silent audio signal. By comparing the average admittance value corresponding to the feedback signal sequence with the normal admittance value range, it can be determined whether the screen speaker is working properly.

[0347] Figures 14a-14c This illustrates a set of exemplary user interfaces when a user triggers the terminal to detect the screen speaker via settings.

[0348] like Figure 14a As shown, the user interface 30 is a settings interface for the terminal. This user interface 30 may include a screen speaker detection setting 301. In response to a user's operation (e.g., a click) on this screen speaker detection setting 301, the terminal can display... Figure 14b The user interface 31 shown in the figure.

[0349] like Figure 14b As shown, the user interface 31 corresponds to the settings of the screen speaker detection setting 301. The user interface 31 may include a wear test control 311, which can be used to trigger the terminal to detect the screen speaker. In response to the user's operation on the wear test control 311 (e.g., a click operation), the terminal can detect the screen speaker and display the detection result. Figure 14c In the user interface 32 shown.

[0350] like Figure 14c As shown, user interface 32 is a user interface for the terminal to display the detection results. User interface 32 may include a detection score 321 and related prompt information 322, wherein the test score is used to represent the result of the terminal's detection of the screen speaker, and the prompt information 322 can be used to explain the detection result. In the event that the screen speaker is damaged, the terminal may also display remedial measures for the user to choose from to eliminate the impact of the screen speaker damage. For example, user interface 32 may include a prompt box 323 with the remedial measures, which includes the prompt information for the remedial measures: "Switch to enable earpiece sound only". In response to the user's operation on the confirmation control (e.g., click operation), the terminal may play audio signals without using the screen speaker, and only use the earpiece to play audio signals.

[0351] The screen speaker involved in this application embodiment can be referred to as a first speaker, and the audio signal it plays, such as a downlink audio signal, can also be referred to as a first audio signal; the earpiece can also be referred to as a second speaker, and the audio signal it plays can also be referred to as a second audio signal; the downlink audio signal after adding the pilot signal can also be referred to as the first audio signal after adding the pilot signal; the downlink audio signal sequence can also be referred to as the first audio signal sequence, and one frame of the first audio signal after adding the pilot signal included can also be referred to as a third audio signal; the feedback signal sequence corresponding to the downlink audio signal sequence after adding the pilot signal can also be referred to as the first feedback signal sequence; the first frequency threshold can also be referred to as the frequency threshold; the user interface for displaying the aforementioned prompt information can also be referred to as the first interface; and one frame of detection signal included in the detection signal sequence can also be referred to as the first detection signal. The audio signal played by the screen speaker under normal conditions for M samples, such as the reference audio signal after adding the pilot signal, can also be referred to as the second audio signal sequence; the reference feedback signal can also be referred to as the second feedback signal sequence.

[0352] It should also be understood that, as described above, the terminal determines whether the screen speaker is functioning correctly using parameters related to admittance values ​​(such as the mute frame admittance value and the normal admittance range). In other cases, the terminal can also use other parameters to determine whether the screen speaker is functioning correctly, such as current-related parameters. In this embodiment, these current-related parameters can be referred to as the mute frame current value and the normal current range. In other cases, the terminal can also use a combination of admittance-related parameters and current-related parameters to determine whether the screen speaker is functioning correctly, or it can use other parameters, such as resistance-related parameters, as long as they can represent the screen speaker's ability to transmit audio signals. This embodiment does not limit this.

[0353] The normal current range refers to the range of current values ​​of the screen speaker when the screen speaker is playing a silent audio signal, provided that the terminal is operating normally.

[0354] The mute frame admittance value is the maximum admittance value of the screen speaker when it plays a mute audio signal.

[0355] The determination methods for the mute frame current value and the normal current value are similar to those for the mute frame admittance value and the normal admittance value, respectively. The difference is that the process of calculating the admittance value involves formulas (1), (2), and (3), but the determination of the normal current value does not involve formulas (2) and (3). In other formulas and their related descriptions, replacing the admittance value with the current value can be used as a description of the range of normal current value and the mute frame current value.

[0356] The following describes an exemplary terminal provided in the embodiments of this application.

[0357] Figure 15 This is a schematic diagram of the terminal structure provided in the embodiments of this application.

[0358] The following description uses a terminal as an example to illustrate the embodiments. It should be understood that a terminal may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0359] The terminal may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0360] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal. In other embodiments of this application, the terminal may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0361] The processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), etc. These different processing units may be independent devices or integrated into one or more processors.

[0362] The processor 110 may also include a memory for storing instructions and data.

[0363] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, etc.

[0364] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the terminal. In other embodiments of this application, the terminal may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0365] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0366] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.

[0367] The terminal's wireless communication function can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

[0368] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0369] The mobile communication module 150 can provide solutions for wireless communication applications, including 2G / 3G / 4G / 5G, on terminals.

[0370] A modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal.

[0371] The wireless communication module 160 can provide solutions for wireless communication applications on terminals, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and global navigation satellite system (GNSS). The wireless communication module 160 can be one or more devices integrating at least one communication processing module.

[0372] In some embodiments, antenna 1 of the terminal is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the terminal to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), etc.

[0373] The terminal implements display functions through a GPU, a display screen (194), and an application processor.

[0374] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD).

[0375] The terminal can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0376] The ISP is used to process the data fed back by the camera 193.

[0377] Camera 193 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element.

[0378] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when a terminal selects a frequency, a DSP can perform a Fourier transform on the frequency energy.

[0379] Video codecs are used to compress or decompress digital video. A terminal can support one or more video codecs. This allows the terminal to play or record videos in various encoding formats.

[0380] NPU stands for Neural-Network (NN) Computing Processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.

[0381] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).

[0382] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), etc.

[0383] Non-volatile memory can include disk storage devices and flash memory.

[0384] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc., and according to the level of the storage cell, it can be classified according to the level of the storage cell, including single-level cell (SLC) and multi-level cell (MLC), etc.

[0385] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.

[0386] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.

[0387] The external memory interface 120 can be used to connect to external non-volatile memory to expand the terminal's storage capacity.

[0388] The terminal can implement audio functions, such as music playback and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.

[0389] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals.

[0390] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The terminal can listen to music or make hands-free calls through the speaker 170A.

[0391] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the terminal is answering a phone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0392] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C.

[0393] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0394] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The terminal can receive button input and generate key signal inputs related to user settings and function control of the terminal.

[0395] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0396] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0397] The SIM card interface 195 is used to connect the SIM card.

[0398] In this embodiment, the processor 110 can call computer instructions stored in the internal memory 121 to cause the terminal to execute the device detection method in this embodiment.

[0399] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0400] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0401] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0402] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A device testing method, characterized in that, Applied to a terminal including a first speaker and a second speaker, the method includes: After the call application interface is displayed, a first audio signal is played through the first speaker, and a second audio signal is played through the second speaker; wherein, the first audio signal is the audio signal played by the terminal through the first speaker during a first time period; and the second audio signal is the audio signal played by the terminal through the second speaker during the first time period. The first audio signal sequence is obtained by acquiring multiple frames of the first audio signal; The first speaker is determined to be damaged based on the first audio signal sequence; During the second time period, the audio signal is played through the second speaker, and the first audio signal is no longer played through the first speaker; wherein, the second time period is after the first time period.

2. The method according to claim 1, characterized in that, Playing a second audio signal through the second speaker specifically includes: Increase the energy of the second audio signal; The second audio signal, amplified by the second speaker, is played back.

3. The method according to claim 1 or 2, characterized in that, After determining that the first speaker is damaged based on the first audio signal sequence, the method further includes: The first interface is displayed, which includes a prompt message to inform the user that the first speaker has been damaged.

4. The method according to claim 1 or 2, characterized in that: The first speaker is placed inside the screen of the terminal, and the second speaker is placed on the side of the terminal; wherein the first audio signal played by the first speaker is transmitted to the ear through the bone structure, and the second audio signal played by the second speaker is transmitted to the ear through the air.

5. The method according to claim 1 or 2, characterized in that, Obtaining multiple frames of the first audio signal to obtain a first audio signal sequence specifically includes: A pilot signal is added to each frame of the first audio signal to obtain the first audio signal sequence; wherein, the pilot signal is an audio signal with a frequency greater than a frequency threshold and an energy less than a first energy threshold.

6. The method according to claim 5, characterized in that, The frequency threshold is greater than the frequency of the first audio signal, and the first energy threshold is close to or equal to -30dB.

7. The method according to claim 5, wherein the first audio signal sequence includes a first audio signal after adding a pilot signal to an H-frame, and includes a third audio signal; the third audio signal is a first audio signal after adding a pilot signal to a frame, characterized in that, Determining that the first speaker is damaged based on the first audio signal sequence specifically includes: After playing the first audio signal sequence through the first speaker, a detection signal sequence is obtained; the detection signal sequence includes K-frame detection signals, including a first detection signal, which is a feedback signal corresponding to the silent audio signal in the third audio signal; the silent audio signal in the third audio signal is an audio signal with energy less than or equal to a second energy threshold and a frequency equal to or greater than the frequency threshold, wherein the second energy threshold is greater than or equal to the first energy threshold; Determine the admittance value corresponding to each frame of the detection signal in the detection signal sequence, including the admittance value corresponding to the first detection signal. The admittance value corresponding to the first detection signal is used to indicate the first admittance value of the first speaker when playing the silent audio signal in the third audio signal. The first admittance value is used to indicate the ability of the first speaker to pass the silent audio signal in the third audio signal. Determine the average admittance value corresponding to the detection signal sequence; wherein, the average admittance value corresponding to the detection signal sequence is the average value of the admittance values ​​corresponding to the K-frame detection signals; If the average admittance value corresponding to the detection signal sequence is not within the normal admittance value range, the first speaker is determined to be damaged; the normal admittance value range is the range of admittance values ​​of the first speaker when the first speaker is playing the silent audio signal under normal conditions.

8. The method according to claim 7, characterized in that, After playing the first audio signal sequence through the first speaker, a detection signal sequence is obtained, specifically including: After playing the first audio signal sequence through the first speaker, a first feedback signal sequence corresponding to the first audio signal is obtained; the first feedback signal sequence includes an H-frame feedback signal, which includes a first feedback signal. The first feedback signal is a feedback signal corresponding to the third audio signal. The first feedback signal includes current information and voltage information corresponding to when the first speaker plays the third audio signal. The first feedback signal carries information about the third audio signal. The third audio signal also includes a non-silent audio signal. The non-silent audio signal is an audio signal in the third audio signal whose energy is greater than or equal to a third energy threshold and whose frequency is less than the frequency threshold. The third energy threshold is greater than or equal to a second energy threshold. The first feedback signal sequence is filtered to obtain a prediction signal sequence; the prediction signal sequence includes S frame prediction signals, where S is less than or equal to H; the prediction signal sequence includes a first prediction signal, which is the first feedback signal after filtering the first feedback signal to remove non-silent audio signal information from the first feedback signal. Determine the admittance value corresponding to each frame of the predicted signal in the predicted signal sequence; All predicted signals in the predicted signal sequence whose corresponding admittance values ​​are less than the admittance value of the silence frame are identified as the detection signal sequence. The admittance value of the silence frame is the maximum admittance value of the first speaker when the first speaker plays the silence audio signal.

9. The method according to claim 8, characterized in that, The first feedback signal sequence is filtered to obtain a prediction signal sequence; the prediction signal sequence includes S-frame prediction signals, specifically including: A portion of the feedback signals in the first feedback signal sequence is filtered to obtain a prediction signal sequence; wherein the portion of the feedback signals is the filtered feedback signals of S frames acquired later in the first feedback signal sequence, and the prediction signal sequence includes the S frames of filtered feedback signals, where S is less than H; or... All feedback signals in the first feedback signal sequence are filtered to obtain a prediction signal sequence, which includes S frames of filtered feedback signals, where S equals H.

10. The method according to claim 8, characterized in that, The normal admittance range is predetermined and set in the terminal. The process of determining the normal admittance range includes: The second audio signal sequence is played through M samples under normal conditions using the first speaker; The second feedback signal sequences corresponding to the M samples when the second audio signal sequence is played are obtained respectively, thus obtaining the second feedback signal sequences corresponding to the M samples; Based on the second feedback signal sequences corresponding to the M samples, a prediction signal sequence for silence corresponding to the M samples is determined; the M samples include a first sample, and the prediction signal sequence for silence corresponding to the first sample includes prediction signals for silence across multiple frames, including a prediction signal for the first silence; the prediction signal for the first silence is a filtered feedback signal that satisfies a first condition obtained by filtering the second feedback signal sequence corresponding to the first sample, wherein the first condition is that the admittance value corresponding to the filtered feedback signal is less than or equal to an admittance threshold. The reference admittance values ​​corresponding to the M samples are determined based on the predicted signal sequences of silence corresponding to the M samples, wherein the reference admittance value of the first sample is the average value of the admittance values ​​corresponding to all predicted signals of silence in the predicted signal sequence of silence corresponding to the first sample. The normal admittance range is determined based on the reference admittance values ​​corresponding to the M samples.

11. The method according to claim 10, characterized in that, Determining the normal admittance range based on the reference admittance values ​​corresponding to the M samples specifically includes: Determine the maximum value and the minimum value among the reference admittance values ​​corresponding to the M samples; The normal admittance value range is determined to be from the minimum value among the reference admittance values ​​to the maximum value among the reference admittance values.

12. The method according to claim 10 or 11, characterized in that, The silence frame admittance value is predetermined and then set in the terminal. The process of determining the silence frame admittance value includes: The average reference admittance value of the first sound generator is determined for M samples under different conditions, including a normal condition and at least one abnormal condition; the average reference admittance value of the M samples under the normal condition is the average of the reference admittance values ​​corresponding to the M samples under the normal condition; the average reference admittance value of the M samples under the abnormal condition is the average of the reference admittance values ​​corresponding to the M samples under the abnormal condition. The silence frame admittance value is determined based on the average reference admittance value of M samples of the first speaker under different conditions.

13. The method according to claim 12, characterized in that, The silence frame admittance value is determined based on the average reference admittance value of M samples from the first speaker under different conditions, specifically including: The maximum value among the average reference admittance values ​​of the M samples of the first speaker under different conditions is determined as the silent frame admittance value.

14. A terminal, characterized in that, The terminal includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the terminal to perform the method as described in any one of claims 1-13.

15. A chip system applied to a terminal, the chip system comprising one or more processors, the processors being configured to invoke computer instructions to cause the terminal to perform the method as described in any one of claims 1-13.

16. A computer program product containing instructions, characterized in that, When the computer program product is run on a terminal, the terminal performs the method as described in any one of claims 1-13.

17. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on a terminal, the terminal causes the terminal to perform the method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Loudspeaker fault processing method and apparatus

    CN107920321A

  • Electronic device for controlling volume level of audio signal on basis of states of multiple speakers

    US20200348902A1