Headphone control method, device, chip and headphone
By collecting the echo data of the headset and detecting the pressure sensor, the connection between the headset and the terminal is automatically controlled, which solves the problem that the headset still works after the user takes off the headset, and realizes resource saving and convenient control.
Patent Information
- Application Number
- CN202210975535.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-08-15
AI Technical Summary
When using headphones, the headphones continue to work normally after the user takes them off, resulting in a waste of resources, especially power consumption.
By collecting the echo data of the earphones, judging the usage status of the earphones based on the echo data, and automatically controlling the connection between the earphones and the terminal, including the pressure sensor detecting the wearing status of the earphones and echo data analysis, combining the pressure changes and echo characteristics to ensure the accuracy of the judgment.
Automatic control of the headset is achieved, which reduces resource waste, especially power consumption, improves the convenience and accuracy of headset control, and prevents users from missing important prompts.
Smart Images

Figure CN115334396B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of wireless technology, and in particular to an earphone control method, device, chip, and earphone. Background Art
[0002] As wireless technology matures, headsets are increasingly being connected to mobile phones and other devices. People can use them for various functions, such as listening to music and making phone calls. However, in some current headset usage scenarios, even when users remove their headsets for some reason, the headsets continue to function normally, resulting in a waste of resources. Summary of the Invention
[0003] The embodiments of the present application provide a headset control method, device, chip, and headset, which realize automatic control of the headset and improve the convenience of headset control. The technical solution is as follows:
[0004] According to one aspect of an embodiment of the present application, a headphone control method is provided, the method comprising:
[0005] Collect echo data from headphones;
[0006] determining a usage status of the headset based at least in part on the echo data;
[0007] The connection between the headset and the terminal is controlled based on the usage status of the headset.
[0008] According to another aspect of an embodiment of the present application, a headphone control device is provided, the device comprising:
[0009] Acquisition module, used to collect echo data of headphones;
[0010] a state determination module for determining a usage state of the headset based at least in part on the echo data;
[0011] The headset control module is used to control the connection between the headset and the terminal based on the usage status of the headset.
[0012] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the headphone control method as described in the above aspect.
[0013] According to another aspect of an embodiment of the present application, a computer program product is provided. The computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the headphone control method described in the above aspect.
[0014] According to another aspect of an embodiment of the present application, a chip is provided, including a processor, wherein the processor is configured to:
[0015] determining a usage status of the headset based at least in part on echo data of the headset;
[0016] The connection between the headset and the terminal is controlled based on the usage status of the headset.
[0017] According to another aspect of an embodiment of the present application, there is provided an earphone comprising a pressure sensor and the above chip.
[0018] The earphone control method, device, chip, and earphone provided in the embodiments of the present application collect echo data of the earphone and determine the usage status of the earphone based at least in part on the echo data, thereby being able to more accurately judge the current status of the earphone and automatically control the connection between the earphone and the terminal, thereby realizing automatic control of the earphone and improving the convenience of earphone control. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A flowchart of an earphone control method provided by an exemplary embodiment of the present application is shown;
[0021] Figure 2 A flowchart of another headphone control method provided by an exemplary embodiment of the present application is shown;
[0022] Figure 3 A flowchart of another headphone control method provided by an exemplary embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of training an echo detection model provided by an exemplary embodiment of the present application is shown;
[0024] Figure 5 A flowchart of an earphone control process provided by an exemplary embodiment of the present application is shown;
[0025] Figure 6 A structural block diagram of an earphone control device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0027] As used herein, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0028] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, and display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the audio data and echo data involved in this application were obtained with full authorization.
[0029] The present invention provides an embodiment of a headphone control method applicable to headphones. The headphones have wireless communication capabilities and can be wirelessly connected to a terminal. Optionally, the terminal can be a mobile phone, desktop computer, laptop computer, tablet computer, smart TV, smart speaker, vehicle-mounted terminal, intelligent robot, or other terminal. The method provided in the embodiment of the present invention can control the connection between the headphones and the terminal based on the usage status of the headphones, thereby achieving automatic control of the headphones.
[0030] For example, the earphones are wirelessly connected to the terminal, the terminal plays music through the earphones, and the user using the terminal wears the earphones to listen to the music played by the earphones. If the earphones detect that the user is not wearing the earphones through the earphone control method provided in the embodiment of the present application, the earphones are disconnected from the terminal, so that the terminal no longer plays music through the earphones. At this time, the terminal can play music through other audio output channels, so that when the user is not wearing the earphones, it can automatically switch to playing music on the terminal.
[0031] The earphone control method provided in the embodiment of the present application can also be applied in other scenarios, and the embodiment of the present application does not limit this.
[0032] The above only describes the application scenario of the headphone control method. The following embodiments will describe the process of the headphone control method.
[0033] Figure 1 A flowchart of an earphone control method provided by an exemplary embodiment of the present application is shown. Figure 1 , the method is executed by the headset, and the method includes:
[0034] 101. Collect echo data of the earphone.
[0035] The headset has a wireless communication function. In an embodiment of the present application, the terminal is wirelessly connected to the headset, and then the audio data of the terminal is played through the headset. The user can wear the headset to hear the audio data played by the headset. Because the headset is wirelessly connected to the terminal, the user may take off the headset for some purpose while the headset is still working normally, resulting in a waste of resources, such as wasting the headset's battery.
[0036] Therefore, in the embodiment of the present application, when the headset is wirelessly connected to the terminal, echo data of the headset is collected, and the usage status of the headset is determined based on the echo data, thereby achieving automatic control of the headset based on the usage status.
[0037] Optionally, when the earphone is wirelessly connected to the terminal, the earphone plays audio data output by the terminal, and the audio data is reflected by a reflective object and then collected by the earphone to obtain echo data, wherein the reflective object includes a human ear or an object other than a human ear.
[0038] 102. Determine a usage status of the headset based at least in part on the echo data.
[0039] The usage status of the headset indicates whether the user is currently using the headset. Optionally, the usage status includes a wearing state and a not-wearing state. If the headset is in the wearing state, it means that the user is wearing the headset, and it is considered that the user is using the headset, while if the headset is in the not-wearing state, it means that the user is not wearing the headset, and it is considered that the user is not using the headset.
[0040] Since the echo data collected by the earphones is different when the user is wearing the earphones and when the user is not wearing the earphones, whether the earphones are being worn can be determined at least partially based on the echo data.
[0041] 103. Control the connection between the headset and the terminal based on the usage status of the headset.
[0042] Among them, if the headset is not worn, the headset is disconnected from the terminal so that the terminal no longer plays audio data through the headset, which can reduce the power consumption of the headset and save resources. If the headset is worn, the headset continues to be connected to the terminal.
[0043] In an embodiment of the present application, by collecting the echo data of the headset, the usage status of the headset is determined at least partially based on the echo data, so that the current status of the headset can be judged more accurately, thereby automatically controlling the connection between the headset and the terminal, realizing automatic control of the headset and improving the convenience of headset control.
[0044] Figure 2 A flowchart of another headphone control method provided by an exemplary embodiment of the present application is shown. Figure 2 , the method is executed by the headset, and the method includes:
[0045] 201. Collect first echo data of the earphone based on detecting a first change in pressure applied to the earphone.
[0046] The headset has a wireless communication function. In an embodiment of the present application, the terminal is wirelessly connected to the headset, and then the audio data of the terminal is played through the headset. The user can wear the headset to hear the audio data played by the headset. Because the headset is wirelessly connected to the terminal, the user may take off the headset for some purpose while the headset is still working normally, resulting in a waste of resources, such as wasting the headset's battery.
[0047] The embodiments of the present application take into account that when a person wears headphones, the human ear will exert pressure on the headphones. By performing pressure detection on the headphones when the headphones are wirelessly connected to the terminal, it is possible to preliminarily determine the usage status of the headphones based on the detected pressure, which indicates whether the headphones are in use. Accordingly, the headphones include a pressure sensor, which is arranged at a position where the headphones are in contact with the ears of the wearer when the headphones are worn, and the pressure sensor is used to detect the pressure exerted on the headphones. In one possible implementation, the headphones perform pressure detection once every preset time period. The preset time period can be set as needed, and the embodiments of the present application do not limit this.
[0048] Optionally, the earphone includes a pressure sensor, which is provided at a position in contact with an ear of a wearer when the earphone is worn, and is used to detect pressure applied to the earphone.
[0049] Optionally, the headset includes multiple pressure sensors, and each pressure sensor is positioned at a different location. The number of the multiple pressure sensors can be set as needed and is not limited in the embodiments of the present application. For example, the number can be 3, 4, 5, or 6. The headset detects multiple pressures, and each pressure sensor detects a pressure.
[0050] Optionally, the headset further includes a sound detection module, which is used to collect echo data. For example, the sound detection module is a microphone.
[0051] In the embodiment of the present application, the first change in pressure on the earphone is taken as an example. When the first change in pressure on the earphone is detected, first echo data of the earphone is collected.
[0052] 202. Based on detecting a second change in pressure applied to the earphone, collect second echo data of the earphone.
[0053] Step 202 is similar to step 201 above. Step 202 occurs after step 201 when the pressure on the earphone undergoes a second change.
[0054] 203. Determine a usage status of the headset based at least in part on the first echo data and the second echo data.
[0055] The usage status indicates whether the headset is in use. Based on the echo data, the current environment of the headset can be understood, thereby determining the usage status of the headset.
[0056] Compared with determining the usage status only through the echo data currently collected by the earphone, in the embodiment of the present application, the usage status of the earphone is determined by the echo data collected when the earphone pressure changes twice continuously, so as to ensure the accuracy of the usage status.
[0057] Optionally, a first usage state represented by the first echo data and a second usage state represented by the second echo data are determined, and based on determining that the first usage state is opposite to the second usage state, the second usage state is determined to be the usage state of the earphone.
[0058] A change in pressure on the earphones indicates they may have moved, such as removing them from your ears (taking them off), or putting them back on (putting them on). Therefore, a change in pressure on the earphones indicates a change in their usage state. Changes in usage should also be consistent. For example, if the first pressure change indicates removal, the second pressure change should indicate putting them on, not removal.
[0059] Therefore, if the first usage state indicated by the first echo data is opposite to the first usage state indicated by the second echo data, then the actual situation is correct, indicating that no pressure changes have been missed. In this case, the second usage state is considered to be the current and accurate usage state of the headset. However, if the first usage state indicated by the first echo data is opposite to the first usage state indicated by the second echo data, then the actual situation is correct, indicating that a detection error or a missed pressure change has likely occurred. In this case, the second usage state is considered to be incorrect, and the next pressure change can be waited for to re-determine.
[0060] 204. Control the connection between the headset and the terminal based on the usage status of the headset.
[0061] In the embodiments of the present application, by collecting echo data from the earphones and determining the earphone usage status based at least in part on the echo data, the current status of the earphones can be more accurately determined, thereby automatically controlling the connection between the earphones and the terminal. This achieves automatic control of the earphones and improves the convenience of earphone control. Furthermore, by combining echo data from two adjacent pressure changes to determine the usage status, the accuracy of the usage status is further improved, thereby improving the accuracy of earphone control.
[0062] Figure 3 A flowchart of another headphone control method provided by an exemplary embodiment of the present application is shown. Figure 3 , the method is executed by the headset, and the method includes:
[0063] 301. Collect echo data of the earphone based on the detected change in pressure applied to the earphone.
[0064] The embodiments of the present application take into account that when the human ear is wearing headphones, the human ear will exert pressure on the headphones. When the headphones are not worn, the headphones will not be subjected to pressure from the human ear. Therefore, when the pressure on the headphones changes, it indicates that the usage status of the headphones has changed. In this way, the echo data of the headphones is collected to determine the usage status of the headphones after the change.
[0065] Optionally, based on the current pressure on the earphone satisfying a pressure change condition, it is determined that the pressure on the earphone has changed, where the pressure change condition is that the difference between the current pressure on the earphone and the last detected pressure is greater than a threshold.
[0066] If the difference between the current pressure experienced by the earphones and the last detected pressure is greater than a threshold, this indicates a significant change in pressure, possibly due to the earphones being moved, such as being removed from or placed in the ear. In this case, echo data from the earphones is collected to further determine the earphone usage status based on this echo data. Accordingly, after detecting pressure, the earphones store this pressure to facilitate subsequent calculation of the pressure difference. The threshold can be set as needed and is not limited in this embodiment of the present application.
[0067] Optionally, when the headset is wirelessly connected to the terminal, if the headset plays audio data output by the terminal, the audio data is reflected by a reflective object and collected by the sound detection module in the headset, thereby generating echo data. The reflective object may include the human ear or an object other than the human ear. This implementation utilizes the audio data currently being played by the headset to collect echo data, making echo detection quick and convenient.
[0068] Optionally, if the terminal does not output audio data, the headset does not play audio data. At this time, if echo detection is required, the headset can be controlled to play preset audio data. The preset audio data is reflected by the reflective object and collected by the sound detection module in the headset to obtain echo data. The headset stores preset audio data. If the detected pressure meets the pressure change condition and the headset is not currently playing audio data, the preset audio data is obtained and played. The preset audio data can be set as needed, and the embodiments of the present application are not limited to this. Since the echo detection is initiated when the pressure in the headset changes, it can be considered that the headset is likely to have been taken off. In this way, even if the headset actively emits a certain sound, the impact on the user's normal use of the headset is relatively small.
[0069] If the difference between the current pressure of the headset and the last detected pressure is not greater than the threshold, it means that the pressure of the headset has not changed, and the headset is likely not moving. In this case, pressure detection can be continued until the detected pressure meets the pressure change condition or the headset is no longer wirelessly connected to the terminal.
[0070] In one possible implementation, the earphones collect pressure detected by multiple pressure sensors, and the difference between the pressure detected by each pressure sensor and the pressure detected last time is greater than a threshold, indicating that the pressure change experienced by the earphones is an ambient pressure change, indicating that the earphones are likely to be placed in or taken out of the human ear. In this case, the echo data of the earphones can be collected.
[0071] It should be noted that steps 201-202 in the embodiment of the present application are merely examples of detecting a pressure change using the aforementioned pressure change condition. In other embodiments, other methods may be used to determine whether the pressure applied to the earphone has changed. Upon detecting a pressure change applied to the earphone, echo data from the earphone may be collected to determine the changed usage status of the earphone.
[0072] 302. Determine a usage status of the headset based at least in part on the echo data.
[0073] The usage status indicates whether the headset is in use. Based on the echo data, the current environment of the headset can be understood, thereby determining the usage status of the headset.
[0074] Optionally, the usage state of the earphone is determined based on whether the echo data satisfies a target condition, wherein the target condition refers to a condition that the echo data reflected by the ear should satisfy when the earphone is worn.
[0075] If the echo data meets the target conditions, that is, the echo data meets the conditions that echo data reflected from the human ear when the earphones are worn should meet, it indicates that the object reflecting the echo data is likely a human ear. In other words, the earphones are likely still being worn by a person, and the earphones are determined to be in the worn state. Conversely, if the echo data does not meet the target conditions, that is, the echo data does not meet the conditions that echo data reflected from the human ear when the earphones are worn, it indicates that the object reflecting the echo data is likely not a human ear. In other words, the earphones are likely not currently being worn by a person, and the earphones are determined to be in the unworn state. By determining whether the echo data meets the target conditions, the usage status of the earphones can be determined more accurately.
[0076] Optionally, determining the usage status of the headset based on whether the echo data satisfies a target condition includes determining a target distance between the headset and a reflecting object based on a time when the audio data is played and a time when echo data corresponding to the audio data is detected. Determining the usage status of the headset based on the target distance.
[0077] The headset determines the target distance based on the time difference between the time the audio data is played and the time the echo data is detected, as well as the sound speed. The sound speed is a preset speed that can be set as needed and is not limited in this embodiment of the present application. Based on the target distance, it is then possible to determine whether the user is wearing the headset, thereby determining the headset's usage status.
[0078] Optionally, determining the usage status of the earphone based on the target distance includes: determining a target sound intensity of the echo data, and determining the usage status of the earphone based on the target distance and the target sound intensity.
[0079] The target sound intensity is the intensity of the echo data. After detecting the echo data, the earphones determine the intensity of the echo data. This intensity indicates the strength of the echo data detected by the earphones and can reflect the earphones' sound field environment and / or the user's ear cavity structure. The earphones' usage status is then determined based on the target distance and the target sound intensity.
[0080] Optionally, an echo detection model is provided in an embodiment of the present application. The echo detection model is represented by a correspondence between sound intensity and distance, where the correspondence represents the intensity of the echo resulting from the reflection of the sound from the human ear after the sound has traveled the distance. The earphone can then determine a reference sound intensity corresponding to the target distance from the correspondence between sound intensity and distance, i.e., the intensity of the echo resulting from the reflection of the sound from the human ear after the sound has traveled the target distance. If the difference between the reference sound intensity and the target sound intensity is greater than a sound intensity threshold, it indicates that the target sound intensity differs significantly from the reference sound intensity, and the target sound intensity is likely not the intensity of the echo resulting from the reflection of the audio data from the human ear after the sound has traveled the target distance. In this case, it can be assumed that the earphone is no longer in the ear, and the usage state is determined to be the unworn state. Alternatively, if the difference between the reference sound intensity and the target sound intensity is not greater than the sound intensity threshold, it indicates that the target sound intensity is close to the reference sound intensity, and the target sound intensity is likely the intensity of the echo resulting from the reflection of the audio data from the human ear after the sound has traveled the target distance. In this case, it can be assumed that the earphone is still in the ear, and the usage state is determined to be the worn state.
[0081] The sound intensity threshold can be set as needed, and is not limited in this embodiment of the present application.
[0082] In an embodiment of the present application, by combining the target distance between the earphone and the reflecting object and the target sound intensity of the echo data, it is determined whether the target sound intensity is the sound intensity of the echo obtained by the audio data being reflected by the human ear after passing the target distance, and thus the usage status of the earphone is determined based on the judgment result, so that the determined wearing status is more accurate.
[0083] Optionally, the echo detection model is calibrated based on the sound field environment of the headphones and / or the user's ear cavity structure. The correspondence in the echo detection model has limited accuracy, and the actual correspondence will be affected by the sound field environment of the headphones and / or the user's ear cavity structure. Therefore, by calibrating the echo detection model, the calibrated echo detection model can be made more suitable for the current sound field environment of the headphones and / or the user's ear cavity structure, and the determined usage status is more accurate.
[0084] For example, if the difference between the reference sound intensity and the target sound intensity is not greater than the sound intensity threshold, the usage state of the headset is the wearing state. At this time, since the reference sound intensity is the sound intensity corresponding to the target distance in the preset correspondence between sound intensity and distance, and the target sound intensity is the current actual sound intensity, it is more accurate, so the reference sound intensity corresponding to the target distance in the correspondence is replaced by the target sound intensity.
[0085] In the embodiment of the present application, the target sound intensity is the sound intensity of the echo obtained by the audio data being reflected by the human ear after passing the target distance. Therefore, the target sound intensity is for the current human ear and has higher accuracy than the reference sound intensity. By replacing the reference sound intensity corresponding to the target distance in the corresponding relationship with the target sound intensity, the echo detection model is corrected, thereby improving the accuracy of the echo detection model.
[0086] If this is the first time the headphones are used, the original echo detection model can be used. When it is subsequently determined that the headphones are in a worn state, the echo detection model can be calibrated to match the sound field environment of different headphones and / or the characteristics of the user's ear cavity structure. In this way, the next time the echo detection model is used, the current usage status of the headphones can be determined more accurately.
[0087] See also Figure 4 ,Each correction of the echo detection model can be regarded as a training of the ,echo detection model. As the number of training times increases, the ,echo detection model gradually converges.
[0088] Optionally, the headset usage status can be determined directly based on the target distance between the headset and the reflecting object. Accordingly, the headset usage status can be determined based on whether the echo data meets the target condition, including: determining the target distance between the headset and the reflecting object based on the time when the audio data is played and the time when the echo data corresponding to the audio data is detected; if the target distance is greater than a distance threshold, determining the usage status as not being worn; or if the target distance is not greater than the distance threshold, determining the usage status as being worn. The distance threshold can be set as needed and is not limited in this embodiment of the present application.
[0089] In an embodiment of the present application, if the target distance is not greater than the distance threshold, it means that the distance between the earphone and the reflecting object is small. If the reflecting object is a human ear, the earphone is likely to be worn. If the target distance is greater than the distance threshold, it means that the distance between the earphone and the reflecting object is large, and the earphone is likely not to be worn. Therefore, based on the target distance between the earphone and the reflecting object, the usage status of the earphone can be determined more quickly.
[0090] The above optional implementation uses the example of the headset independently determining its usage status. In other embodiments, the headset can use the terminal to determine its usage status to conserve battery and reduce power consumption. Accordingly, step 203 can be replaced by: the headset sends echo data to the terminal, the terminal determines the headset's usage status based on the echo data, sends the wearing status to the headset, the headset receives the wearing status, and then executes step 204. Alternatively, after determining the headset's usage status, if the usage status is wearing, the terminal disconnects the headset from the terminal, without requiring the headset to perform any operation.
[0091] In one possible implementation, the terminal determines the usage status of the headset based on whether the echo data meets the target condition. The implementation method is similar to the above optional implementation, in which the headset determines the usage status of the headset based on whether the echo data meets the target condition, and is not repeated here.
[0092] In another possible implementation, the terminal determines the usage status of the headset based on whether the echo data satisfies a target condition, including: the terminal invokes an echo recognition model based on the echo data, outputs the usage status of the headset, and returns the wearing status. The echo recognition model receives the echo data as input and outputs the usage status of the headset, and the echo recognition model is capable of determining whether the echo data satisfies the target condition.
[0093] In the embodiment of the present application, the terminal determines the usage status of the headset based on whether the echo data meets the target condition, without the headset needing to identify the echo data, thereby reducing the power consumption of the headset and saving the battery of the headset.
[0094] The embodiment of the present application takes into account that continuous echo detection will consume a lot of power of the earphones. Therefore, the echo detection function can be turned off after the echo data is determined to meet the target conditions. When pressure is detected around the earphones, the echo detection function is turned on and echo detection is performed, thereby saving power of the earphones.
[0095] 303. If the usage state is not worn, disconnect the headset from the terminal.
[0096] Among them, if the usage state is the unworn state, the earphone is disconnected from the terminal so that the terminal no longer plays audio data through the earphone, which can reduce the power consumption of the earphone and save resources.
[0097] Optionally, when it is determined that the headset is not being worn, the user may be prompted first. Accordingly, if the usage state is the not-worn state, the headset is disconnected from the terminal in an implementation method including: if the usage state is the not-worn state, sending a prompt instruction to the terminal, the prompt instruction being used to prompt the terminal to confirm whether to disconnect the headset from the terminal; and upon receiving a confirmation response returned by the terminal based on the prompt instruction, disconnecting the headset from the terminal. If a negative response is received from the terminal based on the prompt information, the headset maintains the wireless connection between the terminal and the headset.
[0098] In a possible implementation, the terminal displays prompt information based on receiving the prompt instruction, where the prompt information is used to prompt confirmation of whether to disconnect the headset from the terminal, and based on detecting a confirmation response to the prompt information, feeds back the confirmation response to the headset.
[0099] In an embodiment of the present application, if the usage status is the unworn state, the terminal is instructed to prompt the user to confirm whether to disconnect the headset from the terminal by sending a prompt instruction to the terminal, thereby comprehensively considering the user's choice, avoiding misjudgment of the wearing status, meeting the user's needs, and improving the user's usage experience.
[0100] The user may not see the terminal's prompt in a timely manner. Accordingly, the headset control method further includes disconnecting the headset from the terminal if no response is received from the terminal within a preset time period. The preset time period can be set as needed and is not limited in this embodiment of the application. If no response is received from the terminal within the preset time period, it indicates that the user may not have seen the terminal's prompt. In this case, the headset can be disconnected from the terminal by default, thereby achieving automatic control of the headset.
[0101] The above step 204 is described using the example of disconnecting the headset from the terminal. In other embodiments, step 204 can be replaced by: if the usage state is not worn, sending a switching instruction to the terminal, the switching instruction is used to instruct the terminal to switch the current audio output channel from the headset to the audio output channel on the terminal. In this case, the headset maintains a wireless connection with the terminal, but the terminal no longer plays audio data through the headset. In this way, the headset can operate in a low-power mode, which can also reduce resource waste.
[0102] 304. If the usage state is the wearing state, the headset maintains a wireless connection with the terminal.
[0103] For example, see Figure 5 The headset control process shown includes the following steps:
[0104] 1. The headset is wirelessly connected to the terminal.
[0105] 2. Start the pressure sensor to perform real-time pressure detection.
[0106] 3. When the difference between the detected pressure and the last detected pressure is greater than a threshold, echo detection is started to obtain echo data.
[0107] 4. Identify and process the echo data to determine whether the echo data meets the target conditions.
[0108] The echo detection model may be trained so that the echo detection model gradually becomes closer to the sound field environment of the earphone and / or the ear cavity structure of the user.
[0109] 5. Decide whether to disconnect the headset from the terminal based on the recognition result.
[0110] If the echo data meets the target condition, the headset is kept connected to the terminal; if the echo data does not meet the target condition, the headset is disconnected from the terminal.
[0111] 6. If disconnected, wait for the next connection event.
[0112] 7. If the connection is not disconnected, turn off the echo detection function and continue with the pressure detection.
[0113] In the related art, the headset is connected to the terminal, and the headset and the terminal are always in a connected state as long as the user does not actively disconnect the connection between the headset and the terminal; however, the user may temporarily take off the headset for some reason (or forget to put it on in time after taking it off), and the headset is still working normally in this case, which not only wastes power, but may also cause the user to miss the receipt of some terminal information (due to the connection between the headset and the terminal, some prompt sounds of the terminal will continue to be played through the headset).
[0114] The embodiment of the present application determines whether the earphones are still being worn based on the changes in the earphone echo and pressure. If it is determined that the earphones are no longer being worn, the connection can be promptly disconnected, thereby turning off the earphones, allowing the terminal's prompt tone to be played by the terminal itself rather than through the earphones, reducing the user from missing important prompts. At the same time, timely disconnection can also better save the earphones' power consumption and increase the earphones' battery life. In terms of the specific implementation process, the embodiment of the present application takes into account the characteristics of users using earphones and optimizes the detection process to make the judgment results more accurate and reduce false positives.
[0115] In an embodiment of the present application, echo data is obtained by performing echo detection on the earphone, and the usage status of the earphone is determined based on whether the echo data meets the conditions that the echo data reflected by the human ear should meet when the earphone is worn. This makes it possible to more accurately judge whether the earphone is currently being worn. When the earphone is not being worn, the earphone is disconnected from the terminal in a timely manner so that the audio of the terminal is no longer played through the earphone, thereby achieving automatic control of the earphone and improving the convenience of controlling the earphone.
[0116] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0117] Please refer to Figure 6 , which shows a structural block diagram of an earphone control device provided by an exemplary embodiment of the present application. The earphone control device is applied to earphones, and the earphone control device includes:
[0118] Acquisition module 601, used to collect echo data of earphones;
[0119] a state determination module 602 for determining a usage state of the headset based at least in part on the echo data;
[0120] The headset control module 603 is configured to control the connection between the headset and the terminal based on the usage status of the headset.
[0121] In a possible implementation, the acquisition module 601 includes:
[0122] The first collecting unit is configured to collect first echo data of the earphone based on detecting a first change in pressure applied to the earphone.
[0123] In another possible implementation, the acquisition module 601 further includes:
[0124] The second collecting unit is configured to collect second echo data of the earphone based on detecting a second change in the pressure applied to the earphone.
[0125] In another possible implementation, determining the usage status of the headset based at least in part on the echo data includes:
[0126] determining a first usage state indicated by the first echo data and a second usage state indicated by the second echo data;
[0127] Based on determining that the first usage state is opposite to the second usage state, the second usage state is determined to be the usage state of the headset.
[0128] In another possible implementation, the apparatus further includes:
[0129] The correction unit is used to correct the echo detection model based on the sound field environment of the earphone and / or the ear cavity structure of the user.
[0130] In a possible implementation, the state determination module 502 includes:
[0131] a distance determining unit, configured to determine a target distance between the earphone and the reflecting object based on a time when the audio data is played and a time when echo data corresponding to the audio data is detected;
[0132] The state determination unit is used to determine the usage state of the headset based on the target distance.
[0133] In a possible implementation, the state determination unit includes:
[0134] a sound intensity determination subunit, for determining a target sound intensity of the echo data;
[0135] The state determination subunit is used to determine the usage state of the headset based on the target distance and the target sound intensity.
[0136] In a possible implementation, the state determination subunit is configured to:
[0137] From the correspondence between sound intensity and distance, determine the reference sound intensity corresponding to the target distance. The correspondence represents the sound intensity of the echo obtained by the human ear after the sound passes through the distance.
[0138] If the difference between the reference sound intensity and the target sound intensity is greater than the sound intensity threshold, it is determined that the earphone is not being worn;
[0139] Alternatively, if the difference between the reference sound intensity and the target sound intensity is not greater than the sound intensity threshold, it is determined that the earphone is in the wearing state.
[0140] In one possible implementation, the apparatus further includes:
[0141] The sound intensity replacement module is used to replace the reference sound intensity corresponding to the target distance in the corresponding relationship with the target sound intensity if the difference between the reference sound intensity and the target sound intensity is not greater than the sound intensity threshold.
[0142] In a possible implementation, the state determination module 502 includes:
[0143] a distance determining unit, configured to determine a target distance between the earphone and the reflecting object based on a time when the audio data is played and a time when echo data corresponding to the audio data is detected;
[0144] The state determination unit is configured to determine that the use state is the non-worn state if the target distance is greater than the distance threshold; or to determine that the use state is the worn state if the target distance is not greater than the distance threshold.
[0145] In one possible implementation, the state determination module 502 is configured to:
[0146] Sending echo data to the terminal, where the terminal is configured to determine the usage status of the headset based on the echo data;
[0147] The usage status returned by the receiving terminal.
[0148] In a possible implementation, the earphone control module 503 is configured to disconnect the earphone from the terminal if the earphone is not being worn.
[0149] In one possible implementation, the earphone control module 503 is used to send a prompt instruction to the terminal if the usage status is the unworn state, and the prompt instruction is used to prompt the terminal to confirm whether to disconnect the earphone from the terminal; based on receiving a confirmation response returned by the terminal based on the prompt instruction, the earphone is disconnected from the terminal.
[0150] In a possible implementation, the headset control module 503 is further configured to disconnect the headset from the terminal if no response is received from the terminal within a preset time period.
[0151] In one possible implementation, the apparatus further includes:
[0152] The earphone control module 503 is configured to send a switching instruction to the terminal if the earphone is not being worn, wherein the switching instruction is configured to instruct the terminal to switch the current audio output channel from the earphone to the audio output channel on the terminal.
[0153] In an embodiment of the present application, echo data is obtained by performing echo detection on the earphone, and the usage status of the earphone is determined based on whether the echo data meets the conditions that the echo data reflected by the human ear should meet when the earphone is worn. This makes it possible to more accurately judge whether the earphone is currently being worn. When the earphone is not being worn, the earphone is disconnected from the terminal in a timely manner so that the audio of the terminal is no longer played through the earphone, thereby achieving automatic control of the earphone and improving the convenience of controlling the earphone.
[0154] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is merely illustrated by the division of the above functional modules. In actual applications, the above functions can be distributed among different functional modules as needed, that is, the internal structure of the headset can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiments and will not be repeated here.
[0155] An embodiment of the present application provides a chip, which includes a processor, and the processor is configured to:
[0156] determining a usage status of the headset based at least in part on echo data of the headset;
[0157] Control the connection between the headset and the headset based on the usage status of the headset.
[0158] The steps executed by the processor are the same as those in the above embodiment and will not be repeated here.
[0159] The present application also provides an earphone comprising a pressure sensor and the aforementioned chip. The earphone may also include a sound detection module, such as a microphone. Other modules, such as a memory and a power supply, may also be included, although these are not limited by the present application.
[0160] The present application also provides a computer-readable storage medium, which stores at least one program code. The at least one program code is loaded and executed by the processor to implement the headphone control method shown in the above embodiments.
[0161] The present application also provides a computer program product, which stores at least one program code, and the at least one program code is used to be executed by a processor to implement the headphone control method shown in the above embodiments.
[0162] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0163] Those skilled in the art will appreciate that all or part of the steps in the headphone control method of the above embodiment can be implemented using hardware or by programming the relevant hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A headphone control method, characterized in that: The method comprises: collecting first echo data of the earphone based on detecting a first change in pressure applied to the earphone; collecting second echo data of the earphone based on detecting a second change in the pressure applied to the earphone; determining a first usage state represented by the first echo data and a second usage state represented by the second echo data; determining the second usage state as the usage state of the headset based on determining that the first usage state is opposite to the second usage state; The connection between the headset and the terminal is controlled based on the usage status of the headset.
2. The method according to claim 1, characterized in that The method further comprises: The echo detection model is calibrated based on the sound field environment of the earphone and / or the ear cavity structure of the user.
3. The method according to claim 1, characterized in that The method further comprises: determining a target distance between the earphone and the reflecting object based on a time when the audio data is played and a time when echo data corresponding to the audio data is detected; Based on the target distance, a usage status of the headset is determined.
4. The method according to claim 3, characterized in that The determining the usage status of the headset based on the target distance includes: determining a target sound intensity of the echo data; A usage status of the headset is determined based on the target distance and the target sound intensity.
5. The method according to claim 4, characterized in that The determining the usage status of the headset based on the target distance and the target sound intensity includes: Determining a reference sound intensity corresponding to the target distance from a correspondence between sound intensity and distance, wherein the correspondence represents the sound intensity of an echo obtained by a sound reflected by a human ear after traveling the distance; If the difference between the reference sound intensity and the target sound intensity is greater than the sound intensity threshold, determining that the earphone is not worn; Alternatively, if the difference between the reference sound intensity and the target sound intensity is not greater than the sound intensity threshold, it is determined that the earphone is in the wearing state.
6. The method according to claim 5, characterized in that The method further comprises: If the difference between the reference sound intensity and the target sound intensity is not greater than the sound intensity threshold, the reference sound intensity corresponding to the target distance in the corresponding relationship is replaced by the target sound intensity.
7. The method according to claim 3, characterized in that The determining the usage status of the headset based on the target distance includes: If the target distance is greater than the distance threshold, it is determined that the headset is in an unworn state; or if the target distance is not greater than the distance threshold, it is determined that the headset is in a worn state.
8. The method according to claim 1, characterized in that The method further comprises: sending the echo data to the terminal, wherein the terminal is configured to determine a usage status of the headset based on the echo data; Receive the usage status returned by the terminal.
9. The method according to claim 1, characterized in that The controlling the connection between the headset and the terminal based on the usage status of the headset includes: If the headset is not worn, disconnect the headset from the terminal.
10. The method according to claim 9, characterized in that The disconnecting the headset from the terminal includes: Sending a prompt instruction to the terminal, wherein the prompt instruction is used to prompt the terminal to confirm whether to disconnect the headset from the terminal; Upon receiving a confirmation response returned by the terminal based on the prompt instruction, the headset is disconnected from the terminal.
11. The method according to claim 10, characterized in that The method further comprises: If no response is received from the terminal within a preset time period, the headset is disconnected from the terminal.
12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: If the earphone is not worn, a switching instruction is sent to the terminal, where the switching instruction is used to instruct the terminal to switch the current audio output channel from the earphone to the audio output channel on the terminal.
13. An earphone control device, characterized in that: The device comprises: an acquisition module, configured to acquire first echo data of the earphone based on detecting a first change in pressure applied to the earphone; and to acquire second echo data of the earphone based on detecting a second change in pressure applied to the earphone; a state determination module, configured to determine a first usage state represented by the first echo data and a second usage state represented by the second echo data; and based on determining that the first usage state is opposite to the second usage state, determine the second usage state as the usage state of the headset; The headset control module is used to control the connection between the headset and the terminal based on the usage status of the headset.
14. A computer-readable storage medium, characterized in that The storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the earphone control method according to any one of claims 1 to 12.
15. A chip comprising a processor, wherein the processor is configured to: determining a first usage state represented by first echo data of an earphone, and a second usage state represented by second echo data of the earphone, wherein the first echo data is collected upon detecting a first change in pressure applied to the earphone, and the second echo data is collected upon detecting a second change in pressure applied to the earphone; determining the second usage state as the usage state of the headset based on determining that the first usage state is opposite to the second usage state; The connection between the headset and the terminal is controlled based on the usage status of the headset.
16. An earphone comprising a pressure sensor and the chip according to claim 15.
17. A computer program product, wherein the computer program product stores at least one program code, wherein the at least one program code is configured to be executed by a processor to implement the earphone control method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Earphone and earphone control method and device
CN107920298A
Information processing method and device, terminal, earphones and readable storage medium
CN108803859A