CN111131954A - Wireless earphone charging box, earphone in-out box detection method, system and storage medium - Google Patents

Wireless earphone charging box, earphone in-out box detection method, system and storage medium Download PDF

Info

Publication number
CN111131954A
CN111131954A CN201911382330.0A CN201911382330A CN111131954A CN 111131954 A CN111131954 A CN 111131954A CN 201911382330 A CN201911382330 A CN 201911382330A CN 111131954 A CN111131954 A CN 111131954A
Authority
CN
China
Prior art keywords
box
earphone
pressure data
real
pressure
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.)
Pending
Application number
CN201911382330.0A
Other languages
Chinese (zh)
Inventor
李伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201911382330.0A priority Critical patent/CN111131954A/en
Publication of CN111131954A publication Critical patent/CN111131954A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1025Accumulators or arrangements for charging
    • AHUMAN NECESSITIES
    • A45HAND OR TRAVELLING ARTICLES
    • A45CPURSES; LUGGAGE; HAND CARRIED BAGS
    • A45C11/00Receptacles for purposes not provided for in groups A45C1/00-A45C9/00
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • AHUMAN NECESSITIES
    • A45HAND OR TRAVELLING ARTICLES
    • A45CPURSES; LUGGAGE; HAND CARRIED BAGS
    • A45C11/00Receptacles for purposes not provided for in groups A45C1/00-A45C9/00
    • A45C2011/001Receptacles for purposes not provided for in groups A45C1/00-A45C9/00 for portable audio devices, e.g. headphones or MP3-players

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)
  • Telephone Function (AREA)

Abstract

The application discloses a wireless earphone charging box, an earphone in-out box detection method, a system and a storage medium, which are used for acquiring real-time pressure data acquired by a pressure sensor arranged in the wireless earphone charging box; determining the earphone in-out box state based on the real-time pressure data. According to the method for detecting the earphone in-out box, the pressure sensor is installed in the wireless earphone charging box, the state of the earphone in-out box is determined by means of real-time pressure data collected by the pressure sensor, and the pressure sensor cannot interfere with the function of a device of the wireless earphone charging box and has small influence on the power consumption of the wireless earphone charging box, so that the detection of the earphone in-out box can be realized under the condition that the influence on the wireless earphone charging box is small. The application provides an earphone discrepancy box detecting system, equipment and computer readable storage medium has also solved corresponding technical problem.

Description

Wireless earphone charging box, earphone in-out box detection method, system and storage medium
Technical Field
The application relates to the technical field of TWS earphone in-out box detection, in particular to a wireless earphone charging box, an earphone in-out box detection method, a wireless earphone charging box detection system and a wireless earphone in-out box detection storage medium.
Background
In the application process of the wireless earphone, the wireless earphone charging box judges whether the wireless earphone is in the box or not to perform other operations.
At present, the existing earphone in-out box detection method mainly comprises a Hall magnetic attraction method, a wireless earphone charging box and earphone communication method and the like, but a magnetic field generated by the Hall magnetic attraction method can interfere with the functions of components of a TWS earphone and the earphone charging box, the wireless earphone charging box and earphone communication method can increase the power consumption of the wireless earphone charging box and the earphone, and a communication electric contact is easy to oxidize in a long-time use process and cannot accurately judge the in-out box state.
In summary, how to provide a method for detecting an earphone in/out box without interference and with low power consumption is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
In order to solve the technical problems, the application provides a wireless earphone charging box, an earphone in-out box detection method, an earphone in-out box detection system and a computer readable storage medium.
In order to achieve the above purpose, the present application provides the following technical solutions:
a method for detecting the entrance and exit of an earphone box comprises the following steps:
acquiring real-time pressure data acquired by a pressure sensor arranged in a wireless earphone charging box;
determining an earphone in-out box state based on the real-time pressure data.
Preferably, the determining of the state of the earphone in and out of the box based on the real-time pressure data comprises:
calculating the absolute value of the difference between the real-time pressure data and the pressure base value;
judging whether the absolute value is larger than a preset threshold value, if so, judging that the earphone is in the box, and if not, judging that the earphone is out of the box;
determining the state of the earphone entering and exiting the box based on the judgment result that the earphone is in the box or outside the box;
and the pressure base value is a pressure value acquired by the pressure sensor when the wireless earphone charging box is empty.
Preferably, the judging whether the absolute value is greater than a preset threshold value, if so, determining that the earphone is in the box, and if not, determining that the earphone is outside the box, including:
judging whether the absolute value is larger than the preset threshold value or not;
if the absolute value is larger than the preset threshold, judging whether the real-time pressure data is in a preset pressure value range; if the real-time pressure data is within the preset pressure value range, the earphone is judged to be in the box; if the real-time pressure data is not within the preset pressure value range, the earphone is judged to be outside the box;
if the absolute value is less than or equal to the preset threshold value, the earphone is judged to be out of the box;
and the preset pressure value range represents the pressure value range collected by the pressure sensor after the earphone is placed in the box.
Preferably, before the determining whether the absolute value is greater than a preset threshold, the method further includes:
acquiring a preset number of historical pressure data representing that earphones are put into a box;
and determining the preset pressure value range based on the historical pressure data.
Preferably, the determining the preset pressure value range based on the historical pressure data includes:
deleting the maximum value of the first quantity and the minimum value of the second quantity in the historical pressure data to obtain target historical pressure data;
and determining the preset pressure value range based on the target historical pressure data.
Preferably, the determining of the state of the earphone in and out of the box based on the real-time pressure data comprises:
acquiring historical real-time pressure data acquired by the pressure sensor at the last moment of the current moment;
determining the earphone in-out box state based on the historical real-time pressure data and the real-time pressure data.
A headset access case detection system comprising:
the first acquisition module is used for acquiring real-time pressure data acquired by a pressure sensor arranged in the wireless earphone charging box;
and the first determination module is used for determining the state of the earphone in and out of the box based on the real-time pressure data.
A wireless headset charging box, comprising:
the pressure sensor is used for acquiring real-time pressure data between an object positioned in the wireless earphone charging box and the pressure sensor;
and the processor is connected with the pressure sensor and is used for determining the state of the earphone in and out of the box based on the real-time pressure data.
Preferably, the pressure sensor is further configured to:
calculating the absolute value of the difference between the real-time pressure data and the pressure base value; judging whether the absolute value is larger than a preset threshold value, if so, sending an interrupt signal to the processor, and if not, forbidding sending the interrupt signal to the processor;
the processor determines an earpiece access case status based on the real-time pressure data, including:
and after receiving the interrupt signal, the processor determines the state of the earphone entering and exiting the box based on the real-time pressure data and the preset pressure value range.
Preferably, the pressure sensor is connected with the processor through an interrupt pin and a communication interface;
the pressure sensor controls whether to send the interrupt signal to the processor by controlling the level of the interrupt pin;
the processor reads the real-time pressure data through the communication interface.
A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for detecting an entrance and exit of a headphone as described in any one of the above.
The method for detecting the earphone in and out of the box comprises the steps that real-time pressure data collected by a pressure sensor arranged in a wireless earphone charging box is obtained; determining the earphone in-out box state based on the real-time pressure data. According to the method for detecting the earphone in-out box, the pressure sensor is installed in the wireless earphone charging box, the state of the earphone in-out box is determined by means of real-time pressure data collected by the pressure sensor, and the pressure sensor cannot interfere with the functions of components of the wireless earphone charging box and has small influence on the power consumption of the wireless earphone charging box, so that the detection of the state of the wireless earphone in-out box can be realized under the conditions of no interference and low power consumption. The application provides an earphone discrepancy box detecting system, equipment and computer readable storage medium has also solved corresponding technical problem.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a first flowchart of a method for detecting an earphone in/out box according to an embodiment of the present application;
fig. 2 is a second flowchart of a method for detecting an earphone entering/exiting from a box according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a system for detecting an in-out box of an earphone according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a wireless headset 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 only a part of the embodiments of the present application, and not all of the embodiments. 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.
Referring to fig. 1, fig. 1 is a first flowchart of a method for detecting an earphone entering/exiting from a box according to an embodiment of the present application.
The method for detecting the earphone in and out box provided by the embodiment of the application can comprise the following steps:
step S101: and acquiring real-time pressure data acquired by a pressure sensor arranged in the wireless earphone charging box.
Step S102: determining the earphone in-out box state based on the real-time pressure data.
In practical application, because install pressure sensor in the wireless earphone that this application provided charges the box, so get into the wireless earphone and charge the interior object of box and produce pressure between pressure sensor, consequently, pressure sensor can gather the object that gets into the wireless earphone and charge the interior object and self pressure between, so can acquire the real-time pressure data that install the pressure sensor collection in the wireless earphone charges the box earlier, again based on real-time pressure data confirm the earphone discrepancy box state.
The method for detecting the earphone in and out of the box comprises the steps that real-time pressure data collected by a pressure sensor arranged in a wireless earphone charging box is obtained; determining the earphone in-out box state based on the real-time pressure data. According to the method for detecting the earphone in-out box, the pressure sensor is installed in the wireless earphone charging box, the state of the earphone in-out box is determined by means of real-time pressure data collected by the pressure sensor, and the pressure sensor cannot interfere with the functions of components of the wireless earphone charging box and has small influence on the power consumption of the wireless earphone charging box, so that the detection of the state of the wireless earphone in-out box can be realized under the conditions of no interference and low power consumption.
In the earphone in-out box detection method provided by the embodiment of the application, when the objects entering the wireless earphone charging box are different, the objects are affected by the weight of the objects, the pressure data collected by the pressure sensor are different, so that the types of the objects entering the wireless earphone charging box can be judged by means of the pressure data collected by the pressure sensor, and therefore the process of determining the state of the earphone in-out box based on the real-time pressure data can be specifically as follows: calculating the absolute value of the difference between the real-time pressure data and the pressure base value; judging whether the absolute value is larger than a preset threshold value, if so, judging that the earphone is in the box, and if not, judging that the earphone is out of the box; determining the state of the earphone entering and exiting the box based on the judgment result that the earphone is in the box or outside the box; the pressure base value is a pressure value acquired by the pressure sensor when the wireless earphone charging box is empty.
In practical application, after the earphone enters the wireless earphone charging box, the pressure sensor acquires pressure data, when the earphone does not enter the wireless earphone charging box, the pressure data of the pressure sensor is approximately zero, and in the application process of the wireless earphone charging box, a user generally only places the earphone in the wireless earphone charging box, and the earphone quality generally does not change, so that the pressure data acquired by the pressure sensor is close to a certain value, therefore, the absolute value of the difference value between the real-time pressure data and the pressure base value can be calculated, the type of an object entering the wireless earphone charging box is represented by the absolute value, and then whether the absolute value is greater than a preset threshold value is judged, namely whether the object entering the wireless earphone charging box is the earphone is judged, if so, the earphone is judged to be in the wireless earphone charging box, and if not, the earphone is judged to be outside the wireless earphone charging box.
Referring to fig. 2, fig. 2 is a second flowchart of a method for detecting an earphone in/out box according to an embodiment of the present application.
The method for detecting the earphone in and out box provided by the embodiment of the application can comprise the following steps:
step S201: and acquiring real-time pressure data acquired by a pressure sensor arranged in the wireless earphone charging box.
Step S202: the absolute value of the difference between the real-time pressure data and the pressure base value is calculated.
Step S203: judging whether the absolute value is larger than a preset threshold value or not; if the absolute value is greater than the preset threshold, executing step S204; if the absolute value is smaller than the predetermined threshold, step S206 is executed.
Step S204: judging whether the real-time pressure data is within a preset pressure value range; if the real-time pressure data is within the preset pressure value range, step S205 is executed, and if the real-time pressure data is not within the preset pressure value range, step S206 is executed.
Step S205: the earphone is judged to be in the box.
Step S206: determining that the earphone is outside the box; the preset pressure value range represents the pressure value range collected by the pressure sensor after the earphone is placed in the box.
Step S207: and determining the state of the earphone entering and exiting the box based on the judgment result that the earphone is in the box or outside the box.
In practical application, under the condition that the absolute value is greater than the preset threshold value, the earphone may not enter the wireless earphone charging box, in order to enhance the accuracy of the earphone in-out box detection method provided by the application, the pressure value range collected by the pressure sensor can be collected firstly after the earphone enters the box, that is, the preset pressure value range representing the earphone entering the box is collected firstly, so that after the absolute value is greater than the preset threshold value, whether the real-time pressure data is in the preset pressure value range can be further judged, if the real-time pressure data is in the preset pressure value range, the earphone is judged to be in the box, and if the real-time pressure data is not in the preset pressure value range, the earphone is judged to be out of the box.
In the method for detecting the earphone entering and exiting box provided by the embodiment of the application, before judging whether the absolute value is greater than the preset threshold value, the historical pressure data representing the earphone entering box can be obtained in a preset amount; a preset pressure value range is determined based on the historical pressure data.
In practical application, due to the abrasion of the earphones or the change of the state of the wireless earphone charging box, pressure data collected by the pressure sensor can be changed, so that the pressure data representing the earphones in the box can be different at different moments, but the earphones can be represented in the box, therefore, in order to guarantee that the preset pressure value range can accurately represent the earphones in the box as far as possible, the historical pressure data representing the earphones in the box in preset quantity can be obtained, the preset pressure value range is determined based on the historical pressure data, in the process, the value of the preset quantity can be determined according to actual needs, and the historical pressure data can be a group of pressure data which are closest to the current moment.
In a specific application scenario, in the process of determining the preset pressure value range based on the historical pressure data, in order to avoid the influence of fluctuating pressure data on the preset pressure value range, the maximum value of the first quantity and the minimum value of the second quantity can be deleted from the historical pressure data, and the remaining historical pressure data is used as target historical pressure data; and then determining a preset pressure value range based on the target historical pressure data. The values of the first number and the second number may be determined according to actual needs, and the values of the first number and the second number may be equal or unequal. Specifically, in the process of determining the preset pressure value range based on the target historical pressure data, the minimum value and the maximum value in the target historical pressure data may be used as two critical values of the preset pressure value range, and the pressure values between the two critical values are all attributed to the preset pressure value range.
In the method for detecting the earphone in-out box provided by the embodiment of the application, because the real-time pressure data can only represent whether the earphone is in the box at the current moment or not, and the earphone in-out box represents the state change of the earphone, the final state of the earphone in-out box needs to be determined according to whether the earphone is in the box before the current moment or not, so that the historical real-time pressure data acquired by the pressure sensor at the last moment at the current moment can be acquired in the process of determining the state of the earphone in-out box based on the real-time pressure data; and determining the state of the earphone in and out of the box based on the historical real-time pressure data and the real-time pressure data.
Specifically, whether the earphone is in the box at the last moment can be determined based on the historical real-time pressure data, the judging method can be the same as the method for judging whether the earphone is in the box based on the real-time pressure data, and then if the historical real-time pressure data represents that the earphone is in the box and the real-time pressure data represents that the earphone is out of the box, the earphone is judged to be in the out-of-box state; if the historical real-time pressure data represents that the earphone is outside the box and the real-time pressure data represents that the earphone is inside the box, the earphone is judged to be in a box-in state; in addition, when both the historical real-time pressure data and the real-time pressure data represent that the earphone is in the box or represent that the earphone is out of the box, the condition that the earphone is in and out of the box can only be indicated.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an earphone in-out box detection system according to an embodiment of the present application.
The earphone discrepancy box detecting system that this application embodiment provided can include:
the first acquisition module 101 is used for acquiring real-time pressure data acquired by a pressure sensor installed in the wireless earphone charging box;
the first determination module 102 is configured to determine a status of the earphone entering and exiting the box based on the real-time pressure data.
Specifically, the first determining module may include:
the first calculation submodule is used for calculating the absolute value of the difference between the real-time pressure data and the pressure base value;
the first judgment submodule is used for judging whether the absolute value is larger than a preset threshold value or not, if so, the earphone is judged to be in the box, and if not, the earphone is judged to be out of the box; the pressure base value is a pressure value acquired by the pressure sensor when the wireless earphone charging box is empty;
and the first determining submodule is used for determining the state of the earphone entering and exiting the box based on the judgment result that the earphone is in the box or outside the box.
Specifically, the first determining sub-module may include:
the first judging unit is used for judging whether the absolute value is larger than a preset threshold value or not; if the absolute value is larger than the preset threshold value, judging whether the real-time pressure data is in the range of the preset pressure value; if the real-time pressure data is within the preset pressure value range, the earphone is judged to be in the box; if the real-time pressure data is not within the preset pressure value range, the earphone is judged to be outside the box; if the absolute value is less than or equal to a preset threshold value, the earphone is judged to be out of the box;
the preset pressure value range represents the pressure value range collected by the pressure sensor after the earphone is placed in the box.
Specifically, the method may further include:
the first obtaining submodule is used for obtaining the historical pressure data representing that the earphones are put into the box in a preset number before the first judging unit judges whether the absolute value is larger than the preset threshold value;
and the second determination submodule is used for determining the preset pressure value range based on the historical pressure data.
Specifically, the first determining sub-module may include:
the first deleting unit is used for deleting the maximum value of the first quantity and the minimum value of the second quantity in the historical pressure data to obtain target historical pressure data;
and the first determining unit is used for determining a preset pressure value range based on the target historical pressure data.
Specifically, the first determining module may include:
the first acquisition unit is used for acquiring historical real-time pressure data acquired by the pressure sensor at the last moment of the current moment;
the first determining unit is used for determining the state of the earphone in and out of the box based on historical real-time pressure data and real-time pressure data.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a wireless headset charging box according to an embodiment of the present disclosure.
The wireless earphone box that charges that this application embodiment provided can include:
the pressure sensor 11 is used for acquiring real-time pressure data between an object positioned in the wireless earphone charging box and the pressure sensor 11;
and the processor 12 is connected with the pressure sensor 11 and is used for determining the state of the earphone in and out of the box based on real-time pressure data.
In this application, the quantity of the pressure sensor of installation in the wireless earphone box that charges can be confirmed according to actual need, for example can install two pressure sensor, and a pressure sensor is responsible for gathering the pressure data between an earphone and self, and in addition, pressure sensor's shape can be confirmed according to actual need, for example pressure sensor can be cyclic annular, cubic etc..
In the wireless earphone box that charges that this application embodiment provided, can carry out functional partitioning to pressure sensor and treater for pressure sensor and treater can be better accomplish earphone discrepancy box detection function, for example pressure sensor can be used for: calculating the absolute value of the difference between the real-time pressure data and the pressure base value; judging whether the absolute value is larger than a preset threshold value, if so, sending an interrupt signal to the processor, and if not, forbidding sending the interrupt signal to the processor;
correspondingly, when the processor determines the state of the earphone in and out of the box based on the real-time pressure data, the state of the earphone in and out of the box can be determined based on the real-time pressure data and the preset pressure value range after the interrupt signal is received.
It should be noted that, the process of determining the state of the earphone entering and exiting the box based on the real-time pressure data and the preset pressure value range by the processor may refer to the above embodiments, and will not be described herein again.
In the wireless headset charging box provided in the embodiment of the present application, in order to facilitate the pressure sensor to send an interrupt signal to the processor and facilitate the processor to read pressure data from the pressure sensor, please refer to fig. 4, in fig. 4, Int1, Int2, Int3, Int4 all represent interrupt pins, Int1 is connected to Int2, Int3 is connected to Int4, and the pressure sensor and the processor may be connected through the interrupt pins and the communication interface; correspondingly, the pressure sensor can control whether to send an interrupt signal to the processor or not by controlling the level of the interrupt pin; the processor reads the real-time pressure data through the communication interface.
In a specific application scenario, four interrupt pins Int1, Int2, Int3 and Int4 may be set to be low levels, so that when the pressure sensor needs to send a terminal signal, it is only necessary to set its interrupt pin to be high level, for example, after Int2 is set to be high level, Int1 also correspondingly becomes high level, and after the processor detects that Int1 is high level, it may be determined that an interrupt signal transmitted by the pressure sensor is received.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
acquiring real-time pressure data acquired by a pressure sensor arranged in a wireless earphone charging box;
determining the earphone in-out box state based on the real-time pressure data.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: calculating the absolute value of the difference between the real-time pressure data and the pressure base value; judging whether the absolute value is larger than a preset threshold value, if so, judging that the earphone is put into a box, and if not, judging that the earphone is put out of the box; determining the state of the earphone entering and exiting the box based on the judgment result that the earphone is in the box or outside the box; the pressure base value is a pressure value acquired by the pressure sensor when the wireless earphone charging box is empty.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: judging whether the absolute value is larger than a preset threshold value or not; if the absolute value is larger than the preset threshold value, judging whether the real-time pressure data is in the range of the preset pressure value; if the real-time pressure data is within the range of the preset pressure value, the earphone is judged to be put into the box; if the real-time pressure data is not within the preset pressure value range, judging that the earphone is taken out of the box; if the absolute value is less than or equal to a preset threshold value, judging that the earphone is taken out of the box; the preset pressure value range represents the pressure value range collected by the pressure sensor after the earphone is placed in the box.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: before judging whether the absolute value is larger than a preset threshold value, acquiring a preset number of historical pressure data representing that the earphones are put into the box; a preset pressure value range is determined based on the historical pressure data.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: deleting the maximum value of the first quantity and the minimum value of the second quantity in the historical pressure data to obtain target historical pressure data; and determining a preset pressure value range based on the target historical pressure data.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: acquiring historical real-time pressure data acquired by a pressure sensor at the last moment of the current moment; and determining the state of the earphone in and out of the box based on the historical real-time pressure data and the real-time pressure data.
The computer-readable storage media to which this application relates include Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
For a description of a related part in a wireless headset charging box and a method, a system and a computer readable storage medium for detecting an in-out box of a headset provided in an embodiment of the present application, please refer to a detailed description of a corresponding part in the method for detecting an in-out box of a headset provided in an embodiment of the present application, which is not repeated herein. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for detecting the entrance and exit of an earphone, comprising the steps of:
acquiring real-time pressure data acquired by a pressure sensor arranged in a wireless earphone charging box;
determining an earphone in-out box state based on the real-time pressure data.
2. The method of claim 1, wherein said determining headphone in and out cartridge status based on said real-time pressure data comprises:
calculating the absolute value of the difference between the real-time pressure data and the pressure base value;
judging whether the absolute value is larger than a preset threshold value, if so, judging that the earphone is in the box, and if not, judging that the earphone is out of the box;
determining the state of the earphone entering and exiting the box based on the judgment result that the earphone is in the box or outside the box;
and the pressure base value is a pressure value acquired by the pressure sensor when the wireless earphone charging box is empty.
3. The method of claim 2, wherein the determining whether the absolute value is greater than a preset threshold, if so, determining that the earphone is inside the box, and if not, determining that the earphone is outside the box, comprises:
judging whether the absolute value is larger than the preset threshold value or not;
if the absolute value is larger than the preset threshold, judging whether the real-time pressure data is in a preset pressure value range; if the real-time pressure data is within the preset pressure value range, the earphone is judged to be in the box; if the real-time pressure data is not within the preset pressure value range, the earphone is judged to be outside the box;
if the absolute value is less than or equal to the preset threshold value, the earphone is judged to be out of the box;
and the preset pressure value range represents the pressure value range collected by the pressure sensor after the earphone is placed in the box.
4. The method of claim 3, wherein before determining whether the absolute value is greater than a predetermined threshold, further comprising:
acquiring a preset number of historical pressure data representing that earphones are put into a box;
and determining the preset pressure value range based on the historical pressure data.
5. The method of claim 4, wherein said determining the preset pressure value range based on the historical pressure data comprises:
deleting the maximum value of the first quantity and the minimum value of the second quantity in the historical pressure data to obtain target historical pressure data;
and determining the preset pressure value range based on the target historical pressure data.
6. The method of any of claims 1 to 5, wherein said determining headphone in-out cartridge status based on said real-time pressure data comprises:
acquiring historical real-time pressure data acquired by the pressure sensor at the last moment of the current moment;
determining the earphone in-out box state based on the historical real-time pressure data and the real-time pressure data.
7. A headset access enclosure detection system, comprising:
the first acquisition module is used for acquiring real-time pressure data acquired by a pressure sensor arranged in the wireless earphone charging box;
and the first determination module is used for determining the state of the earphone in and out of the box based on the real-time pressure data.
8. A wireless headset charging box, comprising:
the pressure sensor is used for acquiring real-time pressure data between an object positioned in the wireless earphone charging box and the pressure sensor;
and the processor is connected with the pressure sensor and is used for determining the state of the earphone in and out of the box based on the real-time pressure data.
9. The wireless headset charging box of claim 8, wherein the pressure sensor is further configured to:
calculating the absolute value of the difference between the real-time pressure data and the pressure base value; judging whether the absolute value is larger than a preset threshold value, if so, sending an interrupt signal to the processor, and if not, forbidding sending the interrupt signal to the processor;
the processor determines an earpiece access case status based on the real-time pressure data, including:
and after receiving the interrupt signal, the processor determines the state of the earphone entering and exiting the box based on the real-time pressure data and the preset pressure value range.
10. The wireless headset charging box of claim 9, wherein the pressure sensor is connected to the processor via an interrupt pin and a communication interface;
the pressure sensor controls whether to send the interrupt signal to the processor by controlling the level of the interrupt pin;
the processor reads the real-time pressure data through the communication interface.
11. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for detecting an entrance and exit of a headphone according to any one of claims 1 to 6.
CN201911382330.0A 2019-12-27 2019-12-27 Wireless earphone charging box, earphone in-out box detection method, system and storage medium Pending CN111131954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911382330.0A CN111131954A (en) 2019-12-27 2019-12-27 Wireless earphone charging box, earphone in-out box detection method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911382330.0A CN111131954A (en) 2019-12-27 2019-12-27 Wireless earphone charging box, earphone in-out box detection method, system and storage medium

Publications (1)

Publication Number Publication Date
CN111131954A true CN111131954A (en) 2020-05-08

Family

ID=70504998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911382330.0A Pending CN111131954A (en) 2019-12-27 2019-12-27 Wireless earphone charging box, earphone in-out box detection method, system and storage medium

Country Status (1)

Country Link
CN (1) CN111131954A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111568013A (en) * 2020-06-28 2020-08-25 Oppo广东移动通信有限公司 Spectacle case and intelligent glasses
CN111698596A (en) * 2020-05-29 2020-09-22 青岛歌尔智能传感器有限公司 Earphone in-out box detection method, earphone box and readable storage medium
CN111770407A (en) * 2020-06-30 2020-10-13 歌尔科技有限公司 Earphone state detection method and device, earphone and readable storage medium
CN111866691A (en) * 2020-06-10 2020-10-30 歌尔科技有限公司 State detection method and device of wireless earphone and earphone
CN112333320A (en) * 2020-10-30 2021-02-05 歌尔科技有限公司 Electronic equipment drop detection method and electronic equipment
CN114501285A (en) * 2020-11-13 2022-05-13 华为技术有限公司 Plug detection circuit and plug detection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201856A (en) * 2015-05-04 2016-12-07 阿里巴巴集团控股有限公司 A kind of multi version performance test methods and device
CN108696784A (en) * 2018-06-06 2018-10-23 歌尔科技有限公司 A kind of method of wireless headset role switching, wireless headset and TWS earphones
CN109120296A (en) * 2018-08-30 2019-01-01 歌尔科技有限公司 A kind of earphone far field exchange method, earphone far field interaction accessory and wireless headset
CN109782944A (en) * 2018-12-11 2019-05-21 华为技术有限公司 A kind of response method and electronic equipment of touch screen

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201856A (en) * 2015-05-04 2016-12-07 阿里巴巴集团控股有限公司 A kind of multi version performance test methods and device
CN108696784A (en) * 2018-06-06 2018-10-23 歌尔科技有限公司 A kind of method of wireless headset role switching, wireless headset and TWS earphones
CN109120296A (en) * 2018-08-30 2019-01-01 歌尔科技有限公司 A kind of earphone far field exchange method, earphone far field interaction accessory and wireless headset
CN109782944A (en) * 2018-12-11 2019-05-21 华为技术有限公司 A kind of response method and electronic equipment of touch screen

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698596A (en) * 2020-05-29 2020-09-22 青岛歌尔智能传感器有限公司 Earphone in-out box detection method, earphone box and readable storage medium
CN111698596B (en) * 2020-05-29 2022-03-25 青岛歌尔智能传感器有限公司 Earphone in-out box detection method, earphone box and readable storage medium
CN111866691A (en) * 2020-06-10 2020-10-30 歌尔科技有限公司 State detection method and device of wireless earphone and earphone
CN111568013A (en) * 2020-06-28 2020-08-25 Oppo广东移动通信有限公司 Spectacle case and intelligent glasses
CN111770407A (en) * 2020-06-30 2020-10-13 歌尔科技有限公司 Earphone state detection method and device, earphone and readable storage medium
WO2022000998A1 (en) * 2020-06-30 2022-01-06 歌尔股份有限公司 Earphone state detection method and device, earphone, and readable storage medium
CN112333320A (en) * 2020-10-30 2021-02-05 歌尔科技有限公司 Electronic equipment drop detection method and electronic equipment
CN114501285A (en) * 2020-11-13 2022-05-13 华为技术有限公司 Plug detection circuit and plug detection method
CN114501285B (en) * 2020-11-13 2023-05-16 华为技术有限公司 Plug detection circuit and plug detection method

Similar Documents

Publication Publication Date Title
CN111131954A (en) Wireless earphone charging box, earphone in-out box detection method, system and storage medium
CN109413536B (en) Wireless earphone box-entering detection method and device and wireless earphone charging box
CN106655396B (en) Charge control method, device and terminal
US20220043067A1 (en) Charging method and device, charging system, electronic equipment and storage medium
KR102561574B1 (en) Method for acquiring information on state of battery based on amount of change of battery while charging battery and electronic device for supporting the same
EP2365605B1 (en) Charging apparatus, program
CN111083271B (en) Wearing detection method, system, equipment and computer readable storage medium
CN110958524B (en) Earphone in-out box detection method, electronic equipment and earphone assembly
CN111314813A (en) Wireless earphone, method for detecting entrance and exit of wireless earphone, and storage medium
CN115453376B (en) State monitoring method and system for power battery of electric automobile and electric automobile
CN106707187B (en) Method and device for determining target SOC of battery
CN113453122A (en) Wearing detection method, wearing detection device, wearing detection equipment and computer-readable storage medium
CN108872780B (en) Live working detection and system for live exploration and terminal equipment
CN111372157A (en) Wireless earphone, wearing detection method thereof and storage medium
CN112165143A (en) Wireless earphone charging method, device, equipment and storage medium
CN113038331A (en) Method and device for detecting wireless earphone in and out box
CN112477696A (en) Current control method and device for slow charging
CN112929778B (en) Wireless earphone control method and device, electronic equipment and wireless earphone
CN109655269B (en) Motor vibration detection method and device
CN110850304B (en) Full charge detection method and device and storage medium
CN111157907B (en) Detection method and device, charging method and device, electronic device and storage medium
CN106124864A (en) A kind of mobile terminal and mobile terminal bonnet detection method
CN115257454A (en) Nominal voltage identification method, apparatus, terminal device and storage medium
CN115728652A (en) Detection method and detection device for nominal voltage
CN113131550A (en) Charging control method, system, device, and computer-readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication