CN112261536B - Earphone control method, earphone control device, terminal equipment and storage medium - Google Patents
Earphone control method, earphone control device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN112261536B CN112261536B CN202011124704.1A CN202011124704A CN112261536B CN 112261536 B CN112261536 B CN 112261536B CN 202011124704 A CN202011124704 A CN 202011124704A CN 112261536 B CN112261536 B CN 112261536B
- Authority
- CN
- China
- Prior art keywords
- earphone
- user
- state
- controlling
- range
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1041—Mechanical or electronic switches, or control elements
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Headphones And Earphones (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention discloses a headset control method, a device, terminal equipment and a storage medium. The embodiment of the invention controls the direction sensor of the earphone to be in an on state; acquiring the change range of the inclination angle of the earphone according to the direction sensor; when the change range of the inclination angle is lower than a first preset range, an opening interrupt signal is generated to control the earphone to be in a closed state, wherein the first preset range is the minimum change range of the inclination angle of the earphone in a user use state; when the change range of the inclination angle is higher than a first preset range, a closing interrupt signal is generated to control the earphone to be in an on state. According to the embodiment of the invention, the use state of the earphone by a user is judged by detecting the numerical value change range of the direction sensor of the earphone, so that the earphone is controlled to be automatically opened or closed.
Description
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a method and apparatus for controlling an earphone, a terminal device, and a storage medium.
Background
Mobile terminal handset headphones fall into two criteria: the OMTP standard is commonly referred to as the national standard and CTIA is referred to as the international standard. Headphones are classified according to their transduction modes, and mainly include: moving coil mode, moving iron mode, electrostatic mode, and isopagnetic mode. The classification is carried out from the structural functional mode, and the classification can be divided into a semi-open type and a closed type; the ear plugs, the lugs, the in-ear type and the head type are classified from the wearing forms; the wearing number is classified into a single earphone and a multi-earphone; the audio source can be distinguished from the active earphone and the passive earphone; active headphones are also commonly referred to as add-on headphones. The invention also discloses a wireless earphone, which is characterized in that the wireless earphone is divided into a wired earphone and a wireless earphone from the aspect of data transmission, wherein the wireless earphone is convenient to use and carry, more and more users use the wireless earphone, and in the research and practice process of the prior art, the inventor discovers that the user often forgets to manually close the wireless earphone after picking off the wireless earphone, so that the mobile terminal and the wireless earphone perform audio interaction in a bidirectional way all the time, and the energy of the two wireless earphone is consumed.
Disclosure of Invention
The embodiment of the invention provides a headset control method, a device, terminal equipment and a storage medium, wherein the use state of a user on the headset is judged by detecting the change range of the inclination angle of a direction sensor of the headset, so that the headset is controlled to be automatically opened or closed.
The embodiment of the invention provides a headset control method, which comprises the following steps:
controlling a direction sensor of the earphone to be in an on state;
acquiring the inclination angle change range of the earphone according to the direction sensor;
when the inclination angle change range is lower than a first preset range, an opening interrupt signal is generated to control the earphone to be in a closed state, wherein the first preset range is the minimum inclination angle change range of the earphone in a user use state;
and when the inclination angle change range is higher than the first preset range, generating a closing interrupt signal to control the earphone to be in an open state.
Optionally, in some embodiments of the present invention, when the inclination angle variation range is lower than a first preset range, generating an on interrupt signal includes:
generating the start interrupt signal when the time of the inclination angle change range lower than the first preset range is greater than or equal to the preset time;
and when the time that the inclination angle change range is lower than the first preset range is smaller than the preset time, the starting interrupt signal is not generated.
Optionally, in some embodiments of the present invention, when the tilt angle variation range is lower than a first preset range, an on-off signal is generated, and the earphone is controlled to be in an off state, including:
and controlling the earphone to be in a closed state in response to the number of the continuously generated on-off signals exceeding a first limiting value.
Optionally, in some embodiments of the present invention, the controlling the earphone to be in a closed state includes:
sending a closing prompt of the earphone to a user;
controlling the earphone to be in a closed state in response to the operation of closing the earphone confirmed by a user;
and controlling the earphone to be in an on state in response to the operation of the user for denying the closing of the earphone.
Optionally, in some embodiments of the present invention, when the inclination angle variation range is higher than the first preset range, the generating a closing interrupt signal includes:
and when the inclination angle change range is lower than or equal to the first preset range, the closing interrupt signal is not generated.
Optionally, in some embodiments of the present invention, when the tilt angle variation range is lower than a first preset range, an on-off signal is generated, and the earphone is controlled to be in an off state, including:
and controlling the earphone to be in a closed state in response to the number of the continuously generated on-off signals exceeding a second limiting value.
Optionally, in some embodiments of the present invention, the controlling the earphone to be in a closed state includes:
sending a headset on prompt to a user;
controlling the earphone to be in a closed state in response to the operation of starting the earphone confirmed by a user;
and controlling the earphone to be in an on state in response to the operation of opening the earphone by the user.
Correspondingly, the embodiment of the invention also provides a headset control device, which comprises:
the control unit is used for controlling the direction sensor of the earphone to be in an on state;
the change range generation unit is used for acquiring the change range of the inclination angle of the earphone according to the direction sensor;
the closed state control unit is used for generating an opening interrupt signal when the change range of the inclination angle is lower than a first preset range, and controlling the earphone to be in a closed state, wherein the first preset range is the minimum change range of the inclination angle of the earphone in a user use state;
and the starting state control unit is used for generating a closing interrupt signal when the inclination angle change range is higher than the first preset range, and controlling the earphone to be in a starting state.
Also, an embodiment of the present invention further provides a terminal device, including:
a memory for storing an application program;
and a processor for implementing the steps of any one of the earphone control methods when executing the application program.
In addition, the embodiment of the invention also provides a readable storage medium, wherein an application program is stored on the readable storage medium, and when the application program is executed by a processor, any step of the earphone control method is realized.
The embodiment of the invention provides a headset control method, a device, terminal equipment and a storage medium, wherein a mobile terminal controls a direction sensor of a headset to be in an on state; then, acquiring the inclination angle change range of the earphone according to the direction sensor; then, when the change range of the inclination angle is lower than a first preset range, generating an opening interrupt signal to control the earphone to be in a closed state, wherein the first preset range is the minimum change range of the inclination angle of the earphone in a user use state; and finally, when the change range of the inclination angle is higher than a first preset range, generating a closing interrupt signal to control the earphone to be in an on state. According to the embodiment of the invention, the using state of the earphone by a user is judged by detecting the change range of the inclination angle of the direction sensor of the earphone, so that the earphone is controlled to be automatically opened or closed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of an earphone control method provided by an embodiment of the present invention;
fig. 2 is a flowchart of a headset control method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an earphone control device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides a headset control method, a device, terminal equipment and a storage medium. The device can be integrated in a terminal, and the terminal can be a mobile phone, a tablet computer, a notebook computer, a smart watch and other devices.
Referring to fig. 1, fig. 1 is a schematic diagram of a scenario of an earphone control method according to an embodiment of the present invention. The scene diagram comprises a mobile terminal and an earphone, wherein the earphone can be a Bluetooth earphone, a headset and the like, and the mobile terminal is used for controlling a direction sensor of the earphone to be in an on state; acquiring the change range of the inclination angle of the earphone according to the direction sensor; then, when the change range of the inclination angle is lower than a first preset range, generating an opening interrupt signal to control the earphone to be in a closed state, wherein the first preset range is the minimum change range of the inclination angle of the earphone in a user use state; and finally, when the change range of the inclination angle is higher than a first preset range, generating a closing interrupt signal to control the earphone to be in an on state.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the viewpoint of an earphone control device, which may be integrated in a terminal device, which may include a notebook computer, a tablet computer, a smart phone, a personal computer (PC, personal Computer), and the like.
As shown in fig. 2, the specific flow of the earphone control method is as follows:
step 201, a direction sensor of the earphone is controlled to be in an on state.
For example, a direction sensor is arranged in the earphone, the mobile terminal is connected with the earphone, when the earphone is started, the mobile terminal generates a direction sensor starting instruction, the direction sensor in the earphone is controlled to be in a starting state, and the direction sensor is used for detecting the direction of the earphone, so that the direction is converted into a quantifiable numerical value.
The direction sensor calculates the inclination angle of the earphone by acquiring the numerical values of the position of the earphone on the X axis, the Y axis and the Z axis at the moment and by using the angle formed by the three axes (or any two axes).
Step 202, acquiring the change range of the inclination angle of the earphone according to the direction sensor.
For example, the numerical value of the direction sensor is continuously detected, the numerical value change of the direction sensor is recorded each time, and the inclination angle change range of the direction sensor each time is calculated,
and 203, when the inclination angle variation range is lower than a first preset range, generating an opening interrupt signal to control the earphone to be in a closed state, wherein the first preset range is the minimum inclination angle variation range of the earphone in a user use state.
For example, when the earphone is in an on state, a first preset range is preset, the inclination angle change range of the direction sensor calculated each time is compared with the first preset range, and whether an on-off signal is generated is judged according to a comparison result.
The first preset range is a minimum inclination angle change range indicating that the earphone is in a user use state.
In one embodiment, the mobile terminal generates the on interrupt signal when the detected tilt angle variation range of the direction sensor is lower than a first preset range.
In one embodiment, the mobile terminal does not generate the on-interrupt signal when the detected tilt angle variation range of the direction sensor is equal to or greater than the first preset range.
In one embodiment, the tilt angle variation range of the direction sensor is compared with a first preset range, and if the time that the tilt angle variation range of the direction sensor is smaller than the first preset range is greater than or equal to a preset time, the mobile terminal generates an on-off signal. Specifically, the mobile terminal obtains the inclination angle change range of the direction sensor, compares the inclination angle change range with a first preset range, and when the preset time is reached, the continuously obtained inclination angle change range of the direction sensor is smaller than the first preset range, so that the earphone is in a state of unused by a user, and the mobile terminal generates an opening interrupt signal.
In one embodiment, the tilt angle variation range of the direction sensor is compared with the first preset range, and if the time that the tilt angle variation range of the direction sensor is smaller than the first preset range is smaller than the preset time, the mobile terminal does not generate the start interrupt signal. Specifically, the mobile terminal obtains the inclination angle change range of the direction sensor, compares the inclination angle change range with the first preset range, and when the preset time is not reached yet, the obtained inclination angle change range of the direction sensor is larger than the first preset range, so that the earphone is in a user use state, and the mobile terminal does not generate an opening interrupt signal.
The preset time is a time period, for example, one hour, and the length of the preset time is not limited, and the preset time can be flexibly set according to actual conditions.
In some embodiments, the interrupt signal is indicated by a GPIO (General-purpose input/output) that indicates that the mobile terminal is generating an interrupt signal when the GPIO is displayed high and that indicates that the mobile terminal is not generating an interrupt signal when the GPIO is displayed low.
Optionally, in response to the number of continuously generated on-off signals exceeding the first limit value, an earphone closing instruction is sent out to control the earphone to be in a closed state.
Optionally, when the inclination angle variation range of the direction sensor is compared with the first preset range, the mobile terminal records the result of each comparison, namely, records whether an opening interrupt signal is generated each time, determines according to the comparison result, if the number of the continuously generated opening interrupt signals exceeds a first limiting value, the mobile terminal sends out an earphone closing instruction, and controls the earphone to be in a closing state.
The first limiting value is any value, the setting of the first limiting value is not limited, and the first limiting value can be flexibly set according to actual conditions.
In one embodiment, after sending the earphone closing instruction, the mobile terminal sends an earphone closing instruction to the user, for example, sends vibration and/or ring to the user, and in response to the user confirming the operation of closing the earphone, executes the earphone closing instruction to automatically close the earphone.
In one embodiment, after sending a headset closing instruction, the mobile terminal sends a headset closing prompt to a user, and in response to the user denying the operation of closing the headset, the headset closing instruction is not executed, so that the headset is in an open state.
In some embodiments, the user confirming or denying the operation of closing the earphone includes generating a prompt box after the mobile terminal sends the earphone closing prompt to the user, wherein the prompt box includes two options of confirming to close the earphone and denying to close the earphone, and the user clicks the corresponding options to indicate whether to execute the earphone closing instruction or not, so as to control the earphone to be in a closed state.
In some embodiments, the user confirming or denying the operation of closing the earphone includes making a preset denial operation on the screen of the mobile terminal, for example, pressing on the screen for a long time, double-clicking on the screen, sliding on the screen for a certain distance, etc., after the mobile terminal sends the earphone closing prompt to the user, if the user denying the closing of the earphone, the user makes a preset denial operation on the screen of the mobile terminal, for example, pressing on the screen for a long time, sliding on the screen for a certain distance, etc., and if the mobile terminal receives the denial operation, the earphone closing instruction is not executed, and the earphone is controlled to be in an on state; if the user confirms to close the earphone, the user does not do any operation, and after a period of time, the mobile terminal automatically executes an earphone closing instruction to control the earphone to be in a closed state.
And 204, when the inclination angle variation range is higher than the first preset range, generating a closing interrupt signal to control the earphone to be in an on state.
For example, when the earphone is in a closed state, the inclination angle of the direction sensor is continuously detected, the inclination angle change of the direction sensor is recorded each time, the inclination angle change range of the direction sensor is calculated each time, the inclination angle change range of the direction sensor calculated each time is compared with a first preset range, and whether the closing interrupt signal is generated is judged according to the comparison result.
In one embodiment, the mobile terminal generates the off interrupt signal when the detected tilt angle variation range of the direction sensor is higher than a first preset range.
In one embodiment, the mobile terminal does not generate the off interrupt signal when the detected tilt angle variation range of the direction sensor is equal to or less than the first preset range.
Optionally, in response to the number of the continuously generated off interrupt signals exceeding the second limit value, an earphone on command is sent out to control the earphone to be in an on state.
Optionally, when the inclination angle variation range of the direction sensor is compared with the first preset range, the mobile terminal records the result of each comparison, namely, records whether the closing interrupt signal is generated each time, and if the number of the interrupt signals continuously generated exceeds the second limiting value, the mobile terminal sends out an earphone opening instruction to control the earphone to be in an opening state.
The second limiting value is any value, the setting of the second limiting value is not limited, and the second limiting value can be flexibly set according to actual conditions. The first limiting value and the second limiting value are not limited in size, and the first limiting value may be smaller than the second limiting value, may be equal to the second limiting value, or may be greater than the second limiting value.
In one embodiment, after sending the earphone opening instruction, the mobile terminal sends an earphone opening prompt to the user, for example, sends vibration and/or ring prompt to the user, and in response to the user confirming the operation of opening the earphone, executes the earphone opening instruction to enable the earphone to be automatically opened.
In one embodiment, after sending a headset opening instruction, the mobile terminal sends a headset opening prompt to a user, and controls the headset to be in a closed state in response to the user denying the operation of opening the headset.
In some embodiments, the operation of confirming or denying to open the earphone by the user includes generating a prompt box after the mobile terminal sends the earphone opening prompt to the user, wherein the prompt box includes two options of confirming to open the earphone and denying to open the earphone, and the user clicks the corresponding options to indicate whether to execute the earphone opening instruction.
In some embodiments, the operation of confirming or denying to turn on the earphone by the user includes making a preset denial operation on the screen of the mobile terminal, for example, pressing long on the screen, double-clicking on the screen, sliding a distance on the screen, etc., for a period of time, for example, 10 seconds, if the user does not confirm to turn on the earphone after the mobile terminal sends the earphone turn-on prompt to the user, and the mobile terminal does not execute the earphone turn-off instruction after receiving the denial operation; if the user confirms to turn on the earphone, the user does not perform any operation, and after a period of time, the mobile terminal automatically executes an earphone turn-on instruction to control the earphone to be in an on state.
In order to better implement the earphone control method according to the embodiment of the present invention, the embodiment of the present invention further provides an earphone control device, and referring to fig. 3, fig. 3 is a schematic structural diagram of the earphone control device according to the embodiment of the present invention, where the earphone control device may include a control unit 301, a variation range generating unit 302, a closed state control unit 303, and an open state control unit 304.
Wherein, the control unit 301 is configured to control the direction sensor of the earphone to be in an on state.
Optionally, the change range generating unit 302 is configured to obtain the change range of the tilt angle of the earphone according to the direction sensor.
Optionally, the off-state control unit 303 is configured to generate an on-interrupt signal when the tilt angle variation range is lower than a first preset range, and control the earphone to be in an off state, where the first preset range is a minimum tilt angle variation range in which the earphone is in a user use state.
Optionally, the off-state control unit 303 is further configured to generate the on-interrupt signal when a time of the tilt angle variation range below the first preset range is greater than or equal to a preset time; and when the time that the inclination angle change range is lower than the first preset range is smaller than the preset time, the starting interrupt signal is not generated.
Optionally, the first instruction issuing unit 303 is configured to control the earphone to be in the off state in response to the number of the continuously generated on interrupt signals exceeding a first limit value.
Optionally, the first instruction sending unit 303 is further configured to send an earphone closing prompt to a user; controlling the earphone to be in a closed state in response to the operation of closing the earphone confirmed by a user; and controlling the earphone to be in an on state in response to the operation of the user for denying the closing of the earphone.
Optionally, the second signal generating unit 304 is configured to generate a closing interrupt signal when the tilt angle variation range is higher than the first preset range, so as to control the earphone to be in an on state.
Optionally, the second signal generating unit 304 is further configured to not generate the shutdown interrupt signal when the tilt angle variation range is less than or equal to the first preset range.
Optionally, the second signal generating unit 304 is further configured to control the earphone to be in the off state in response to the number of the continuously generated on interrupt signals exceeding a second limit value.
Optionally, the second signal generating unit 304 is further configured to send an earphone on prompt to a user; controlling the earphone to be in a closed state in response to the operation of starting the earphone confirmed by a user; and controlling the earphone to be in an on state in response to the operation of opening the earphone by the user.
Correspondingly, the embodiment of the present invention further provides a terminal, as shown in fig. 4, where the terminal may include a Radio Frequency (RF) circuit 401, a memory 402 including one or more computer readable storage media, an input unit 403, a display unit 404, a sensor 405, an audio circuit 406, a wireless fidelity (WiFi, wireless Fidelity) module 407, a processor 408 including one or more processing cores, and a power supply 409. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 4 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the RF circuit 401 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 408; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 401 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM, subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 401 may also communicate with networks and other devices through wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications (GSM, global System of Mobile communication), general packet radio service (GPRS, general Packet Radio Service), code division multiple access (CDMA, code Division Multiple Access), wideband code division multiple access (WCDMA, wideband Code Division Multiple Access), long term evolution (LTE, long Term Evolution), email, short message service (SMS, short Messaging Service), and the like.
The memory 402 may be used to store software programs and modules, and the processor 408 may execute various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the terminal, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide access to the memory 402 by the processor 408 and the input unit 403.
The input unit 403 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 403 may include a touch-sensitive surface, as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch-sensitive surface may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 408, and can receive commands from the processor 408 and execute them. In addition, touch sensitive surfaces may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 403 may also comprise other input devices. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 404 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal, which may be composed of graphics, text, icons, video and any combination thereof. The display unit 404 may include a display panel, which may be optionally configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay a display panel, and upon detection of a touch operation thereon or thereabout, the touch-sensitive surface is communicated to the processor 408 to determine a type of touch event, and the processor 408 then provides a corresponding visual output on the display panel based on the type of touch event. Although in fig. 4 the touch sensitive surface and the display panel are implemented as two separate components for input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement the input and output functions.
The terminal may also include at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or backlight when the terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the terminal are not described in detail herein.
Audio circuitry 406, speakers, and a microphone may provide an audio interface between the user and the terminal. The audio circuit 406 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted to a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 406 and converted into audio data, which are processed by the audio data output processor 408 for transmission to, for example, another terminal via the RF circuit 401, or which are output to the memory 402 for further processing. Audio circuitry 406 may also include an ear bud jack to provide communication of the peripheral ear bud with the terminal.
The WiFi belongs to a short-distance wireless transmission technology, and the terminal can help the user to send and receive e-mail, browse web pages, access streaming media and the like through the WiFi module 407, so that wireless broadband internet access is provided for the user. Although fig. 4 shows a WiFi module 407, it is understood that it does not belong to the essential constitution of the terminal, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The processor 408 is a control center of the terminal, and connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the handset. Optionally, the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 408.
The terminal also includes a power supply 409 (e.g., a battery) for powering the various components, which may be logically connected to the processor 408 through a power management system that performs functions such as managing charge, discharge, and power consumption. The power supply 409 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, etc., which will not be described herein. In this embodiment, the processor 408 in the terminal loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 408 executes the application programs stored in the memory 402, so as to implement various functions: controlling a direction sensor of the earphone to be in an on state; then, acquiring the inclination angle change range of the earphone according to the direction sensor; then, when the change range of the inclination angle is lower than a first preset range, generating an opening interrupt signal to control the earphone to be in a closed state, wherein the first preset range is the minimum change range of the inclination angle of the earphone in a user use state; and finally, when the change range of the inclination angle is higher than a first preset range, generating a closing interrupt signal to control the earphone to be in an on state.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The foregoing describes in detail a method, apparatus, terminal device and storage medium for controlling headphones according to the embodiments of the present invention, and specific examples are applied to describe the principles and implementations of the present invention, where the descriptions of the foregoing embodiments are only used to help understand the technical solution and core idea of the present invention; those of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (10)
1. A headset control method, comprising:
establishing connection with the earphone, and generating a direction sensor starting instruction when the earphone is started to control the direction sensor of the earphone to be in a starting state;
acquiring numerical values of the positions of the earphones on all coordinate axes according to the direction sensor, and calculating the change range of the inclination angle of the earphones according to the numerical values;
when the inclination angle change range is lower than a first preset range, an opening interrupt signal is generated to control the earphone to be in a closed state, wherein the first preset range is the minimum inclination angle change range of the earphone in a user use state, and the controlling the earphone to be in the closed state comprises the following steps:
sending a closing prompt of the earphone to a user, and displaying a prompt box on a terminal screen, wherein the prompt box is used for the user to confirm whether to close the earphone; if the operation of closing the earphone by the user on the prompt box is detected in a preset time period, controlling the earphone to be in a closing state; if the operation of the user on the prompt box is not detected within the preset time period, controlling the earphone to be in a closed state;
when the inclination angle change range is higher than the first preset range, a closing interrupt signal is generated to control the earphone to be in an on state, wherein the controlling the earphone to be in the on state comprises the following steps:
sending a headset on prompt to the user, and controlling the headset to be in the off state if the user's denial operation on the terminal screen is detected within a preset time; and if the operation of the user on the terminal screen is not detected within the preset time period, controlling the earphone to be in an on state.
2. The method of claim 1, wherein generating an on-interrupt signal when the tilt angle variation range is below a first preset range comprises:
generating the start interrupt signal when the time of the inclination angle change range lower than the first preset range is greater than or equal to the preset time;
and when the time that the inclination angle change range is lower than the first preset range is smaller than the preset time, the starting interrupt signal is not generated.
3. The method of claim 1, wherein generating an on-interrupt signal when the tilt angle variation range is below a first preset range, controlling the earphone to be in an off state, comprises:
and controlling the earphone to be in a closed state in response to the number of the continuously generated on-off signals exceeding a first limiting value.
4. The method of claim 1, wherein the controlling the earphone in the off state comprises:
sending a closing prompt of the earphone to a user;
controlling the earphone to be in a closed state in response to the operation of closing the earphone confirmed by a user;
and controlling the earphone to be in an on state in response to the operation of the user for denying the closing of the earphone.
5. The method of claim 1, wherein generating a shut-down interrupt signal when the tilt angle variation range is higher than the first preset range comprises:
and when the inclination angle change range is lower than or equal to the first preset range, the closing interrupt signal is not generated.
6. The method of claim 1, wherein generating an on-interrupt signal when the tilt angle variation range is below a first preset range, controlling the earphone to be in an off state, comprises:
and controlling the earphone to be in a closed state in response to the number of the continuously generated on-off signals exceeding a second limiting value.
7. The method of claim 1, wherein the controlling the earphone in the off state comprises:
sending a headset on prompt to a user;
controlling the earphone to be in a closed state in response to the operation of starting the earphone confirmed by a user;
and controlling the earphone to be in an on state in response to the operation of opening the earphone by the user.
8. An earphone control device, characterized by comprising:
the control unit is used for establishing connection with the earphone, generating a direction sensor starting instruction when the earphone is started, and controlling the direction sensor of the earphone to be in a starting state;
the change range generation unit is used for acquiring numerical values of the positions of the earphones on all coordinate axes according to the direction sensor and calculating the change range of the inclination angle of the earphones according to the numerical values;
the closed state control unit is configured to generate an on-off signal when the tilt angle variation range is lower than a first preset range, and control the earphone to be in a closed state, where the first preset range is a minimum tilt angle variation range in which the earphone is in a user use state, and the controlling the earphone to be in the closed state includes:
sending a closing prompt of the earphone to a user, and displaying a prompt box on a terminal screen, wherein the prompt box is used for the user to confirm whether to close the earphone; if the operation of closing the earphone by the user on the prompt box is detected in a preset time period, controlling the earphone to be in a closing state; if the operation of the user on the prompt box is not detected within the preset time period, controlling the earphone to be in a closed state;
an on-state control unit, configured to generate an off-interrupt signal when the tilt angle variation range is higher than the first preset range, and control the earphone to be in an on-state, where the controlling the earphone to be in an on-state includes:
sending a headset on prompt to the user, and controlling the headset to be in the off state if the user's denial operation on the terminal screen is detected within a preset time; and if the operation of the user on the terminal screen is not detected within the preset time period, controlling the earphone to be in an on state.
9. A terminal device, comprising:
a memory for storing an application program;
a processor for implementing the steps in the earphone control method according to any one of claims 1 to 7 when executing the application program.
10. A readable storage medium, characterized in that it has stored thereon an application program, which when executed by a processor, implements the steps of the earphone control method according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011124704.1A CN112261536B (en) | 2020-10-20 | 2020-10-20 | Earphone control method, earphone control device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011124704.1A CN112261536B (en) | 2020-10-20 | 2020-10-20 | Earphone control method, earphone control device, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112261536A CN112261536A (en) | 2021-01-22 |
CN112261536B true CN112261536B (en) | 2023-08-04 |
Family
ID=74245054
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011124704.1A Active CN112261536B (en) | 2020-10-20 | 2020-10-20 | Earphone control method, earphone control device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112261536B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101867634A (en) * | 2010-03-03 | 2010-10-20 | 深圳市同洲电子股份有限公司 | Information prompting method and device in mobile terminal |
CN103137158A (en) * | 2013-01-28 | 2013-06-05 | 深圳市金立通信设备有限公司 | Method controlling audio playing and terminal |
CN207166694U (en) * | 2017-04-13 | 2018-03-30 | 微鲸科技有限公司 | A kind of earphone |
CN111698632A (en) * | 2020-06-03 | 2020-09-22 | 歌尔科技有限公司 | Headset state detection method and device, TWS headset and computer storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110033643A (en) * | 2009-09-25 | 2011-03-31 | 삼성전자주식회사 | Apparatus and method for controlling power of bluetooth headset |
US8888701B2 (en) * | 2011-01-27 | 2014-11-18 | Valencell, Inc. | Apparatus and methods for monitoring physiological data during environmental interference |
CN103167379B (en) * | 2011-12-13 | 2018-03-09 | 富泰华工业(深圳)有限公司 | Audio playing apparatus |
US20130345842A1 (en) * | 2012-06-25 | 2013-12-26 | Lenovo (Singapore) Pte. Ltd. | Earphone removal detection |
US9402124B2 (en) * | 2013-04-18 | 2016-07-26 | Xiaomi Inc. | Method for controlling terminal device and the smart terminal device thereof |
CN103730139A (en) * | 2013-11-15 | 2014-04-16 | 刘和超 | Action switch earphone |
US9723393B2 (en) * | 2014-03-28 | 2017-08-01 | Echostar Technologies L.L.C. | Methods to conserve remote batteries |
WO2016155019A1 (en) * | 2015-04-03 | 2016-10-06 | 深圳市柔宇科技有限公司 | Head-mounted electronic device |
CN105959854B (en) * | 2016-06-22 | 2019-09-24 | 惠州Tcl移动通信有限公司 | A kind of method and system for realizing that left and right sound is normally exported based on earphone |
CN108810749B (en) * | 2018-06-08 | 2021-04-06 | Oppo(重庆)智能科技有限公司 | Player control method, device, terminal equipment and storage medium |
-
2020
- 2020-10-20 CN CN202011124704.1A patent/CN112261536B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101867634A (en) * | 2010-03-03 | 2010-10-20 | 深圳市同洲电子股份有限公司 | Information prompting method and device in mobile terminal |
CN103137158A (en) * | 2013-01-28 | 2013-06-05 | 深圳市金立通信设备有限公司 | Method controlling audio playing and terminal |
CN207166694U (en) * | 2017-04-13 | 2018-03-30 | 微鲸科技有限公司 | A kind of earphone |
CN111698632A (en) * | 2020-06-03 | 2020-09-22 | 歌尔科技有限公司 | Headset state detection method and device, TWS headset and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112261536A (en) | 2021-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111092621B (en) | Radio frequency circuit, control method and electronic equipment | |
CN107219951B (en) | Touch screen control method and device, storage medium and terminal equipment | |
CN110266323B (en) | Signal control circuit, terminal equipment and signal control method | |
CN110072013B (en) | Terminal control method and device | |
CN106936516B (en) | Display screen display state control method, storage medium and terminal | |
CN107066090B (en) | Method for controlling fingerprint identification module and mobile terminal | |
CN112997471B (en) | Audio channel switching method and device, readable storage medium and electronic equipment | |
CN111475066A (en) | Background switching method of application program and electronic equipment | |
CN111240451A (en) | Heat dissipation method, electronic device and computer-readable storage medium | |
CN107424393B (en) | Mobile terminal searching method, mobile terminal and storage medium | |
CN111526248B (en) | Audio output mode switching method and electronic equipment | |
CN106507357B (en) | Access control method and terminal equipment | |
CN106454953B (en) | Flow control method, device and terminal | |
CN108600906B (en) | Playing control method and device for multiple sound boxes | |
CN105635379B (en) | Noise suppression method and device | |
CN112261536B (en) | Earphone control method, earphone control device, terminal equipment and storage medium | |
CN112367425B (en) | Volume adjusting method and device and terminal | |
CN111966206B (en) | Power saving control method and device for fingerprint sensor and mobile terminal | |
CN112542867B (en) | Mobile terminal power supply control method and device, terminal equipment and storage medium | |
CN114257902A (en) | Sound cavity, temperature control method thereof, terminal and storage medium | |
CN108966298B (en) | Communication frequency band control method and device | |
CN112286849A (en) | Wireless charging base data switching method and system, storage medium and terminal equipment | |
CN111614839B (en) | Antenna self-adaptive control method and device | |
CN105700762B (en) | Method and device for displaying option information | |
CN110891304B (en) | gPS power consumption control method for mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230710 Address after: 518000 floors B, 4 and 5, building a, Shanghe Industrial Park, Nanchang Road, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province Applicant after: SHENZHEN SHI KISB ELECTRONIC CO.,LTD. Address before: 6 / F, No. B5, Lane 999, Yangfan Road, Meixu street, Yinzhou District, Ningbo City, Zhejiang Province Applicant before: TCL COMMUNICATION (NINGBO) Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |