CN113038327B - Detection method, detection device, charging box and storage medium - Google Patents
Detection method, detection device, charging box and storage medium Download PDFInfo
- Publication number
- CN113038327B CN113038327B CN202110276961.5A CN202110276961A CN113038327B CN 113038327 B CN113038327 B CN 113038327B CN 202110276961 A CN202110276961 A CN 202110276961A CN 113038327 B CN113038327 B CN 113038327B
- Authority
- CN
- China
- Prior art keywords
- audio
- earphone
- box
- charging box
- target audio
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1025—Accumulators or arrangements for charging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R29/00—Monitoring arrangements; Testing arrangements
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Otolaryngology (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
Abstract
The application discloses a detection method, a detection device, a charging box and a storage medium, and belongs to the technical field of communication. The method mainly comprises the steps that under the condition that a cover body and a box body of a charging box are relatively opened, first target audio is obtained; when the similarity between the first target audio and the preset audio meets a first preset threshold, determining that the earphone corresponding to the charging box is placed in the box body; charging the earphone through a charging box; the preset audio is pre-stored audio of the earphone placed in the box body, and the first target audio is sound of the earphone contacting with the charging box. The method provided in the embodiment of the application can solve the problems that the connection between the earphone and the charging box is not accurate and the charging box cannot effectively charge the earphone at present.
Description
Technical Field
The application belongs to the technical field of communication, and particularly relates to a detection method, a detection device, a charging box and a storage medium.
Background
Along with the development of wearable equipment, more and more wearable equipment such as intelligent bracelet, wireless earphone etc. receive user's liking. Among them, the wireless earphone is popular with users because of its small size and portability.
At present, the duration of a wireless earphone is shorter, and a matched charging box is needed to charge the wireless earphone. The charging box can charge the wireless earphone after detecting that the wireless earphone is plugged into the box, namely the wireless earphone and the charging box are connected. The wireless earphone and the charging box can be connected through a pin, and the connection between the wireless earphone and the charging box can be detected through a sensor. However, the former can lead to detection accuracy to reduce because of pin oxidation, and the latter can lead to the false detection because the distance that wireless earphone did not go into the box apart from the box roof that charges is little apart from the distance of earphone main part distance sensor when wireless earphone went into the box, reduces the accuracy that detects wireless earphone and the box that charges and be connected.
Disclosure of Invention
The embodiment of the application aims to provide a detection method, a detection device, a charging box and a storage medium, and can solve the problems that at present, the connection between a headset and the charging box is inaccurate, and the charging box cannot effectively charge the headset.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a detection method, where the method may include:
acquiring a first target audio under the condition that a cover body and a box body of a charging box are relatively opened;
when the similarity of the first target audio and the preset audio meets a first preset threshold, determining that the earphones corresponding to the charging box are placed in the box body;
charging the earphone through a charging box; the preset audio is the audio stored in advance and placed in the box body of the earphone, and the first target audio is the sound of the earphone contacting with the charging box.
In a second aspect, an embodiment of the present application provides a detection apparatus, which may include:
the acquisition module is used for acquiring a first target audio under the condition that the cover body and the box body of the charging box are relatively opened;
the processing module is used for determining that the earphones corresponding to the charging box are placed in the box body when the similarity of the first target audio and the preset audio meets a first preset threshold;
charging the earphone through a charging box; the preset audio is pre-stored audio of the earphone placed in the box body, and the first target audio is sound of the earphone contacting with the charging box.
In a third aspect, embodiments of the present application provide a charging box, which includes a radio receiver, a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the detection method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the detection method according to the first aspect are implemented.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the detection method shown in the first aspect.
In the embodiment of the application, the acquired first target audio and the pre-stored preset audio which is placed in the box body are matched, when the similarity between the first target audio and the pre-stored preset audio meets a first preset threshold value, the earphone corresponding to the charging box is determined to be placed in the box body, and the earphone is charged through the charging box. Thus, on the premise that the pins are not exposed and the sensor is not added in the earphone, whether the earphone is placed in the charging box or not is detected by using sound waves and the earphone is charged. From this, effectively reduce the possibility of false detection, improve the accuracy that detects the earphone and charge the box and be connected, guarantee to charge the box and charge for its earphone that corresponds fast.
Drawings
Fig. 1 is a schematic diagram of a detection architecture according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a charging box according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a detection method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a style a of a headset according to an embodiment of the present application;
fig. 5 is a schematic view illustrating a manner in which an earphone a is placed in a charging box according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a time domain waveform of an earphone a placed in a charging box according to an embodiment of the present application;
fig. 7 is a schematic diagram of a type B of a headset according to an embodiment of the present application;
fig. 8 is a schematic view illustrating a manner in which an earphone B is placed in a charging box according to an embodiment of the present disclosure;
fig. 9 is a schematic time domain waveform diagram of an earphone B placed in a charging box according to an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating a comparison of time domain waveforms provided by an embodiment of the present application;
fig. 11 is a schematic structural diagram of a detection apparatus according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a charging box according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
At present, along with wearable equipment's development, more and more wearing formula equipment is accepted by vast consumer like intelligent bracelet, earphone, wherein, wireless earphone is because of its small and exquisite convenience, is in the favor. The wireless earphone needs a matched charging box to charge the wireless earphone due to the small size and short endurance time. The charging box needs to detect that the wireless earphone enters the box, namely, the wireless earphone and the charging box are connected, and then the charging circuit is started to charge the wireless earphone. Here, detect wireless earphone and go into the box at the box that charges, the box that charges can be automatic and wireless earphone connection, acquires the electric quantity of wireless earphone, if the electric quantity is 100%, then can not charge, if the electric quantity is less than 100%, will charge it.
Here, the manner of detecting that the wireless headset is inserted into the charging box includes: in the first mode, the wireless earphone is detected to enter the charging box through the exposed pin between the wireless earphone and the charging box. The number of the exposed pins is generally 2 or 3, if the number of the exposed pins comprises two, one of the pins is used as a communication pin, and the other pin is used as a charging pin; if the exposed pins include three pins, 1 of the three pins is used as a communication pin, and the other 2 pins are used as charging pins. And in the second mode, an infrared sensor, a capacitance sensor, a Hall sensor and the like are additionally arranged in the charging box to detect the connection of the wireless earphone into the box.
However, in the first mode, detection circuits need to be added to the wireless headset and the charging box, and the wireless headset and the charging box both have exposed pins, which may be oxidized to reduce detection accuracy while affecting appearance. Mode two, need increase the sensor simultaneously inside wireless earphone and the box that charges, like this, be unfavorable for the design of the big electric quantity of little volume of wireless earphone promptly, also can be when wireless earphone does not go into the box that charges, because of the distance of sensor distance charging box roof when wireless earphone does not go into the box differs little with the distance of wireless earphone main part distance sensor when going into the box, leads to the false detection, reduces the accuracy that detects wireless earphone and the box that charges and be connected.
Based on this, in order to solve the above problems, an embodiment of the present invention provides a detection method for detecting that a wireless headset is plugged in a case by using sound waves without exposing a pin and without adding a sensor to the wireless headset. When the wireless earphone is placed in the charging box, due to the difference of the structure of the wireless earphone, the structure of the charging box, the mode of placing the wireless earphone in the charging box and the like, specific sound is generated when the wireless earphone is placed in the charging box, and the sound has fixed Time Domain (TD) and Frequency Domain (FD). In this way, the sound of the wireless headset when being put into the box is recorded, and parameters such as TD and FD are extracted and stored in the charging box, for example, in a charging box Micro Control Unit (MCU). When detecting that the lid and the box body of box that charges open relatively, the box that charges begins to acquire the target audio frequency, when detecting that target audio frequency and the TD and the FD of prestoring are unanimous, then confirm to place in the box body with the wireless earphone that the box that charges corresponds to charge the earphone through the box that charges.
From this, effectively reduce the possibility of false detection, improve the accuracy that detects wireless earphone and the box that charges and be connected, guarantee to charge the box and charge for its wireless earphone that corresponds fast. In addition, more battery space is reserved for the design of small space and large electric quantity of the wireless earphone, meanwhile, the wireless earphone does not need to be limited to be electrified during detection, the wireless earphone does not need to be communicated with a charging box, and the portability of the design of the wireless earphone is guaranteed to the maximum extent.
Based on this, the following describes in detail the detection method provided by the embodiment of the present application through a specific embodiment and an application scenario thereof with reference to fig. 1 to fig. 2.
The embodiment of the present application provides a detection architecture, as shown in fig. 1, the detection architecture may include a charging box and an earphone including a wireless earphone 10, or may have a device configured with the charging box, such as a wearable device like a smart watch. Wherein, the charging box includes lid 101 and box body 102, and the charging box can be used for accomodating wireless earphone 10 to it charges to be less than 100% at its electric quantity.
The charging box and the wireless headset 10 described above will be described below.
As shown in fig. 2, the present embodiment provides a schematic diagram of a circuit structure in a charging box, as shown in fig. 2, wherein the charging box 200 includes, but is not limited to, the following components: a Universal Serial Bus (USB) 20, an Overvoltage protection circuit (OVP) 21, a Power Management Unit (PMU) 22, a battery 23, a Low dropout regulator (LDO) 24, a micro control unit MCU25, a Light-emitting diode (LED) 26, and a radio 27 such as a microphone (microphone). The universal serial bus 20 is used for standardizing the connection and communication between the charging box and external equipment such as a charger; the overvoltage protection circuit 21 is used for protecting a subsequent circuit from being damaged by load shedding or instantaneous high voltage; the power management unit 22 is a microcontroller that controls the power functions of the digital platform; the battery 23 may charge the wireless headset 10 corresponding to the charging box; the micro control unit 25 is configured to store audio of the wireless headset 10 placed in the box body, or store audio of the wireless headset 10 placed in the box body and audio of the cover 101 and the box body 102 that are relatively closed, and detect whether a similarity between the acquired first target audio and the stored preset audio satisfies a first preset threshold, or detect whether a similarity between the acquired first target audio and the stored preset audio satisfies a first preset threshold, and detect whether a similarity between the acquired second target audio and the stored preset audio satisfies a second preset threshold. Under the condition that the similarity of the first target audio and the preset audio is detected to meet a first preset threshold value, the wireless earphone 10 corresponding to the charging box is determined to be placed in the box body 102 and connected with the wireless earphone 10, or under the condition that the similarity of the first target audio and the preset audio is detected to meet the first preset threshold value and the similarity of the second target audio and the preset audio is detected to meet a second preset threshold value, the cover body 101 and the box body 102 are determined to be relatively closed, and the wireless earphone 10 is placed in the charging box and connected with the wireless earphone 10. When the wireless earphone 10 is determined to be connected, the power management unit 22 is controlled to detect the electric quantity and charge the wireless earphone 10 through the battery 23; the led 26 may be used as a warning light to notify the user of the power information; the radio 27 is configured to pick up and transmit sound, and convert the sound signal into an electrical signal, and in this embodiment, the radio 27 may obtain an audio frequency of the wireless headset 10 placed in the case 102 and an audio frequency of the case 102 and the cover 101, and obtain a first target audio frequency (or a first target audio frequency and a second target audio frequency) when it is detected that the cover 101 and the case 102 of the charging case are relatively opened, so that the micro control unit 25 detects whether a similarity between the first target audio frequency and a preset audio frequency satisfies a first preset threshold (or detects whether a similarity between the first target audio frequency and the preset audio frequency satisfies a first preset threshold and detects whether a similarity between the second target audio frequency and the preset audio frequency satisfies a second preset threshold). The Wireless headset 10 may be a Wireless bluetooth headset (TWS).
Based on the above detection architecture, the detection method provided in the embodiment of the present application may obtain the preset audio frequency of the wireless earphone 10 placed in the box body 102 through the radio 27, so that when the micro control unit 25 detects that the cover 101 and the box body 102 of the charging box are relatively opened, or detects that the wireless earphone 10 is not included in the charging box and the cover 101 and the box body 102 of the charging box are relatively opened, the radio 27 obtains the first target audio frequency; when the similarity between the first target audio and the preset audio meets the first preset threshold, the mcu25 determines that the wireless headset 10 corresponding to the charging box is placed in the box 102 and connected to the wireless headset 10. Or, the first target audio and the second target audio are acquired through the radio receiver 27; when the similarity between the first target audio and the preset audio meets the first preset threshold and the similarity between the second target audio and the preset audio meets the second preset threshold, the micro control unit 25 determines that the cover 101 and the case 102 are relatively closed, and the wireless headset 10 is placed in the charging case and connected to the wireless headset 10. Then, the mcu25 detects the power of the wireless headset 10 through the power management unit 22, and charges the wireless headset 10 through the battery 23 when the power of the wireless headset 10 is less than or equal to a predetermined power, such as 100%.
Therefore, on the premise that the pin is not exposed and the sensor is not added in the wireless earphone, whether the wireless earphone is placed in the charging box and connected with the charging box is detected by using the sound wave. From this, effectively reduce the possibility of false detection, improve the accuracy that detects wireless earphone and the box that charges and be connected to guarantee to charge the box and charge for its wireless earphone that corresponds fast.
It should be noted that, based on the detection architecture, an application scenario of the detection method provided in the embodiment of the present application is described. The detection method provided by the embodiment of the application can be applied to the scene that the charging box detects the wireless earphone entering the box. The method can also be applied to a scene that the electronic equipment is connected with the charger, for example, when the situation that the electric quantity of the electronic equipment is smaller than or equal to the preset electric quantity is detected, the first target audio is obtained, and when the similarity of the first target audio and the preset audio meets a first preset threshold value, the electronic equipment is determined to be connected with the charger, so that the electronic equipment can start the charging circuit to charge the electronic equipment. Based on this, the embodiment of the present application may also be used in any scenario of detecting connection of two devices, and is not limited herein.
According to the application scenario, the following describes in detail the detection method provided by the embodiment of the present application with reference to fig. 3.
Fig. 3 is a flowchart of a detection method according to an embodiment of the present application.
As shown in fig. 3, the detection method may be applied to a charging box, and specifically may include the following steps based on this:
first, in step 310, a first target audio is obtained when the cover and the case of the charging case are relatively opened. Then, in step 320, when the similarity between the first target audio and the preset audio meets a first preset threshold, determining that the earphone corresponding to the charging box is placed in the box body; and step 330, charging the earphone through the charging box, wherein the preset audio is the audio stored in advance and the earphone is placed on the box body, and the first target audio is the sound of the earphone contacting the charging box.
The above steps are described in detail below, specifically as follows:
referring first to step 310, in one or more alternative embodiments, a first target audio is obtained upon detecting that the charging pouch does not include an earphone therein and that the cover and the case of the charging pouch are relatively open.
Here, in order to ensure that the amount of power of the charging box is reduced, the first target audio may be acquired when it is detected that the earphone is not included in the charging box and the cover and the box of the charging box are relatively opened, so as to eliminate a problem that the radio is opened to increase the amount of power consumption of the charging box when the earphone is included in the charging box.
It should be noted that, if there are two earphones, the charging box includes only one earphone, and the radio is also turned on to obtain the first target audio when the cover and the box of the charging box are relatively turned on, so as to ensure the accuracy of detecting the connection between the other earphone and the charging box.
Then, referring to step 320, in one or more alternative embodiments, before step 320, the detection method may further include:
under the condition that the earphones comprise a first earphone and a second earphone, acquiring a first audio frequency of the first earphone placed in the box body and a second audio frequency of the second earphone placed in the box body;
and determining the first audio and the second audio as preset audio.
Based on this, the step 320 may specifically include:
extracting a first target audio signal in a first target audio, wherein the first target audio signal comprises audio signals except for a noise signal;
matching the first target audio signal with a first audio signal of a first audio and a second audio signal of a second audio to obtain a matching result;
when the matching result represents that the similarity between the first target audio signal and the first audio signal and the similarity between the first target audio signal and the second audio signal are greater than or equal to a first preset threshold value, the earphone corresponding to the charging box is placed in the box body.
For example, a first target audio signal other than a noise signal in the first target audio is extracted, which in one possible embodiment comprises two, namely a first sub-target audio signal and a second sub-target audio signal. Here, the time domain waveform 31 and the frequency domain waveform 32 corresponding to the first sub-target audio signal, and the time domain waveform 33 and the frequency domain waveform 34 corresponding to the second sub-target audio signal are determined.
Matching a time domain waveform 35 and a frequency domain waveform 36 corresponding to a pre-stored first audio signal and a time domain waveform 37 and a frequency domain waveform 38 corresponding to a pre-stored second audio signal with the time domain waveform 31, the frequency domain waveform 32, the time domain waveform 33 and the frequency domain waveform 34, and determining that the earphone corresponding to the charging box is placed in the box body under the condition that the time domain waveform 31 and the frequency domain waveform 32 are matched with the time domain waveform 35 and the frequency domain waveform 36 and the time domain waveform 33 and the frequency domain waveform 34 are matched with the time domain waveform 37 and the frequency domain waveform 38.
Here, it should be noted that the first audio signal may be an audio signal with a first earphone placed in the box body, or an audio signal with a second earphone placed in the box body. Therefore, if the time domain waveform and the frequency domain waveform of the first target audio signal are matched with the preset audio signal, the earphone corresponding to the charging box can be placed in the box body.
In addition, in one or more optional embodiments, the step 320 may specifically include:
under the condition that the preset audio frequency further comprises a third audio frequency with a cover body and a box body relatively closed, a second target audio frequency is obtained, and the second target audio frequency is a sound with the cover body and the box body relatively closed; and under the condition that the similarity between the second target audio signal of the second target audio and the third audio signal of the third audio is greater than or equal to a second preset threshold value, determining that the cover body and the box body are relatively closed, and placing the earphone in the charging box.
For example, similar to the earphone being placed in the charging box, there may be a unique time domain waveform and a unique frequency domain waveform corresponding to the audio signal, and similarly, there may also be a special time domain waveform and a special frequency domain waveform when the cover and the box of the charging box are relatively closed. In order to promote the accuracy that detects the earphone and charge the box and be connected, can combine the earphone to put into the process that charges the box and carry out the cubic and detect that an earphone is put into the detection, another earphone is put into the lid that detects and charge the box and the relative closed detection of box body, its concrete testing process as follows:
and respectively acquiring the audio frequency put into one earphone, the audio frequency put into the other earphone and a second target audio frequency, namely the audio frequency of the charging box with the cover body and the box body relatively closed.
Then, the time domain waveform 31 and the frequency domain waveform 32 corresponding to the first sub-target audio signal of the audio put in one earphone, the time domain waveform 33 and the frequency domain waveform 34 corresponding to the second sub-target audio signal of the audio put in another earphone, the time domain waveform 39 and the frequency domain waveform 40 corresponding to the second target audio, the time domain waveform 35 and the frequency domain waveform 36 corresponding to the first audio signal of the preset audio, the time domain waveform 37 and the frequency domain waveform 38 corresponding to the pre-stored second audio signal, and the time domain waveform 41 and the frequency domain waveform 42 corresponding to the third audio signal of the pre-stored third audio are set.
And if the similarity between the three groups of corresponding first target audios and second target audios and the time domain waveforms and the frequency domain waveforms of the three groups of prestored audios meets the preset threshold values, namely a first preset threshold value and a second preset threshold value, determining that the earphones corresponding to the charging box are placed in the charging box.
It should be noted that the interval between the acquisition of the first target audio and the acquisition of the second target audio is less than or equal to the preset time period, that is, it is ensured that the one-time earphone is placed in the charging box, thereby avoiding detection errors. In addition, the detection method in the embodiment of the application does not limit the sequence of the detected audio and the acquired audio, that is, the first target audio may be acquired first and then the first target audio and the preset audio may be matched, and then the second target audio may be acquired and matched with the preset audio. Or, the first target audio and the second target audio are acquired within a preset time period, and the first target audio and the second target audio are matched with the preset audio at the same time, so that the sequence is not limited.
In addition, the detection method provided by the embodiment of the application can preset different audio frequencies according to different types of earphones, different types of charging boxes and positions of the earphones placed in the charging boxes, and is exemplified by fig. 4 to fig. 10.
The headset a corresponding to the headset style 1 shown in fig. 4 is placed vertically in the charging box as shown in fig. 5. Then, fig. 6 is a schematic diagram of a time domain waveform of the earphone a placed in the charging box. In addition, as for the earphone B corresponding to the earphone style 2 shown in fig. 7, the earphone B shown in fig. 8 is placed horizontally in the charging box. Then, fig. 9 is a schematic diagram of a time domain waveform of the earphone B placed in the charging box. Comparing the waveform of the time domain waveform diagram shown in fig. 6 with the waveform of the time domain waveform diagram shown in fig. 9, as shown in fig. 10, the upper curve is a curve corresponding to the earphone a, the lower curve is a curve corresponding to the earphone B, the frame 101 is a frequency band 2-3 KHz corresponding to the maximum frequency domain value of the earphone a, and the frame 102 is a frequency band 7-9 KHz corresponding to the maximum frequency domain value of the earphone B.
As can be seen from the above examples, when the earphone is placed in the charging box, there are specific frequency domain waveforms, time domain waveforms and durations, and different earphones have different waveforms and durations due to differences in the structure of the earphone, the structure of the charging box, the placement manner, and the like. Through the detection of specific waveforms, whether the earphone corresponding to the charging box is placed in the box body or not can be determined, and the earphone is connected with the earphone.
Furthermore, in one or more alternative embodiments, after step 320, the detection method may further include: detecting the electric quantity of the earphone;
and when the electric quantity of the earphone is less than or equal to the preset electric quantity, charging the earphone.
Then, step 330 is involved, the power of the headset is detected, and when the power is less than or equal to the preset power, such as 100%, the headset is charged through the charging box.
In summary, in the embodiment of the application, the acquired first target audio and the pre-stored preset audio of the box body in which the earphones are placed are matched, and when the similarity between the first target audio and the pre-stored audio meets the first preset threshold, the earphones corresponding to the charging box are determined to be placed in the box body. Therefore, on the premise that the pins are not exposed and the sensor is not added in the earphone, whether the earphone is placed in the charging box and connected with the charging box is detected by using sound waves. From this, effectively reduce false detection's possibility, improve the accuracy that detects the earphone and charge the box and be connected to guarantee to charge the box and charge for its earphone that corresponds fast.
In addition, more battery space is reserved for the design of small space and large electric quantity of the earphone, the earphone is not required to be limited to be powered during detection, the earphone and a charging box are not required to be communicated, and the portability of earphone design is guaranteed to the maximum extent.
It should be noted that, in the detection method provided in the embodiment of the present application, the execution subject may be a detection device, or a control module in the detection device for executing the detection method. In the embodiment of the present application, a detection device executing a detection method is taken as an example, and the detection device provided in the embodiment of the present application is described. Based on the same inventive concept, the application also provides a detection device. The details are described with reference to fig. 11.
Fig. 11 is a schematic structural diagram of a detection apparatus according to an embodiment of the present application.
As shown in fig. 11, the detection apparatus 1100 is applied to a charging box, and may specifically include:
the acquisition module 1101 is used for acquiring a first target audio frequency under the condition that a cover body and a box body of the charging box are relatively opened;
the processing module 1102 is configured to determine that the earphone corresponding to the charging box is placed in the box body when the similarity between the first target audio and the preset audio meets a first preset threshold;
a charging module 1103 for charging the earphone through a charging box; the preset audio is pre-stored audio of the earphone placed in the box body, and the first target audio is sound of the earphone contacting with the charging box.
In the embodiment of the application, on the premise that the pins are not exposed and the sensor is not added in the earphone, whether the earphone is placed in the charging box and connected with the charging box is detected by using sound waves. From this, effectively reduce the possibility of false detection, improve the accuracy that detects the earphone and charge the box and be connected, guarantee to charge the box and charge for its earphone that corresponds fast.
The following describes the detection apparatus 1100 in detail, specifically as follows:
in one or more possible embodiments, the obtaining module 1101 is further configured to, in a case where the earphones include a first earphone and a second earphone, obtain a first audio with the first earphone placed on the box and a second audio with the second earphone placed on the box;
the processing module 1102 is further configured to determine the first audio and the second audio as preset audio.
In one or more possible embodiments, the processing module 1102 is specifically configured to extract a first target audio signal in the first target audio, where the first target audio signal includes an audio signal other than the noise signal;
matching the first target audio signal with a first audio signal of a first audio and a second audio signal of a second audio to obtain a matching result;
when the matching result represents that the similarity between the first target audio signal and the first audio signal and the similarity between the first target audio signal and the second audio signal are greater than or equal to a first preset threshold value, the earphone corresponding to the charging box is placed in the box body.
In one or more possible embodiments, the processing module 1102 is specifically configured to, in a case that the preset audio further includes a third audio in which the cover and the box are relatively closed, obtain a second target audio, where the second target audio is a sound in which the cover and the box are relatively closed; and under the condition that the similarity between the second target audio signal of the second target audio and the third audio signal of the third audio is greater than or equal to a second preset threshold value, determining that the cover body and the box body are relatively closed, and placing the earphone in the charging box.
Based on this, in the embodiment of the application, when the time interval between the acquisition of the first target audio and the acquisition of the second target audio is less than or equal to the preset time, the earphone is charged through the charging box.
In one or more possible embodiments, the obtaining module 1101 is specifically configured to obtain the first target audio when it is detected that the earphone is not included in the charging box and the cover and the box of the charging box are relatively opened.
In one or more possible embodiments, the charging module 1103 is used to detect the amount of power of the headset; when the electric quantity of the earphone is smaller than or equal to the preset electric quantity, the earphone is charged through the charging box.
The detection device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a charging box, and the embodiment of the present application is not particularly limited.
The detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The detection apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments in fig. 1 to fig. 10, and is not described here again to avoid repetition.
In the embodiment of the application, the acquired first target audio and the pre-stored preset audio of the box body in which the earphone is placed are matched, and when the similarity between the first target audio and the pre-stored audio meets a first preset threshold, the earphone corresponding to the charging box is determined to be placed in the box body and connected with the earphone, so that the charging box is ensured to rapidly charge the corresponding earphone. Therefore, on the premise that the pins are not exposed and the sensor is not added in the earphone, whether the earphone is placed in the charging box and connected with the charging box is detected by using sound waves.
From this, effectively reduce the possibility of false detection, improve the accuracy that detects the earphone and charge the box and be connected, guarantee to charge the box and charge for its earphone that corresponds fast. In addition, more battery space is reserved for the design of small space and large electric quantity of the earphone, the earphone is not required to be limited to be powered during detection, the earphone and a charging box are not required to be communicated, and the portability of earphone design is guaranteed to the maximum extent.
Optionally, as shown in fig. 12, an embodiment of the present application further provides a charging box 1200, which includes a radio 1201, a processor 1202, and a memory 1203, and a program or an instruction stored in the memory 1203 and executable on the processor 1202, where the program or the instruction is executed by the processor 1202 to implement each process of the detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements the processes of the detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
Wherein the processor is the processor in the charging box in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
In addition, an embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the foregoing detection method embodiment, and the same technical effect can be achieved.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods of the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (12)
1. A detection method is characterized by being applied to a charging box and comprising the following steps:
acquiring a first target audio under the condition that a cover body and a box body of the charging box are relatively opened;
when the similarity between the first target audio and a preset audio meets a first preset threshold, determining that the earphone corresponding to the charging box is placed in the box body;
charging the earphone through the charging box; the preset audio comprises pre-stored audio of the earphone placed on the box body, and the first target audio is sound of the earphone contacting with the charging box.
2. The method of claim 1, wherein the headset comprises a first headset and a second headset; before the determining that the earphone corresponding to the charging box is placed in the box body, the method further includes:
acquiring a first audio frequency of the first earphone placed in the box body and a second audio frequency of the second earphone placed in the box body;
determining the first audio and the second audio as the preset audio.
3. The method of claim 2, wherein when the similarity between the first target audio and a preset audio meets a first preset threshold, determining that the earphone corresponding to the charging box is placed in the box body comprises:
extracting a first target audio signal in the first target audio, wherein the first target audio signal comprises an audio signal except for a noise signal;
matching the first target audio signal with a first audio signal of the first audio and a second audio signal of the second audio respectively to obtain a matching result;
and when the matching result represents that the similarity between the first target audio signal and the first audio signal and the similarity between the first target audio signal and the second audio signal are greater than or equal to a first preset threshold value, determining that the earphone corresponding to the charging box is placed in the box body.
4. The method of claim 1, wherein the predetermined audio further comprises a third audio in which the cover and the case are relatively closed; before the charging of the headset by the charging box, the method further comprises:
acquiring a second target audio, wherein the second target audio is a sound generated when the cover body and the box body are closed relatively;
and under the condition that the similarity between a second target audio signal of the second target audio and a third audio signal of the third audio is greater than or equal to a second preset threshold value, determining that the cover body and the box body are relatively closed, and placing the earphone in the charging box.
5. The method of claim 4, wherein the charging the headset via the charging box comprises:
and under the condition that the time interval for acquiring the first target audio and the second target audio is less than or equal to the preset time, charging the earphone through the charging box.
6. A detection device, characterized in that, be applied to a charging box, includes:
the acquisition module is used for acquiring a first target audio under the condition that a cover body and a box body of the charging box are relatively opened;
the processing module is used for determining that the earphone corresponding to the charging box is placed in the box body when the similarity between the first target audio and a preset audio meets a first preset threshold;
the charging module is used for charging the earphone through the charging box; the preset audio is pre-stored audio of the earphone placed in the box body, and the first target audio is sound of the earphone contacting with the charging box.
7. The apparatus of claim 6, wherein the obtaining module is further configured to, in a case where the earphones comprise a first earphone and a second earphone, obtain a first audio with the first earphone placed on the case and a second audio with the second earphone placed on the case;
the processing module is further configured to determine the first audio and the second audio as the preset audio.
8. The apparatus according to claim 7, wherein the processing module is specifically configured to extract a first target audio signal in the first target audio, the first target audio signal comprising an audio signal other than a noise signal;
matching the first target audio signal with a first audio signal of the first audio and a second audio signal of the second audio respectively to obtain a matching result;
and when the matching result represents that the similarity between the first target audio signal and the first audio signal and the similarity between the first target audio signal and the second audio signal are greater than or equal to a first preset threshold value, determining that the earphone corresponding to the charging box is placed in the box body.
9. The apparatus of claim 6, wherein the predetermined audio further comprises a third audio in which the cover and the case are closed with respect to each other; the acquisition module is further configured to acquire a second target audio, where the second target audio is a sound of a relatively closed cover and the box body;
the processing module is further configured to determine that the cover and the box are relatively closed and the earphone is placed in the charging box when the similarity between the second target audio signal of the second target audio and the third audio signal of the third audio is greater than or equal to a second preset threshold.
10. The apparatus of claim 9, wherein the charging module is further configured to charge the earphone through the charging box if a time interval between the acquisition of the first target audio and the second target audio is less than or equal to a preset time.
11. A charging box, comprising: a radio receiver, a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the detection method according to any one of claims 1 to 5.
12. A computer-readable storage medium, on which a program or instructions are stored, which, when executed by a processor, carry out the steps of the detection method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110276961.5A CN113038327B (en) | 2021-03-15 | 2021-03-15 | Detection method, detection device, charging box and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110276961.5A CN113038327B (en) | 2021-03-15 | 2021-03-15 | Detection method, detection device, charging box and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113038327A CN113038327A (en) | 2021-06-25 |
CN113038327B true CN113038327B (en) | 2022-12-20 |
Family
ID=76470552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110276961.5A Active CN113038327B (en) | 2021-03-15 | 2021-03-15 | Detection method, detection device, charging box and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113038327B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116047613A (en) * | 2021-07-22 | 2023-05-02 | 荣耀终端有限公司 | Earphone in-place detection method and device |
CN115602192B (en) * | 2022-04-06 | 2023-11-14 | 荣耀终端有限公司 | Functional accessory detection system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108810787A (en) * | 2018-05-28 | 2018-11-13 | Oppo广东移动通信有限公司 | Foreign matter detecting method and device based on audio frequency apparatus, terminal |
CN109493870A (en) * | 2018-11-28 | 2019-03-19 | 途客电力科技(天津)有限公司 | Charging pile identity identifying method, device and electronic equipment |
US10349176B1 (en) * | 2018-03-30 | 2019-07-09 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for processing signals, terminal device, and non-transitory computer-readable storage medium |
CN110429677A (en) * | 2019-07-31 | 2019-11-08 | 歌尔股份有限公司 | Charging box and wireless headset charging system |
CN111343534A (en) * | 2020-03-02 | 2020-06-26 | 昆山众赢昌盛贸易有限公司 | Wireless earphone in-ear detection method and wireless earphone |
CN112492449A (en) * | 2019-12-23 | 2021-03-12 | 无锡中感微电子股份有限公司 | Wireless earphone receiver and wireless earphone |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140007892A1 (en) * | 2012-07-03 | 2014-01-09 | Qiuming Liu | Acoustic Control Electronic Cigarette Case and Electronic Cigarette Device |
-
2021
- 2021-03-15 CN CN202110276961.5A patent/CN113038327B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10349176B1 (en) * | 2018-03-30 | 2019-07-09 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for processing signals, terminal device, and non-transitory computer-readable storage medium |
CN108810787A (en) * | 2018-05-28 | 2018-11-13 | Oppo广东移动通信有限公司 | Foreign matter detecting method and device based on audio frequency apparatus, terminal |
CN109493870A (en) * | 2018-11-28 | 2019-03-19 | 途客电力科技(天津)有限公司 | Charging pile identity identifying method, device and electronic equipment |
CN110429677A (en) * | 2019-07-31 | 2019-11-08 | 歌尔股份有限公司 | Charging box and wireless headset charging system |
CN112492449A (en) * | 2019-12-23 | 2021-03-12 | 无锡中感微电子股份有限公司 | Wireless earphone receiver and wireless earphone |
CN111343534A (en) * | 2020-03-02 | 2020-06-26 | 昆山众赢昌盛贸易有限公司 | Wireless earphone in-ear detection method and wireless earphone |
US10939193B1 (en) * | 2020-03-02 | 2021-03-02 | Ifory Limited | In-ear detection method for a wireless earphone and a wireless earphone |
Also Published As
Publication number | Publication date |
---|---|
CN113038327A (en) | 2021-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413134B (en) | Wearing state detection method and related equipment | |
CN113038327B (en) | Detection method, detection device, charging box and storage medium | |
CN106655396B (en) | Charge control method, device and terminal | |
CN108132401A (en) | Charge abnormal detection method, device, storage medium and mobile terminal | |
US9483093B2 (en) | Electronic device and method for controlling a setting of a maximum consumption current | |
US20180260551A1 (en) | Unlocking Method And Mobile Terminal | |
JP6359459B2 (en) | Mobile terminal and charging device and method thereof | |
CN105635387B (en) | A kind of method of controlling antenna and mobile terminal | |
CN110166871B (en) | Earphone charging box, TWS earphone, working state switching method and storage medium | |
EP3826005A1 (en) | Method of providing voice command and electronic device supporting the same | |
CN103871408A (en) | Method and device for voice identification and electronic equipment | |
CN110650400A (en) | Wireless earphone and low-power-consumption method, device and system thereof | |
JP2012205007A (en) | Input/output circuit | |
CN107681727A (en) | The control method and device of electronic equipment | |
CN106532876B (en) | Power supply control method and device and computer equipment | |
CN104461952A (en) | Interface sharing method and terminal | |
CN102665052B (en) | There is the receiving terminal for digital television of charge function and the method to terminal charge thereof | |
CN108054794A (en) | Charging and discharging method and device for intelligent terminal, terminal and storage medium | |
CN105005489B (en) | A kind of the starting method and terminal device of terminal device | |
US9414176B2 (en) | Accessory plug detection | |
CN105809002A (en) | Charging method of user terminal and user terminal | |
CN106026232A (en) | Detecting method and apparatus for USB port type | |
CN107171741B (en) | Radio frequency interference processing method, device, storage medium and terminal | |
CN105490319B (en) | A kind of information processing method and electronic equipment | |
CN204012845U (en) | Have the portable power source that fingerprint is controlled concurrently |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |