WO2022000998A1 - Earphone state detection method and device, earphone, and readable storage medium - Google Patents

Earphone state detection method and device, earphone, and readable storage medium Download PDF

Info

Publication number
WO2022000998A1
WO2022000998A1 PCT/CN2020/134462 CN2020134462W WO2022000998A1 WO 2022000998 A1 WO2022000998 A1 WO 2022000998A1 CN 2020134462 W CN2020134462 W CN 2020134462W WO 2022000998 A1 WO2022000998 A1 WO 2022000998A1
Authority
WO
WIPO (PCT)
Prior art keywords
earphone
state
detection
determined
box
Prior art date
Application number
PCT/CN2020/134462
Other languages
French (fr)
Chinese (zh)
Inventor
骆俊谕
Original Assignee
歌尔股份有限公司
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 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Publication of WO2022000998A1 publication Critical patent/WO2022000998A1/en

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/1041Mechanical or electronic switches, or control elements
    • 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

Definitions

  • the present invention relates to the field of earphones, and in particular, to a method, a device, an earphone and a readable storage medium for detecting a state of an earphone.
  • TWS is the abbreviation of True Wireless Stereo in English, which means true wireless stereo.
  • TWS technology is also based on the development of Bluetooth chip technology. According to its working principle, it means that the mobile phone is connected to the main earphone, and then the main earphone is quickly connected to the auxiliary earphone by wireless means, so as to realize the true wireless separation of the left and right channels of Bluetooth. When the slave speakers are not connected, the master speakers return to mono sound quality.
  • TWS technology has been applied to the field of Bluetooth headsets, so it has also spawned a new product, TWS Bluetooth headsets.
  • TWS earphones are more and more compact and thin, emphasizing no sense of wearing. Since the user's perception of wearing the earphone is getting weaker and weaker, when the earphone falls from the ear, there is also a problem that it is not easy to perceive, and the loss of the earphone will cause certain property damage to the user.
  • the main purpose of the present invention is to provide an earphone state detection method, device, earphone and readable storage medium, aiming to solve the technical problem that the existing user's wearing perception of the earphone is getting weaker and weaker, resulting in the inability to know the earphone wearing state in time. .
  • the present invention provides a method for detecting the state of an earphone, and the method for detecting the state of the earphone comprises the following steps:
  • the detection data of the wearing detection module of the earphone is acquired, and the target state of the earphone is determined based on the detection data and the initial state of the earphone.
  • the step of determining the initial state of the earphone based on the pressure data and the duration includes:
  • the step of obtaining the detection data of the wearing detection module of the headset, and determining the target state of the headset based on the detection data and the initial state of the headset includes:
  • a target state of the earphone is determined based on the initial state of the earphone and the contact state.
  • the detection data includes a detection value and a detection duration corresponding to the detection value
  • the step of determining the contact state between the earphone and the ear based on the detection data includes:
  • the step of determining the target state of the earphone based on the contact state and the initial state of the earphone includes:
  • the target state of the earphone is determined to be starting to wear the earphone
  • the target state of the earphone is determined to be the hand-held earphone
  • the target state of the earphone is determined to be the earphone being worn
  • the target state of the earphone is that the earphone is falling off.
  • the step of determining that the target state of the earphone is the hand-held earphone includes:
  • the target state of the earphone is updated to be that the earphone is in the box.
  • the method includes:
  • the earphone falling off alarm information is sent to the preset terminal.
  • the headset state detection device includes:
  • a detection module configured to detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data
  • a comparison module configured to determine the initial state of the earphone based on the pressure data and the duration
  • a determination module configured to acquire detection data of a wearing detection module of the earphone, and determine a target state of the earphone based on the detection data and the initial state of the earphone.
  • the present invention also provides an earphone state detection earphone, the earphone includes: a memory, a processor, and an earphone state detection program stored in the memory and running on the processor, so When the earphone state detection program is executed by the processor, the steps of any one of the earphone state detection methods described above are implemented.
  • the present invention also provides a readable storage medium, on which a headphone state detection program is stored, and when the headphone state detection program is executed by a processor, any of the above The steps of the headset state detection method.
  • the present invention detects the pressure data corresponding to the earphone based on the pressure sensor, and obtains the duration corresponding to the pressure data, and then determines the initial state of the earphone based on the pressure data and the duration, and then obtains The detection data of the wearing detection module of the headset, and the target state of the headset is determined based on the detection data and the initial state of the headset.
  • the pressure sensor Through the pressure data and duration detected by the pressure sensor, it is determined whether the user is wearing or taking off the earphones, and further combined with the detection data of the wearing detection module to determine the final state of the earphone, which realizes the real-time detection of the earphone state, and can accurately Locate the current wearing status (including falling off) of the headset to prevent loss of the headset due to inability to know the wearing status of the headset in time, resulting in economic losses to the user.
  • FIG. 1 is a schematic structural diagram of a headset in a hardware operating environment involved in an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of the first embodiment of the earphone state detection method according to the present invention
  • FIG. 3 is a schematic flowchart of wearing detection of an earphone in an embodiment of the earphone state detection method of the present invention
  • FIG. 4 is a schematic flowchart of time accumulation during earphone wearing in an embodiment of the earphone state detection method of the present invention
  • FIG. 5 is a schematic flowchart of earphone box detection in an embodiment of the earphone state detection method of the present invention
  • FIG. 6 is a schematic diagram of functional modules of an embodiment of an apparatus for detecting an earphone state according to the present invention.
  • FIG. 1 is a schematic structural diagram of an earphone in a hardware operating environment involved in an embodiment of the present invention.
  • the headset may include: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 .
  • the communication bus 1002 is used to realize the connection and communication between these components.
  • the network interface 1004 may include a standard wired interface and a wireless interface (eg, a WI-FI interface).
  • the memory 1005 may be high-speed RAM memory, or may be non-volatile memory, such as disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
  • the structure of the target detection system shown in FIG. 1 does not constitute a limitation on the earphone, and may include more or less components than shown, or combine some components, or arrange different components.
  • the memory 1005 as a readable storage medium may include an operating system, a network communication module, a user interface module and a headset state detection program.
  • the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect to the client and perform data communication with the client; and the processor 1001 can be used for
  • the earphone state detection program stored in the memory 1005 is called.
  • the headset includes: a memory 1005 , a processor 1001 , and a headset state detection program stored on the memory 1005 and executable on the processor 1001 , wherein the processor 1001 calls the program stored in the memory 1005 During the earphone state detection program, the steps of the earphone state detection method provided by each embodiment of the present application are performed.
  • FIG. 2 is a schematic flowchart of the first embodiment of the earphone state detection method of the present invention.
  • This embodiment of the present invention provides an embodiment of a method for detecting an earphone state. It should be noted that although a logical sequence is shown in the flowchart, in some cases, the shown or described steps.
  • the earphone state detection method includes:
  • Step S100 detecting the pressure data corresponding to the earphone based on the pressure sensor, and acquiring the duration corresponding to the pressure data;
  • the wireless headset is mainly composed of a main control module, a wireless communication module, a speaker, a plurality of microphones with different functions, a rechargeable battery, etc.
  • the main control module is connected to the main device through the wireless communication module to obtain the main control module. data sent by the device or to the master device.
  • the wireless headset is further provided with a wearing detection module and a pressure sensor module, wherein the wearing detection module is used to detect whether the headset is in contact with the ear, that is, whether the headset is in a wearing state.
  • the pressure sensor module is arranged on the inside of the casing where the user habitually takes the earphone, such as the earphone handle.
  • the pressure sensor can detect the deformation of the earphone casing, detect the pressure, and accumulate the duration of the pressure. When When the detected pressure is greater than the threshold, it can be determined that the earphone is taken by the user, and the duration corresponding to the pressure data indicates that the user has been holding the earphone or performing operations such as wearing or removing the earphone during the duration.
  • Step S200 determining the initial state of the earphone based on the pressure data and the duration
  • the initial state of the earphone is first determined, and the initial state includes two states of hand-held and non-hand-held. If you are wearing the headset, you may be performing operations such as putting on the headset, removing the headset, etc. Non-handheld means that the current user has not performed any manual operations on the headset.
  • step S200 includes:
  • Step S210 when the pressure data is greater than or equal to the preset pressure value, and the duration is greater than or equal to the first preset duration, determine that the initial state of the earphone is hand-held;
  • Step S220 when the pressure data is less than the preset pressure value, determine that the initial state of the earphone is hands-free.
  • a pressure threshold is preset to determine whether the user has pressed the earphone.
  • the first preset duration is used to detect the duration of the pressure operation. For example, 5 seconds is set.
  • the pressure data is greater than or equal to the preset time
  • the duration of the pressure is greater than or equal to the first preset duration, it is determined that the initial state of the earphone is hand-held, that is, the user holds the earphone by hand, and the duration is used to exclude that the user just touches the earphone.
  • the pressure data detected by the pressure sensor is less than the preset pressure value, it means that the user does not press the earphone, that is, the user does not hold the earphone with his hand. Press operation, that is, when the pressure data is less than the preset pressure value, it is determined that the initial state of the earphone is non-handheld.
  • Step S300 acquiring detection data of the wearing detection module of the earphone, and determining a target state of the earphone based on the detection data and the initial state of the earphone.
  • the wearing detection module of the earphone is used to detect whether the earphone is in contact with the ear, that is, whether the earphone is in a wearing state.
  • the wearing detection module includes but is not limited to an optical sensor wearing detection unit or a capacitive detection device.
  • the optical sensor wearing detection unit detects and emits infrared light, and the reflected light signal after encountering the human ear, when the optical sensor wearing detection unit receives the reflected light signal, it is determined that the earphone is in contact with the ear; or the capacitive detection device detects the coupling capacitance If the coupling capacitance value is greater than the capacitance threshold, it is judged that the earphone is in contact with the ear.
  • step S300 includes:
  • Step S310 determining the contact state between the earphone and the ear based on the detection data
  • step S310 includes:
  • Step S311 when the detection value is within a preset interval and the detection duration is greater than a second preset duration, determine that the contact state is contacted;
  • Step S312 when the detected value is not within a preset interval, determine that the contact state is non-contact.
  • the detection data of the wearing detection module of the earphone includes the detection value and the detection duration corresponding to the detection value, and the preset interval is used to judge whether the detection value is valid.
  • the detection value is the optical signal strength
  • the preset interval is the preset range of the optical signal.
  • the optical signal strength is within the preset interval, it is determined that the earphone is in contact with the ear.
  • the contact needs to be maintained for a certain period of time, that is, the detection period is longer than the second preset period.
  • the time is long, it is determined that the contact state between the earphone and the ear is in contact. Otherwise, when the detected value is not in the preset interval, it is determined that the contact state between the earphone and the ear is non-contact.
  • Step S320 determining a target state of the earphone based on the initial state of the earphone and the contact state.
  • the states of the earphones include: starting to wear the earphones, holding the earphones, wearing the earphones, falling off the earphones, and placing the earphones in a special box for earphones.
  • the target state of the earphone that is, the current real state, is determined according to the initial state of the earphone and the contact state of the earphone and the ear.
  • step S320 includes:
  • Step S321 when determining that the initial state of the earphone is hand-held and the contact state is contacted, determine that the target state of the earphone is to start wearing the earphone;
  • the user opens the earphone storage box to take the earphone.
  • the pressure sensor of the earphone detects the taking action of the user's finger
  • the detected pressure data is greater than or equal to the preset pressure value
  • the duration of the pressure data is greater than or equal to or equal to the first preset duration, that is, the initial state of the headset is hand-held
  • the wearing detection module of the headset such as the optical sensor detects the reflected light signal, or the capacitive detection device detects the contact with the skin, that is, the contact between the headset and the ear If the state is contacted, it is determined that the earphone is taken out from the storage box and the wearing action is completed, that is, when the initial state of the earphone is determined to be hand-held and the contact state is determined to be in contact, the target state of the earphone is determined to start wearing the earphone.
  • the abscissa is time
  • the user takes the earphone from the earphone storage box in the non-wearing state
  • the pressure sensor inside the earphone handle shell detects the taking action of the user's finger, that is, the detected pressure data If it is greater than the threshold ⁇ F, time accumulation is performed.
  • the wearing detection module of the headset detects valid data, such as the optical sensor of the headset detects the reflected light signal, or the capacitive detection device detects and Skin contact, start time accumulation, if the time accumulation is greater than ⁇ t2, it is determined that the user takes the earphones out of the storage box and completes the wearing action. It should be noted that during the process of wearing the earphone, the user may loosen the handle. Therefore, referring to FIG.
  • Step S322 when it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, determine that the target state of the earphone is the hand-held earphone;
  • the pressure sensor of the earphone detects the picking action of the user's finger, but the wearing detection module does not detect valid data at this time, that is, the contact state between the earphone and the ear is non-contact, that is, when the earphone is determined to be in contact with the ear
  • the target state of the earphone is determined to be the hand-held earphone.
  • the state of holding the earphone may be that the user is only holding the earphone, or the user is performing operations such as taking off the earphone.
  • the pressure sensor in the earphone detects the picking action of the user's finger, that is, the detected pressure is greater than the threshold ⁇ F, and the detected pressure is greater than the threshold ⁇ F.
  • the time accumulation is greater than ⁇ t1.
  • the wearing detection module of the earphone does not detect valid data, such as the optical sensor of the earphone does not detect the reflected light signal, or the capacitive detection device detects that it is not in contact with the skin, Then it is judged that the earphone is removed from the ear and is in a non-wearing state.
  • Step S323 when it is determined that the initial state of the earphone is non-handheld and the contact state is contacted, determine that the target state of the earphone is the earphone being worn;
  • the earphone when the earphone is being worn, the earphone is usually not touched by hand. Therefore, when the pressure data detected by the pressure sensor of the earphone is less than the preset pressure value, that is, the user does not press the earphone, And the current state of contact between the earphone and the ear is in contact, it can be determined that the earphone is currently in a wearing state. It should be noted that the wearing detection module of the headset and the pressure sensor continuously monitor data to ensure that when the headset falls off or is abnormally worn, it can be detected in time and an alarm will be issued.
  • Step S324 when it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, determine that the target state of the earphone is that the earphone is off.
  • the wearing detection module of the earphone when the pressure data detected by the pressure sensor of the earphone is less than the preset pressure value, that is, the user does not press the earphone, the wearing detection module of the earphone, such as the optical sensor of the earphone, does not detect the reflected light signal, Or if the capacitive detection device detects that it is not in contact with the skin, it is determined that the earphone is not worn correctly or falls off. Because the wearing detection module of the headset and the pressure sensor continuously monitor data, it can ensure that when the headset falls off or is abnormally worn, it can be detected in time, and the user is notified to avoid loss of the headset and economic losses to the user.
  • the corresponding hyperparameters of each preset group are obtained, respectively, and each hyperparameter is sent to the participants in the corresponding group, so that each participant in the group can use the received
  • the headset state detects the respective model parameters, and the participants in the group perform federated learning to obtain the sub-goal model corresponding to each group, wherein each group includes the same number of participants, and then based on each sub-goal model and the corresponding Perform evolution calculation on hyperparameters to obtain intermediate hyperparameters, and optimize the hyperparameters corresponding to each group based on the intermediate hyperparameters, and finally perform iterative evolution calculation based on the hyperparameters corresponding to each optimized group until the iteration stop condition is detected.
  • the model hyperparameters of federated learning can be optimized synchronously through evolutionary computing, so as to avoid manual manual adjustment of hyperparameters, which not only improves the efficiency of hyperparameter optimization in federated learning, but also significantly improves the performance of federated learning models. .
  • step S322 includes:
  • Step a within a preset time, obtain the detection data of the box-in-box detection module of the earphone;
  • Step b based on the detection data of the box-in-box detection module, determine whether the earphone is in the earphone box;
  • Step c when the earphone is in the earphone box, update the target state of the earphone to be that the earphone is in the box.
  • the pressure sensor of the earphone detects the picking action of the user's finger, but the wearing detection module does not detect valid data at this time, that is, the contact state between the earphone and the ear is non-contact, that is, when the earphone is determined to be in contact with the ear
  • the target state of the earphone is determined to be the hand-held earphone.
  • the state of holding the earphone may be that the user is only holding the earphone, or the user is performing operations such as taking off the earphone.
  • the detection data of the box-in-box detection module of the earphone is obtained within a preset time to determine whether the earphone is in the earphone box, and when the earphone is in the earphone box, the data of the earphone is updated.
  • the current status is that the headset is in the box.
  • the box detection module of the earphone detects that the earphone is in the box after time ⁇ t3, it is determined that the user removes the earphone and incorporates it into the box, as shown in Figure 5, the abscissa is the time, if the pressure sensor of the earphone detects When the user's finger picks up, that is, the detected pressure is greater than the threshold ⁇ F, and after the time ⁇ t3, the box-in detection module does not detect that the earphones are in the box, and it is determined that the user has removed the earphones but has not put them in the box.
  • step S324 it includes:
  • Step d obtain the detection data of the box-into-box detection module of the earphone, and determine whether the earphone is in the earphone box based on the detection data of the box-in detection module;
  • Step e when the earphone is not in the earphone box, send the earphone falling off alarm information to the preset terminal.
  • the wearing detection module of the earphone such as the optical sensor of the earphone, does not detect the reflected light signal, Or if the capacitive detection device detects that it is not in contact with the skin, it is determined that the earphone is not worn correctly or falls off.
  • the earphone storage box is provided with a box-in monitoring device, and when the earphone is in the box, data can be sent to the earphone box-in detection module, or the earphone box-in detection module
  • the detection module actively obtains the data of the box-in monitoring device, so as to determine whether the earphone is in the box.
  • the detection data of the earphone's box-in detection module is obtained to determine whether the earphone is in the earphone box, and when the earphone is in the earphone box, the data of the earphone is updated.
  • the current status is that the headset is in the box. Otherwise, when the earphone is not in the earphone box, an abnormal wearing command is sent to the main device such as the mobile phone to remind the user that the earphone has fallen off, so as to realize the reminder of the earphone falling.
  • the earphone state detection method proposed in this embodiment determines whether the earphone is placed in the earphone storage box through the earphone box-in detection module, so as to more accurately determine the current state of the earphone, and avoid the occurrence of the earphone entering the box but being judged as falling off. This improves the accuracy of determining the wearing status of the headset. At the same time, when the earphone falls off or is worn abnormally, the user is reminded in time to prevent the earphone from being lost due to the inability to know the wearing status of the earphone in time, which will bring economic losses to the user.
  • FIG. 6 is a schematic diagram of functional modules of an embodiment of the earphone state detection device of the present invention.
  • a detection module 10 configured to detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data
  • an initial determination module 20 configured to determine an initial state of the earphone based on the pressure data and the duration
  • the target determination module 30 is configured to acquire the detection data of the wearing detection module of the earphone, and determine the target state of the earphone based on the detection data and the initial state of the earphone.
  • the initial determination module 20 is also used for:
  • target determination module 30 is also used for:
  • a target state of the earphone is determined based on the initial state of the earphone and the contact state.
  • target determination module 30 is also used for:
  • target determination module 30 is also used for:
  • the target state of the earphone is determined to be starting to wear the earphone
  • the target state of the earphone is determined to be the hand-held earphone
  • the target state of the earphone is determined to be the earphone being worn
  • the target state of the earphone is that the earphone is falling off.
  • target determination module 30 is also used for:
  • the target state of the earphone is updated to be that the earphone is in the box.
  • the headset state detection device also includes:
  • an analysis module configured to obtain the detection data of the box-into-box detection module of the earphone, and determine whether the earphone is in the earphone box based on the detection data of the box-into-box detection module;
  • the alarm module is used to send the alarm information of the earphone falling off to the preset terminal when the earphone is not in the earphone box
  • an embodiment of the present invention also provides a readable storage medium, where an earphone state detection program is stored on the readable storage medium, and when the earphone state detection program is executed by a processor, the earphone state detection method in each of the foregoing embodiments is implemented A step of.

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

Disclosed are an earphone state detection method and device, an earphone, and a readable storage medium. The method comprises: on the basis of a pressure sensor, detecting pressure data corresponding to an earphone, and obtaining a duration corresponding to the pressure data; then comparing the pressure data and the duration with a preset value, and determining the initial state of the earphone on the basis of the comparison result; then obtaining detection data of a wearing detection module of the earphone, and determining the target state of the earphone on the basis of the detection data and the initial state of the earphone. By means of the pressure data detected by the pressure sensor and the duration, it can be determined whether the user is performing human operations, such as wearing or removing the earphone, and the final state of the earphone is determined in combination with the detection data of the wearing detection module, thus achieving the real-time detection of the earphone state. At the same time, the current earphone wearing state can be accurately positioned, thus preventing loss of the earphone and economic losses to the user as a result of not being able to promptly know the wearing state of the earphone.

Description

耳机状态检测方法、装置、耳机及可读存储介质Earphone state detection method, device, earphone and readable storage medium
本申请要求于2020年6月30日提交中国专利局、申请号为202010611832.2、发明名称为“耳机状态检测方法、装置、耳机及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on June 30, 2020 with the application number 202010611832.2 and the invention titled "Headphone Status Detection Method, Device, Headphone and Readable Storage Medium", the entire contents of which are approved by Reference is incorporated in this application.
技术领域technical field
本发明涉及耳机领域,尤其涉及一种耳机状态检测方法、装置、耳机及可读存储介质。The present invention relates to the field of earphones, and in particular, to a method, a device, an earphone and a readable storage medium for detecting a state of an earphone.
背景技术Background technique
TWS是英文True Wireless Stereo的缩写,即真正无线立体声的意思,TWS技术同样也是基于蓝牙芯片技术的发展。按其工作原理来说是指手机通过连接主耳机,再由主耳机通过无线方式快速连接副耳机,实现真正的蓝牙左右声道无线分离使用。不连接从音箱时,主音箱回到单声道音质。TWS技术运用到了蓝牙耳机领域,因此也催生了一个新的产品TWS蓝牙耳机。TWS is the abbreviation of True Wireless Stereo in English, which means true wireless stereo. TWS technology is also based on the development of Bluetooth chip technology. According to its working principle, it means that the mobile phone is connected to the main earphone, and then the main earphone is quickly connected to the auxiliary earphone by wireless means, so as to realize the true wireless separation of the left and right channels of Bluetooth. When the slave speakers are not connected, the master speakers return to mono sound quality. TWS technology has been applied to the field of Bluetooth headsets, so it has also spawned a new product, TWS Bluetooth headsets.
现有的TWS耳机越来越追求小巧轻薄,强调无感佩戴。由于用户对耳机的佩戴感知越来越弱,因此当耳机从耳部掉落下来,也存在不易感知的问题,耳机的丢失会给用户造成一定的财产损失。Existing TWS earphones are more and more compact and thin, emphasizing no sense of wearing. Since the user's perception of wearing the earphone is getting weaker and weaker, when the earphone falls from the ear, there is also a problem that it is not easy to perceive, and the loss of the earphone will cause certain property damage to the user.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist the understanding of the technical solutions of the present invention, and does not mean that the above content is the prior art.
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提供一种耳机状态检测方法、装置、耳机及可读存储介质,旨在解决现有的用户对耳机的佩戴感知越来越弱,导致无法及时获知耳机佩戴状态的技术问题。The main purpose of the present invention is to provide an earphone state detection method, device, earphone and readable storage medium, aiming to solve the technical problem that the existing user's wearing perception of the earphone is getting weaker and weaker, resulting in the inability to know the earphone wearing state in time. .
为实现上述目的,本发明提供一种耳机状态检测方法,所述的耳机状态 检测方法包括以下步骤:In order to achieve the above object, the present invention provides a method for detecting the state of an earphone, and the method for detecting the state of the earphone comprises the following steps:
基于所述压力传感器检测所述耳机对应的压力数据,并获取所述压力数据对应的持续时间;Detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data;
基于所述压力数据、所述持续时间,确定所述耳机的初始状态;determining an initial state of the earphone based on the pressure data and the duration;
获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。The detection data of the wearing detection module of the earphone is acquired, and the target state of the earphone is determined based on the detection data and the initial state of the earphone.
进一步地,所述基于所述压力数据、所述持续时间,确定所述耳机的初始状态的步骤包括:Further, the step of determining the initial state of the earphone based on the pressure data and the duration includes:
当所述压力数据大于或等于预设压力值,且所述持续时间大于或等于第一预设时长时,确定所述耳机的初始状态为手持;When the pressure data is greater than or equal to a preset pressure value, and the duration is greater than or equal to a first preset duration, determining that the initial state of the earphone is hand-held;
当所述压力数据小于所述预设压力值时,确定所述耳机的初始状态为非手持。When the pressure data is less than the preset pressure value, it is determined that the initial state of the earphone is hands-free.
进一步地,所述获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态的步骤包括:Further, the step of obtaining the detection data of the wearing detection module of the headset, and determining the target state of the headset based on the detection data and the initial state of the headset includes:
基于所述检测数据确定所述耳机与耳朵的接触状态;determining the contact state between the earphone and the ear based on the detection data;
基于所述耳机的初始状态以及所述接触状态确定所述耳机的目标状态。A target state of the earphone is determined based on the initial state of the earphone and the contact state.
进一步地,所述检测数据包括检测值和所述检测值对应的检测时长,所述基于所述检测数据确定所述耳机与耳朵的接触状态的步骤包括:Further, the detection data includes a detection value and a detection duration corresponding to the detection value, and the step of determining the contact state between the earphone and the ear based on the detection data includes:
当所述检测值在预设区间且所述检测时长大于第二预设时长时,确定所述接触状态为已接触;When the detection value is within a preset interval and the detection duration is greater than a second preset duration, determining that the contact state is contacted;
当所述检测值不在预设区间时,确定所述接触状态为非接触。When the detected value is not within a preset interval, it is determined that the contact state is non-contact.
进一步地,所述基于所述接触状态以及所述耳机的初始状态确定所述耳机的目标状态的步骤包括:Further, the step of determining the target state of the earphone based on the contact state and the initial state of the earphone includes:
当确定所述耳机的初始状态为手持、所述接触状态为已接触时,确定所述耳机的目标状态为开始佩戴耳机;When it is determined that the initial state of the earphone is hand-held and the contact state is contacted, the target state of the earphone is determined to be starting to wear the earphone;
当确定所述耳机的初始状态为手持、所述接触状态为非接触时,确定所 述耳机的目标状态为手持耳机;When it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, the target state of the earphone is determined to be the hand-held earphone;
当确定所述耳机的初始状态为非手持、所述接触状态为已接触时,确定所述耳机的目标状态为耳机佩戴中;When it is determined that the initial state of the earphone is non-handheld and the contact state is contacted, the target state of the earphone is determined to be the earphone being worn;
当确定所述耳机的初始状态为非手持、所述接触状态为非接触时,确定所述耳机的目标状态为耳机脱落。When it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, it is determined that the target state of the earphone is that the earphone is falling off.
进一步地,所述当确定所述耳机的初始状态为手持、所述接触状态为非接触时,确定所述耳机的目标状态为手持耳机的步骤包括:Further, when it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, the step of determining that the target state of the earphone is the hand-held earphone includes:
在预设时间内,获取所述耳机的入盒检测模块的检测数据;Acquire the detection data of the box-in-box detection module of the earphone within a preset time;
基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Determine whether the earphone is in the earphone box based on the detection data of the box-in-box detection module;
当所述耳机在耳机盒中时,更新所述耳机的目标状态为耳机已入盒。When the earphone is in the earphone box, the target state of the earphone is updated to be that the earphone is in the box.
进一步地,所述当确定所述耳机的初始状态为非手持、所述接触状态为非接触时,确定所述耳机的目标状态为耳机脱落的步骤之后,包括:Further, when it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, and after the step of determining that the target state of the earphone is the earphone falling off, the method includes:
获取所述耳机的入盒检测模块的检测数据,并基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Obtain the detection data of the box-in-box detection module of the earphone, and determine whether the earphone is in the earphone box based on the detection data of the box-in detection module;
当所述耳机不在耳机盒中时,发送耳机脱落告警信息至预设终端。When the earphone is not in the earphone box, the earphone falling off alarm information is sent to the preset terminal.
进一步地,所述耳机状态检测装置包括:Further, the headset state detection device includes:
检测模块,用于基于所述压力传感器检测所述耳机对应的压力数据,并获取所述压力数据对应的持续时间;a detection module, configured to detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data;
比较模块,用于基于所述压力数据、所述持续时间,确定所述耳机的初始状态;a comparison module, configured to determine the initial state of the earphone based on the pressure data and the duration;
确定模块,用于获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。A determination module, configured to acquire detection data of a wearing detection module of the earphone, and determine a target state of the earphone based on the detection data and the initial state of the earphone.
此外,为实现上述目的,本发明还提供一种耳机状态检测耳机,所述耳机包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耳机状态检测程序,所述耳机状态检测程序被所述处理器执行时实现上述任一项所述的耳机状态检测方法的步骤。In addition, in order to achieve the above object, the present invention also provides an earphone state detection earphone, the earphone includes: a memory, a processor, and an earphone state detection program stored in the memory and running on the processor, so When the earphone state detection program is executed by the processor, the steps of any one of the earphone state detection methods described above are implemented.
此外,为实现上述目的,本发明还提供一种可读存储介质,所述可读存储介质上存储有耳机状态检测程序,所述耳机状态检测程序被处理器执行时实现上述任一项所述的耳机状态检测方法的步骤。In addition, in order to achieve the above object, the present invention also provides a readable storage medium, on which a headphone state detection program is stored, and when the headphone state detection program is executed by a processor, any of the above The steps of the headset state detection method.
本发明基于所述压力传感器检测所述耳机对应的压力数据,并获取所述压力数据对应的持续时间,而后基于所述压力数据、所述持续时间,确定所述耳机的初始状态,接下来获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。通过压力传感器检测的压力数据以及持续时间,判定用户是否正在进行佩戴、摘取耳机等人为操作,进一步结合佩戴检测模块的检测数据确定耳机的最终状态,实现了耳机状态的实时检测,同时可以准确定位当前耳机的佩戴状态(包括脱落),防止因无法及时获知耳机佩戴状态,导致耳机丢失,给用户带来经济损失。The present invention detects the pressure data corresponding to the earphone based on the pressure sensor, and obtains the duration corresponding to the pressure data, and then determines the initial state of the earphone based on the pressure data and the duration, and then obtains The detection data of the wearing detection module of the headset, and the target state of the headset is determined based on the detection data and the initial state of the headset. Through the pressure data and duration detected by the pressure sensor, it is determined whether the user is wearing or taking off the earphones, and further combined with the detection data of the wearing detection module to determine the final state of the earphone, which realizes the real-time detection of the earphone state, and can accurately Locate the current wearing status (including falling off) of the headset to prevent loss of the headset due to inability to know the wearing status of the headset in time, resulting in economic losses to the user.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境中耳机的结构示意图;1 is a schematic structural diagram of a headset in a hardware operating environment involved in an embodiment of the present invention;
图2为本发明耳机状态检测方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the earphone state detection method according to the present invention;
图3为本发明耳机状态检测方法一实施例中耳机进行佩戴检测的流程示意图;FIG. 3 is a schematic flowchart of wearing detection of an earphone in an embodiment of the earphone state detection method of the present invention;
图4为本发明耳机状态检测方法一实施例中耳机佩戴过程中时间累计的流程示意图;FIG. 4 is a schematic flowchart of time accumulation during earphone wearing in an embodiment of the earphone state detection method of the present invention;
图5为本发明耳机状态检测方法一实施例中耳机入盒检测的流程示意图;FIG. 5 is a schematic flowchart of earphone box detection in an embodiment of the earphone state detection method of the present invention;
图6为本发明耳机状态检测装置实施例的功能模块示意图。FIG. 6 is a schematic diagram of functional modules of an embodiment of an apparatus for detecting an earphone state according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限 定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境中耳机的结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic structural diagram of an earphone in a hardware operating environment involved in an embodiment of the present invention.
如图1所示,该耳机可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the headset may include: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 . Among them, the communication bus 1002 is used to realize the connection and communication between these components. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (eg, a WI-FI interface). The memory 1005 may be high-speed RAM memory, or may be non-volatile memory, such as disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
本领域技术人员可以理解,图1中示出的目标检测***结构并不构成对耳机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the target detection system shown in FIG. 1 does not constitute a limitation on the earphone, and may include more or less components than shown, or combine some components, or arrange different components.
如图1所示,作为一种可读存储介质的存储器1005中可以包括操作***、网络通信模块、用户接口模块以及耳机状态检测程序。As shown in FIG. 1 , the memory 1005 as a readable storage medium may include an operating system, a network communication module, a user interface module and a headset state detection program.
在图1所示的耳机中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接用户端,与用户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的耳机状态检测程序。In the headset shown in FIG. 1 , the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect to the client and perform data communication with the client; and the processor 1001 can be used for The earphone state detection program stored in the memory 1005 is called.
在本实施例中,耳机包括:存储器1005、处理器1001及存储在所述存储器1005上并可在所述处理器1001上运行的耳机状态检测程序,其中,处理器1001调用存储器1005中存储的耳机状态检测程序时,执行本申请各个实施例提供的耳机状态检测方法的步骤。In this embodiment, the headset includes: a memory 1005 , a processor 1001 , and a headset state detection program stored on the memory 1005 and executable on the processor 1001 , wherein the processor 1001 calls the program stored in the memory 1005 During the earphone state detection program, the steps of the earphone state detection method provided by each embodiment of the present application are performed.
本发明还提供一种耳机状态检测方法,参照图2,图2为本发明耳机状态检测方法第一实施例的流程示意图。The present invention also provides an earphone state detection method. Referring to FIG. 2 , FIG. 2 is a schematic flowchart of the first embodiment of the earphone state detection method of the present invention.
本发明实施例提供了耳机状态检测方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。This embodiment of the present invention provides an embodiment of a method for detecting an earphone state. It should be noted that although a logical sequence is shown in the flowchart, in some cases, the shown or described steps.
在本实施例中,该耳机状态检测方法包括:In this embodiment, the earphone state detection method includes:
步骤S100,基于所述压力传感器检测所述耳机对应的压力数据,并获取 所述压力数据对应的持续时间;Step S100, detecting the pressure data corresponding to the earphone based on the pressure sensor, and acquiring the duration corresponding to the pressure data;
在本实施例中,一般情况下,无线耳机主要由主控模块、无线通信模块、扬声器、多个不同功能的麦克风、充电电池等组成,主控模块通过无线通信模块与主设备连接,获取主设备发送的数据或向主设备发送数据。进一步地,为了检测耳机的佩戴状态,无线耳机还设置有佩戴检测模块、压力传感器模块,其中,佩戴检测模块用于检测耳机与耳朵接触,即耳机是否处于佩戴状态。In this embodiment, in general, the wireless headset is mainly composed of a main control module, a wireless communication module, a speaker, a plurality of microphones with different functions, a rechargeable battery, etc. The main control module is connected to the main device through the wireless communication module to obtain the main control module. data sent by the device or to the master device. Further, in order to detect the wearing state of the headset, the wireless headset is further provided with a wearing detection module and a pressure sensor module, wherein the wearing detection module is used to detect whether the headset is in contact with the ear, that is, whether the headset is in a wearing state.
具体地,压力传感器模块设置在用户习惯性拿取耳机的位置的壳体内侧,例如耳机柄,压力传感器可以检测到耳机壳体的形变,检测到压力大小,同时累计该压力的持续时间,当检测到的压力大于阈值时,可以判定耳机被用户拿取,压力数据对应的持续时间表示用户在该持续时间内,一直在拿着耳机或进行佩戴耳机、摘取耳机等操作。Specifically, the pressure sensor module is arranged on the inside of the casing where the user habitually takes the earphone, such as the earphone handle. The pressure sensor can detect the deformation of the earphone casing, detect the pressure, and accumulate the duration of the pressure. When When the detected pressure is greater than the threshold, it can be determined that the earphone is taken by the user, and the duration corresponding to the pressure data indicates that the user has been holding the earphone or performing operations such as wearing or removing the earphone during the duration.
步骤S200,基于所述压力数据、所述持续时间,确定所述耳机的初始状态;Step S200, determining the initial state of the earphone based on the pressure data and the duration;
在本实施例中,根据压力传感器检测到的压力数据,以及累计压力数据对应的持续时间,首先确定耳机的初始状态,初始状态包括手持和非手持两种状态,其中,手持表示用户用手拿着耳机,可能在进行佩戴耳机、摘取耳机等操作,非手持表示当前用户没有对耳机进行任何手动操作。In this embodiment, according to the pressure data detected by the pressure sensor and the duration corresponding to the accumulated pressure data, the initial state of the earphone is first determined, and the initial state includes two states of hand-held and non-hand-held. If you are wearing the headset, you may be performing operations such as putting on the headset, removing the headset, etc. Non-handheld means that the current user has not performed any manual operations on the headset.
具体地,步骤S200包括:Specifically, step S200 includes:
步骤S210,当所述压力数据大于或等于所述预设压力值,且所述持续时间大于或等于所述第一预设时长时,确定所述耳机的初始状态为手持;Step S210, when the pressure data is greater than or equal to the preset pressure value, and the duration is greater than or equal to the first preset duration, determine that the initial state of the earphone is hand-held;
步骤S220,当所述压力数据小于所述预设压力值时,确定所述耳机的初始状态为非手持。Step S220, when the pressure data is less than the preset pressure value, determine that the initial state of the earphone is hands-free.
在本实施例中,预先设置一个压力阈值,用于判断用户是否对耳机进行了按压操作,第一预设时长用于检测压力操作的持续时间,如设置5秒,当压力数据大于或等于预设压力值,且压力的持续时间大于或等于第一预设时长时,才确定此时耳机的初始状态为手持,即用户用手拿着耳机,持续时间是用于排除用户只是触碰耳机。In this embodiment, a pressure threshold is preset to determine whether the user has pressed the earphone. The first preset duration is used to detect the duration of the pressure operation. For example, 5 seconds is set. When the pressure data is greater than or equal to the preset time When the pressure value is set, and the duration of the pressure is greater than or equal to the first preset duration, it is determined that the initial state of the earphone is hand-held, that is, the user holds the earphone by hand, and the duration is used to exclude that the user just touches the earphone.
进一步地,当压力传感器检测到的压力数据小于预设压力值,说明用户没有对耳机进行按压操作,即用户没有用手拿着耳机,此时无需对持续时间 进行判定,只要用户没有对耳机进行按压操作,即压力数据小于预设压力值时,确则定耳机的初始状态为非手持。Further, when the pressure data detected by the pressure sensor is less than the preset pressure value, it means that the user does not press the earphone, that is, the user does not hold the earphone with his hand. Press operation, that is, when the pressure data is less than the preset pressure value, it is determined that the initial state of the earphone is non-handheld.
步骤S300,获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。Step S300, acquiring detection data of the wearing detection module of the earphone, and determining a target state of the earphone based on the detection data and the initial state of the earphone.
在本实施例中,耳机的佩戴检测模块用于检测耳机与耳朵接触,即耳机是否处于佩戴状态,佩戴检测模块包含但不限于光学传感器佩戴检测单元或电容式检测装置等。例如,光学传感器佩戴检测单元检测发射红外光,遇到人耳后反射光信号,当光学传感器佩戴检测单元接收到反射的光信号时,判定耳机与耳朵接触;或电容式检测装置检测到耦合电容值,耦合电容值大于电容阈值,则判断耳机与耳朵接触。In this embodiment, the wearing detection module of the earphone is used to detect whether the earphone is in contact with the ear, that is, whether the earphone is in a wearing state. The wearing detection module includes but is not limited to an optical sensor wearing detection unit or a capacitive detection device. For example, the optical sensor wearing detection unit detects and emits infrared light, and the reflected light signal after encountering the human ear, when the optical sensor wearing detection unit receives the reflected light signal, it is determined that the earphone is in contact with the ear; or the capacitive detection device detects the coupling capacitance If the coupling capacitance value is greater than the capacitance threshold, it is judged that the earphone is in contact with the ear.
具体地,步骤S300包括:Specifically, step S300 includes:
步骤S310,基于所述检测数据确定所述耳机与耳朵的接触状态;Step S310, determining the contact state between the earphone and the ear based on the detection data;
具体地,步骤S310包括:Specifically, step S310 includes:
步骤S311,当所述检测值在预设区间且所述检测时长大于第二预设时长时,确定所述接触状态为已接触;Step S311, when the detection value is within a preset interval and the detection duration is greater than a second preset duration, determine that the contact state is contacted;
步骤S312,当所述检测值不在预设区间时,确定所述接触状态为非接触。Step S312, when the detected value is not within a preset interval, determine that the contact state is non-contact.
在本实施例中,耳机的佩戴检测模块的检测数据包括检测值和检测值对应的检测时长,预设区间用于判断检测值是否有效,如佩戴检测模块为光学传感器佩戴检测单元时,检测值为光信号强度,则预设区间为光信号的预设范围,当光信号强度在预设区间时,判定耳机与耳朵接触,并行该接触需要保持一定的时长,即检测时长大于第二预设时长时,确定耳机与耳朵的接触状态为已接触。否则,当检测值不在预设区间时,则确定耳机与耳朵的接触状态为非接触。In this embodiment, the detection data of the wearing detection module of the earphone includes the detection value and the detection duration corresponding to the detection value, and the preset interval is used to judge whether the detection value is valid. For example, when the wearing detection module is an optical sensor wearing detection unit, the detection value is the optical signal strength, and the preset interval is the preset range of the optical signal. When the optical signal strength is within the preset interval, it is determined that the earphone is in contact with the ear. In parallel, the contact needs to be maintained for a certain period of time, that is, the detection period is longer than the second preset period. When the time is long, it is determined that the contact state between the earphone and the ear is in contact. Otherwise, when the detected value is not in the preset interval, it is determined that the contact state between the earphone and the ear is non-contact.
步骤S320,基于所述耳机的初始状态以及所述接触状态确定所述耳机的目标状态。Step S320, determining a target state of the earphone based on the initial state of the earphone and the contact state.
在本实施例中,一般情况下,耳机的状态包括:开始佩戴耳机、手持耳机、耳机佩戴中、耳机脱落以及耳机放置耳机专用盒。根据耳机的初始状态以及耳机与耳朵的接触状态确定耳机的目标状态,也就是当前的真实状态。In this embodiment, generally, the states of the earphones include: starting to wear the earphones, holding the earphones, wearing the earphones, falling off the earphones, and placing the earphones in a special box for earphones. The target state of the earphone, that is, the current real state, is determined according to the initial state of the earphone and the contact state of the earphone and the ear.
具体地,步骤S320包括:Specifically, step S320 includes:
步骤S321,当确定所述耳机的初始状态为手持、所述接触状态为已接触 时,确定所述耳机的目标状态为开始佩戴耳机;Step S321, when determining that the initial state of the earphone is hand-held and the contact state is contacted, determine that the target state of the earphone is to start wearing the earphone;
在本实施例中,用户打开耳机收纳盒中拿取耳机,当耳机的压力传感器检测用户手指的拿取动作,即检测到的压力数据大于或等于预设压力值,且压力数据的持续时间大于或等于第一预设时长,即耳机的初始状态为手持;同时,耳机的佩戴检测模块,如光学传感器检测到反射的光信号,或电容式检测装置检测与皮肤接触,即耳机与耳朵的接触状态为已接触,则判断耳机从收纳盒中取出,并完成佩戴动作,也就是说,当确定耳机的初始状态为手持、接触状态为已接触时,确定耳机的目标状态为开始佩戴耳机。In this embodiment, the user opens the earphone storage box to take the earphone. When the pressure sensor of the earphone detects the taking action of the user's finger, the detected pressure data is greater than or equal to the preset pressure value, and the duration of the pressure data is greater than or equal to or equal to the first preset duration, that is, the initial state of the headset is hand-held; at the same time, the wearing detection module of the headset, such as the optical sensor detects the reflected light signal, or the capacitive detection device detects the contact with the skin, that is, the contact between the headset and the ear If the state is contacted, it is determined that the earphone is taken out from the storage box and the wearing action is completed, that is, when the initial state of the earphone is determined to be hand-held and the contact state is determined to be in contact, the target state of the earphone is determined to start wearing the earphone.
举例说明,参照图3,横坐标为时间,用户在非佩戴状态时从耳机收纳盒中拿取耳机,当耳机柄壳体内侧的压力传感器检测用户手指的拿取动作,即检测到的压力数据大于阈值△F,则进行时间累积。如果压力传感器检测到的压力数据大于阈值△F的时间累积大于△t1,同时,耳机的佩戴检测模块检测到有效数据,如耳机的光学传感器检测到反射的光信号,或电容式检测装置检测与皮肤接触,则开始时间累积,如果该时间累积大于△t2,,则判断用户将耳机从收纳盒中取出,并完成佩戴动作。需要说明的是,用户在进行耳机佩戴的过程中,会存在把手松开的情况,因此,参照图4,只要压力数据大于阈值△F的时间累积大于△t1以及耳机与耳朵的接触时间累积大于△t2,就满足初始状态为手持、接触状态为已接触的条件。For example, referring to FIG. 3, the abscissa is time, the user takes the earphone from the earphone storage box in the non-wearing state, when the pressure sensor inside the earphone handle shell detects the taking action of the user's finger, that is, the detected pressure data If it is greater than the threshold ΔF, time accumulation is performed. If the pressure data detected by the pressure sensor is greater than the threshold ΔF and the accumulated time is greater than Δt1, at the same time, the wearing detection module of the headset detects valid data, such as the optical sensor of the headset detects the reflected light signal, or the capacitive detection device detects and Skin contact, start time accumulation, if the time accumulation is greater than Δt2, it is determined that the user takes the earphones out of the storage box and completes the wearing action. It should be noted that during the process of wearing the earphone, the user may loosen the handle. Therefore, referring to FIG. 4 , as long as the time accumulation of the pressure data greater than the threshold ΔF is greater than Δt1 and the accumulation of the contact time between the earphone and the ear is greater than Δt2, it satisfies the condition that the initial state is hand-held and the contact state is contacted.
步骤S322,当确定所述耳机的初始状态为手持、所述接触状态为非接触时,确定所述耳机的目标状态为手持耳机;Step S322, when it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, determine that the target state of the earphone is the hand-held earphone;
在本实施例中,耳机的压力传感器检测用户手指的拿取动作,但是此时佩戴检测模块并未检测到有效数据,即耳机与耳朵的接触状态为非接触,也就是说,当确定耳机的初始状态为手持、接触状态为非接触时,确定耳机的目标状态为手持耳机。手持耳机的状态可能为用户只是拿着耳机,或者用户在进行耳机摘取等操作。In this embodiment, the pressure sensor of the earphone detects the picking action of the user's finger, but the wearing detection module does not detect valid data at this time, that is, the contact state between the earphone and the ear is non-contact, that is, when the earphone is determined to be in contact with the ear When the initial state is hand-held and the contact state is non-contact, the target state of the earphone is determined to be the hand-held earphone. The state of holding the earphone may be that the user is only holding the earphone, or the user is performing operations such as taking off the earphone.
举例说明,用户在耳机佩戴状态下从耳部取下耳机,当耳机内的压力传感器检测用户手指的拿取动作,即检测到的压力大于阈值△F,且检测到的压力大于阈值△F的时间累积大于△t1。在检测到的压力持续大于阈值△F的时间内,耳机的佩戴检测模块未检测到有效数据,如耳机的光学传感器未检测到反射的光信号,或电容式检测装置检测到未与皮肤接触,则判断耳机从耳 部取下,处于非佩戴状态。For example, when the user removes the earphone from the ear when the earphone is wearing, when the pressure sensor in the earphone detects the picking action of the user's finger, that is, the detected pressure is greater than the threshold ΔF, and the detected pressure is greater than the threshold ΔF. The time accumulation is greater than Δt1. During the time when the detected pressure is continuously greater than the threshold ΔF, the wearing detection module of the earphone does not detect valid data, such as the optical sensor of the earphone does not detect the reflected light signal, or the capacitive detection device detects that it is not in contact with the skin, Then it is judged that the earphone is removed from the ear and is in a non-wearing state.
步骤S323,当确定所述耳机的初始状态为非手持、所述接触状态为已接触时,确定所述耳机的目标状态为耳机佩戴中;Step S323, when it is determined that the initial state of the earphone is non-handheld and the contact state is contacted, determine that the target state of the earphone is the earphone being worn;
在本实施例中,在耳机处于佩戴时,通常不会用手对耳机进行触摸操作,因此,当耳机的压力传感器检测到的压力数据小于预设压力值,即用户没有对耳机进行按压操作,以及当前耳机与耳朵的接触状态为已接触,可以确定耳机目前处于佩戴状态中。需要说明的是,耳机的佩戴检测模块以及压力传感器持续进行数据监测,保证当耳机脱落或佩戴异常时可以及时发现,并进行告警。In this embodiment, when the earphone is being worn, the earphone is usually not touched by hand. Therefore, when the pressure data detected by the pressure sensor of the earphone is less than the preset pressure value, that is, the user does not press the earphone, And the current state of contact between the earphone and the ear is in contact, it can be determined that the earphone is currently in a wearing state. It should be noted that the wearing detection module of the headset and the pressure sensor continuously monitor data to ensure that when the headset falls off or is abnormally worn, it can be detected in time and an alarm will be issued.
步骤S324,当确定所述耳机的初始状态为非手持、所述接触状态为非接触时,确定所述耳机的目标状态为耳机脱落。Step S324, when it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, determine that the target state of the earphone is that the earphone is off.
在本实施例中,当耳机的压力传感器检测到的压力数据小于预设压力值,即用户没有对耳机进行按压操作,耳机的佩戴检测模块,如耳机的光学传感器未检测到反射的光信号,或电容式检测装置检测到未与皮肤接触,则判定耳机未佩戴正确或脱落。因为耳机的佩戴检测模块以及压力传感器持续进行数据监测,故可以保证当耳机脱落或佩戴异常时能及时被监测到,并通知用户,避免导致耳机丢失,给用户带来经济损失。In this embodiment, when the pressure data detected by the pressure sensor of the earphone is less than the preset pressure value, that is, the user does not press the earphone, the wearing detection module of the earphone, such as the optical sensor of the earphone, does not detect the reflected light signal, Or if the capacitive detection device detects that it is not in contact with the skin, it is determined that the earphone is not worn correctly or falls off. Because the wearing detection module of the headset and the pressure sensor continuously monitor data, it can ensure that when the headset falls off or is abnormally worn, it can be detected in time, and the user is notified to avoid loss of the headset and economic losses to the user.
本实施例提出的耳机状态检测方法,获取预设的各个分组各自对应的超参数,分别发送各个超参数至各自对应的分组中的参与方,以供所述分组中各个参与方基于接收到的耳机状态检测各自模型参数,分组中的参与方之间进行联邦学习,得到各个分组对应的子目标模型,其中,各个分组包括相同数量的参与方,而后基于各个子目标模型以及各个分组各自对应的超参数进行演化计算,得到中间超参数,并基于所述中间超参数优化各个分组各自对应的超参数,最后基于优化后的各个分组各自对应的超参数进行迭代演化计算,直到检测到迭代停止条件,得到目标超参数。通过演化计算实现在联邦学习优化模型参数的基础上,同步优化联邦学习的模型超参数,从而避免人为手动调整超参数,在提升联邦学习中超参数优化效率的同时,显著提升了联邦学习模型的性能。In the headset state detection method proposed in this embodiment, the corresponding hyperparameters of each preset group are obtained, respectively, and each hyperparameter is sent to the participants in the corresponding group, so that each participant in the group can use the received The headset state detects the respective model parameters, and the participants in the group perform federated learning to obtain the sub-goal model corresponding to each group, wherein each group includes the same number of participants, and then based on each sub-goal model and the corresponding Perform evolution calculation on hyperparameters to obtain intermediate hyperparameters, and optimize the hyperparameters corresponding to each group based on the intermediate hyperparameters, and finally perform iterative evolution calculation based on the hyperparameters corresponding to each optimized group until the iteration stop condition is detected. , get the target hyperparameters. Based on the optimization of model parameters in federated learning, the model hyperparameters of federated learning can be optimized synchronously through evolutionary computing, so as to avoid manual manual adjustment of hyperparameters, which not only improves the efficiency of hyperparameter optimization in federated learning, but also significantly improves the performance of federated learning models. .
基于第一实施例,提出本发明耳机状态检测方法的第二实施例,在本实 施例中,步骤S322包括:Based on the first embodiment, a second embodiment of the earphone state detection method of the present invention is proposed. In this embodiment, step S322 includes:
步骤a,在预设时间内,获取所述耳机的入盒检测模块的检测数据;Step a, within a preset time, obtain the detection data of the box-in-box detection module of the earphone;
步骤b,基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Step b, based on the detection data of the box-in-box detection module, determine whether the earphone is in the earphone box;
步骤c,当所述耳机在耳机盒中时,更新所述耳机的目标状态为耳机已入盒。Step c, when the earphone is in the earphone box, update the target state of the earphone to be that the earphone is in the box.
在本实施例中,耳机的压力传感器检测用户手指的拿取动作,但是此时佩戴检测模块并未检测到有效数据,即耳机与耳朵的接触状态为非接触,也就是说,当确定耳机的初始状态为手持、接触状态为非接触时,确定耳机的目标状态为手持耳机。手持耳机的状态可能为用户只是拿着耳机,或者用户在进行耳机摘取等操作。可以进一步确定耳机是否被放置在耳机收纳盒中,其中,耳机收纳盒设置有入盒监测装置,当耳机入盒时,可以发送数据给耳机的入盒检测模块,或者耳机的入盒检测模块主动获取入盒监测装置的数据,从而确定耳机是否入盒。In this embodiment, the pressure sensor of the earphone detects the picking action of the user's finger, but the wearing detection module does not detect valid data at this time, that is, the contact state between the earphone and the ear is non-contact, that is, when the earphone is determined to be in contact with the ear When the initial state is hand-held and the contact state is non-contact, the target state of the earphone is determined to be the hand-held earphone. The state of holding the earphone may be that the user is only holding the earphone, or the user is performing operations such as taking off the earphone. It can be further determined whether the earphones are placed in the earphone storage box, wherein the earphone storage box is provided with a box entry monitoring device, when the earphones are put into the box, data can be sent to the earphone box entry detection module, or the earphone box entry detection module actively. Obtain the data of the box-in monitoring device to determine whether the earphone is in the box.
具体地,当前确定耳机的状态为手持耳机时,则在预设时间内,获取通过耳机的入盒检测模块的检测数据确定耳机是否在耳机盒中,当耳机在耳机盒中时,更新耳机的当前状态为耳机已入盒。Specifically, when it is currently determined that the state of the earphone is a hand-held earphone, the detection data of the box-in-box detection module of the earphone is obtained within a preset time to determine whether the earphone is in the earphone box, and when the earphone is in the earphone box, the data of the earphone is updated. The current status is that the headset is in the box.
举例说明,如果耳机的入盒检测模块在时间△t3后检测到耳机入盒,则判定用户将耳机取下并入盒,如图5所示,横坐标为时间,如果当耳机的压力传感器检测用户手指的拿取动作,即检测到的压力大于阈值△F起始,时间△t3后入盒检测模块未检测到耳机入盒,则判定用户将耳机取下但未入盒。For example, if the box detection module of the earphone detects that the earphone is in the box after time Δt3, it is determined that the user removes the earphone and incorporates it into the box, as shown in Figure 5, the abscissa is the time, if the pressure sensor of the earphone detects When the user's finger picks up, that is, the detected pressure is greater than the threshold ΔF, and after the time Δt3, the box-in detection module does not detect that the earphones are in the box, and it is determined that the user has removed the earphones but has not put them in the box.
进一步地,在一实施例中,所述步骤S324之后,包括:Further, in one embodiment, after the step S324, it includes:
步骤d,获取所述耳机的入盒检测模块的检测数据,并基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Step d, obtain the detection data of the box-into-box detection module of the earphone, and determine whether the earphone is in the earphone box based on the detection data of the box-in detection module;
步骤e,当所述耳机不在耳机盒中时,发送耳机脱落告警信息至预设终端。Step e, when the earphone is not in the earphone box, send the earphone falling off alarm information to the preset terminal.
在本实施例中,当耳机的压力传感器检测到的压力数据小于预设压力值,即用户没有对耳机进行按压操作,耳机的佩戴检测模块,如耳机的光学传感器未检测到反射的光信号,或电容式检测装置检测到未与皮肤接触,则判定耳机未佩戴正确或脱落。此时,可以进一步确定耳机是否被放置在耳机收纳 盒中,其中,耳机收纳盒设置有入盒监测装置,当耳机入盒时,可以发送数据给耳机的入盒检测模块,或者耳机的入盒检测模块主动获取入盒监测装置的数据,从而确定耳机是否入盒。In this embodiment, when the pressure data detected by the pressure sensor of the earphone is less than the preset pressure value, that is, the user does not press the earphone, the wearing detection module of the earphone, such as the optical sensor of the earphone, does not detect the reflected light signal, Or if the capacitive detection device detects that it is not in contact with the skin, it is determined that the earphone is not worn correctly or falls off. At this time, it can be further determined whether the earphone is placed in the earphone storage box, wherein the earphone storage box is provided with a box-in monitoring device, and when the earphone is in the box, data can be sent to the earphone box-in detection module, or the earphone box-in detection module The detection module actively obtains the data of the box-in monitoring device, so as to determine whether the earphone is in the box.
具体地,当前确定耳机的状态为耳机脱落时,则在预设时间内,获取通过耳机的入盒检测模块的检测数据确定耳机是否在耳机盒中,当耳机在耳机盒中时,更新耳机的当前状态为耳机已入盒。否则,当耳机不在耳机盒中时,向手机等主设备发送佩戴异常的命令,提醒用户耳机发生脱落,从而实现耳机掉落的提醒。Specifically, when it is currently determined that the state of the earphone is that the earphone has fallen off, then within a preset time, the detection data of the earphone's box-in detection module is obtained to determine whether the earphone is in the earphone box, and when the earphone is in the earphone box, the data of the earphone is updated. The current status is that the headset is in the box. Otherwise, when the earphone is not in the earphone box, an abnormal wearing command is sent to the main device such as the mobile phone to remind the user that the earphone has fallen off, so as to realize the reminder of the earphone falling.
本实施例提出的耳机状态检测方法,通过耳机的入盒检测模块确定耳机是否被放置在耳机收纳盒中,从而更准确地确定耳机的当前状态,避免发生耳机入盒但却被判定为脱落的情况,提升了耳机佩戴状态判定的精准度。同时当耳机发生脱落或异常佩戴时,及时提醒用户,防止因无法及时获知耳机佩戴状态,导致耳机丢失,给用户带来经济损失。The earphone state detection method proposed in this embodiment determines whether the earphone is placed in the earphone storage box through the earphone box-in detection module, so as to more accurately determine the current state of the earphone, and avoid the occurrence of the earphone entering the box but being judged as falling off. This improves the accuracy of determining the wearing status of the headset. At the same time, when the earphone falls off or is worn abnormally, the user is reminded in time to prevent the earphone from being lost due to the inability to know the wearing status of the earphone in time, which will bring economic losses to the user.
本发明进一步提供一种耳机状态检测装置,参照图6,图6为本发明耳机状态检测装置实施例的功能模块示意图。The present invention further provides an earphone state detection device. Referring to FIG. 6 , FIG. 6 is a schematic diagram of functional modules of an embodiment of the earphone state detection device of the present invention.
检测模块10,用于基于所述压力传感器检测所述耳机对应的压力数据,并获取所述压力数据对应的持续时间;A detection module 10, configured to detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data;
初始确定模块20,用于基于所述压力数据、所述持续时间,确定所述耳机的初始状态;an initial determination module 20, configured to determine an initial state of the earphone based on the pressure data and the duration;
目标确定模块30,用于获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。The target determination module 30 is configured to acquire the detection data of the wearing detection module of the earphone, and determine the target state of the earphone based on the detection data and the initial state of the earphone.
进一步地,所述初始确定模块20还用于:Further, the initial determination module 20 is also used for:
当所述压力数据大于或等于所述预设压力值,且所述持续时间大于或等于所述第一预设时长时,确定所述耳机的初始状态为手持;When the pressure data is greater than or equal to the preset pressure value, and the duration is greater than or equal to the first preset duration, determining that the initial state of the earphone is hand-held;
当所述压力数据小于所述预设压力值时,确定所述耳机的初始状态为非手持。When the pressure data is less than the preset pressure value, it is determined that the initial state of the earphone is hands-free.
进一步地,所述目标确定模块30还用于:Further, the target determination module 30 is also used for:
基于所述检测数据确定所述耳机与耳朵的接触状态;determining the contact state between the earphone and the ear based on the detection data;
基于所述耳机的初始状态以及所述接触状态确定所述耳机的目标状态。A target state of the earphone is determined based on the initial state of the earphone and the contact state.
进一步地,所述目标确定模块30还用于:Further, the target determination module 30 is also used for:
当所述检测值在预设区间且所述检测时长大于第二预设时长时,确定所述接触状态为已接触;When the detection value is within a preset interval and the detection duration is greater than a second preset duration, determining that the contact state is contacted;
当所述检测值不在预设区间时,确定所述接触状态为非接触。When the detected value is not within a preset interval, it is determined that the contact state is non-contact.
进一步地,所述目标确定模块30还用于:Further, the target determination module 30 is also used for:
当确定所述耳机的初始状态为手持、所述接触状态为已接触时,确定所述耳机的目标状态为开始佩戴耳机;When it is determined that the initial state of the earphone is hand-held and the contact state is contacted, the target state of the earphone is determined to be starting to wear the earphone;
当确定所述耳机的初始状态为手持、所述接触状态为非接触时,确定所述耳机的目标状态为手持耳机;When it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, the target state of the earphone is determined to be the hand-held earphone;
当确定所述耳机的初始状态为非手持、所述接触状态为已接触时,确定所述耳机的目标状态为耳机佩戴中;When it is determined that the initial state of the earphone is non-handheld and the contact state is contacted, the target state of the earphone is determined to be the earphone being worn;
当确定所述耳机的初始状态为非手持、所述接触状态为非接触时,确定所述耳机的目标状态为耳机脱落。When it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, it is determined that the target state of the earphone is that the earphone is falling off.
进一步地,所述目标确定模块30还用于:Further, the target determination module 30 is also used for:
在预设时间内,获取所述耳机的入盒检测模块的检测数据;Acquire the detection data of the box-in-box detection module of the earphone within a preset time;
基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Determine whether the earphone is in the earphone box based on the detection data of the box-in-box detection module;
当所述耳机在耳机盒中时,更新所述耳机的目标状态为耳机已入盒。When the earphone is in the earphone box, the target state of the earphone is updated to be that the earphone is in the box.
进一步地,所述耳机状态检测装置还包括:Further, the headset state detection device also includes:
分析模块,用于获取所述耳机的入盒检测模块的检测数据,并基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;an analysis module, configured to obtain the detection data of the box-into-box detection module of the earphone, and determine whether the earphone is in the earphone box based on the detection data of the box-into-box detection module;
告警模块,用于当所述耳机不在耳机盒中时,发送耳机脱落告警信息至预设终端The alarm module is used to send the alarm information of the earphone falling off to the preset terminal when the earphone is not in the earphone box
此外,本发明实施例还提出一种可读存储介质,所述可读存储介质上存 储有耳机状态检测程序,所述耳机状态检测程序被处理器执行时实现上述各个实施例中耳机状态检测方法的步骤。In addition, an embodiment of the present invention also provides a readable storage medium, where an earphone state detection program is stored on the readable storage medium, and when the earphone state detection program is executed by a processor, the earphone state detection method in each of the foregoing embodiments is implemented A step of.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者***中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台***设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a readable storage medium (such as ROM) as described above. /RAM, magnetic disk, optical disk), including several instructions to make a system device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.

Claims (10)

  1. 一种耳机状态检测方法,其特征在于,应用于设置有压力传感器的耳机,包括:An earphone state detection method, characterized in that it is applied to an earphone provided with a pressure sensor, comprising:
    基于所述压力传感器检测所述耳机对应的压力数据,并获取所述压力数据对应的持续时间;Detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data;
    基于所述压力数据、所述持续时间,确定所述耳机的初始状态;determining an initial state of the earphone based on the pressure data and the duration;
    获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。The detection data of the wearing detection module of the earphone is acquired, and the target state of the earphone is determined based on the detection data and the initial state of the earphone.
  2. 如权利要求1所述的耳机状态检测方法,其特征在于,所述基于所述压力数据、所述持续时间,确定所述耳机的初始状态的步骤包括:The earphone state detection method according to claim 1, wherein the step of determining the initial state of the earphone based on the pressure data and the duration comprises:
    当所述压力数据大于或等于预设压力值,且所述持续时间大于或等于第一预设时长时,确定所述耳机的初始状态为手持;When the pressure data is greater than or equal to a preset pressure value, and the duration is greater than or equal to a first preset duration, determining that the initial state of the earphone is hand-held;
    当所述压力数据小于所述预设压力值时,确定所述耳机的初始状态为非手持。When the pressure data is less than the preset pressure value, it is determined that the initial state of the earphone is hands-free.
  3. 如权利要求1或2所述的耳机状态检测方法,其特征在于,所述获取所述耳机的佩戴检测模块的检测数据,并基于所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态的步骤包括:The earphone state detection method according to claim 1 or 2, wherein the acquisition of the detection data of the wearing detection module of the earphone, and the determination of the state of the earphone based on the detection data and the initial state of the earphone The steps for the target state include:
    基于所述检测数据确定所述耳机与耳朵的接触状态;determining the contact state between the earphone and the ear based on the detection data;
    基于所述耳机的初始状态以及所述接触状态确定所述耳机的目标状态。A target state of the earphone is determined based on the initial state of the earphone and the contact state.
  4. 如权利要求3所述的耳机状态检测方法,其特征在于,所述检测数据包括检测值和所述检测值对应的检测时长,所述基于所述检测数据确定所述耳机与耳朵的接触状态的步骤包括:The earphone state detection method according to claim 3, wherein the detection data includes a detection value and a detection duration corresponding to the detection value, and the method for determining the contact state between the earphone and the ear based on the detection data Steps include:
    当所述检测值在预设区间且所述检测时长大于第二预设时长时,确定所述接触状态为已接触;When the detection value is within a preset interval and the detection duration is greater than a second preset duration, determining that the contact state is contacted;
    当所述检测值不在预设区间时,确定所述接触状态为非接触。When the detected value is not within a preset interval, it is determined that the contact state is non-contact.
  5. 如权利要求3所述的耳机状态检测方法,其特征在于,所述基于所述 接触状态以及所述耳机的初始状态确定所述耳机的目标状态的步骤包括:The earphone state detection method according to claim 3, wherein the step of determining the target state of the earphone based on the contact state and the initial state of the earphone comprises:
    当确定所述耳机的初始状态为手持、所述接触状态为已接触时,确定所述耳机的目标状态为开始佩戴耳机;When it is determined that the initial state of the earphone is hand-held and the contact state is contacted, the target state of the earphone is determined to be starting to wear the earphone;
    当确定所述耳机的初始状态为手持、所述接触状态为非接触时,确定所述耳机的目标状态为手持耳机;When it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, the target state of the earphone is determined to be the hand-held earphone;
    当确定所述耳机的初始状态为非手持、所述接触状态为已接触时,确定所述耳机的目标状态为耳机佩戴中;When it is determined that the initial state of the earphone is non-handheld and the contact state is contacted, the target state of the earphone is determined to be the earphone being worn;
    当确定所述耳机的初始状态为非手持、所述接触状态为非接触时,确定所述耳机的目标状态为耳机脱落。When it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, it is determined that the target state of the earphone is that the earphone is falling off.
  6. 如权利要求5所述的耳机状态检测方法,其特征在于,所述当确定所述耳机的初始状态为手持、所述接触状态为非接触时,确定所述耳机的目标状态为手持耳机的步骤包括:The earphone state detection method according to claim 5, wherein when it is determined that the initial state of the earphone is hand-held and the contact state is non-contact, the step of determining that the target state of the earphone is the hand-held earphone include:
    在预设时间内,获取所述耳机的入盒检测模块的检测数据;Acquire the detection data of the box-in-box detection module of the earphone within a preset time;
    基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Determine whether the earphone is in the earphone box based on the detection data of the box-in-box detection module;
    当所述耳机在耳机盒中时,更新所述耳机的目标状态为耳机已入盒。When the earphone is in the earphone box, the target state of the earphone is updated to be that the earphone is in the box.
  7. 如权利要求5所述的耳机状态检测方法,其特征在于,所述当确定所述耳机的初始状态为非手持、所述接触状态为非接触时,确定所述耳机的目标状态为耳机脱落的步骤之后,包括:The earphone state detection method according to claim 5, wherein when it is determined that the initial state of the earphone is non-handheld and the contact state is non-contact, the target state of the earphone is determined to be that the earphone has fallen off. After the steps, including:
    获取所述耳机的入盒检测模块的检测数据,并基于所述入盒检测模块的检测数据确定所述耳机是否在耳机盒中;Obtain the detection data of the box-in-box detection module of the earphone, and determine whether the earphone is in the earphone box based on the detection data of the box-in detection module;
    当所述耳机不在耳机盒中时,发送耳机脱落告警信息至预设终端。When the earphone is not in the earphone box, the earphone falling off alarm information is sent to the preset terminal.
  8. 一种耳机状态检测装置,其特征在于,所述耳机状态检测装置包括:An earphone state detection device, characterized in that the earphone state detection device comprises:
    检测模块,用于基于所述压力传感器检测所述耳机对应的压力数据,并获取所述压力数据对应的持续时间;a detection module, configured to detect the pressure data corresponding to the earphone based on the pressure sensor, and obtain the duration corresponding to the pressure data;
    初始确定模块,用于基于所述压力数据、所述持续时间,确定所述耳机的初始状态;an initial determination module, configured to determine the initial state of the earphone based on the pressure data and the duration;
    目标确定模块,用于获取所述耳机的佩戴检测模块的检测数据,并基于 所述检测数据以及所述耳机的初始状态确定所述耳机的目标状态。A target determination module, configured to acquire detection data of the wearing detection module of the earphone, and determine the target state of the earphone based on the detection data and the initial state of the earphone.
  9. 一种耳机,其特征在于,所述耳机包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耳机状态检测程序,所述耳机状态检测程序被所述处理器执行时实现如权利要求1至7中任一项所述的耳机状态检测方法的步骤。An earphone, characterized in that the earphone comprises: a memory, a processor, and an earphone state detection program stored on the memory and executable on the processor, the earphone state detection program being executed by the processor When executed, the steps of the earphone state detection method according to any one of claims 1 to 7 are realized.
  10. 一种可读存储介质,其特征在于,所述可读存储介质上存储有所述耳机状态检测程序,所述耳机状态检测程序被处理器执行时实现如权利要求1至7中任一项所述的耳机状态检测方法的步骤。A readable storage medium, characterized in that the earphone state detection program is stored on the readable storage medium, and when the earphone state detection program is executed by a processor, any one of claims 1 to 7 is implemented. The steps of the earphone state detection method described above.
PCT/CN2020/134462 2020-06-30 2020-12-08 Earphone state detection method and device, earphone, and readable storage medium WO2022000998A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010611832.2A CN111770407A (en) 2020-06-30 2020-06-30 Earphone state detection method and device, earphone and readable storage medium
CN202010611832.2 2020-06-30

Publications (1)

Publication Number Publication Date
WO2022000998A1 true WO2022000998A1 (en) 2022-01-06

Family

ID=72722935

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/134462 WO2022000998A1 (en) 2020-06-30 2020-12-08 Earphone state detection method and device, earphone, and readable storage medium

Country Status (2)

Country Link
CN (1) CN111770407A (en)
WO (1) WO2022000998A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501220A (en) * 2022-02-28 2022-05-13 歌尔股份有限公司 Earphone control method, earphone control device, earphone equipment and storage medium
CN115696129A (en) * 2023-01-05 2023-02-03 荣耀终端有限公司 Method and device for recognizing mixed loading of earphones

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770407A (en) * 2020-06-30 2020-10-13 歌尔科技有限公司 Earphone state detection method and device, earphone and readable storage medium
CN112289012A (en) * 2020-10-28 2021-01-29 上海闻泰信息技术有限公司 Reminding method and device, Bluetooth headset and storage medium
CN112492439B (en) * 2020-11-17 2023-01-20 上海闻泰信息技术有限公司 Earphone falling reminding method and device, electronic equipment and storage medium
CN112533126B (en) * 2020-12-16 2022-03-25 歌尔光学科技有限公司 Earphone wearing state detection method, earphone and computer readable storage medium
IT202100000293A1 (en) * 2021-01-08 2022-07-08 St Microelectronics Srl DEVICE AND METHOD OF DETECTING A CHANGE IN THE OPERATING ENVIRONMENT FOR AN ELECTRONIC APPLIANCE
CN113079434A (en) * 2021-04-07 2021-07-06 南京紫牛软件科技有限公司 Control method, device, storage medium and system of audio playing equipment
CN113473292B (en) * 2021-06-29 2024-02-06 芯海科技(深圳)股份有限公司 State detection method, earphone and computer readable storage medium
CN114466300A (en) * 2022-02-28 2022-05-10 深圳曦华科技有限公司 Earphone state detection method and device, earphone and computer storage medium
CN115278431A (en) * 2022-06-24 2022-11-01 维沃移动通信有限公司 State determination method and device, electronic equipment and readable storage medium
CN117255283B (en) * 2023-11-16 2024-04-05 深圳市雅乐电子有限公司 Earphone and control method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130083933A1 (en) * 2011-09-30 2013-04-04 Apple Inc. Pressure sensing earbuds and systems and methods for the use thereof
CN108702567A (en) * 2017-11-27 2018-10-23 深圳市汇顶科技股份有限公司 Earphone, test earphone wearing state method and electronic equipment
CN208489963U (en) * 2018-06-08 2019-02-12 Oppo广东移动通信有限公司 Wearable device and Bluetooth audio traffic system
CN109413536A (en) * 2018-12-20 2019-03-01 歌尔科技有限公司 A kind of wireless headset enters box detection method, device and wireless headset charging box
CN110972014A (en) * 2019-12-11 2020-04-07 歌尔智能科技有限公司 Parameter adjustment method and device for active noise reduction earphone and wireless earphone
CN111131954A (en) * 2019-12-27 2020-05-08 歌尔科技有限公司 Wireless earphone charging box, earphone in-out box detection method, system and storage medium
CN111328009A (en) * 2018-12-14 2020-06-23 苹果公司 Acoustic in-ear detection for audible devices
CN111770407A (en) * 2020-06-30 2020-10-13 歌尔科技有限公司 Earphone state detection method and device, earphone and readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130083933A1 (en) * 2011-09-30 2013-04-04 Apple Inc. Pressure sensing earbuds and systems and methods for the use thereof
CN108702567A (en) * 2017-11-27 2018-10-23 深圳市汇顶科技股份有限公司 Earphone, test earphone wearing state method and electronic equipment
CN208489963U (en) * 2018-06-08 2019-02-12 Oppo广东移动通信有限公司 Wearable device and Bluetooth audio traffic system
CN111328009A (en) * 2018-12-14 2020-06-23 苹果公司 Acoustic in-ear detection for audible devices
CN109413536A (en) * 2018-12-20 2019-03-01 歌尔科技有限公司 A kind of wireless headset enters box detection method, device and wireless headset charging box
CN110972014A (en) * 2019-12-11 2020-04-07 歌尔智能科技有限公司 Parameter adjustment method and device for active noise reduction earphone and wireless earphone
CN111131954A (en) * 2019-12-27 2020-05-08 歌尔科技有限公司 Wireless earphone charging box, earphone in-out box detection method, system and storage medium
CN111770407A (en) * 2020-06-30 2020-10-13 歌尔科技有限公司 Earphone state detection method and device, earphone and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501220A (en) * 2022-02-28 2022-05-13 歌尔股份有限公司 Earphone control method, earphone control device, earphone equipment and storage medium
CN114501220B (en) * 2022-02-28 2023-02-28 歌尔股份有限公司 Earphone control method, earphone control device, earphone equipment and storage medium
CN115696129A (en) * 2023-01-05 2023-02-03 荣耀终端有限公司 Method and device for recognizing mixed loading of earphones
CN115696129B (en) * 2023-01-05 2023-07-07 荣耀终端有限公司 Method and equipment for identifying mixed loading of earphone

Also Published As

Publication number Publication date
CN111770407A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
WO2022000998A1 (en) Earphone state detection method and device, earphone, and readable storage medium
CN109381165B (en) Skin detection method and mobile terminal
US11452172B2 (en) Method for switching master earphone, mobile terminal, and non-transitory computer-readable storage medium
WO2020019847A1 (en) Method for switching main headset, and related device
WO2017028678A1 (en) Communication method, server and device
CN110677768A (en) Wireless earphone control method and device, wireless earphone and storage medium
US10991372B2 (en) Method and apparatus for activating device in response to detecting change in user head feature, and computer readable storage medium
CN108810697B (en) Wireless earphone pairing method and device and wireless earphone
WO2020019858A1 (en) Microphone hole clogging detection method and related products
CN111654773B (en) Bluetooth headset, calibration method and device for Bluetooth headset, and storage medium
US20210144495A1 (en) Microphone Hole Blockage Detection Method, Microphone Hole Blockage Detection Device, and First Wireless Earphone
US10681451B1 (en) On-body detection of wearable devices
CN104504868A (en) Device and method for monitoring bad habits of terminal device user
WO2018107389A1 (en) Method and apparatus for joint assistance by means of voice, and robot
CN113596657A (en) Earphone in-ear detection method, terminal and computer readable storage medium
CN111462454A (en) Reminding method, device, equipment and storage medium
CN112492439B (en) Earphone falling reminding method and device, electronic equipment and storage medium
CN111780907A (en) Earphone, earphone state monitoring method and device and readable storage medium
CN109151203B (en) Information prompting method and mobile terminal
CN108632713B (en) Volume control method and device, storage medium and terminal equipment
CN111443764A (en) Separation state processing method and electronic equipment
CN110930372A (en) Image processing method, electronic equipment and computer readable storage medium
CN113473301B (en) Earphone wearing detection method, device, equipment and readable storage medium
EP3890344B1 (en) Hearing devices and methods for implementing automatic sensor-based on/off control of a hearing device
CN111372166B (en) Intelligent left and right ear identification method and related equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20943445

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20943445

Country of ref document: EP

Kind code of ref document: A1