Hole blocking identification method and device, electronic equipment and storage medium

By obtaining the operating current of the voice coil when the sound output device plays audio and comparing it with the current detection threshold, the accuracy of the sound output device's hole blocking detection is solved, ensuring the sound quality and normal operation of the device.

CN120385383APending Publication Date: 2025-07-29SHANGHAI WINGTECH INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510519072.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The prior art is difficult to accurately detect whether the sound output device is blocked, resulting in a small sound output, a deterioration in the sound quality, and even damage to the device.

Method used

When the audio signal is played by the sound output device, the operating current of the voice coil is obtained and compared with multiple current detection thresholds to determine the current range, thereby determining the degree of hole blockage.

Benefits of technology

The hole blocking degree of sound output device is detected in a timely and accurate manner, and the long-term hole blocking affects the sound quality and device performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120385383A_ABST
    Figure CN120385383A_ABST
Patent Text Reader

Abstract

The invention provides a hole blocking identification method and device, electronic equipment and a storage medium, and is applied to the electronic equipment, the electronic equipment comprises a sound output device, the sound output device comprises a voice coil, and the method comprises the following steps: under the condition that the sound output device plays an audio signal, obtaining a first working current of the voice coil; comparing the first working current with a plurality of current detection thresholds, and determining that the current range to which the first working current belongs and the playing state of the sound output device are the same as the playing state when the plurality of current detection thresholds are obtained through testing; and determining a first hole blocking degree corresponding to the sound output device according to the current range to which the first working current belongs. According to the invention, the hole blocking degree of the sound output device can be timely and accurately detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technologies, and particularly to a method and device for identifying blocked holes, an electronic device, and a storage medium. Background Art

[0002] With the development of technology, sound output devices such as speakers and receivers are widely used in electronic devices to provide audio playback services for users. However, during the use of an electronic device, the sound outlet holes of the electronic device are easily blocked by dust, debris, or other reasons, resulting in problems such as a smaller output sound and a deteriorated sound quality of the sound output device. If the blockage of the sound outlet holes is not detected and processed in time, it may further affect the performance of the sound output device and even cause damage to the sound output device. Therefore, how to accurately detect whether the sound output device has a blocked hole has become the focus of current technology. Summary of the Invention

[0003] Embodiments of the present application disclose a method and device for identifying blocked holes, an electronic device, and a storage medium, which can timely and accurately detect the degree of blocked holes of a sound output device.

[0004] A first aspect of embodiments of the present application discloses a method for identifying blocked holes, which is applied to an electronic device. The electronic device includes a sound output device, and the sound output device includes a voice coil. The method includes:

[0005] When the sound output device plays an audio signal, obtain a first operating current of the voice coil;

[0006] Compare the first operating current with a plurality of current detection thresholds to determine the current range to which the first operating current belongs; the playback state of the sound output device is the same as the playback state when the plurality of current detection thresholds are obtained through testing

[0007] Determine a first degree of blocked holes corresponding to the sound output device according to the current range to which the first operating current belongs.

[0008] In some possible embodiments, when the amplitude and frequency of the audio signal played by the sound output device remain unchanged, the first operating current is positively correlated with the first degree of blocked holes.

[0009] In some possible embodiments, the determining the first degree of blocked holes corresponding to the sound output device according to the current range to which the first operating current belongs includes:

[0010] If the first operating current is not greater than a first current detection threshold, it is determined that the first degree of blocked holes corresponding to the sound output device is unblocked;

[0011] When the first operating current is greater than the second current detection threshold, it is determined that the first degree of blockage of the sound output device is complete blockage; the second current detection threshold is greater than the first current detection threshold;

[0012] When the first operating current is greater than the first current detection threshold and less than or equal to the second current detection threshold, the blockage ratio is determined according to the current range to which the first operating current belongs, and the first degree of blockage of the sound output device is obtained; the blockage ratio is a value greater than 0 and less than 1.

[0013] In some possible embodiments, the multiple current detection thresholds are obtained by testing sound output devices with multiple different preset degrees of blockage;

[0014] The current ranges respectively corresponding to the multiple different preset degrees of blockage are determined based on the maximum operating current of the voice coil when the sound output devices with the respective preset degrees of blockage play an audio signal.

[0015] In some possible embodiments, the sound output device further includes a current sampling circuit; obtaining the first operating current of the voice coil includes:

[0016] Collecting, by the current sampling circuit, a plurality of sampled currents corresponding to the voice coil within a first time period;

[0017] Taking the average value of the plurality of sampled currents within the first time period as the first operating current.

[0018] In some possible embodiments, comparing the first operating current with multiple current detection thresholds to determine the current range to which the first operating current belongs includes:

[0019] When the sound output device plays an audio signal at a target volume, comparing the first operating current with the multiple current detection thresholds corresponding to the target volume to determine the current range to which the first operating current belongs; when the target volumes are different, the multiple current detection thresholds corresponding to the target volumes are different.

[0020] In some possible embodiments, after determining the first degree of blockage of the sound output device according to the current range to which the first operating current belongs, the method further includes:

[0021] Obtaining a second operating current of the voice coil;

[0022] Comparing the second operating current with the multiple current detection thresholds to determine the current range to which the second operating current belongs;

[0023] Determine a second degree of blocked hole corresponding to the sound output device according to the current range to which the second working current belongs;

[0024] Determine a type of blocked hole corresponding to the sound output device according to the first degree of blocked hole and the second degree of blocked hole, where the type of blocked hole includes a human-made blocked hole and a non-human-made blocked hole.

[0025] A second aspect of the embodiments of the present application discloses a blocked hole identification device applied to an electronic device, where the electronic device includes a sound output device, and the sound output device includes a voice coil. The blocked hole identification device includes:

[0026] A current acquisition module, configured to acquire a first working current of the voice coil when the sound output device plays an audio signal;

[0027] A range determination module, configured to compare the first working current with multiple current detection thresholds to determine the current range to which the first working current belongs; the playing state of the sound output device is the same as the playing state when the multiple current detection thresholds are obtained through testing

[0028] A blocked hole detection module, configured to determine a first degree of blocked hole corresponding to the sound output device according to the current range to which the first working current belongs.

[0029] A third aspect of the embodiments of the present application discloses an electronic device, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor implements the blocked hole identification method described in any one of the above embodiments.

[0030] A fourth aspect of the embodiments of the present application discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the blocked hole identification method described in any one of the above embodiments.

[0031] A method, device, electronic device, and storage medium for identifying blocked holes provided by the present application. When the electronic device plays an audio signal through the sound output device, it obtains the first working current of the voice coil and compares the first working current with multiple current detection thresholds to determine the current range to which the first working current belongs. The playback state of the sound output device is the same as the playback state when the multiple current detection thresholds are obtained. The electronic device can determine the first blocked hole degree corresponding to the sound output device according to the current range to which the first working current belongs. Since different degrees of blocked holes in the sound output device will have different effects on the working current of the voice coil, in the embodiments of the present application, the electronic device can obtain the first working current of the voice coil during the playback of the audio signal by the sound output device, determine the current range to which the first working current belongs by comparing with multiple current detection thresholds, and determine the first blocked hole degree corresponding to the sound output device according to the current range to which the first working current belongs. By using multiple current detection thresholds to refine the division of the current range to which the working current of the voice coil belongs, the blocked hole degree corresponding to the sound output device can be accurately determined, and the blocked hole degree of the sound output device can be determined in a timely and accurate manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0033] Figure 1 FIG. is an application scenario diagram of a method for identifying blocked holes provided by an embodiment of the present application;

[0034] Figure 2 FIG. is a schematic structural diagram of a sound cavity in an electronic device provided by an embodiment of the present application;

[0035] Figure 3 FIG. is a schematic structural diagram of a sound output device provided by an embodiment of the present application;

[0036] Figure 4 FIG. is a flowchart of a method for identifying blocked holes provided by an embodiment of the present application;

[0037] Figure 5 FIG. is a flowchart of obtaining the first working current of the voice coil provided by an embodiment of the present application;

[0038] Figure 6 FIG. is a flowchart of determining the first blocked hole degree corresponding to the sound output device provided by an embodiment of the present application;

[0039] Figure 7Flowchart for determining the type of blocked hole of the sound output device provided by the embodiments of the present application;

[0040] Figure 8 Structural block diagram of a blocked hole identification device provided by the embodiments of the present application;

[0041] Figure 9 Structural block diagram of an electronic device provided by the embodiments of the present application. Detailed implementation manners

[0042] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0043] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes unlisted steps or units, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0044] In addition, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or similar expressions thereof refer to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, and c can represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0045] Figure 1 Application scenario diagram of a blocked hole identification method provided by the embodiments of the present application. As Figure 1 shown, the blocked hole identification method can be applied to an electronic device. The electronic device 100 includes a sound output device provided inside the electronic device 100 ( Figure 1(not shown in the figure), in the area of the housing of the electronic device 100 corresponding to the sound output device, a plurality of sound outlet holes 101 are provided. When the electronic device 100 plays audio, the sound output device can output an audio signal and transmit it to the user's ear through the sound outlet holes 101.

[0046] The electronic device 100 may include, but is not limited to, terminal devices with a sound output device such as a computer, a mobile phone, and a headset. The sound output device may include, but is not limited to, a speaker, a receiver, etc.

[0047] It should be noted that the electronic device 100 and the sound output device may be an integrated structure, that is, the sound output device is arranged inside the electronic device 100; the electronic device 100 and the sound output device may also be a split structure, that is, the sound output device is arranged outside the electronic device 100, and a communication connection is established between the electronic device 100 and the sound output device. For example, the sound output device may be a headset, and a communication connection such as Bluetooth may be established between the electronic device 100 and the headset, and the electronic device 100 plays audio through the headset.

[0048] In some embodiments, a sound cavity is provided inside the housing of the electronic device 100, the sound output device is arranged in the sound cavity, and a plurality of sound outlet holes 101 are provided in the area of the housing of the electronic device 100 corresponding to the sound cavity. Figure 2 It is a schematic structural diagram of a sound cavity in the electronic device provided by the embodiment of the present application. As Figure 2 shown, the sound cavity 103 is arranged inside the housing 104 of the electronic device 100, and the housing 104 fixes the sound output device 102 inside the sound cavity 103. The sound cavity 103 includes a first cavity 201 and a second cavity 202. The outlet of the first cavity 201 on the housing 104 is the sound outlet hole 101. Figure 2 The dotted line with an arrow shown is the propagation direction of the sound emitted by the sound output device 102.

[0049] Figure 3 It is a schematic structural diagram of a sound output device provided by the embodiment of the present application. As Figure 3 shown, the sound output device 102 includes a first magnet 301, a diaphragm 302, a voice coil 303, a second magnet 304, and a bracket 305. The voice coil 303 is connected to the diaphragm 302. Among them, the first magnet 301 is a magnet with a magnetic south pole (i.e., S pole), the second magnet 304 is a magnet with a magnetic north pole (i.e., N pole), the first magnet 301 can be arranged around the second magnet 304, and a uniform and stable magnetic field with a certain size and direction is formed between the first magnet 301 and the second magnet 304. The magnetic field direction Y is the direction from the second magnet 304 to the first magnet 301. Exemplarily, the sound output device may include two first magnets 301, and a voice coil 303 may be provided between each first magnet 301 and the second magnet 304.

[0050] The bracket 305 is a support structure for the sound output device 102, and is used to fix and support the dual magnetic circuit structure composed of the first magnet 301 and the second magnet 304. When an audio signal current passes through the voice coil 303, the charged voice coil 303 will interact with the magnetic field to generate a force, and the direction of this force is perpendicular to the direction of the audio signal current and the direction Y of the magnetic field. Thus, under this force, the voice coil 303 drives the diaphragm 302 directly connected to the voice coil 303 to vibrate along the direction Z or the opposite direction of the direction Z, and the vibration of the air caused by the diaphragm 302 emits sound, enabling the sound output device 102 to convert an electrical signal into a sound wave.

[0051] In some embodiments, the audio signal current may include a current for driving the vibration of the voice coil 303 generated by an audio signal that an electronic device needs to play according to requirements. The magnitude and direction of the audio signal current are determined by the frequency and amplitude of the audio signal played by the sound output device 102. During the process that the audio signal current passes through the voice coil 303 and the voice coil 303 drives the diaphragm 302 to vibrate, since the voice coil 303 moves in the magnetic field formed by the first magnet 301 and the second magnet 304, the free charges inside the voice coil 303 will be affected by the Lorentz force and move directionally, thereby generating an induced electromotive force, that is, a motional electromotive force, at both ends of the voice coil 303, and further generating a motional current. The direction of the motional current is opposite to the direction of the audio signal current. Therefore, the working current of the voice coil 303 is the superposition of the audio signal current and the motional current. Further, the working current of the voice coil 303 may be the difference between the audio signal current and the motional current.

[0052] During the use of the electronic device 100, the sound outlet 101 is very likely to be blocked by an object (such as the user's finger, etc.), or the sound output device 102 generates static electricity during its own operation to adsorb dust, resulting in the blockage of the sound outlet 101. When the sound outlet 101 is blocked, since the sound wave cannot normally propagate out of the sound outlet 101, the sound wave will be reflected back at the blocked part of the sound outlet 101, thereby increasing the elasticity of the first cavity 201 and the second cavity 202, and causing the vibration amplitude of the diaphragm 302 of the sound output device 102 to become smaller. For example, when the power of the voice coil is 1 W (watt), if the sound outlet 101 is not blocked, the vibration amplitude of the diaphragm 302 is 0.5 mm (millimeter), and after the sound outlet 101 is blocked, the vibration amplitude of the diaphragm 302 decreases to 0.2 mm or 0.3 mm.

[0053] When the vibration amplitude of the diaphragm 302 becomes smaller, the displacement and speed of the voice coil 303 connected to the diaphragm 302 will also become smaller, and further, the motional current formed by the voice coil 303 in the magnetic field will also be further reduced, resulting in an increase in the working current of the voice coil 303.

[0054] Furthermore, the more the blocked part of the sound outlet hole 101 is, the more sound waves will be reflected, resulting in smaller displacements of the diaphragm 302 and the voice coil 303, and a smaller motional current of the voice coil 303. When the audio signal current remains unchanged, the smaller the motional current of the voice coil 303 is, the larger the working current of the voice coil 303 is. Therefore, the working current of the voice coil 303 is associated with the degree of blocked holes of the sound output device 102. Therefore, when the degree of blocked holes of the sound output device 102 is unknown and the amplitude and frequency of the audio signal played by the sound output device 102 remain unchanged, the degree of blocked holes can be determined in reverse through the working current of the voice coil 303. The larger the working current of the voice coil 303 is, the more the blocked part of the sound outlet hole 101 is, that is, the working current of the voice coil 303 is positively correlated with the degree of blocked holes.

[0055] In the embodiment of the present application, the electronic device can obtain the first working current of the voice coil during the process of the sound output device playing the audio signal, determine the current range to which the first working current belongs by comparing it with multiple current detection thresholds, and determine the first degree of blocked holes corresponding to the sound output device according to the current range to which the first working current belongs. By refining and dividing the current range to which the working current of the voice coil belongs through multiple current detection thresholds, the degree of blocked holes corresponding to the sound output device can be accurately determined, and the degree of blocked holes of the sound output device can be determined in a timely and accurate manner.

[0056] As Figure 4 shown, in one embodiment, a method for identifying blocked holes is provided, which can be applied to the above-mentioned electronic device. The method may include the following steps:

[0057] Step 402, obtain the first working current of the voice coil when the sound output device plays the audio signal.

[0058] The audio signal played by the sound output device may include audio signals corresponding to multimedia contents such as music and video, as well as audio signals dedicated to blocked hole identification.

[0059] The first working current may refer to the total current output by the voice coil during actual operation. The first working current may be the difference between the audio signal current flowing through the voice coil and the motional current generated by the voice coil.

[0060] When the sound output device plays the audio signal, the electronic device will generate an audio signal current for driving the voice coil to vibrate according to the audio signal to be played, and the voice coil will generate a motional current in the opposite direction to the audio signal current during vibration, so that the audio signal current and the motional current are superimposed to form the first working current of the voice coil.

[0061] In some embodiments, the sound output device further includes a current sampling circuit; the sound output device can collect the first working current of the voice coil through the current sampling circuit when playing an audio signal.

[0062] In some other embodiments, the electronic device can also detect the audio signal current flowing through the voice coil and the motional current generated by the voice coil, calculate the difference between the audio signal current and the motional current, and obtain the first working current of the voice coil. Optionally, the sound output device further includes a diaphragm vibration amplitude detection circuit, which can be used to collect the vibration amplitude of the diaphragm. The electronic device can obtain the vibration amplitude of the diaphragm collected by the diaphragm displacement detection circuit and calculate the vibration speed of the voice coil based on the vibration amplitude of the diaphragm; the electronic device can determine the motional electromotive force of the voice coil according to the vibration speed of the voice coil, the length of the voice coil, and the magnetic induction intensity of the magnetic field where the voice coil is located.

[0063] The electronic device can determine the impedance of the voice coil according to the resistance of the voice coil, the inductive reactance of the voice coil, and the frequency of the audio signal current. Herein, the impedance can refer to the general term for the obstruction to the current in the circuit, and the impedance can include the resistance and the inductive reactance. The resistance can refer to the obstruction of the voice coil to the current in the circuit, and the inductive reactance can refer to the obstruction of the inductance of the voice coil to the current in the circuit.

[0064] Optionally, since the voice coil usually does not contain a capacitive element, but at high-frequency audio signals, the distributed capacitance of the voice coil will have a certain impact on the first working current. The distributed capacitance can include the capacitance formed between each turn of the coil inside the voice coil due to electric field coupling. Therefore, the impedance can also include the capacitive reactance, and the capacitive reactance can refer to the obstruction to the current caused by a certain capacitive effect exhibited by the voice coil in the circuit at high-frequency audio signals.

[0065] The electronic device can determine the audio signal current according to the audio signal to be played, determine the motional current according to the motional electromotive force and the impedance of the voice coil, and then determine the first working current of the voice coil according to the difference between the audio signal current and the motional current.

[0066] Exemplarily, the electronic device can determine that the vibration amplitude of the diaphragm, that is, the displacement of the voice coil, is:

[0067]

[0068] where A represents the maximum displacement of the vibration, that is, the maximum distance that the voice coil deviates from the equilibrium position, ω represents the angular frequency, represents the starting position of the vibration, t represents time, and s represents the displacement of the voice coil;

[0069] The electronic device can determine the vibration speed v of the voice coil according to the differential of the displacement of the voice coil:

[0070]

[0071] After determining the vibration speed v of the voice coil, the electronic device can determine the first working current of the voice coil as:

[0072]

[0073] Wherein, B represents the magnetic induction intensity of the magnetic field where the voice coil is located, l represents the length of the voice coil, -Blv represents the motional electromotive force of the voice coil, R represents the resistance of the voice coil, L represents the inductive reactance of the voice coil, represents the impedance of the voice coil, represents the motional current of the voice coil, I a represents the audio signal current, I w represents the first working current.

[0074] Step 404: Compare the first working current with multiple current detection thresholds to determine the current range to which the first working current belongs.

[0075] The playback state of the sound output device can be the same as the playback state when multiple current detection thresholds are obtained through testing, so that the first working current can be compared with the multiple current detection thresholds obtained through testing of the sound output device in the same playback state. Among them, the playback state can include one or more of the audio signal played by the sound output device, the volume, and the playback mode, etc.

[0076] Step 406: Determine the first degree of hole blockage corresponding to the sound output device according to the current range to which the first working current belongs.

[0077] The degree of hole blockage can include the hole blockage ratio, and the hole blockage ratio can indicate the ratio of the sound outlet being blocked. The hole blockage ratio can be a value greater than 0 and less than 1. 0 means the sound outlet is not blocked, and 1 means the sound outlet is completely blocked. Optionally, when the housing of the electronic device has multiple sound outlets, the hole blockage ratio can refer to the ratio between the blocked area of each sound outlet and the total area of each sound outlet.

[0078] Multiple current detection thresholds can be preset, and the multiple current detection thresholds are obtained through testing in advance according to multiple sound output devices with a preset degree of hole blockage under a target audio signal. Optionally, the target audio signal can include an audio signal with an amplitude greater than an amplitude threshold, and / or an audio signal with a volume greater than a volume threshold, etc.

[0079] Further, the current detection threshold may be the maximum operating current of the voice coil in a sound output device with a preset degree of blocked holes under a target audio signal. The maximum operating current of the voice coil may refer to the maximum value of the operating current of the voice coil when the sound output device plays the target audio signal under the condition that the degree of blocked holes of the sound output device is the preset degree of blocked holes. It should be noted that the maximum operating current of the voice coil is essentially the maximum current demand when the sound output device plays a normal audio signal under the condition that the degree of blocked holes of the sound output device is the preset degree of blocked holes, rather than necessarily the limit value of the current that the voice coil can withstand in extreme cases.

[0080] Exemplarily, when the amplitude and frequency of the audio signal played by the sound output device remain unchanged, the maximum operating current of the voice coil measured when the sound output device has no blocked holes is taken as T1, the maximum operating current measured when the blocked hole ratio of the sound output device is one-fourth is taken as T2, the maximum operating current measured when the blocked hole ratio of the sound output device is one-half is taken as T3, the maximum operating current measured when the blocked hole ratio of the sound output device is three-fourths is taken as T4, and the maximum operating current measured when the sound output device is completely blocked is taken as T5.

[0081] Multiple current detection thresholds may form multiple current ranges, and each current range may include at least one current detection threshold. Further, the multiple current detection thresholds may be arranged in ascending or descending order, and multiple current ranges may be determined according to the arranged multiple current detection thresholds.

[0082] Taking the arrangement of multiple current detection thresholds in ascending order as an example, the first current range may be less than or equal to the first current detection threshold, the second current range may be greater than the first current detection threshold and less than or equal to the second current detection threshold, and so on. The last current range may be greater than the last current detection threshold.

[0083] Exemplarily, the electronic device may form six current ranges according to the multiple current detection thresholds T1, T2, T3, T4, and T5 arranged in ascending order, which are the current range (0, T1], the current range (T1, T2], the current range (T2, T3], the current range (T3, T4], the current range (T4, T5], and the current range (T5, +∞).

[0084] Multiple current ranges may each have a corresponding preset degree of blocked holes. Optionally, taking the first current range as an example, the first current range is any current range, the first current range corresponds to the first preset degree of blocked holes, and the upper limit value corresponding to the first current range may be the maximum operating current of the voice coil measured under the condition that the degree of blocked holes of the sound output device is the first preset degree of blocked holes.

[0085] Exemplarily, the preset hole-blocking degree corresponding to the current range (0, T1] is no hole-blocking, the preset hole-blocking degree corresponding to the current range (T1, T2] is one-fourth, the preset hole-blocking degree corresponding to the current range (T2, T3] is one-half, the preset hole-blocking degree corresponding to the current range (T3, T4] is three-fourths, the preset hole-blocking degree corresponding to the current range (T4, T5] is complete hole-blocking, and the preset hole-blocking degree corresponding to the current range (T5, +∞) is also complete hole-blocking.

[0086] The electronic device can compare the first working current of the audio with multiple current detection thresholds, determine the current range to which the first working current belongs, and determine the preset hole-blocking degree corresponding to the current range to which the first working current belongs as the first hole-blocking degree.

[0087] Exemplarily, the multiple current detection thresholds include T1, T2, T3, T4, and T5 in ascending order. Therefore, when the electronic device determines that the first working current I w is greater than T2 and less than or equal to T3, it determines that the current range to which the first working current I w belongs is (T2, T3], and determines the first hole-blocking degree as one-half according to the preset hole-blocking degree corresponding to the current range (T2, T3] being one-half.

[0088] In some embodiments, after the electronic device determines the first hole-blocking degree corresponding to the sound output device, it sends a first hole-blocking warning prompt corresponding to the first hole-blocking degree. The first hole-blocking warning prompt can be used to remind the user that there may be a blockage problem with the sound outlet holes of the current electronic device.

[0089] The first hole-blocking warning prompt may include displaying a hole-blocking prompt on the display screen of the electronic device and / or emitting a warning sound through the sound output device.

[0090] After determining that the sound outlet holes are blocked, the electronic device can send a first hole-blocking warning prompt corresponding to the first hole-blocking degree to remind the user to clean the sound outlet holes in time, so as to avoid the long-term blockage affecting the user's listening experience and damaging the sound output device.

[0091] In the embodiments of the present application, the electronic device can, during the process of the sound output device playing an audio signal, obtain the first working current of the voice coil in real time, quickly determine the range to which the first working current belongs by comparing it with multiple current detection thresholds, and determine the first hole-blocking degree corresponding to the sound output device according to the current range to which the first working current belongs. The refined division of the current range to which the first working current belongs by multiple current detection thresholds makes the electronic device's judgment of the hole-blocking degree more accurate, and can timely and accurately determine the hole-blocking degree of the sound output device.

[0092] In some embodiments, the sound output device further includes a current sampling circuit, and the electronic device can determine the first working current based on multiple sampled currents collected by the current sampling circuit. Figure 5 The flowchart of obtaining the first working current of the voice coil provided by the embodiment of the present application is as follows. Figure 5 As shown, the steps of obtaining the first working current of the voice coil may include the following steps:

[0093] Step 501, collect multiple sampled currents corresponding to the voice coil within the first time period through the current sampling circuit.

[0094] The first time period can be set as needed according to the actual situation. For example, the first time period can be 1 second, 3 seconds, 5 seconds, etc. Further, the first time period can also be the playing duration of the audio signal, such as the playing duration of a song or the playing duration of a video.

[0095] It can be understood that during the process of the sound output device playing the audio signal, the first working current of the voice coil may fluctuate due to various factors. For example, when the electronic device plays a video, the occasional high-frequency screeching sound will cause the first working current of the voice coil to rise rapidly. At this time, the first working current of the voice coil may instantaneously exceed the set current detection threshold, thereby changing the current range of the first working current, causing the electronic device to misjudge the degree of blockage of the sound output device, affecting the normal operation of the electronic device and the user experience. Therefore, in order to ensure the accuracy and reliability of the detection of the degree of blockage of the sound output device, it is necessary to collect multiple sampled currents within the first time period through the current sampling circuit, and then analyze these sampled currents to more accurately evaluate the working state of the voice coil, avoiding misjudgment of the degree of blockage due to instantaneous current fluctuations.

[0096] Step 503, take the average value of the multiple sampled currents within the first time period as the first working current.

[0097] The electronic device can calculate the average value of the multiple sampled currents within the first time period as the first working current.

[0098] In some embodiments, after the electronic device collects multiple sampled currents corresponding to the voice coil within the first time period through the current sampling circuit, it can calculate the change range of the multiple sampled currents within the first time period, and select different calculation methods according to different change ranges to determine the first working current.

[0099] The change range may include the range, variance, standard deviation, etc. of the multiple sampled currents.

[0100] Exemplarily, the electronic device can collect n sampled currents corresponding to the voice coil within the first time period through the current sampling circuit, and determine that the change range of the sampled currents within the first time period is:

[0101]

[0102] Among them, I i is the i-th sampled current collected by the current sampling circuit in the first time period, is the average value of n sampled currents collected in the first time period, n is the total number of sampled currents collected in the first time period, and σ is the variation range of the sampled currents in the first time period.

[0103] When the multiple sampled currents corresponding in the first time period remain unchanged, that is, the variation range is 0, the electronic device can select one of the sampled currents as the first working current; when the variation range of the multiple sampled currents corresponding in the first time period is less than or equal to a preset variation range threshold, the electronic device can use the average value of the multiple sampled currents as the first working current; when the variation range of the multiple sampled currents corresponding in the first time period is greater than the preset variation range threshold, the electronic device can use one of the median, weighted average, truncated average, etc. of the multiple sampled currents as the first working current. Among them, the variation range threshold can be set as needed according to the actual situation. The weighted average can refer to the average value calculated after assigning weights according to the importance or reliability of each sampled current, and the truncated average can refer to the average value calculated after removing a certain proportion of the maximum and minimum values from the multiple sampled currents.

[0104] When the variation range of the multiple sampled currents corresponding in the first time period is less than or equal to the preset variation range threshold, it indicates that the audio signal played by the sound output device has relatively stable amplitude and frequency characteristics in the first time period. Therefore, the average value of the multiple sampled currents can be used as the first working current; while when the variation range is greater than the preset variation range threshold, the numerical distribution of the multiple sampled currents may be relatively dispersed, and there may be outliers or severe fluctuations. Therefore, the average value of the multiple sampled currents may be affected by these outliers. Therefore, one of the median, weighted average, truncated average, etc. needs to be used as the first working current to avoid the interference of abnormal sampled currents and more accurately reflect the main trend of the multiple sampled currents in the first time period.

[0105] In the embodiment of the present application, the electronic device determines the first working current of the voice coil according to the average value of the multiple sampled currents corresponding to the voice coil in the first time period, which can avoid misjudgment of the clogging degree due to instantaneous fluctuations of the sampled currents and improve the accuracy of identifying the clogging degree.

[0106] In some embodiments, the first operating current of the voice coil is related not only to the first time period but also to the volume of the audio signal played by the sound output device. The electronic device may compare the first operating current with a plurality of current detection thresholds corresponding to the target volume when the sound output device plays the audio signal according to the target volume, and determine the current range to which the first operating current belongs; when the target volumes are different, the plurality of current detection thresholds corresponding to the target volumes are different.

[0107] The target volume refers to the volume of the audio signal currently output by the sound output device. The target volume is usually set by the user according to the audio signal played by the sound output device or automatically set by the electronic device according to the audio signal played by the sound output device.

[0108] It can be understood that since the volume setting of the electronic device determines the amplification degree of the audio signal, which directly affects the magnitude of the audio signal current, the operating current of the voice coil will also be affected by the target volume. When the amplitude and frequency of the audio signal played by the sound output device remain unchanged, the larger the target volume, the larger the audio signal current, and the larger the first operating current and the maximum operating current of the voice coil. Therefore, when the target volumes of the sound output device are different, the plurality of current detection thresholds corresponding to the target volumes are also different.

[0109] In the embodiments of the present application, when the electronic device determines the degree of blockage of the sound output device through the first operating current of the voice coil, it also considers the influence of the volume of the sound output device, which can not only more comprehensively reflect the actual operating state of the voice coil, but also improve the accuracy of identifying the degree of blockage of the sound output device at different volumes, thereby facilitating the adoption of more targeted measures to protect the sound output device and optimize the user experience.

[0110] In some embodiments, the electronic device may not perform blockage identification when the target volume is low, but only perform blockage identification when the target volume is high. When the sound output device plays an audio signal, obtain the target volume of the sound output device, and when the target volume is greater than or equal to the first volume detection threshold, obtain the first operating current of the voice coil, and when the target volume is less than the first volume detection threshold, do not obtain the first operating current of the voice coil.

[0111] The volume detection threshold may refer to the volume size determined based on multiple aspects such as historical average volume, user auditory comfort, and protection requirements of the sound output device. The historical average volume may refer to the average volume when the sound output device historically played audio signals. The user auditory comfort may include the volume range in which the audio can be comfortably listened to in common scenarios. The protection requirement may refer to the volume limit required to prevent the sound output device from being damaged due to overcurrent or overheating.

[0112] When the sound output device plays an audio signal, even if the sound outlet is blocked, since the target volume of the sound output device is small, the first working current of the voice coil is relatively small, and the intensity of the sound output by the sound output device remains basically unchanged or changes very little. That is, the sound output device is not greatly affected by the degree of blocked holes, and has little impact on the overall power consumption and heat dissipation problems of the electronic device. Therefore, there is no need to perform blocked hole identification, which can avoid the computing resources occupied during blocked hole identification and further reduce the power consumption of the electronic device.

[0113] On the contrary, when the target volume of the sound output device is large, blocking the sound outlet will cause the first working current of the voice coil to be relatively large, and the overall power consumption and temperature rise problems of the electronic device are obvious. Therefore, it is necessary to obtain the first working current of the voice coil in a timely manner for blocked hole identification to avoid affecting the user's listening experience and damaging the sound output device due to long-term blocking of the holes at high volume.

[0114] In some other embodiments, when the sound output device plays an audio signal at any target volume, the electronic device can obtain the first working current of the voice coil and determine the degree of blocked holes. That is, even if the sound output device is not greatly affected by the degree of blocked holes, the electronic device also obtains the first working current of the voice coil for blocked hole identification, so that regardless of the high or low target volume of the electronic device, it can determine the corresponding first degree of blocked holes of the sound output device according to the current range to which the first working current of the voice coil belongs, thereby more comprehensively and timely identifying the blocked hole problem of the sound output device, effectively protecting the sound output device, and improving the user experience.

[0115] In some embodiments, after the electronic device obtains the current range to which the first working current belongs, it can determine the first degree of blocked holes according to the first working current and the current range to which it belongs. Figure 6 This is a flowchart for determining the corresponding first degree of blocked holes of the sound output device provided by the embodiments of the present application. As Figure 6 shown, the step of determining the corresponding first degree of blocked holes of the sound output device according to the current range to which the first working current belongs may include the following steps:

[0116] Step 602, compare the first working current with multiple current detection thresholds.

[0117] Step 604, if the first working current is not greater than the first current detection threshold, then determine that the corresponding first degree of blocked holes of the sound output device is no blocked hole.

[0118] The first current detection threshold may refer to the maximum working current obtained by testing when the sound output device is completely unblocked.

[0119] The electronic device can compare the first operating current with the first current detection threshold, and determine that the sound output device is not blocked when it is determined that the first operating current is not greater than the first current detection threshold.

[0120] Exemplarily, when the maximum operating current of the voice coil is obtained as T1 during the test when the sound output device is completely unblocked, the electronic device can compare the first operating current I w with T1, and when I w ≤T1, determine that the sound output device is not blocked. On the contrary, when I w >T1, determine that the sound output device is blocked.

[0121] Step 606: When the first operating current is greater than the second current detection threshold, it is determined that the first blockage degree corresponding to the sound output device is complete blockage.

[0122] The second current detection threshold is greater than the first current detection threshold, and the second current detection threshold may include the maximum operating current obtained during the test when the blockage ratio of the sound output device is three - quarters.

[0123] The electronic device can compare the first operating current with the second current detection threshold, and determine that the first blockage degree corresponding to the sound output device is complete blockage when it is determined that the first operating current is greater than the second current detection threshold.

[0124] Exemplarily, the electronic device can use the maximum operating current T4 obtained during the test when the blockage ratio of the sound output device is three - quarters as the second current detection threshold, and compare the first operating current I w with T4. When I w >T4, determine that the sound output device is completely blocked.

[0125] Step 608: When the first operating current is greater than the first current detection threshold and less than or equal to the second current detection threshold, the blockage ratio is determined according to the current range to which the first operating current belongs, and the first blockage degree corresponding to the sound output device is obtained.

[0126] In some embodiments, the electronic device can pre - establish a mapping relationship table according to the current ranges corresponding to multiple different preset blockage ratios, and when it is determined that the first operating current is greater than the first current detection threshold and less than or equal to the second current detection threshold, query the mapping relationship table according to the current range to which the first operating current belongs, so as to determine the first blockage degree corresponding to the sound output device.

[0127] In some embodiments, the electronic device may establish a relationship model between the clogging degree and the first operating current according to the current range to which the first operating current belongs and the corresponding clogging ratio of the current range. When determining the first operating current based on the average value of multiple sampled currents corresponding to the first time period, the electronic device may respectively determine new clogging ratios according to the maximum and minimum values of the multiple sampled currents within the first time period through the relationship model, so as to obtain the new first clogging degree of the sound output device.

[0128] During the process of obtaining the current detection threshold, only a few sound output devices with specific clogging degrees are tested to obtain the current detection threshold, and it is impossible to test sound output devices with each clogging ratio. For example, usually only sound output devices with clogging ratios of one - quarter (0.25), one - half (0.5), three - quarters (0.75), and complete clogging (1) are tested, and sound output devices with clogging ratios of 0.01, 0.02, ……, 0.99, and 1 are not tested. Therefore, the obtained first clogging degree of the sound output device is usually relatively vague. For example, when the current range to which the first operating current belongs is (T2, T3], only the first clogging degree of the sound output device can be determined to be one - half, and a more specific clogging ratio cannot be further determined.

[0129] In addition, the maximum or minimum value of the actual fluctuation of the first operating current within the first time period may not exactly reach the pre - determined current detection threshold. Therefore, the current range of the first operating current can be re - determined according to the maximum and minimum values of the multiple sampled currents within the first time period to more accurately define the upper and lower limits of the change of the first operating current, thereby avoiding a rough judgment of the clogging degree due to too large an interval of the current detection threshold and facilitating obtaining a more accurate first clogging degree.

[0130] Exemplarily, the electronic device may establish the following relationship model according to the minimum value S1 and the maximum value S2 of the current range to which the first operating current belongs:

[0131]

[0132] where I m represents the maximum value of the multiple sampled currents within the first time period, that is, the maximum sampled current, d1 represents the clogging ratio of the sound output device with the maximum operating current of S1, d2 represents the clogging ratio of the sound output device with the maximum operating current of S2, and Prop represents the clogging ratio corresponding to the maximum value of the multiple sampled currents within the first time period.

[0133] The electronic device determines, according to Equation (5), the clogging ratio Prop corresponding to the maximum sampled current I mThe blockage ratio Prop can be determined, and thus the first blockage degree d2 corresponding to the current range to which the first working current belongs can be reduced to Prop, so that the new first blockage degree of the sound output device can be determined as the blockage ratio Prop.

[0134] Optionally, the more sound output devices with different blockage ratios are tested to obtain the current detection threshold, the lower the acquisition efficiency of the current detection threshold. Moreover, the fewer the number of current detection thresholds and the larger the interval between two adjacent current detection thresholds, the less accurate the blockage ratio determined according to Equation (5) may be. Therefore, in order to ensure a balance between the accuracy of the blockage ratio and the acquisition efficiency of the current detection threshold, an appropriate number of current detection thresholds can be obtained. For example, 20 sound output devices with blockage ratios of 0.05, 0.10, 0.15,..., 0.95, and 1 can be tested to obtain the corresponding current detection thresholds.

[0135] By reducing the first blockage degree corresponding to the current range to which the first working current belongs to the first blockage degree corresponding to the maximum value of multiple sampled currents within the first time period according to the maximum value of multiple sampled currents within the first time period, the electronic device can improve the accuracy of detecting the blockage degree and avoid a rough judgment of the blockage degree due to a fixed current detection threshold.

[0136] In the embodiments of the present application, the first blockage degree corresponding to the sound output device is determined according to the current range to which the first working current belongs, the first current detection threshold corresponding to no blockage, and the first current detection threshold corresponding to complete blockage. By directly determining the first blockage degree through the working current of the voice coil, not only can the complex calculations required by the traditional method be avoided, improving the efficiency and accuracy of blockage identification, but also the blockage identification can be performed in real time during the operation of the electronic device to determine the accurate blockage ratio, which is conducive to taking timely countermeasures to extend the service life of the sound output device and improve the user experience.

[0137] In some embodiments, the electronic device may adjust the target volume after determining the first blockage degree.

[0138] The electronic device may increase the target volume when the target volume is less than the second volume detection threshold; the electronic device may decrease the target volume when the target volume is greater than or equal to the second volume detection threshold.

[0139] The second volume detection threshold can be set as needed based on the actual situation. For example, when the volume is between 0 and 100, the second volume detection threshold can be set to 50.

[0140] When the target volume is less than the second volume detection threshold, since the target volume is relatively low, the first working current of the voice coil is relatively small, and the current detection thresholds at the target volume are also relatively close to each other. The current range constructed based on two adjacent current detection thresholds is also small. When the first working current fluctuates greatly, it affects the accuracy of judging the degree of blockage. Therefore, it is necessary to amplify the target volume to further assist in judging the degree of blockage of the sound output device. On the contrary, when the target volume is greater than the volume detection threshold, since the volume is large, the sound output device often operates with a large working current at a corresponding degree of blockage, which will increase the power consumption, is not conducive to heat dissipation, and is likely to damage the sound output device. Therefore, after determining the first degree of blockage, it is necessary to reduce the size of the target volume to prevent damage to the sound output device.

[0141] Optionally, the electronic device can automatically adjust the target volume to a preset volume. For example, when the second volume detection threshold is 50 and the target volume is 75, the electronic device can automatically adjust the volume to the preset 65. Or, the electronic device can calculate the adjustment amount of the target volume in real time according to the first degree of blockage and the size of the first working current, to avoid the adjusted volume still being a large volume. For example, when the target volume is 90, the electronic device can calculate the adjustment amount of the target volume to be 15 according to the first degree of blockage and the size of the first working current, and adjust the target volume to 75. When the target volume is 80, the electronic device can calculate the adjustment amount of the target volume to be 5 according to the first degree of blockage and the size of the first working current, and adjust the target volume to 75.

[0142] In some embodiments, when the electronic device determines that the first degree of blockage is blockage, it can adjust the target volume after an interval of a second time period, and the duration of the second time period is different from that of the first time period.

[0143] In the embodiments of the present application, by adjusting the target volume after determining the first degree of blockage, it is possible to avoid affecting the accuracy of judging the degree of blockage when the target volume is small, and reduce the increase in power consumption of the sound output device caused when the target volume is large, thereby preventing the sound output device from being damaged due to long-term blockage at a large volume.

[0144] In some embodiments, the electronic device can detect the second degree of blockage after determining the first degree of blockage, and determine the type of blockage of the sound output device through the first degree of blockage and the second degree of blockage, so as to facilitate the electronic device to take more targeted measures to deal with blockage. Figure 7 The flowchart for determining the type of blockage of the sound output device provided by the embodiments of the present application. As Figure 7As shown, after determining the first degree of hole blockage corresponding to the sound output device according to the current range to which the first working current belongs, the following steps are further included:

[0145] Step 701, obtain the second working current of the voice coil.

[0146] The second working current may refer to the working current after the working period corresponding to the first working current. The second working current may be the same as or different from the first working current, and no specific limitation is made here. When the second working current is different from the first working current, that is, when the playing state of the sound output device changes, the second working current may include the working current of the voice coil when the sound output device plays an audio signal different from the audio signal corresponding to the first working current.

[0147] In some embodiments, after the electronic device adjusts the target volume, it may obtain the second working current of the voice coil at the adjusted target volume. During the process of avoiding the target volume being too large or too small by adjusting the target volume, and at the same time determining the second degree of hole blockage according to the second working current of the voice coil at the adjusted target volume, it can not only avoid the problems caused by the target volume being too large or too small, but also re-determine the degree of hole blockage by adjusting the working current, improving the accuracy of judging the degree of hole blockage.

[0148] In some embodiments, when the electronic device takes the average value of multiple sampled currents within the first time period as the first working current, the electronic device may take the average value of multiple sampled currents within the third time period as the second working current. The third time period has the same duration as the first time period, and the third time period is located after the first time period in chronological order.

[0149] Step 703, compare the second working current with multiple current detection thresholds to determine the current range to which the second working current belongs.

[0150] The multiple current detection thresholds corresponding to the target volume before adjustment are different from the multiple current detection thresholds corresponding to the target volume after adjustment. When the target volume before adjustment is less than the target volume after adjustment, the multiple current detection thresholds corresponding to the target volume before adjustment are less than the multiple current detection thresholds corresponding to the target volume after adjustment; when the target volume before adjustment is greater than or equal to the target volume after adjustment, the multiple current detection thresholds corresponding to the target volume before adjustment are greater than or equal to the multiple current detection thresholds corresponding to the target volume after adjustment.

[0151] Step 705, determine the second degree of hole blockage corresponding to the sound output device according to the current range to which the second working current belongs.

[0152] Step 707, determine the type of hole blockage corresponding to the sound output device according to the first degree of hole blockage and the second degree of hole blockage.

[0153] The types of blocked sound holes include human - caused blocked sound holes and non - human - caused blocked sound holes. Among them, human - caused blocked sound holes may refer to the user actively placing a blocking object such as a user's finger physically at the sound outlet during the use of the electronic device, causing the sound outlet to be blocked. Non - human - caused blocked sound holes may refer to the sound output device generating static electricity during its own operation to adsorb dust, etc. to form a blocking object, thus causing the sound outlet to be blocked.

[0154] It can be understood that the blocking object of non - human - caused blocked sound holes is relatively stable and will not easily change the degree of blocked sound holes due to external interference. However, human - caused blocked sound holes usually have uncertainty. The blocking object under human - caused blocked sound holes often changes with time, the user's actions, or environmental changes. Especially after the electronic device issues the first blocked - sound - hole warning prompt, the user usually actively moves the blocking object to avoid affecting the listening experience, thus changing the degree of blocked sound holes of the sound output device.

[0155] Therefore, when it is uncertain whether the first degree of blocked sound holes is a temporary blockage caused by human factors, in order to more accurately judge the type of blocked sound holes and the corresponding degree of blocked sound holes, the second degree of blocked sound holes can be combined to avoid misjudgment. If the first degree of blocked sound holes is consistent with the second degree of blocked sound holes, it indicates that the blocking object at the sound outlet has not changed due to user intervention and is more likely to be a non - human - caused blocked sound hole. On the contrary, if the first degree of blocked sound holes is inconsistent with the second degree of blocked sound holes, it indicates that the blocking object at the sound outlet has been intervened by the user and is more likely to be a human - caused blocked sound hole.

[0156] In some embodiments, when the electronic device determines that the second degree of blocked sound holes is blocked and the first degree of blocked sound holes is the same as the second degree of blocked sound holes, it determines that the type of blocked sound hole corresponding to the sound output device is a non - human - caused blocked sound hole. When the electronic device determines that the second degree of blocked sound holes is blocked and the first degree of blocked sound holes is different from the second degree of blocked sound holes, it determines that the type of blocked sound hole corresponding to the sound output device includes human - caused blocked sound holes and non - human - caused blocked sound holes. When the electronic device determines that the second degree of blocked sound holes is unblocked, it determines that the type of blocked sound hole corresponding to the sound output device is a human - caused blocked sound hole.

[0157] When the first degree of blocked sound holes is the same as the second degree of blocked sound holes, it indicates that the blocking object at the sound outlet has not been intervened by the user. Therefore, it can be determined that the type of blocked sound hole corresponding to the sound output device at this time is a non - human - caused blocked sound hole. When the second degree of blocked sound holes is blocked and the first degree of blocked sound holes is different from the second degree of blocked sound holes, it indicates that the blocking object at the sound outlet has been intervened by the user, but the blocking object has only changed to a certain extent. Therefore, it can only be determined that the type of blocked sound hole corresponding to the sound output device includes human - caused blocked sound holes and non - human - caused blocked sound holes, and it cannot be determined whether it is completely caused by human - caused blocked sound holes. When the second degree of blocked sound holes is unblocked, it indicates that the sound output device is actually not blocked, and the first degree of blocked sound holes is only a misjudgment caused by a blockage caused by human factors.

[0158] Based on the first hole-blocking degree and the second hole-blocking degree, the electronic device determines the corresponding hole-blocking type of the sound output device, which can not only clarify the cause of the hole-blocking of the sound output device, avoid misjudgment of the hole-blocking degree caused by blockage due to human factors, but also facilitate the electronic device to take more targeted measures to protect the sound output device and optimize the user experience.

[0159] In some embodiments, after determining the corresponding hole-blocking type of the sound output device according to the first hole-blocking degree and the second hole-blocking degree, the electronic device may send a corresponding second hole-blocking warning prompt according to the hole-blocking type. For example, when it is determined that the corresponding hole-blocking type of the sound output device is human-caused hole-blocking, the electronic device may send a second hole-blocking warning prompt to remind the user to promptly move away the object blocking the sound outlet hole, such as the user's finger, etc. When it is determined that the corresponding hole-blocking type of the sound output device is non-human-caused hole-blocking, the electronic device may send a second hole-blocking warning prompt to remind the user to promptly clean the sound outlet hole. Further, when it is determined that the corresponding hole-blocking type of the sound output device is non-human-caused hole-blocking, the electronic device may also automatically start cleaning the sound outlet hole through a preset cleaning device, such as a micro air pump or an air flow injection device, etc.

[0160] In the embodiments of the present application, by obtaining the second working current of the voice coil to re-determine the second hole-blocking degree of the sound output device, and determining the hole-blocking type of the sound output device according to the first hole-blocking degree and the second hole-blocking degree, it is not only possible to avoid misjudgment caused by human-caused hole-blocking, improve the accuracy of identifying the hole-blocking degree, but also facilitate the electronic device to take measures for different hole-blocking types to protect the sound output device and improve the user experience.

[0161] Based on the hole-blocking identification method provided in the above embodiments, Figure 8 This is a structural block diagram of a hole-blocking identification device provided in the embodiments of the present application. As Figure 8 shown, in one embodiment, a hole-blocking identification device 800 is provided. The hole-blocking identification device 800 can be applied to an electronic device. The electronic device includes a sound output device, and the sound output device includes a voice coil. The hole-blocking identification device 800 includes a current acquisition module 801, a range determination module 802, and a hole-blocking detection module 803.

[0162] The current acquisition module 801 is configured to obtain the first working current of the voice coil when the sound output device plays an audio signal.

[0163] The range determination module 802 is configured to compare the first working current with multiple current detection thresholds to determine the current range to which the first working current belongs; the playing state of the sound output device is the same as the playing state when multiple current detection thresholds are obtained through testing.

[0164] The hole-blocking detection module 803 is configured to determine the first hole-blocking degree corresponding to the sound output device according to the current range to which the first working current belongs.

[0165] In some embodiments, the hole-blocking detection module 803 is further configured to, when the first working current is not greater than the first current detection threshold, determine that the first hole-blocking degree corresponding to the sound output device is no hole-blocking.

[0166] The hole-blocking detection module 803 is further configured to, when the first working current is greater than the second current detection threshold, determine that the first hole-blocking degree corresponding to the sound output device is complete hole-blocking; the second current detection threshold is greater than the first current detection threshold.

[0167] The hole-blocking detection module 803 is further configured to, when the first working current is greater than the first current detection threshold and less than or equal to the second current detection threshold, determine the hole-blocking ratio according to the current range to which the first working current belongs, and obtain the first hole-blocking degree corresponding to the sound output device; the hole-blocking ratio is a value greater than 0 and less than 1.

[0168] In some embodiments, the current acquisition module 801 is further configured to collect a plurality of sampled currents corresponding to the voice coil within the first time period through a current sampling circuit.

[0169] The current acquisition module 801 is further configured to use the average value of the plurality of sampled currents within the first time period as the first working current.

[0170] In some embodiments, the range determination module 802 is further configured to, when the sound output device plays an audio signal according to the target volume, compare the first working current with a plurality of current detection thresholds corresponding to the target volume, and determine the current range to which the first working current belongs; when the target volumes are different, the plurality of current detection thresholds corresponding to the target volumes are different.

[0171] In some embodiments, the current acquisition module 801 is further configured to acquire the second working current of the voice coil.

[0172] The range determination module 802 is further configured to compare the second working current with a plurality of current detection thresholds, and determine the current range to which the second working current belongs.

[0173] The hole-blocking detection module 803 is further configured to determine the second hole-blocking degree corresponding to the sound output device according to the current range to which the second working current belongs;

[0174] The hole-blocking detection module 803 is further configured to determine the hole-blocking type corresponding to the sound output device according to the first hole-blocking degree and the second hole-blocking degree, and the hole-blocking type includes artificial hole-blocking and non-artificial hole-blocking.

[0175] Figure 9The block diagram of an electronic device provided by an embodiment of this application. As Figure 9 shown, the electronic device 900 may include a memory 902 and a processor 901. A computer program is stored in the memory 902. When the computer program is executed by the processor 901, the electronic device 900 is enabled to implement the hole-blocking identification method described in the above embodiments.

[0176] The processor 901 may include one or more processing cores. The processor 901 connects various parts within the entire electronic device using various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory, and by invoking data stored in the memory, the processor 901 performs various functions of the electronic device and processes data. Optionally, the processor 901 may be implemented in at least one hardware form of digital signal processing, field programmable gate array, or programmable logic array. The processor 901 may integrate a combination of one or several of a central processing unit (CPU for short), a graphics processing unit (GPU for short), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 901 and may be implemented separately through a communication chip.

[0177] The memory 902 may include a random access memory and may also include a read-only memory. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function, instructions for implementing the above method embodiments, etc. The data storage area may also store data created during the use of the electronic device.

[0178] An embodiment of this application discloses a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, the processor is enabled to implement the hole-blocking identification method described in the above embodiments.

[0179] An embodiment of this application discloses a computer program product that includes a computer program. When the computer program is executable by a processor, the processor is enabled to implement the hole-blocking identification method described in the above embodiments.

[0180] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a ROM, etc.

[0181] The above are only specific examples of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for identifying plugged holes, characterized in that, Applied to an electronic device, the electronic device includes a sound output device, and the sound output device includes a voice coil. The method includes: When the sound output device plays an audio signal, obtaining a first operating current of the voice coil; Comparing the first operating current with a plurality of current detection thresholds to determine the current range to which the first operating current belongs; the playback state of the sound output device is the same as the playback state when the plurality of current detection thresholds are obtained through testing; Determining a first degree of blockage corresponding to the sound output device according to the current range to which the first operating current belongs.

2. The method according to claim 1, wherein When the amplitude and frequency of the audio signal played by the sound output device remain unchanged, the first operating current is positively correlated with the first degree of blockage.

3. The method according to claim 1, characterized in that, The determining the first degree of blockage corresponding to the sound output device according to the current range to which the first operating current belongs includes: When the first operating current is not greater than a first current detection threshold, determining that the first degree of blockage corresponding to the sound output device is unblocked; When the first operating current is greater than a second current detection threshold, determining that the first degree of blockage corresponding to the sound output device is completely blocked; the second current detection threshold is greater than the first current detection threshold; When the first operating current is greater than the first current detection threshold and less than or equal to the second current detection threshold, determining a blockage ratio according to the current range to which the first operating current belongs to obtain the first degree of blockage corresponding to the sound output device; the blockage ratio is a value greater than 0 and less than 1.

4. The method according to any one of claims 1-3, characterized in that The plurality of current detection thresholds are obtained through testing of sound output devices with a plurality of different preset degrees of blockage; The current ranges respectively corresponding to the plurality of different preset degrees of blockage are determined based on the maximum operating current of the voice coil when the sound output devices with respective preset degrees of blockage play an audio signal.

5. The method according to claim 1, wherein The sound output device further includes a current sampling circuit; the obtaining the first operating current of the voice coil includes: Collecting a plurality of sampling currents corresponding to the voice coil within a first time period through the current sampling circuit; Taking the average value of the plurality of sampling currents within the first time period as the first operating current.

6. The method according to claim 1, wherein Comparing the first operating current with a plurality of current detection thresholds to determine the current range to which the first operating current belongs includes: When the sound output device plays an audio signal at a target volume, comparing the first operating current with the plurality of current detection thresholds corresponding to the target volume to determine the current range to which the first operating current belongs; when the target volumes are different, the plurality of current detection thresholds corresponding to the target volumes are different.

7. The method according to claim 6, wherein After determining the first degree of blockage corresponding to the sound output device according to the current range to which the first operating current belongs, the method further includes: Obtaining a second operating current of the voice coil; Comparing the second operating current with the plurality of current detection thresholds to determine the current range to which the second operating current belongs; Determine a second degree of hole blockage corresponding to the sound output device according to the current range to which the second working current belongs; Determine a type of hole blockage corresponding to the sound output device according to the first degree of hole blockage and the second degree of hole blockage, where the type of hole blockage includes artificial hole blockage and non-artificial hole blockage.

8. A hole plugging identification device, characterized in that, Applied to an electronic device, the electronic device includes a sound output device, the sound output device includes a voice coil, and the hole blockage identification device includes: A current acquisition module, configured to acquire a first working current of the voice coil when the sound output device plays an audio signal; A range determination module, configured to compare the first working current with a plurality of current detection thresholds to determine the current range to which the first working current belongs; the playback state of the sound output device is the same as the playback state when the plurality of current detection thresholds are obtained through testing; A hole blockage detection module, configured to determine a first degree of hole blockage corresponding to the sound output device according to the current range to which the first working current belongs.

9. An electronic device, characterized in that, Comprising a memory and a processor, a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the hole blockage identification method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the processor implements the hole blockage identification method according to any one of claims 1-7.