CN107205187A - A kind of method, device and terminal device based on earphone control music - Google Patents

A kind of method, device and terminal device based on earphone control music Download PDF

Info

Publication number
CN107205187A
CN107205187A CN201710474395.2A CN201710474395A CN107205187A CN 107205187 A CN107205187 A CN 107205187A CN 201710474395 A CN201710474395 A CN 201710474395A CN 107205187 A CN107205187 A CN 107205187A
Authority
CN
China
Prior art keywords
temperature
value
temperature value
distance value
earphone
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.)
Granted
Application number
CN201710474395.2A
Other languages
Chinese (zh)
Other versions
CN107205187B (en
Inventor
林敏洁
吴海全
王如军
姜德军
张恩勤
曹磊
师瑞文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Grandsun Electronics Co Ltd
Original Assignee
Shenzhen Grandsun Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Grandsun Electronics Co Ltd filed Critical Shenzhen Grandsun Electronics Co Ltd
Priority to CN201710474395.2A priority Critical patent/CN107205187B/en
Publication of CN107205187A publication Critical patent/CN107205187A/en
Application granted granted Critical
Publication of CN107205187B publication Critical patent/CN107205187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/03Connection circuits to selectively connect loudspeakers or headphones to amplifiers

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Stereophonic System (AREA)

Abstract

Whether the present invention, there is provided a kind of method, device and terminal based on earphone control music, is changed suitable for communication technical field by the distance value for judging to be gathered by the sensor on the inside of headset body;When distance value changes, the first temperature value and second temperature value before and after distance value changes are obtained;Judge whether first temperature value and the temperature gap of the second temperature value meet default trigger condition;When the temperature gap meets default trigger condition, send and play control instruction to default terminal device.Dual judgement i.e. by combining distance value and temperature value, realize the current wearing state for precisely determining earphone, go to control the broadcasting or pause of the music program on default terminal device to send corresponding control instruction of playing according to current wearing state, solve the inconvenience of the manually operated control music of user, and the False Rate played in control process is reduced, improve the accuracy of music control.

Description

A kind of method, device and terminal device based on earphone control music
Technical field
The invention belongs to communication technical field, more particularly to it is a kind of based on earphone control the method for music, device and Terminal device.
Background technology
In life, people listen to the audio-video document of intelligent terminal broadcasting commonly using earphone, when people use earphone When listening to audio-video document, it can sometimes be forced to interrupt because of this or that and listen to audio-video document using earphone, such as need When being talked with other people, at this moment, after people lift down earphone, if people will suspend or play the audio frequency and video of intelligent terminal File, it is necessary to show the application program of playing audio-video document in intelligent terminal, is controlled by the broadcasting of the application program Key realizes the broadcasting or pause of audio-video document, especially when user is interrupted repeatedly during audio-video document is listened to When, it is necessary to the pause of the application program of playing audio-video document or broadcasting button on multi-pass operation mobile terminal, this gives user Great troublesome poeration is brought, very not convenient, Consumer's Experience is poor.
In the prior art, although believe there is provided a kind of pressure for being put into human body external auditory meatus by pressure sensor test earphone Number, according to the pressure signal realize according to start the need for user or pause music broadcasting, but because other ambient pressures etc. because The influence of element, it is possible to cause the result of detection not accurate, so as to cause wrong report so that earphone can not control sound to regard well The broadcasting of frequency file.
The content of the invention
In view of this, the embodiments of the invention provide a kind of method, device and terminal based on earphone control music Equipment, it is not convenient to solve the existing frequent operation in many secondary control musics during listening music, and worn according to earphone Wear state control music and there is wrong report, the problem of control music accuracy is relatively low.
The first aspect of the embodiment of the present invention provides a kind of method that music is controlled based on earphone, including:
Judge whether the distance value gathered by the sensor on the inside of headset body changes;
When distance value changes, the first temperature value and second temperature value before and after distance value changes are obtained;
Judge whether first temperature value and the temperature gap of the second temperature value meet default trigger condition;
When the temperature gap meets default trigger condition, send and play control instruction to default terminal device.
The second aspect of the embodiment of the present invention provides a kind of device based on earphone control music, including:
Whether distance value judging unit, the distance value for judging to be gathered by the sensor on the inside of headset body is sent out Changing;
Temperature value acquiring unit, for when distance value changes, obtaining the first temperature before and after distance value changes Angle value and second temperature value;
Judging unit is triggered, for judging whether first temperature value and the temperature gap of the second temperature value meet Default trigger condition;
First instruction sending unit, for when the temperature gap meets default trigger condition, sending and playing control Instruct to default terminal device.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including:
Memory, processor and it is stored in the computer journey that can be run in the memory and on the processor Sequence, wherein, realized described in the computing device during computer program embodiment of the present invention first aspect provide based on ear The step of machine controls the method for music.
Wherein, the computer program includes:
Whether distance value judging unit, the distance value for judging to be gathered by the sensor on the inside of headset body is sent out Changing;
Temperature value acquiring unit, for when distance value changes, obtaining the first temperature before and after distance value changes Angle value and second temperature value;
Judging unit is triggered, for judging whether first temperature value and the temperature gap of the second temperature value meet Default trigger condition;
First instruction sending unit, for when the temperature gap meets default trigger condition, sending and playing control Instruct to default terminal device.
The fourth aspect of the embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage Media storage has computer program, wherein, the computer program realizes the first of the embodiment of the present invention when being executed by processor The step of method based on earphone control music that aspect is provided.
Wherein, the computer program includes:
Whether distance value judging unit, the distance value for judging to be gathered by the sensor on the inside of headset body is sent out Changing;
Temperature value acquiring unit, for when distance value changes, obtaining the first temperature before and after distance value changes Angle value and second temperature value;
Judging unit is triggered, for judging whether first temperature value and the temperature gap of the second temperature value meet Default trigger condition;
First instruction sending unit, for when the temperature gap meets default trigger condition, sending and playing control Instruct to default terminal device.
The beneficial effect that the embodiment of the present invention exists compared with prior art is:Sentence with reference to distance value and the dual of temperature value It is disconnected, the current wearing state for precisely determining earphone is realized, control instruction is played accordingly to be sent according to current wearing state The broadcasting or pause for controlling to preset the music program on terminal device are gone, the manually operated control music of user is solved Inconvenience, and reduce play control process in False Rate, improve music control accuracy.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art In required for the accompanying drawing that uses be briefly described, it should be apparent that, drawings in the following description are only some of the present invention Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Accompanying drawing obtains other accompanying drawings.
Fig. 1 is a kind of implementation process figure of method based on earphone control music provided in an embodiment of the present invention;
Fig. 2 is that a kind of method for obtaining temperature averages provided in an embodiment of the present invention implements flow;
Fig. 3 is another implementation process figure for sending the method for playing control instruction provided in an embodiment of the present invention;
Fig. 4 is the tool that a kind of change according to distance value provided in an embodiment of the present invention sends the method for playing control instruction Body implementation process;
Fig. 5 is a kind of schematic diagram of device based on earphone control music provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic diagram of terminal device provided in an embodiment of the present invention.
Embodiment
In describing below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc Body details, thoroughly to understand the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity Road and the detailed description of method, in case unnecessary details hinders description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.It refer to Fig. 1, Fig. 1 shows a kind of implementation process of method based on earphone control music provided in an embodiment of the present invention, and details are as follows:
In step S101, judge whether the distance value gathered by the sensor on the inside of headset body becomes Change.
In embodiments of the present invention, the earphone includes but is not limited to wireless type earphone such as wear-type bluetooth earphone, monaural Formula bluetooth earphone, or wired earphone.Being provided with the earphone is used to gather the range sensor of distance value and for gathering The temperature sensor of temperature value, herein, temperature sensor gather a temperature value every preset time.
Herein, distance value is changed specially when distance value from zero is changed into non-zero, or distance value is changed into from non-zero Zero.Whether non-zero from zero is changed into by judging distance value, or by non-zero vanishing, it is possible to whether judging distance value becomes Change.
Specifically, when user takes earphone, i.e., when earphone is in wearing state, the distance between earphone and ear are Zero, certainly, in different Headphone structures, or different range sensors is used, the distance value collected is also likely to be Non-zero, the distance value collected when taking earphone to user here is zero or is non-zero and is not specifically limited, as just A kind of example is represented, but by the change of distance value, such as distance value is changed into non-zero or by non-zero vanishing from zero;Or Distance value changes from small to big or comes tentatively to judge the current wearing state of earphone from large to small, determines that distance value is in order to further accurate It is no to be changed, whether can also be changed by the average value or mean-square value for the distance value tried to achieve in preset time To determine the current wearing state of earphone.Assuming that the distance value that at this moment sensor is collected is zero, at this moment due to distance value be by Non-zero vanishing, it is believed that distance value is changed;When user takes earphone, i.e., when earphone is in non-wearing state, Distance is generated between earphone and ear, the distance value that at this moment sensor is collected be non-zero, specific distance value regard earphone with Depending on actual range between object, at this moment, because distance value is to be changed into non-zero from zero, it is also assumed that distance value is become Change.
In step s 102, when distance value changes, obtain distance value change before and after the first temperature value and Second temperature value.
In embodiments of the present invention, whether changed by judging distance value, can typically determine earphone it is current whether In wearing state, but under special circumstances, such as, when earphone is put on the table, there is a book to press against earphone, and just cover The top of sensor, at this moment, the distance value that sensor is collected is zero, so easily causes erroneous judgement, actually earphone simultaneously It is not in wearing state.At this moment, can be by being judged according to temperature value because human ear temperature and room temperature have certain difference Whether earphone is in wearing state, to reduce False Rate, by judging whether earphone is in wearing state to control music, Reach the purpose for the precision for improving music control.
Generally, when user wears earphone and without earphone, i.e., when distance value changes, occur in distance value Temperature after the temperature collected and distance value before change change can change, and there is a temperature value difference, Here, the temperature value before distance value is changed is defined as the first temperature value, can be that human body ear temperature or earphone depart from human ear The temperature value collected afterwards;Temperature value after distance value is changed is defined as second temperature value, can depart from for earphone The temperature value or human body ear temperature collected after human ear;Obviously, the first temperature value and second temperature value be it is relative, can be mutual Conversion, i.e., when the first temperature value is human body ear temperature, second temperature value departs from the temperature value collected after human ear by earphone;When When first temperature value departs from the temperature value collected after human ear by earphone, second temperature value is human body ear temperature.Of the invention real Apply in example, for the ease of explanation hereinafter, the first temperature value of acquiescence is human body ear temperature, and second temperature value is that earphone departs from after human ear The temperature value collected.
Specifically, before the first temperature value changes for distance value, the real-time temperature value collected by sensor specifically may be used Think last temperature value collected before distance value changes.
Second temperature value is that the real-time temperature value collected by sensor is specifically as follows after distance value changes First temperature value that distance value is collected after changing.
Optionally, first temperature value includes the first temperature averages, and the second temperature value is flat including second temperature Average.
First average temperature value is the temperature value of the predetermined number collected before being changed according to distance value by sensor Calculate obtained average temperature value.
Second average temperature value is the temperature value of the predetermined number collected after being changed according to distance value by sensor Calculate obtained average temperature value.
Specifically, the step of acquisition distance value changes front and rear the first temperature value and second temperature value, including The methods of acquisition temperature averages as shown in Figure 2 a kind of implements flow:
In step s 201, obtain distance value change before predetermined number by the sensing on the inside of headset body The temperature value that device is gathered, calculates according to the temperature value and obtains the first average temperature value before distance value changes.
In step S202, obtain distance value change after predetermined number by the sensing on the inside of headset body The temperature value that device is gathered, calculates according to the temperature value and obtains the second average temperature value after distance value changes.
In embodiments of the present invention, the time interval of the temperature gathered by sensor is fixed, is occurred in distance value Before and after change, obtain same amount of temperature value to calculate average temperature value, such as obtain before distance value changes and gathered 3 temperature values, calculate distance value change before average temperature value;Obtain 3 gathered after distance value changes Temperature value, calculates the average temperature value after distance value changes, can further improve the temperature before and after distance value changes The accuracy of difference is spent, so as to reduce the False Rate for judging whether earphone is in wearing state.
In step s 103, judge whether the temperature gap of first temperature value and the second temperature value meets default Trigger condition.
In embodiments of the present invention, default trigger condition can be the first temperature value and the temperature gap of second temperature value Absolute value be more than predetermined threshold value, the predetermined threshold value can be one or more.
For example, setting the standard judged according to second temperature value, when second temperature value is closer to the first temperature, mark is judged It is accurate stricter, to improve the precision of judgement.Second temperature value is divided into several temperature values, human ear is such as will be close to The temperature value of temperature is divided into a temperature range, is much smaller than or is divided into another temperature more than the temperature value of human ear temperature Scope, each temperature values are to that should have a trigger condition, i.e., each temperature values are to that should have a predetermined threshold value.When Two temperature values are considered as in its temperature range, and when reaching default trigger condition with the temperature gap of the first temperature value First temperature value and the temperature gap of the second temperature value meet default trigger condition.
In step S104, when the temperature gap meets default trigger condition, send and play control instruction to pre- If terminal device.
In embodiments of the present invention, playing control instruction includes play instruction and pause instruction;Or be only a control System instruction, when default terminal device receives the control instruction, obtains current music application program in default terminal device Broadcast state, then perform the preset instructions corresponding with the broadcast state, such as when current play status is plays, perform pause Instruction;When current play status is pause, play instruction is performed.
Herein, it is to set up the terminal device that is connected with earphone to preset terminal device, including but not limited to mobile phone, IPAD, MP4, notebook computer etc..The mode that both set up connection includes but is not limited to the mode such as bluetooth, infrared, WIFI.
When temperature gap meets default trigger condition, illustrate that earphone is currently at wearing state or non-wearing state, Play instruction corresponding with current wearing state is just sent to set up on the terminal device being connected to earphone.
In embodiments of the present invention, by the distance value that judges to be gathered by the sensor on the inside of headset body whether Change;When distance value changes, the first temperature value and second temperature value before and after distance value changes are obtained;Sentence Whether disconnected first temperature value and the temperature gap of the second temperature value meet default trigger condition;When the temperature difference When value meets default trigger condition, send and play control instruction to default terminal device.The embodiment of the present invention by combine away from From the dual judgement of value and temperature value, the current wearing state for precisely determining earphone is realized, to be sent out according to current wearing state Send corresponding control instruction of playing to go to control the broadcasting or pause of the music program on default terminal device, solve user The inconvenience of manually operated control music, and the False Rate played in control process is reduced, improve music control Accuracy.
Specifically, described when the temperature gap meets default trigger condition, send and play control instruction to default The method implementation process of control instruction is played in the step of terminal device, including another transmission as shown in Figure 3:
In step S301, when the change of distance value is to be changed into non-zero from zero, and the temperature gap meets default touch During clockwork spring part, the broadcasting control instruction of pause music is sent to default terminal device;
In step s 302, when the change of distance value is that by non-zero vanishing, and the temperature gap meets default touch During clockwork spring part, the broadcasting control instruction of music is sent to default terminal device.
Optionally, when the first temperature and second temperature closer to when, or even when equal, when earphone has been removed, i.e. ear When machine is in non-wearing state, due to not yet reaching default trigger condition, at this moment, erroneous judgement situation just occurs, in order to avoid The appearance of this case, can directly send according to the change of distance value and play control instruction, i.e., play control in described send Instruction is to before the step of default terminal device, in addition to a kind of sent according to the change of distance value as shown in Figure 4 plays control The method for making instruction implements flow:
In step S401, when the temperature gap is unsatisfactory for default trigger condition, environment temperature is obtained.
In embodiments of the present invention, environment temperature may be considered room temperature or local temperature, can be set from default terminal Acquired local temperature in standby application program such as the record of weather forecast application program, or in default terminal device The temperature value that temperature sensor is gathered.
In step S402, judge whether the temperature gap of the environment temperature and the second temperature value is less than default threshold Value.
In embodiments of the present invention, judge whether earphone is currently located by the temperature gap of environment temperature and second temperature value In improper room temperature, for example, earphone has been placed in the too high instrument and equipment environment of temperature, to avoid the occurrence of the feelings of erroneous judgement Condition.
In step S403, when the temperature gap of the environment temperature and the second temperature value is less than predetermined threshold value, Sent according to the change of distance value and play control instruction.
In embodiments of the present invention, when the temperature gap of environment temperature and second temperature value is less than predetermined threshold value, explanation Earphone is currently in improper room temperature, at this moment, if distance value is changed, and has illustrated the current wearing state of earphone Changed, although the temperature gap before and after distance value changes is not up to default trigger condition, according further to distance The change of value, which is sent, plays control instruction, to avoid the erroneous judgement situation that earphone is under improper room ambient conditions, further to drop The low False Rate to earphone wearing state, further improves the accuracy of music control.
It should be understood that the size of the sequence number of each step is not meant to the priority of execution sequence, each process in above-described embodiment Execution sequence should determine that the implementation process without tackling the embodiment of the present invention constitutes any limit with its function and internal logic It is fixed.
Corresponding to a kind of method that music is controlled based on earphone described in foregoing embodiments, Fig. 5 shows the present invention A kind of schematic diagram for device based on earphone control music that embodiment is provided, for convenience of description, illustrate only and this The related part of inventive embodiments.
Reference picture 5, the device includes:
Whether distance value judging unit, the distance value for judging to be gathered by the sensor on the inside of headset body is sent out Changing;
Temperature value acquiring unit, for when distance value changes, obtaining the first temperature before and after distance value changes Angle value and second temperature value;
Judging unit is triggered, for judging whether first temperature value and the temperature gap of the second temperature value meet Default trigger condition;
First instruction sending unit, for when the temperature gap meets default trigger condition, sending and playing control Instruct to default terminal device.
Optionally, first temperature value includes the first temperature averages, and the second temperature value is flat including second temperature Average;
The temperature value acquiring unit includes:
First average temperature value obtain subelement, for obtain the predetermined number before distance value changes by located at ear The temperature value that sensor on the inside of machine body is gathered, first obtained before distance value changes is calculated according to the temperature value Average temperature value;
Second average temperature value obtain subelement, for obtain the predetermined number after distance value changes by located at ear The temperature value that sensor on the inside of machine body is gathered, second obtained after distance value changes is calculated according to the temperature value Average temperature value.
Specifically, first instruction sending unit includes:
First instruction transmission sub-unit, for being to be changed into non-zero from zero when the change of distance value, and the temperature gap is full During the default trigger condition of foot, the broadcasting control instruction of pause music is sent to default terminal device;
Second instruction transmission sub-unit, for being that by non-zero vanishing, and the temperature gap is full when the change of distance value During the default trigger condition of foot, the broadcasting control instruction for playing music is sent to default terminal device.
Optionally, described device also includes:
Environment temperature acquiring unit, for when the temperature gap is unsatisfactory for default trigger condition, obtaining earphone institute Environment temperature on ground;
Threshold decision unit, for judging it is pre- whether the temperature gap of the environment temperature and the second temperature value is less than If threshold value;
Second instruction sending unit, for being preset when the temperature gap of the environment temperature and the second temperature value is less than During threshold value, sent according to the change of distance value and play control instruction to default terminal device.
In embodiments of the present invention, by controlling the device of music to judge by the inside of headset body based on earphone The distance value that is gathered of sensor whether change;When distance value changes, before and after acquisition distance value changes The first temperature value and second temperature value;Judge whether first temperature value and the temperature gap of the second temperature value meet Default trigger condition;When the temperature gap meets default trigger condition, send and play control instruction to default terminal Equipment.The embodiment of the present invention realizes the current pendant for precisely determining earphone by the dual judgement of combination distance value and temperature value State is worn, goes to control the music on default terminal device to send corresponding control instruction of playing according to current wearing state The broadcasting or pause of program, solve the inconvenience of the manually operated control music of user, and reduce in broadcasting control process False Rate, improve music control accuracy.
Fig. 6 is a kind of schematic diagram for terminal device that one embodiment of the invention is provided.As shown in fig. 6, the end of the embodiment End equipment 6 includes:Processor 60, memory 61 and it is stored in the memory 61 and can be run on the processor 60 Computer program 62.The processor 60 realizes that above-mentioned each is based on earphone and controls music when performing the computer program 62 Step in the embodiment of the method for broadcasting, such as step 101 shown in Fig. 1 are to 104.Or, the processor 60 performs described The function of each unit in above-mentioned each device embodiment is realized during computer program 62, such as the function of unit 51 to 54 shown in Fig. 5.
Exemplary, the computer program 62 can be divided into one or more units, one or more of Unit is stored in the memory 61, and is performed by the processor 60, to complete the present invention.One or more of lists Member can complete the series of computation machine programmed instruction section of specific function, and the instruction segment is used to describe the computer journey Implementation procedure of the sequence 62 in the terminal device 6.For example, the computer program 62, which can be divided into distance value, judges single Member 51, temperature value acquiring unit 52, triggering judging unit 53, the first instruction sending unit 54, each unit concrete function are as follows:
Distance value judging unit 51, for the distance value that judges to be gathered by the sensor on the inside of headset body whether Change;
Temperature value acquiring unit 52, for when distance value changes, obtaining first before and after distance value changes Temperature value and second temperature value;
Judging unit 53 is triggered, for judging whether first temperature value and the temperature gap of the second temperature value are full The default trigger condition of foot;
First instruction sending unit 54, for when the temperature gap meets default trigger condition, sending and playing control System is instructed to default terminal device.
Optionally, first temperature value includes the first temperature averages, and the second temperature value is flat including second temperature Average;
The temperature value acquiring unit 52 can be divided into the first average temperature value and obtain subelement and the second average temperature Angle value obtains subelement, and each subelement concrete function is as follows:
First average temperature value obtain subelement, for obtain the predetermined number before distance value changes by located at ear The temperature value that sensor on the inside of machine body is gathered, first obtained before distance value changes is calculated according to the temperature value Average temperature value;
Second average temperature value obtain subelement, for obtain the predetermined number after distance value changes by located at ear The temperature value that sensor on the inside of machine body is gathered, second obtained after distance value changes is calculated according to the temperature value Average temperature value.
Specifically, first instruction sending unit 54 can be divided into the first instruction transmission sub-unit, the second instruction Transmission sub-unit, each subelement concrete function is as follows:
First instruction transmission sub-unit, for being to be changed into non-zero from zero when the change of distance value, and the temperature gap is full During the default trigger condition of foot, the broadcasting control instruction of pause music is sent to default terminal device;
Second instruction transmission sub-unit, for being that by non-zero vanishing, and the temperature gap is full when the change of distance value During the default trigger condition of foot, the broadcasting control instruction for playing music is sent to default terminal device.
Optionally, described device can also be divided into environment temperature acquiring unit, threshold decision unit, the second instruction hair Unit is sent, each unit concrete function is as follows:
Environment temperature acquiring unit, for when the temperature gap is unsatisfactory for default trigger condition, obtaining earphone institute Environment temperature on ground;
Threshold decision unit, for judging it is pre- whether the temperature gap of the environment temperature and the second temperature value is less than If threshold value;
Second instruction sending unit, for being preset when the temperature gap of the environment temperature and the second temperature value is less than During threshold value, sent according to the change of distance value and play control instruction to default terminal device.
The terminal device 6 can be the equipment such as desktop PC, notebook, palm PC and smart mobile phone, earphone. The terminal device 6 may include, but be not limited only to, processor 60, memory 61.It will be understood by those skilled in the art that Fig. 6 is only Only it is the example of terminal device 6, does not constitute the restriction to terminal device 6, can includes than illustrating more or less parts, Some parts or different parts are either combined, such as described terminal device can also include input-output equipment, network and connect Enter equipment, bus etc..
Alleged processor 60 can be CPU (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) or other PLDs, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 61 can be the internal storage unit of the terminal device 6, such as hard disk of terminal device 6 or interior Deposit.The memory 61 can also be the External memory equipment of the terminal device 6, such as is equipped with described terminal device 6 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodges Deposit card (Flash Card) etc..Further, the memory 61 can also both include the storage inside list of the terminal device 6 Member also includes External memory equipment.The memory 61 is used for needed for storing the computer program and the terminal device Other programs and data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that, for convenience of description and succinctly, only with above-mentioned each work( Energy unit, the division progress of module are for example, in practical application, as needed can distribute above-mentioned functions by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completion The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used To be that unit is individually physically present, can also two or more units it is integrated in a unit, it is above-mentioned integrated Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.In addition, each function list Member, the specific name of module are also only to facilitate mutually differentiation, is not limited to the protection domain of the application.Said system The specific work process of middle unit, module, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, without detailed description or note in some embodiment The part of load, may refer to the associated description of other embodiments.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
, can be with embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method Realize by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of division of logic function there can be other dividing mode, for example when actually realizing Multiple units or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.Separately A bit, shown or discussed coupling or direct-coupling or communication connection each other can be by some interfaces, device Or INDIRECT COUPLING or the communication connection of unit, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated module/unit realized using in the form of SFU software functional unit and as independent production marketing or In use, can be stored in a computer read/write memory medium.Understood based on such, the present invention realizes above-mentioned implementation All or part of flow in example method, can also instruct the hardware of correlation to complete, described meter by computer program Calculation machine program can be stored in a computer-readable recording medium, and the computer program can be achieved when being executed by processor The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or some intermediate forms etc..The computer-readable medium It can include:Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic of the computer program code can be carried Dish, CD, computer storage, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium is included can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice Subtract, such as, in some jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and electricity Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied the present invention is described in detail, it will be understood by those within the art that:It still can be to foregoing each Technical scheme described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed Or replace, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme, all should Within protection scope of the present invention.

Claims (10)

1. a kind of method that music is controlled based on earphone, it is characterised in that including:
Judge whether the distance value gathered by the sensor on the inside of headset body changes;
When distance value changes, the first temperature value and second temperature value before and after distance value changes are obtained;
Judge whether first temperature value and the temperature gap of the second temperature value meet default trigger condition;
When the temperature gap meets default trigger condition, send and play control instruction to default terminal device.
2. the method as claimed in claim 1 that music is controlled based on earphone, it is characterised in that the first temperature value bag The first temperature averages are included, the second temperature value includes second temperature average value;
The step of first temperature value obtained before and after distance value changes and second temperature value, including:
The temperature value gathered by the sensor on the inside of headset body of the predetermined number before distance value changes is obtained, Calculated according to the temperature value and obtain the first average temperature value before distance value changes;
The temperature value gathered by the sensor on the inside of headset body of the predetermined number after distance value changes is obtained, Calculated according to the temperature value and obtain the second average temperature value after distance value changes.
3. the method as claimed in claim 1 or 2 that music is controlled based on earphone, it is characterised in that described to work as the temperature When degree difference meets default trigger condition, sending the step of playing control instruction to default terminal device is specially:
When the change of distance value is to be changed into non-zero from zero, and the temperature gap is when meeting default trigger condition, sends pause The broadcasting control instruction of music is to default terminal device;
When the change of distance value is that by non-zero vanishing, and the temperature gap is when meeting default trigger condition, sends and plays The broadcasting control instruction of music is to default terminal device.
4. the method as claimed in claim 1 that music is controlled based on earphone, it is characterised in that play control in described send System is instructed to before the step of default terminal device, in addition to:
When the temperature gap is unsatisfactory for default trigger condition, the environment temperature in earphone location is obtained;
Judge whether the temperature gap of the environment temperature and the second temperature value is less than predetermined threshold value;
When the temperature gap of the environment temperature and the second temperature value is less than predetermined threshold value, sent out according to the change of distance value Broadcasting control instruction is sent to default terminal device.
5. a kind of device based on earphone control music, it is characterised in that including:
Whether distance value judging unit, the distance value for judging to be gathered by the sensor on the inside of headset body becomes Change;
Temperature value acquiring unit, for when distance value changes, obtaining the first temperature value before and after distance value changes With second temperature value;
Judging unit is triggered, for judging whether the temperature gap of first temperature value and the second temperature value meets default Trigger condition;
First instruction sending unit, for when the temperature gap meets default trigger condition, sending and playing control instruction To default terminal device.
6. the device as claimed in claim 5 based on earphone control music, it is characterised in that the first temperature value bag The first temperature averages are included, the second temperature value includes second temperature average value;
The temperature value acquiring unit includes:
First average temperature value obtain subelement, for obtain the predetermined number before distance value changes by located at earphone sheet The temperature value that the sensor of internal side is gathered, calculates according to the temperature value and obtains first being averaged before distance value changes Temperature value;
Second average temperature value obtain subelement, for obtain the predetermined number after distance value changes by located at earphone sheet The temperature value that the sensor of internal side is gathered, calculates according to the temperature value and obtains second being averaged after distance value changes Temperature value.
7. the device that music is controlled based on earphone as described in claim 5 or 6, it is characterised in that first instruction Transmitting element includes:
First instruction transmission sub-unit, for being to be changed into non-zero from zero when the change of distance value, and the temperature gap meets pre- If trigger condition when, send the broadcasting control instruction of pause music to default terminal device;
Second instruction transmission sub-unit, for being that by non-zero vanishing, and the temperature gap meets pre- when the change of distance value If trigger condition when, send the broadcasting control instruction for playing music to default terminal device.
8. the device as claimed in claim 5 based on earphone control music, it is characterised in that described based on earphone control The device of music processed also includes:
Environment temperature acquiring unit, for when the temperature gap is unsatisfactory for default trigger condition, obtaining earphone location Environment temperature;
Threshold decision unit, for judging whether the temperature gap of the environment temperature and the second temperature value is less than default threshold Value;
Second instruction sending unit, is less than predetermined threshold value for the temperature gap when the environment temperature and the second temperature value When, sent according to the change of distance value and play control instruction to default terminal device.
9. a kind of terminal device, including memory, processor and it is stored in the memory and can be on the processor The computer program of operation, it is characterised in that realize such as Claims 1-4 described in the computing device during computer program Described in any one based on earphone control music method the step of.
10. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, its feature exists In realization is broadcast as described in any one of Claims 1-4 based on earphone control music when the computer program is executed by processor The step of method put.
CN201710474395.2A 2017-06-21 2017-06-21 A kind of method, apparatus and terminal device based on earphone control music Active CN107205187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710474395.2A CN107205187B (en) 2017-06-21 2017-06-21 A kind of method, apparatus and terminal device based on earphone control music

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710474395.2A CN107205187B (en) 2017-06-21 2017-06-21 A kind of method, apparatus and terminal device based on earphone control music

Publications (2)

Publication Number Publication Date
CN107205187A true CN107205187A (en) 2017-09-26
CN107205187B CN107205187B (en) 2019-10-01

Family

ID=59908070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710474395.2A Active CN107205187B (en) 2017-06-21 2017-06-21 A kind of method, apparatus and terminal device based on earphone control music

Country Status (1)

Country Link
CN (1) CN107205187B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613387A (en) * 2017-10-12 2018-01-19 广东小天才科技有限公司 Method, apparatus, playback equipment and the storage medium that control data plays
CN108255461A (en) * 2018-01-11 2018-07-06 广东欧珀移动通信有限公司 A kind of control method of mobile terminal, mobile terminal and storage medium
CN108882095A (en) * 2018-08-27 2018-11-23 出门问问信息科技有限公司 The method and device of the pleasant detection of earphone
CN110087161A (en) * 2019-04-23 2019-08-02 青岛恒茂电子有限公司 A kind of wearing state switching method, earphone and the storage medium of bluetooth headset
CN111385689A (en) * 2018-12-29 2020-07-07 北京小米移动软件有限公司 Earphone set
CN111510785A (en) * 2020-04-16 2020-08-07 Oppo广东移动通信有限公司 Video playing control method, device, terminal and computer readable storage medium
CN116600281A (en) * 2023-07-17 2023-08-15 深圳市极客空间科技有限公司 Playing control method of Bluetooth headset

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102149033A (en) * 2010-10-28 2011-08-10 华为终端有限公司 Earphone processing method and user equipment
CN103024193A (en) * 2012-12-25 2013-04-03 北京百度网讯科技有限公司 Mobile terminal and play control method and play control device for same
CN103051997A (en) * 2012-12-26 2013-04-17 广东欧珀移动通信有限公司 Earphone, and terminal equipment and method for controlling audio presentation through earphone
CN103137158A (en) * 2013-01-28 2013-06-05 深圳市金立通信设备有限公司 Method controlling audio playing and terminal
CN103257873A (en) * 2013-04-18 2013-08-21 北京小米科技有限责任公司 Method and system for controlling intelligent terminal device
CN103559895A (en) * 2013-09-04 2014-02-05 张家港保税区润桐电子技术研发有限公司 Audio playing terminal
CN103680546A (en) * 2013-12-31 2014-03-26 深圳市金立通信设备有限公司 Audio playing method, terminal and system
CN104010071A (en) * 2013-02-26 2014-08-27 三星电子株式会社 Application control method and apparatus for mobile terminal, earphone device and application control system
CN104754464A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Audio playing method, terminal and system
CN104978024A (en) * 2014-04-07 2015-10-14 谷歌公司 Detecting driving with a wearable computing device
CN105491483A (en) * 2015-11-30 2016-04-13 歌尔声学股份有限公司 Wearing state detection method and system for earphone and earphone
CN105516850A (en) * 2015-12-15 2016-04-20 上海斐讯数据通信技术有限公司 Noise canceling headphone and noise reduction method
CN105744327A (en) * 2016-02-16 2016-07-06 广东小天才科技有限公司 Playing method and device of multimedia file
CN106131723A (en) * 2016-04-28 2016-11-16 上海斐讯数据通信技术有限公司 The control method of a kind of earphone, control device and earphone
CN205754847U (en) * 2016-05-12 2016-11-30 深圳市盛佳丽电子有限公司 A kind of dynamic ferrum earphone of self-starting
CN106290470A (en) * 2016-07-25 2017-01-04 中国联合网络通信集团有限公司 Air humidity measuring method, equipment and system
CN106775571A (en) * 2017-03-21 2017-05-31 北京小米移动软件有限公司 Audio frequency playing method and device
CN106851455A (en) * 2017-02-23 2017-06-13 上海与德信息技术有限公司 A kind of music control method and device based on earphone play mode

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102149033A (en) * 2010-10-28 2011-08-10 华为终端有限公司 Earphone processing method and user equipment
CN103024193A (en) * 2012-12-25 2013-04-03 北京百度网讯科技有限公司 Mobile terminal and play control method and play control device for same
CN103051997A (en) * 2012-12-26 2013-04-17 广东欧珀移动通信有限公司 Earphone, and terminal equipment and method for controlling audio presentation through earphone
CN103137158A (en) * 2013-01-28 2013-06-05 深圳市金立通信设备有限公司 Method controlling audio playing and terminal
CN104010071A (en) * 2013-02-26 2014-08-27 三星电子株式会社 Application control method and apparatus for mobile terminal, earphone device and application control system
CN103257873A (en) * 2013-04-18 2013-08-21 北京小米科技有限责任公司 Method and system for controlling intelligent terminal device
CN103559895A (en) * 2013-09-04 2014-02-05 张家港保税区润桐电子技术研发有限公司 Audio playing terminal
CN104754464A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Audio playing method, terminal and system
CN103680546A (en) * 2013-12-31 2014-03-26 深圳市金立通信设备有限公司 Audio playing method, terminal and system
CN104978024A (en) * 2014-04-07 2015-10-14 谷歌公司 Detecting driving with a wearable computing device
CN105491483A (en) * 2015-11-30 2016-04-13 歌尔声学股份有限公司 Wearing state detection method and system for earphone and earphone
CN105516850A (en) * 2015-12-15 2016-04-20 上海斐讯数据通信技术有限公司 Noise canceling headphone and noise reduction method
CN105744327A (en) * 2016-02-16 2016-07-06 广东小天才科技有限公司 Playing method and device of multimedia file
CN106131723A (en) * 2016-04-28 2016-11-16 上海斐讯数据通信技术有限公司 The control method of a kind of earphone, control device and earphone
CN205754847U (en) * 2016-05-12 2016-11-30 深圳市盛佳丽电子有限公司 A kind of dynamic ferrum earphone of self-starting
CN106290470A (en) * 2016-07-25 2017-01-04 中国联合网络通信集团有限公司 Air humidity measuring method, equipment and system
CN106851455A (en) * 2017-02-23 2017-06-13 上海与德信息技术有限公司 A kind of music control method and device based on earphone play mode
CN106775571A (en) * 2017-03-21 2017-05-31 北京小米移动软件有限公司 Audio frequency playing method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613387A (en) * 2017-10-12 2018-01-19 广东小天才科技有限公司 Method, apparatus, playback equipment and the storage medium that control data plays
CN108255461A (en) * 2018-01-11 2018-07-06 广东欧珀移动通信有限公司 A kind of control method of mobile terminal, mobile terminal and storage medium
CN108882095A (en) * 2018-08-27 2018-11-23 出门问问信息科技有限公司 The method and device of the pleasant detection of earphone
CN111385689A (en) * 2018-12-29 2020-07-07 北京小米移动软件有限公司 Earphone set
CN110087161A (en) * 2019-04-23 2019-08-02 青岛恒茂电子有限公司 A kind of wearing state switching method, earphone and the storage medium of bluetooth headset
CN111510785A (en) * 2020-04-16 2020-08-07 Oppo广东移动通信有限公司 Video playing control method, device, terminal and computer readable storage medium
CN116600281A (en) * 2023-07-17 2023-08-15 深圳市极客空间科技有限公司 Playing control method of Bluetooth headset
CN116600281B (en) * 2023-07-17 2023-10-27 深圳市极客空间科技有限公司 Playing control method of Bluetooth headset

Also Published As

Publication number Publication date
CN107205187B (en) 2019-10-01

Similar Documents

Publication Publication Date Title
CN107205187A (en) A kind of method, device and terminal device based on earphone control music
CN110166871B (en) Earphone charging box, TWS earphone, working state switching method and storage medium
CN108886653B (en) Earphone sound channel control method, related equipment and system
CN109104684A (en) Microphone plug-hole detection method and Related product
CN105451111A (en) Earphone play control method and apparatus and terminal
CN104735579A (en) Fitting System For Headphone With Physiological Sensor
CN110505550B (en) Wireless earphone in-ear detection method and device and wireless earphone
CN103974158B (en) Audio output device
CN105487899A (en) Headphone wearing state reporting method and system and headphone
CN109150221B (en) Master-slave switching method for wearable equipment and related product
CN108966067A (en) Control method for playing back and Related product
CN104159173A (en) Earphone, earphone application method, earphone control method and device as well as mobile terminal
CN109327758A (en) A kind of wireless playing equipment and its control method for playing back and device
CN108541080A (en) First electronic equipment and the second electronic equipment carry out the method and Related product of Hui Lian
CN108737923A (en) Volume adjusting method and related product
CN109067965A (en) Interpretation method, translating equipment, wearable device and storage medium
CN111766548B (en) Information prompting method and device, electronic equipment and readable storage medium
CN105704604A (en) Smart home earphones
CN105872158A (en) Alarm clock ringing method and device
CN110505547A (en) A kind of earphone wearing state detection method and earphone
WO2020007172A1 (en) Communicational connection establishment method and related device
CN109121034A (en) Master-slave switching method and Related product based on volume
CN108668018A (en) Mobile terminal, method for controlling volume and Related product
CN108255461A (en) A kind of control method of mobile terminal, mobile terminal and storage medium
CN108882112B (en) Audio playing control method and device, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant