Nothing Special   »   [go: up one dir, main page]

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

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

Info

Publication number
CN107205187B
CN107205187B CN201710474395.2A CN201710474395A CN107205187B CN 107205187 B CN107205187 B CN 107205187B CN 201710474395 A CN201710474395 A CN 201710474395A CN 107205187 B CN107205187 B CN 107205187B
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.)
Active
Application number
CN201710474395.2A
Other languages
Chinese (zh)
Other versions
CN107205187A (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

The present invention is suitable for field of communication technology, a kind of method, apparatus and terminal based on earphone control music is provided, by judging by being set to whether the sensor distance value collected 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 preset trigger condition;When the temperature gap meets preset trigger condition, sends 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, to be gone to control the broadcasting or pause of the music playing process on default terminal device according to the corresponding broadcasting control instruction of current wearing state transmission, solves the inconvenience that control music is manually operated in user, and the False Rate played in control process is reduced, improve the accuracy of music control.

Description

A kind of method, apparatus and terminal device based on earphone control music
Technical field
The invention belongs to field of communication technology more particularly to it is a kind of based on earphone control music method, apparatus and Terminal device.
Background technique
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, can sometimes be forced to interrupt because of this or that and using earphone listen to audio-video document, than if you need to When being talked with other people, at this moment, after people lift down earphone, if people will suspend or play the audio-video of intelligent terminal File, it is necessary to the application program of playing audio-video document in intelligent terminal be shown, controlled by the broadcasting of the application program Key realizes the broadcasting or pause of audio-video document, is especially interrupted repeatedly during listening to audio-video document as user When, it is necessary to the pause or broadcasting button of the application program of playing audio-video document on multi-pass operation mobile terminal, this gives user Bring greatly it is troublesome in poeration, very not convenient, user experience is poor.
In the prior art, although providing a kind of pressure letter for being put into human body external auditory canal by pressure sensor test earphone Number, realized according to the pressure signal and start or suspend according to the needs of users the broadcasting of music, 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 view well The broadcasting of frequency file.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of method, apparatus and terminal based on earphone control music Equipment, frequent operation is not convenient when repeatedly controlling music to solve existing during listening to music, and is worn according to earphone It wears state control music and there is wrong report, the lower problem of control music accuracy.
The first aspect of the embodiment of the present invention provides a kind of method based on earphone control music, comprising:
Judge by being set to whether the sensor distance value collected 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 preset trigger condition;
When the temperature gap meets preset trigger condition, sends 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, comprising:
Distance value judging unit, for judging by being set to whether the sensor distance value collected 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 Preset trigger condition;
First instruction sending unit, for sending and playing control when the temperature gap meets preset trigger condition It instructs to default terminal device.
The third aspect of the embodiment of the present invention provides a kind of terminal device, comprising:
Memory, processor and storage are in the memory and the computer journey that can run on the processor Sequence, wherein realize that the first aspect of the embodiment of the present invention provides when the processor executes the computer program based on ear Machine controls the step of method of music.
Wherein, the computer program includes:
Distance value judging unit, for judging by being set to whether the sensor distance value collected 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 Preset trigger condition;
First instruction sending unit, for sending and playing control when the temperature gap meets preset trigger condition It instructs to default terminal device.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, wherein the first of the embodiment of the present invention is realized when the computer program is executed by processor The step of method based on earphone control music that aspect provides.
Wherein, the computer program includes:
Distance value judging unit, for judging by being set to whether the sensor distance value collected 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 Preset trigger condition;
First instruction sending unit, for sending and playing control when the temperature gap meets preset trigger condition It instructs to default terminal device.
Existing beneficial effect is the embodiment of the present invention compared with prior art: sentencing in conjunction with distance value and the dual of temperature value It is disconnected, the current wearing state for precisely determining earphone is realized, plays control instruction accordingly to send according to current wearing state The broadcasting or pause for going to control the music playing process on default terminal device solve user and control music are manually operated Inconvenience, and reduce play control process in False Rate, improve music control accuracy.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation flow chart of method based on earphone control music provided in an embodiment of the present invention;
Fig. 2 is a kind of specific implementation flow of method for obtaining temperature averages provided in an embodiment of the present invention;
Fig. 3 is the implementation flow chart of another method for sending broadcasting control instruction provided in an embodiment of the present invention;
Fig. 4 is that a kind of variation according to distance value provided in an embodiment of the present invention sends the tool for playing the method for 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.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly 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 also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.Referring 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 by being set to whether the sensor distance value collected 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 headset, monaural Formula bluetooth headset or wired earphone.It is equipped in the earphone for acquiring the range sensor of distance value and for acquiring The temperature sensor of temperature value, herein, temperature sensor acquire a temperature value every preset time.
Herein, distance value changes and is specially become when distance value becomes non-zero or distance value from zero from non-zero Zero.It by judging whether distance value from zero becomes non-zero, or is become zero by non-zero, so that it may judge whether distance value becomes Change.
Specifically, when that is, earphone is in wearing state, the distance between earphone and ear are when user takes earphone Zero, certainly, in different Headphone structures, or different range sensors is used, the collected distance value of institute is also likely to be Non-zero, the collected distance value of institute is zero or is non-zero and is not specifically limited when taking earphone to user here, as just A kind of example indicates, but is become non-zero by the variation of distance value, such as distance value from zero or become zero by non-zero;Or Distance value changes from small to big or tentatively judges 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 of obtained distance value within a preset time or mean-square value To determine the current wearing state of earphone.Assuming that at this moment the collected distance value of sensor institute is zero, at this moment due to distance value be by Non-zero becomes zero, it is believed that distance value is changed;When user takes earphone, i.e., when earphone is in non-wearing state, Distance is produced between earphone and ear, at this moment the collected distance value of sensor institute is non-zero, specific distance value view earphone with Depending on actual range between object, at this moment, since distance value is to become 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 front and back the first temperature value and Second temperature value.
In embodiments of the present invention, by judging whether distance value changes, can generally determine earphone currently whether In wearing state, but under special circumstances, for example, thering is a book pressing against earphone, and just cover when earphone is put on the table The top of sensor, at this moment, the collected distance value of sensor is zero, easily causes erroneous judgement, actually earphone so simultaneously It is not in wearing state.It at this moment, can be by being judged according to temperature value since there are certain difference for human ear temperature and room temperature Whether earphone is in wearing state, to reduce False Rate, whether is in wearing state by judging earphone to control music, Achieve the purpose that the precision for improving music control.
Under normal circumstances, when user wears earphone and without earphone, i.e., when distance value changes, occurs in distance value Temperature after collected temperature and distance value before variation change can change, there are a temperature value difference, Here, the temperature value before distance value being changed is defined as the first temperature value, can be detached from human ear for human body ear temperature or earphone The collected temperature value of institute afterwards;Temperature value after distance value is changed is defined as second temperature value, can be detached from for earphone The collected temperature value of institute or human body ear temperature after human ear;Obviously, the first temperature value and second temperature value are opposite, can be mutual Conversion, i.e., when the first temperature value is human body ear temperature, second temperature value is collected temperature value after earphone disengaging human ear;When First temperature value is when collected temperature value, second temperature value is human body ear temperature after earphone disengaging human ear.Of the invention real It applies in example, for the ease of following explanation, the first temperature value of default is human body ear temperature, and second temperature value is after earphone is detached from human ear The collected temperature value of institute.
Specifically, the first temperature value is before distance value changes, by the collected real-time temperature value of sensor, specifically may be used Think the last one collected temperature value before distance value changes.
Second temperature value is after distance value changes, by the collected real-time temperature value of sensor, to be specifically as follows Distance value collected first temperature value after changing.
Optionally, first temperature value includes the first temperature averages, and the second temperature value includes that second temperature is flat Mean value.
First average temperature value is the temperature value before being changed according to distance value by the collected preset quantity of sensor The average temperature value being calculated.
Second average temperature value is the temperature value after being changed according to distance value by the collected preset quantity of sensor The average temperature value being calculated.
Specifically, the step of first temperature value and second temperature value obtained before and after distance value changes, including A kind of specific implementation flow of the method for acquisition temperature averages as shown in Figure 2:
In step s 201, obtain distance value change before preset quantity by be set to headset body on the inside of sensing The first average temperature value before distance value changes is calculated according to the temperature value for device temperature value collected.
In step S202, obtain distance value change after preset quantity by be set to headset body on the inside of sensing The second average temperature value after distance value changes is calculated according to the temperature value for device temperature value collected.
In embodiments of the present invention, because the time interval of sensor temperature collected be it is fixed, distance value occur Variation front and back obtains same amount of temperature value to calculate average temperature value, for example obtains before distance value changes and acquired 3 temperature values, calculate distance value change before average temperature value;3 collected are obtained after distance value changes Temperature value calculates the average temperature value after distance value changes, can be further improved the temperature before and after distance value changes The accuracy for spending difference, to reduce the False Rate for judging whether earphone is in wearing state.
In step s 103, it is default to judge whether the temperature gap of first temperature value and the second temperature value meets Trigger condition.
In embodiments of the present invention, preset trigger condition can be the temperature gap of the first temperature value and second temperature value Absolute value be greater than preset threshold, which can be one or more.
For example, judging to mark when second temperature value is closer to the first temperature according to the standard of second temperature value setting judgement It is quasi- stringenter, to improve the precision of judgement.Second temperature value is divided into several temperature values, such as will be close to human ear The temperature value of temperature is divided into a temperature range, is much smaller than or is divided into another temperature greater than the temperature value of human ear temperature Range, each temperature values are corresponding with a trigger condition, i.e., each temperature values are corresponding with a preset threshold.When Two temperature values are considered as in its temperature range, and when reaching preset trigger condition with the temperature gap of the first temperature value First temperature value and the temperature gap of the second temperature value meet preset trigger condition.
In step S104, when the temperature gap meets preset trigger condition, sends 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 only one control System instruction obtains current music application program in default terminal device when default terminal device receives the control instruction Broadcast state, then preset instructions corresponding with the broadcast state are executed, for example current play status is when playing, to execute pause Instruction;When current play status is pause, play instruction is executed.
Herein, preset terminal device be the terminal device that connection is established with earphone, including but not limited to mobile phone, IPAD, MP4, laptop etc..The mode that the two establishes connection includes but is not limited to the modes such as bluetooth, infrared, WIFI.
When temperature gap meets preset trigger condition, illustrate that earphone is currently at wearing state or non-wearing state, It is extremely established on the terminal device of connection with earphone with regard to sending play instruction corresponding with current wearing state.
In embodiments of the present invention, by judge by be set to headset body on the inside of sensor distance value collected whether It changes;When distance value changes, the first temperature value and second temperature value before and after distance value changes are obtained;Sentence Whether the temperature gap for first temperature value and the second temperature value of breaking meets preset trigger condition;When the temperature difference When value meets preset trigger condition, sends and play control instruction to default terminal device.The embodiment of the present invention pass through combine away from Dual judgement from value and temperature value realizes the current wearing state for precisely determining earphone, to be sent out according to current wearing state It send the corresponding control instruction that plays to go to control the broadcasting or pause of the music playing process on default terminal device, solves user The inconvenience of manual operation control music, and the False Rate played in control process is reduced, improve music control Accuracy.
Specifically, described when the temperature gap meets preset trigger condition, send and play control instruction to default The step of terminal device, including another method implementation process for sending broadcasting control instruction as shown in Figure 3:
In step S301, when the variation of distance value is to become non-zero from zero, and the temperature gap meets preset touching When clockwork spring part, the broadcasting control instruction of pause music is sent to default terminal device;
In step s 302, when the variation of distance value is to be become zero by non-zero, and the temperature gap meets preset touching When 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 in addition it is equal when, when earphone has been removed, i.e. ear When machine is in non-wearing state, since preset trigger condition has not yet been reached, at this moment, it just will appear erroneous judgement situation, in order to avoid The appearance of this case can directly send according to the variation of distance value and play control instruction, i.e., play and control in the transmission It further include that a kind of sent according to the variation of distance value as shown in Figure 4 plays control before the step of instruction to default terminal device Make the specific implementation flow of the method for instruction:
In step S401, when the temperature gap is unsatisfactory for preset trigger condition, environment temperature is obtained.
In embodiments of the present invention, environment temperature may be considered room temperature or local temperature, can set from default terminal Acquired local temperature in the record of standby application program such as weather forecast application program, or for by default terminal device Temperature sensor temperature value collected.
In step S402, judge whether the environment temperature and the temperature gap of the second temperature value are 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 excessively high instrument and equipment environment of temperature, to avoid there are the feelings judged by accident Condition.
In step S403, when the temperature gap of the environment temperature and the second temperature value is less than preset threshold, It is sent according to the variation of distance value and plays control instruction.
In embodiments of the present invention, when the temperature gap of environment temperature and second temperature value is less than preset threshold, explanation Earphone is currently in improper room temperature, at this moment, if distance value is changed, has illustrated the current wearing state of earphone Changed, although distance value changes, the temperature gap of front and back is not up to preset trigger condition, according further to distance The variation of value, which is sent, plays control instruction, the erroneous judgement situation under improper room ambient conditions is in avoid earphone, further to drop The low False Rate to earphone wearing state further increases the accuracy of music control.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
The present invention is shown corresponding to a kind of method based on earphone control music, Fig. 5 described in foregoing embodiments A kind of schematic diagram for device based on earphone control music that embodiment provides illustrates only and this for ease of description The relevant part of inventive embodiments.
Referring to Fig. 5, which includes:
Distance value judging unit, for judging by being set to whether the sensor distance value collected 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 Preset trigger condition;
First instruction sending unit, for sending and playing control when the temperature gap meets preset trigger condition It instructs to default terminal device.
Optionally, first temperature value includes the first temperature averages, and the second temperature value includes that second temperature is flat Mean value;
The temperature value acquiring unit includes:
First average temperature value obtain subelement, for obtain the preset quantity before distance value changes by be set to ear Sensor temperature value collected on the inside of machine ontology, is calculated first before distance value changes according to the temperature value Average temperature value;
Second average temperature value obtain subelement, for obtain the preset quantity after distance value changes by be set to ear Sensor temperature value collected on the inside of machine ontology, is calculated second after distance value changes according to the temperature value Average temperature value.
Specifically, first instruction sending unit includes:
First instruction transmission sub-unit is to become non-zero from zero, and the temperature gap is full for the variation when distance value When the preset trigger condition of foot, the broadcasting control instruction of pause music is sent to default terminal device;
Second instruction transmission sub-unit is to be become zero by non-zero, and the temperature gap is full for the variation when distance value When the preset trigger condition of foot, the broadcasting control instruction for playing music is sent to default terminal device.
Optionally, described device further include:
Environment temperature acquiring unit, for obtaining earphone institute when the temperature gap is unsatisfactory for preset trigger condition 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 is less than default for the temperature gap when the environment temperature and the second temperature value When threshold value, is sent according to the variation of distance value and play control instruction to default terminal device.
In embodiments of the present invention, judged by the device for controlling music based on earphone by being set on the inside of headset body Sensor distance value collected 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 Preset trigger condition;When the temperature gap meets preset trigger condition, sends 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 in conjunction with distance value and temperature value State is worn, goes to control the music on default terminal device to send the corresponding control instruction that plays according to current wearing state The broadcasting or pause of program solve the inconvenience that control music is manually operated in user, and reduce and play in 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 provides.As shown in fig. 6, the end of the embodiment End equipment 6 includes: processor 60, memory 61 and is stored in the memory 61 and can run on the processor 60 Computer program 62.The processor 60 is realized above-mentioned each based on earphone control music when executing the computer program 62 Step in the embodiment of the method for broadcasting, such as step 101 shown in FIG. 1 is to 104.Alternatively, the processor 60 execute it is described The function of each unit in above-mentioned each Installation practice, such as the function of unit 51 to 54 shown in Fig. 5 are realized when computer program 62.
Illustratively, 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 executed by the processor 60, to complete the present invention.One or more of lists Member can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer journey Implementation procedure of the sequence 62 in the terminal device 6.For example, the computer program 62 can be divided into distance value judgement list 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 judge by be set to headset body on the inside of sensor distance value collected whether It changes;
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, whether the temperature gap for judging first temperature value and the second temperature value is full The preset trigger condition of foot;
First instruction sending unit 54, for sending and playing control when the temperature gap meets preset trigger condition System is instructed to default terminal device.
Optionally, first temperature value includes the first temperature averages, and the second temperature value includes that second temperature is flat Mean value;
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 preset quantity before distance value changes by be set to ear Sensor temperature value collected on the inside of machine ontology, is calculated first before distance value changes according to the temperature value Average temperature value;
Second average temperature value obtain subelement, for obtain the preset quantity after distance value changes by be set to ear Sensor temperature value collected on the inside of machine ontology, is calculated second after distance value changes 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 are as follows:
First instruction transmission sub-unit is to become non-zero from zero, and the temperature gap is full for the variation when distance value When the preset trigger condition of foot, the broadcasting control instruction of pause music is sent to default terminal device;
Second instruction transmission sub-unit is to be become zero by non-zero, and the temperature gap is full for the variation when distance value When the preset 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 obtaining earphone institute when the temperature gap is unsatisfactory for preset trigger condition 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 is less than default for the temperature gap when the environment temperature and the second temperature value When threshold value, is sent according to the variation 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 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 It is only the example of terminal device 6, does not constitute the restriction to terminal device 6, may include components more more or fewer than diagram, Perhaps certain components or different components are combined, such as the terminal device can also connect including input-output equipment, network Enter equipment, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 61 can be the internal storage unit of the terminal device 6, such as the hard disk or interior of terminal device 6 It deposits.The memory 61 is also possible to the External memory equipment of the terminal device 6, such as be equipped on the terminal device 6 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge 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 for storing needed for 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 function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution 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 completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes 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 logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on 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 certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (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 includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method based on earphone control music characterized by comprising
Judge that the distance value is default by being set to whether the sensor distance value collected on the inside of headset body changes The average value or mean-square value of obtained distance value in time;
When distance value changes, the first temperature value and second temperature value before and after distance value changes are obtained;
Judge whether the temperature gap of first temperature value and the second temperature value meets preset trigger condition, described the Two temperature values are divided into several temperature values, and each temperature values are corresponding with a preset threshold;
When the temperature gap meets preset trigger condition, sends and play control instruction to default terminal device;
Wherein, described to judge whether first temperature value and the temperature gap of the second temperature value meet preset triggering item The step of part, comprising:
When determining that the second temperature value is in the temperature values, first temperature value and the second temperature are judged Whether the temperature gap of value meets preset trigger condition.
2. the method as described in claim 1 based on earphone control music, which is characterized in that the first temperature value packet The first temperature averages are included, the second temperature value includes second temperature average value;
The step of first temperature value and second temperature value obtained before and after distance value changes, comprising:
Obtain distance value change before preset quantity by be set to headset body on the inside of sensor temperature value collected, The first average temperature value before distance value changes is calculated according to the temperature value;
Obtain distance value change after preset quantity by be set to headset body on the inside of sensor temperature value collected, The second average temperature value after distance value changes is calculated according to the temperature value.
3. the method as claimed in claim 1 or 2 based on earphone control music, which is characterized in that described to work as the temperature When degree difference meets preset trigger condition, the step of playing control instruction to default terminal device is sent specifically:
When the variation of distance value is becomes non-zero from zero, and the temperature gap meets preset trigger condition, pause is sent The broadcasting control instruction of music is to default terminal device;
When the variation of distance value is is become zero by non-zero, and the temperature gap meets preset trigger condition, sends and play The broadcasting control instruction of music is to default terminal device.
4. the method as described in claim 1 based on earphone control music, which is characterized in that play and control in the transmission Before the step of system instruction to default terminal device, further includes:
When the temperature gap is unsatisfactory for preset trigger condition, the environment temperature in earphone location is obtained;
Judge whether the environment temperature and the temperature gap of the second temperature value are less than preset threshold;
When the temperature gap of the environment temperature and the second temperature value is less than preset threshold, sent out according to the variation of distance value It send and plays control instruction to default terminal device.
5. a kind of device based on earphone control music characterized by comprising
Distance value judging unit, for judging by being set to whether the sensor distance value collected on the inside of headset body becomes Change, the distance value is the average value or mean-square value of obtained distance value in preset time;
Temperature value acquiring unit, for when distance value changes, obtaining the first temperature value before and after distance value changes With second temperature value, the second temperature value is divided into several temperature values, and each temperature values are corresponding with one Preset threshold;
Judging unit is triggered, for judging it is default whether the temperature gap of first temperature value and the second temperature value meets Trigger condition;
First instruction sending unit, for sending and playing control instruction when the temperature gap meets preset trigger condition To default terminal device;
Wherein, described to judge whether first temperature value and the temperature gap of the second temperature value meet preset triggering item The step of part, comprising:
When determining that the second temperature value is in the temperature values, first temperature value and the second temperature are judged Whether the temperature gap of value meets preset trigger condition.
6. the device as claimed in claim 5 based on earphone control music, which is characterized in that the first temperature value packet 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 preset quantity before distance value changes by be set to earphone sheet The sensor temperature value collected of internal side is calculated first average before distance value changes according to the temperature value Temperature value;
Second average temperature value obtain subelement, for obtain the preset quantity after distance value changes by be set to earphone sheet The sensor temperature value collected of internal side is calculated second average after distance value changes according to the temperature value Temperature value.
7. such as the device described in claim 5 or 6 based on earphone control music, which is characterized in that first instruction Transmission unit includes:
First instruction transmission sub-unit is to become non-zero from zero, and the temperature gap meets in advance for the variation when distance value If trigger condition when, send the broadcasting control instruction of pause music to default terminal device;
Second instruction transmission sub-unit is to be become zero by non-zero, and the temperature gap meets in advance for the variation when 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, which is characterized in that described based on earphone control The device of music processed further include:
Environment temperature acquiring unit, for obtaining earphone location when the temperature gap is unsatisfactory for preset trigger condition Environment temperature;
Threshold decision unit, for judging whether the environment temperature and the temperature gap of the second temperature value are less than default threshold Value;
Second instruction sending unit is less than preset threshold for the temperature gap when the environment temperature and the second temperature value When, it is sent according to the variation of distance value and plays control instruction to default terminal device.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as Claims 1-4 when executing the computer program The step of described in any item methods based on earphone control music.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and 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 CN107205187A (en) 2017-09-26
CN107205187B true 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)

Families Citing this family (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 and device for controlling data playing, playing equipment and storage medium
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
CN110087161B (en) * 2019-04-23 2020-07-07 青岛恒茂电子有限公司 Wearing state switching method of Bluetooth headset, headset and storage medium
CN111510785B (en) * 2020-04-16 2022-01-28 Oppo广东移动通信有限公司 Video playing control method, device, terminal and computer readable storage medium
CN116600281B (en) * 2023-07-17 2023-10-27 深圳市极客空间科技有限公司 Playing control method of Bluetooth headset

Citations (13)

* 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
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
CN105516850A (en) * 2015-12-15 2016-04-20 上海斐讯数据通信技术有限公司 Noise canceling headphone and noise reduction method
CN105744327A (en) * 2016-02-16 2016-07-06 广东小天才科技有限公司 Multimedia file playing method and device
CN106131723A (en) * 2016-04-28 2016-11-16 上海斐讯数据通信技术有限公司 The control method of a kind of earphone, control device and earphone
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024193A (en) * 2012-12-25 2013-04-03 北京百度网讯科技有限公司 Mobile terminal and play control method and play control device for same
US9037125B1 (en) * 2014-04-07 2015-05-19 Google Inc. Detecting driving with a wearable computing device
CN105491483B (en) * 2015-11-30 2018-11-02 歌尔股份有限公司 Wearing state detection method, system and earphone for earphone
CN205754847U (en) * 2016-05-12 2016-11-30 深圳市盛佳丽电子有限公司 A kind of dynamic ferrum earphone of self-starting
CN106290470B (en) * 2016-07-25 2019-06-18 中国联合网络通信集团有限公司 Air humidity measurement method, equipment and system

Patent Citations (13)

* 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
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
CN103680546A (en) * 2013-12-31 2014-03-26 深圳市金立通信设备有限公司 Audio playing method, terminal and system
CN104754464A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Audio playing method, terminal and system
CN105516850A (en) * 2015-12-15 2016-04-20 上海斐讯数据通信技术有限公司 Noise canceling headphone and noise reduction method
CN105744327A (en) * 2016-02-16 2016-07-06 广东小天才科技有限公司 Multimedia file playing method and device
CN106131723A (en) * 2016-04-28 2016-11-16 上海斐讯数据通信技术有限公司 The control method of a kind of earphone, control device and earphone
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

Also Published As

Publication number Publication date
CN107205187A (en) 2017-09-26

Similar Documents

Publication Publication Date Title
CN107205187B (en) A kind of method, apparatus and terminal device based on earphone control music
CN105554616B (en) A kind of headset control method and earphone
EP2887692B1 (en) A fitting system for a headphone with physiological sensor
KR102060776B1 (en) Electronic device operating in asscociated state with external audio device based on biometric information and method therefor
CN109068206A (en) Principal and subordinate's earphone method for handover control and Related product
US20150230019A1 (en) Wearable electronic system
CN109104684A (en) Microphone plug-hole detection method and Related product
CN109151634A (en) Wireless headset method for controlling volume, wireless headset and mobile terminal
CN107135437B (en) A kind of bluetooth headset and its control method
CN108848427A (en) Wearing state detection method and relevant device
CN108966067A (en) Control method for playing back and Related product
CN105487899A (en) Headphone wearing state reporting method and system and headphone
CN108737923A (en) Volume adjusting method and related product
CN109327758A (en) A kind of wireless playing equipment and its control method for playing back and device
CN110505547A (en) A kind of earphone wearing state detection method and earphone
CN104754470A (en) Multifunctional intelligent headset, multifunctional intelligent headset system and communication method of multifunctional intelligent headset system
US10582290B2 (en) Earpiece with tap functionality
CN104506987A (en) Smart earphone control method and smart earphone
CN109618263A (en) Head/neck inclination angle detection method, apparatus, system and wireless headset controller
CN109067965A (en) Interpretation method, translating equipment, wearable device and storage medium
CN109151697A (en) Microphone plug-hole detection method and Related product
CN105704604A (en) Smart home earphones
CN105872158A (en) Alarm clock ringing method and device
CN109040896A (en) A kind of earphone and apart from detection cut-in method
CN108923810A (en) Interpretation method and relevant device

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