CN112118502B - Earphone control method, device, equipment and storage medium - Google Patents

Earphone control method, device, equipment and storage medium Download PDF

Info

Publication number
CN112118502B
CN112118502B CN202010949094.2A CN202010949094A CN112118502B CN 112118502 B CN112118502 B CN 112118502B CN 202010949094 A CN202010949094 A CN 202010949094A CN 112118502 B CN112118502 B CN 112118502B
Authority
CN
China
Prior art keywords
acceleration data
earphone
determining
change
index information
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
CN202010949094.2A
Other languages
Chinese (zh)
Other versions
CN112118502A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010949094.2A priority Critical patent/CN112118502B/en
Publication of CN112118502A publication Critical patent/CN112118502A/en
Application granted granted Critical
Publication of CN112118502B publication Critical patent/CN112118502B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Headphones And Earphones (AREA)

Abstract

The present disclosure relates to a method, an apparatus, a device and a storage medium for controlling an earphone, wherein the method comprises: acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone; determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode; controlling a play function of the headset based on the usage pattern. The earphone-based control method and the earphone-based control device can achieve the accurate use mode of the earphone based on the accurate acceleration data of the first earphone module and the second earphone module of the earphone, further achieve the corresponding playing function based on the accurate control earphone of the determined use mode, can meet the user requirements under different use modes, and improve the user experience.

Description

Earphone control method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of earphone technologies, and in particular, to an earphone control method, apparatus, device, and storage medium.
Background
With the development of technologies such as mobile terminals and intelligent wearable devices, the performance of earphones used in cooperation with the mobile terminals and the intelligent wearable devices is more and more concerned. In the related art, the headset may be used for enjoying music or other forms of audio contents and for making and receiving calls. However, as the usage rate of the headset is higher, the user demands more and more for the usage of the headset. Therefore, how to accurately control the functions of the earphones according to the requirements is a technical problem to be solved at present.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide an earphone control method, apparatus, device and storage medium, so as to solve the defects in the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a headset control method applied to a split type headset, the method including:
acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode;
controlling a play function of the headset based on the usage pattern.
In an embodiment, said determining a usage pattern of said headset based on said first acceleration data and said second acceleration data comprises:
determining first change index information of the first acceleration data and second change index information of the second acceleration data, wherein the first change index information and the second change index information comprise at least one of a vector sum curve, frequency distribution information and a change amplitude;
determining index information similarity of the first change index information and the second change index information;
in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold, determining that the usage mode of the headset is a single usage mode;
and in response to determining that the index information similarity is smaller than a set index information similarity threshold, determining that the use mode of the earphone is a multi-user use mode.
In an embodiment, in a case where the first change indicator information and the second change indicator information include a vector sum curve, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively calculating the square sum of each axial acceleration data of the first acceleration data and the second acceleration data, and squaring the square sum to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include frequency distribution information, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively carrying out Fourier transform on the first acceleration data and the second acceleration data to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include a change width, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
In an embodiment, in a case that the usage mode is a multi-user usage mode, the controlling the playing function of the headset based on the usage mode includes:
receiving a control instruction for a to-be-controlled earphone module in the earphone, wherein the control instruction comprises identification information of the to-be-controlled earphone module, and the to-be-controlled earphone module is the first earphone module or the second earphone module;
and controlling the playing function of the earphone module to be controlled based on the control instruction, wherein the playing function comprises at least one of playing content and playing volume.
In an embodiment, the method further comprises:
determining states of the first earphone module and the second earphone module based on the first acceleration data and the second acceleration data, wherein the states comprise a wearing state and a non-wearing state;
and in response to the fact that the state of the first earphone module and/or the second earphone module is determined to be the unworn state, controlling the earphone module in the unworn state to stop playing.
In an embodiment, the method further comprises:
and controlling the earphone module stopping playing to play in response to the situation that the state of the earphone module stopping playing is detected to be changed from the unworn state to the worn state.
In an embodiment, in a case that the usage mode is a single usage mode, the controlling the playing function of the headset based on the usage mode includes:
determining an activity state of a wearer of the headset based on the first acceleration data and the second acceleration data;
controlling a play function of the headset based on the activity state.
In an embodiment, in a case that the active state is an exercise state, the controlling the play function of the headset based on the active state includes:
acquiring an audio type matched with the motion state;
and controlling at least one earphone module in the earphones to play the audio of the audio type.
In an embodiment, in a case that the active state is a sleep state, the controlling a play function of the headset based on the active state includes:
responding to a received control instruction for playing a prompt tone of an application program, and controlling the earphone to play the prompt tone based on a first playing mode;
in response to receiving a control instruction for playing an incoming call ringtone of an instant communication program, determining the total incoming call frequency of an instant communication initiating terminal;
controlling the earphone to play the incoming call ringtone based on a second playing mode under the condition that the total incoming call frequency is less than or equal to a set threshold value;
and controlling the earphone to play the incoming call ringtone based on a third playing mode under the condition that the total incoming call frequency is greater than a set threshold value.
According to a second aspect of the embodiments of the present disclosure, there is provided a headset control device applied to a split type headset, the device including:
the acceleration data acquisition module is used for acquiring first acceleration data acquired by the first acceleration sensor and second acceleration data acquired by the second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
a usage mode determination module for determining usage modes of the headset based on the first acceleration data and the second acceleration data, the usage modes including a single-person usage mode and a multi-person usage mode;
and the playing function control module is used for controlling the playing function of the earphone based on the using mode.
In one embodiment, the usage pattern determination module includes:
an index information determination unit configured to determine first change index information of the first acceleration data and second change index information of the second acceleration data, the first change index information and the second change index information including at least one of a vector sum curve, frequency distribution information, and a change amplitude;
an information similarity determination unit configured to determine an index information similarity between the first change index information and the second change index information;
a single-person mode determination unit for determining the use mode of the earphone as a single-person use mode in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold;
and the multi-person mode determining unit is used for responding to the fact that the index information similarity is smaller than a set index information similarity threshold value, and determining that the use mode of the earphone is a multi-person use mode.
In an embodiment, in a case that the first change index information and the second change index information include a vector sum curve, the index information determination unit is further configured to calculate a sum of squares of respective axial acceleration data of the first acceleration data and the second acceleration data, respectively, and square the sum of squares to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
the index information determining unit is further configured to perform fourier transform on the first acceleration data and the second acceleration data, respectively, to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data, when the first change index information and the second change index information include frequency distribution information;
in a case where the first change index information and the second change index information include a change width, the index information determination unit is further configured to:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
In an embodiment, in a case that the usage mode is a multi-user usage mode, the play function control module includes:
the control instruction receiving unit is used for receiving a control instruction for a to-be-controlled earphone module in the earphone, wherein the control instruction comprises identification information of the to-be-controlled earphone module, and the to-be-controlled earphone module is the first earphone module or the second earphone module;
and the first function control unit is used for controlling the playing function of the earphone module to be controlled based on the control instruction, and the playing function comprises at least one of playing content and playing volume.
In one embodiment, the device further comprises an earphone module control module;
earphone module control module includes:
the module state determining unit is used for respectively determining the states of the first earphone module and the second earphone module based on the first acceleration data and the second acceleration data, wherein the states comprise a wearing state and a non-wearing state;
and the earphone module control unit is used for responding to the situation that the state of the first earphone module and/or the second earphone module is determined to be the unworn state, and controlling the earphone module in the unworn state to stop playing.
In an embodiment, the earphone module control unit is further configured to control the earphone module stopping playing to play in response to detecting that the state of the earphone module stopping playing is changed from the unworn state to the worn state.
In an embodiment, in a case that the usage mode is a single usage mode, the play function control module includes:
an activity state determination unit for determining an activity state of a wearer of the headset based on the first acceleration data and the second acceleration data;
a second function control unit for controlling a play function of the earphone based on the activity state.
In an embodiment, in the case that the active state is a sport state, the second function control unit is further configured to:
acquiring an audio type matched with the motion state;
and controlling at least one earphone module in the earphones to play the audio of the audio type.
In an embodiment, in the case that the active state is a sleep state, the second function control unit is further configured to:
in response to receiving a control instruction for playing a prompt tone of an application program, controlling the earphone to play the prompt tone based on a first playing mode;
in response to receiving a control instruction for playing an incoming call ringtone of an instant communication program, determining the total incoming call frequency of an instant communication initiating terminal;
controlling the earphone to play the incoming call ringtone based on a second playing mode under the condition that the total incoming call frequency is less than or equal to a set threshold value;
and controlling the earphone to play the incoming call ringtone based on a third playing mode under the condition that the total incoming call frequency is greater than a set threshold value.
According to a third aspect of embodiments of the present disclosure, there is provided a headphone control device, the device including:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode;
controlling a play function of the headset based on the usage pattern.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements:
acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode;
controlling a play function of the headset based on the usage pattern.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
this is disclosed through the second acceleration data that acquires the first acceleration data that acquires of acquireing first acceleration sensor and the second acceleration data that the second acceleration sensor gathered, and based on first acceleration data with the second acceleration data is confirmed the user mode of earphone, and then can be based on user mode control the play function of earphone can realize the accurate definite user mode of earphone of the acceleration data of the first earphone module and the second earphone module based on the earphone, and then can realize corresponding play function based on the accurate control earphone of definite user mode, can satisfy the user demand under the different user mode, promote user experience.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of headset control according to an exemplary embodiment;
FIG. 2 is a flow chart showing how a usage pattern of the headset is determined based on the first acceleration data and the second acceleration data, according to an example embodiment;
FIG. 3 is a flow chart showing how the play function of the headset is controlled based on the usage pattern in accordance with an exemplary embodiment;
fig. 4 is a flow chart illustrating a method of headset control according to yet another exemplary embodiment;
FIG. 5 is a flow chart showing how the play function of the headset is controlled based on the usage pattern according to yet another exemplary embodiment;
FIG. 6 is a flow diagram illustrating how the play function of the headset is controlled based on the activity state in accordance with an exemplary embodiment;
fig. 7 is a block diagram illustrating a headphone control device according to an exemplary embodiment;
fig. 8 is a block diagram illustrating a headphone control apparatus according to yet another exemplary embodiment;
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flow chart illustrating a method of headset control according to an exemplary embodiment; the method of the embodiment can be applied to a split type earphone, which comprises a left earphone module and a right earphone module which are independent, such as a split type bluetooth earphone (i.e. the two earphone modules are not connected with a wire or a head band).
As shown in fig. 1, the method comprises the following steps S101-S103:
in step S101, first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor are acquired.
The first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone.
In this embodiment, since the first acceleration sensor (i.e., G-sensor) is disposed on the first earphone module and the second acceleration sensor is disposed on the second earphone module in advance, and the first acceleration data and the second acceleration data are respectively collected, the first acceleration data is equivalent to the acceleration data of the first earphone module, and the second acceleration data is equivalent to the acceleration data of the second earphone module.
It should be noted that, the first earphone module and the second earphone module may further include a bluetooth module, an audio playing module, a voice collecting module, and the like in addition to the corresponding acceleration sensor, which is not limited in this embodiment.
In step S102, a usage pattern of the headset is determined based on the first acceleration data and the second acceleration data.
In this embodiment, after acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor, a usage mode of the headset may be determined based on the first acceleration data and the second acceleration data. Wherein the use modes comprise a single use mode and a multi-user use mode.
It is understood that the acceleration sensor may be used to detect the acceleration of the corresponding earphone module, and the usage pattern of the earphone may be determined based on the first acceleration data and the second acceleration data, considering that the two earphone modules are worn by the same person and worn by two persons, respectively.
In an embodiment, after acquiring first acceleration data acquired by the first acceleration sensor and second acceleration data acquired by the second acceleration sensor, the first acceleration data and the second acceleration data may be compared, and it is determined whether the usage mode of the headset is a single-person usage mode or a multi-person usage mode based on a comparison result, that is, it is determined whether the first headset module and the second headset module are worn by the same person or two persons respectively.
In another embodiment, the above-mentioned manner of determining the usage mode of the headset based on the first acceleration data and the second acceleration data can also be referred to the following embodiment shown in fig. 2, which is not described in detail herein.
In step S103, a play function of the headset is controlled based on the usage pattern.
In this embodiment, after the usage mode of the earphone is determined based on the first acceleration data and the second acceleration data, the playing function of the earphone can be controlled based on the determined usage mode.
For example, when the usage mode of the earphone is determined to be the single usage mode, the same control instruction can be adopted to control the playing functions of the two earphone modules of the earphone; when the use mode of the earphone is determined to be a multi-user use mode, different control instructions can be adopted to respectively control the playing functions of the two earphone modules of the earphone.
In another embodiment, the manner for controlling the playing function of the earphone based on the usage mode can also be referred to the following embodiment shown in fig. 3, which will not be described in detail herein.
As can be seen from the above description, in this embodiment, by acquiring the first acceleration data acquired by the first acceleration sensor and the second acceleration data acquired by the second acceleration sensor, determining the usage mode of the headset based on the first acceleration data and the second acceleration data, and then controlling the play function of the headset based on the usage mode, the usage mode of the headset can be accurately determined based on the acceleration data of the first headset module and the second headset module of the headset, and then the corresponding play function can be realized based on the accurately determined usage mode, so that the user requirements under different usage modes can be met, and the user experience can be improved.
FIG. 2 is a flow chart showing how a usage pattern of the headset is determined based on the first acceleration data and the second acceleration data, according to an example embodiment; the present embodiment is exemplified by how to determine the usage pattern of the headset based on the first acceleration data and the second acceleration data on the basis of the above-described embodiments. As shown in fig. 2, the determining the usage mode of the headset based on the first acceleration data and the second acceleration data in the step S102 may include the following steps S201 to S204:
in step S201, first change index information of the first acceleration data and second change index information of the second acceleration data are determined.
Wherein the first change index information and the second change index information include at least one of a vector sum curve, frequency distribution information, and a change amplitude.
In this embodiment, when the first change index information and the second change index information include a vector sum curve, a sum of squares of each axial acceleration data of the first acceleration data and the second acceleration data may be calculated, and the sum of squares may be squared, and a curve may be drawn according to the obtained data to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data.
When the first change index information and the second change index information include frequency distribution information, fourier transform may be performed on the first acceleration data and the second acceleration data, respectively, to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data.
In the case where the first change index information and the second change index information include change magnitudes, the maximum value and the minimum value of the first acceleration data and the second acceleration data may be determined, respectively, and then the first change magnitude of the first acceleration data may be determined based on the maximum value and the minimum value of the first acceleration data, and the second change magnitude of the second acceleration data may be determined based on the maximum value and the minimum value of the second acceleration data.
In step S202, the index information similarity between the first variation index information and the second variation index information is determined.
In this embodiment, after determining first change index information of the first acceleration data and second change index information of the second acceleration data, index information similarity between the first change index information and the second change index information may be determined.
Specifically, the first change index information of the first acceleration data and the second change index information of the second acceleration data may be compared, such as at least one of a comparison vector and curve, frequency distribution information, and change amplitude of the first acceleration data and the second acceleration data, to determine the index information similarity of the first change index information and the second change index information according to the comparison result.
In step S203, in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold, determining that the usage mode of the headset is a single usage mode.
In step S204, in response to determining that the index information similarity is smaller than a set index information similarity threshold, determining that the usage mode of the headset is a multi-user usage mode.
In this embodiment, after determining the similarity between the first variation index information and the second variation index information, the similarity between the first variation index information and the second variation index information may be compared with a threshold value of similarity between set index information, and then when determining that the similarity between the first variation index information and the second variation index information is greater than or equal to the threshold value of similarity between set index information, the usage mode of the earphone may be determined as a single usage mode, and when determining that the similarity between the first variation index information and the second variation index information is less than the threshold value of similarity between set index information, the usage mode of the earphone may be determined as a multi-user usage mode.
It should be noted that the value of the set index information similarity threshold may be set based on actual service needs, for example, set to 90%, and the like, which is not limited in this embodiment.
As is apparent from the above description, the present embodiment can determine whether the usage mode of the headset is the single-person usage mode or the multi-person usage mode based on the similarity between the first variation index information of the first acceleration data and the second variation index information of the second acceleration data by determining the first variation index information of the first acceleration data and the second variation index information of the second acceleration data, and determining the index information similarity between the first variation index information and the second variation index information, and then determining the usage mode of the headset to be the multi-person usage mode in response to determining that the index information similarity is greater than or equal to the set index information similarity threshold, or determining the usage mode of the headset to be the multi-person usage mode in response to determining that the index information similarity is less than the set index information similarity threshold, therefore, the earphone can be accurately controlled to realize a corresponding playing function based on the determined use mode, the user requirements under different use modes can be met, and the user experience is improved.
FIG. 3 is a flow chart showing how the play function of the headset is controlled based on the usage pattern in accordance with an exemplary embodiment; the present embodiment is exemplified by how to control the playing function of the earphone based on the usage mode on the basis of the above-mentioned embodiments.
As shown in fig. 3, in the case that the usage mode of the headset is a multi-user usage mode, the step S103 of controlling the playing function of the headset based on the usage mode may include the following steps S301 to S302:
in step S301, a control instruction for a headphone module to be controlled in the headphones is received.
In this embodiment, when it is determined that the usage mode of the earphone is the multi-user usage mode, if a user wants to adjust the playing function of a certain earphone module (i.e., the earphone module to be controlled), a control instruction for the earphone module to be controlled in the earphone may be sent to the controller of the earphone. The control command may include identification information (e.g., "left", "right", or "L", "R") of the headphone module to be controlled, i.e., the headphone module to be controlled may be the first headphone module or the second headphone module.
In step S302, the playing function of the headphone module to be controlled is controlled based on the control instruction.
In this embodiment, after receiving a control instruction for the to-be-controlled earphone module in the earphone, the playing function of the to-be-controlled earphone module may be controlled based on the control instruction. Wherein the playing function includes at least one of playing content and playing volume.
For example, two different bluetooth connections can be respectively established, so that the first earphone module and the second earphone module are connected with the terminal device, and the playing function of the corresponding earphone module to be controlled can be controlled based on different control instructions. For example, the first earphone module and the second earphone module can be controlled to play different audio contents at different volumes based on different control instructions.
As can be seen from the above description, in this embodiment, by receiving a control instruction for the earphone module to be controlled in the earphone and controlling the play function of the earphone module to be controlled based on the control instruction, the earphone module can be controlled independently based on the received control instruction without affecting the play function of another earphone module of the earphone, and the control of two earphone modules in the multi-user mode can be realized, so that the actual requirements of different users can be met.
Fig. 4 is a flow chart illustrating a method of headset control according to yet another exemplary embodiment; the method of the embodiment can be applied to a split type earphone, which comprises a left earphone module and a right earphone module which are independent, such as a split type bluetooth earphone (i.e. the two earphone modules are not connected with a wire or a head band).
As shown in fig. 4, the method comprises the following steps S401-S405:
in step S401, first acceleration data collected by the first acceleration sensor and second acceleration data collected by the second acceleration sensor are acquired.
The first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone.
In step S402, a usage mode of the headset is determined based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode.
For the explanation and description of steps S401 to S402, reference may be made to the above embodiments, which are not described herein again.
In step S403, states of the first headphone module and the second headphone module are determined based on the first acceleration data and the second acceleration data, respectively.
In this embodiment, after first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor are acquired, states of the first earphone module and the second earphone module may be determined based on the first acceleration data and the second acceleration data, respectively, where the states of the earphones may include a wearing state and an unworn state.
It is understood that the acceleration sensor may be used to detect the acceleration of the corresponding earphone module, and the acceleration data collected by the acceleration sensor is different in consideration of the wearing and non-wearing of the earphone module by the wearer, so that the states of the first earphone module and the second earphone module may be determined based on the first acceleration data and the second acceleration data, respectively.
In step S404, in response to determining that the state of the first earphone module and/or the second earphone module is an unworn state, controlling the earphone module in the unworn state to stop playing.
In this embodiment, when determining that the state of the first earphone module and/or the second earphone module is the unworn state, the earphone module in the unworn state can be controlled to stop playing, so that the electric energy of the earphone can be saved, and the endurance time of the earphone module can be prolonged.
In step S405, in response to detecting that the state of the headphone module that stops playing is changed from the unworn state to the worn state, the headphone module that stops playing is controlled to play.
In this embodiment, after the earphone module that control is in not wearing the state stops the broadcast, if detect the state that this earphone module is located and change into wearing the state by not wearing the state, then can control this earphone module and restart the broadcast, wireless user manual operation earphone plays, can improve the intelligent level of earphone control, promotes user experience.
As can be seen from the above description, in this embodiment, by determining the states of the first earphone module and the second earphone module respectively based on the first acceleration data and the second acceleration data, where the states include a worn state and an unworn state, and controlling the earphone module in the unworn state to stop playing in response to determining that the state of the first earphone module and/or the second earphone module is the unworn state, and further controlling the earphone module in the playing stop to play in response to detecting that the state of the earphone module in which the playing is stopped is changed from the unworn state to the worn state, it is possible to accurately determine the current state of the earphone based on the acceleration data of the earphone module, and further control the earphone module to stop playing when the earphone module in the unworn state is detected, and when the earphone module in which the playing is stopped is changed from the unworn state to the worn state is detected, this earphone module of control continues to play, can realize practicing thrift the electric energy of earphone, improves the intelligent level of earphone control, promotes user experience.
FIG. 5 is a flow chart showing how the play function of the headset is controlled based on the usage pattern according to yet another exemplary embodiment; the present embodiment is exemplified by how to control the playing function of the headset based on the usage mode on the basis of the above-mentioned embodiments.
As shown in fig. 5, when the usage mode is a single usage mode, the step S103 of controlling the playing function of the earphone based on the usage mode may include the following steps S501 to S502:
in step S501, an activity state of the wearer of the headset is determined based on the first acceleration data and the second acceleration data.
In this embodiment, after acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor, an activity state of a wearer of the headset may be determined based on the first acceleration data and the second acceleration data.
For example, the activity state of the wearer may be set according to actual needs, such as a sport state, a sleep state, and the like, which is not limited in this embodiment.
It can be understood that, since the earphone module is usually placed at the ear by the wearer during the use process, the acceleration data detected by the acceleration sensor of the earphone module can reflect the acceleration data of the wearer to some extent. In addition, considering that the acceleration data collected by the acceleration sensor are different between the motion state and the sleep state of the wearer when the earphone module is worn by the wearer, the activity state of the wearer of the earphone can be determined based on the first acceleration data and the second acceleration data.
In step S502, a play function of the headset is controlled based on the activity state.
In this embodiment, after determining the activity state of the wearer of the headset based on the first acceleration data and the second acceleration data, the playing function of the headset may be controlled based on the activity state.
For example, after determining that the activity state of the wearer of the earphone is a motion state or a sleep state, the playing function of the earphone may be controlled based on a preset control mode corresponding to the corresponding state.
The preset control manner may be set based on actual needs, for example, the preset control manner is set to a playing volume, a type of playing audio information, and the like, which is not limited in this embodiment.
In another embodiment, the manner of controlling the playing function of the earphone based on the activity status can also be referred to the following embodiment shown in fig. 6, which will not be described in detail herein.
As can be seen from the above description, in this embodiment, the activity state of the wearer of the earphone is determined based on the first acceleration data and the second acceleration data, and the playing function of the earphone is controlled based on the activity state, so that the playing function of the earphone can be adaptively controlled according to different activity states of the wearer of the earphone, the playing function of the earphone can better meet the requirements of the user, the intelligence level of earphone control can be improved, and the user experience can be improved.
FIG. 6 is a flow diagram illustrating how the play function of the headset is controlled based on the activity state in accordance with an exemplary embodiment; the present embodiment is exemplified by how to control the playing function of the earphone based on the activity state on the basis of the above-mentioned embodiments. As shown in fig. 6, in the case that the active state is a motion state, the step S502 of controlling the playing function of the earphone based on the active state may include the following steps S601-S602:
in step S601, an audio type matching the motion state is acquired.
In this embodiment, when the activity state of the wearer of the headset is determined to be a motion state, an audio type matching the motion state may be acquired.
It should be noted that the audio type matched with the motion state may be set based on actual needs, such as a music type with a joy and dynamic rhythm according to the selection of the user, which is not limited in this embodiment.
In step S602, at least one of the earphone modules is controlled to play the audio of the audio type.
In this embodiment, after the audio type matched with the motion state is obtained, at least one earphone module in the earphone may be controlled to play the audio of the audio type.
For example, the state of the first earphone module and the second earphone module of the earphone can be combined to control at least one earphone module in the wearing state to play the audio type matched with the motion state.
In another embodiment, in the case that the active state is the sleep state, the earphone may be further controlled to play the alert tone based on the first playing manner in response to receiving a control instruction for playing the alert tone of the application program.
The first playing mode may include volume reduction or muting (i.e., not playing the alert), which is not limited in this embodiment.
In response to receiving a control instruction for playing an incoming call ringtone of an instant communication program, determining the total incoming call frequency of an instant communication initiating terminal;
controlling the earphone to play the incoming call ringtone based on a second playing mode under the condition that the total incoming call frequency is less than or equal to a set threshold value;
the second playing mode may include volume reduction or muting (i.e., not playing the incoming call ringtone), which is not limited in this embodiment.
And controlling the earphone to play the incoming call ringtone based on a third playing mode under the condition that the total incoming call times are larger than a set threshold value.
For example, when it is determined that the currently played audio information is an incoming call ring of a communication program, the total incoming call frequency (i.e., the total incoming call frequency of the communication initiator) of the instant communication initiating terminal within a set time period (e.g., within the same day or within 2 hours) may be obtained, and then the total incoming call frequency is compared with a set threshold, so that when it is determined that the total incoming call frequency is less than or equal to the set threshold, the headset is controlled to play the incoming call ring based on a smaller volume, or the incoming call ring is not played directly; and when the total incoming call frequency is determined to be larger than the set threshold value, the earphone can be controlled to play the incoming call ringtone based on larger volume or normal volume. Therefore, the sleep of the wearer can be prevented from being disturbed, and the wearer can be prevented from missing important incoming calls.
The third playing mode may include playing the incoming call ringtone with a normal volume, which is not limited in this embodiment.
It should be noted that the setting threshold may be set based on actual needs, for example, 3 times, and the like, and this embodiment does not limit this.
As can be seen from the above description, in this embodiment, when it is determined that the activity state of the wearer of the headset is the motion state, the audio type matched with the motion state is acquired, and at least one headset module in the headset is controlled to play the audio of the audio type, so that when it is detected that the user is in the motion state, the headset module is automatically controlled to play the audio type matched with the motion state, and the hearing experience of the user in the motion process can be improved; on the other hand, under the condition that the activity state of the wearer is determined to be the sleep state, the earphone module is controlled to play the prompt tone of the application program based on the first play mode, the incoming call ringtone of which the total incoming call frequency is smaller than or equal to the set threshold value is played based on the second play mode, and the incoming ringtone of which the total incoming call frequency is larger than the set threshold value is played based on the third play mode, so that the sleep of the wearer can be prevented from being disturbed, the wearer can be prevented from missing important incoming calls, the play function of the earphone can better meet the requirements of the user, the intelligent level of earphone control can be improved, and the user experience is improved.
Fig. 7 is a block diagram illustrating a headphone control device according to an exemplary embodiment; the device of this embodiment can be applied to split type earphone, contains two earphone modules about independent in this earphone, like split type bluetooth headset etc. (two earphone modules neither connect the wire nor connect on the headband promptly). As shown in fig. 7, the apparatus includes: an acceleration data acquisition module 110, a usage mode determination module 120, and a play function control module 130, wherein:
the acceleration data acquisition module 110 is configured to acquire first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
a usage mode determination module 120 for determining usage modes of the headset based on the first acceleration data and the second acceleration data, the usage modes including a single-person usage mode and a multi-person usage mode;
a playing function control module 130, configured to control a playing function of the earphone based on the usage mode.
As can be seen from the above description, in this embodiment, by acquiring the first acceleration data acquired by the first acceleration sensor and the second acceleration data acquired by the second acceleration sensor, determining the usage mode of the headset based on the first acceleration data and the second acceleration data, and then controlling the play function of the headset based on the usage mode, the usage mode of the headset can be accurately determined based on the acceleration data of the first headset module and the second headset module of the headset, and then the corresponding play function can be realized based on the accurately determined usage mode, so that the user requirements under different usage modes can be met, and the user experience can be improved.
Fig. 8 is a block diagram illustrating a headphone control apparatus according to yet another exemplary embodiment; the device of this embodiment can be applied to split type earphone, contains two earphone modules about independent in this earphone, like split type bluetooth headset etc. (two earphone modules neither connect the wire nor connect on the headband promptly). As shown in fig. 8, the acceleration data obtaining module 210, the usage mode determining module 220, and the playing function control module 230 have the same functions as the acceleration data obtaining module 110, the usage mode determining module 120, and the playing function control module 130 in the foregoing embodiments, and are not described herein again.
As shown in fig. 8, the usage pattern determining module 220 may include:
an index information determination unit 221 configured to determine first change index information of the first acceleration data and second change index information of the second acceleration data, where the first change index information and the second change index information include at least one of a vector sum curve, frequency distribution information, and a change amplitude;
an information similarity determination unit 222 configured to determine an index information similarity between the first change index information and the second change index information;
a single-person mode determination unit 223 for determining the usage mode of the headset as a single-person usage mode in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold;
a multi-user mode determining unit 224, configured to determine that the usage mode of the headset is a multi-user usage mode in response to determining that the index information similarity is smaller than a set index information similarity threshold.
In an embodiment, in a case that the first change index information and the second change index information include a vector sum curve, the index information determining unit 221 may be further configured to calculate a sum of squares of respective axial acceleration data of the first acceleration data and the second acceleration data, respectively, and square the sum of squares to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
when the first change index information and the second change index information include frequency distribution information, the index information determining unit 221 may be further configured to perform fourier transform on the first acceleration data and the second acceleration data, respectively, to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data;
in a case where the first change index information and the second change index information include a change width, the index information determination unit 221 may be further configured to:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
In an embodiment, in the case that the usage mode is a multi-user usage mode, the play function control module 230 may include:
a control instruction receiving unit 231, configured to receive a control instruction for a to-be-controlled earphone module in the earphone, where the control instruction includes identification information of the to-be-controlled earphone module, and the to-be-controlled earphone module is the first earphone module or the second earphone module;
the first function control unit 232 is configured to control a playing function of the to-be-controlled earphone module based on the control instruction, where the playing function includes at least one of playing content and playing volume.
In one embodiment, the apparatus may further include an earphone module control module 240;
the earphone module control module 240 may include:
a module state determining unit 241, configured to determine states of the first earphone module and the second earphone module based on the first acceleration data and the second acceleration data, where the states include a wearing state and an unworn state;
and an earphone module control unit 242, configured to control the earphone module in the unworn state to stop playing in response to determining that the state of the first earphone module and/or the second earphone module is the unworn state.
In an embodiment, the earphone module control unit 242 is further configured to control the earphone module that stops playing to play in response to detecting that the state of the earphone module that stops playing is changed from the unworn state to the worn state.
In an embodiment, in the case that the usage mode is a single-person usage mode, the play function control module 230 may include:
an activity state determination unit 233 for determining an activity state of the wearer of the headset based on the first acceleration data and the second acceleration data;
a second function control unit 234 for controlling a play function of the headset based on the activity status.
In an embodiment, in case that the active state is a motion state, the second function control unit 234 may be further configured to:
acquiring an audio type matched with the motion state;
and controlling at least one earphone module in the earphones to play the audio of the audio type.
In an embodiment, in case that the active state is a sleep state, the second function control unit 234 may be further configured to:
responding to a received control instruction for playing a prompt tone of an application program, and controlling the earphone to play the prompt tone based on a first playing mode;
in response to receiving a control instruction for playing an incoming call ringtone of an instant communication program, determining the total incoming call frequency of an instant communication initiating terminal;
controlling the earphone to play the incoming call ringtone based on a second playing mode under the condition that the total incoming call frequency is less than or equal to a set threshold value;
and controlling the earphone to play the incoming call ringtone based on a third playing mode under the condition that the total incoming call frequency is greater than a set threshold value.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 9, apparatus 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing element 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the device 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 906 provides power to the various components of device 900. The power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen providing an output interface between the device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
The I/O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which may be a keyboard, click wheel, button, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, sensor assembly 914 may detect an open/closed state of device 900, the relative positioning of components, such as a display and keypad of device 900, the change in position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration/deceleration of device 900, and the change in temperature of device 900. The sensor assembly 914 may also include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communication between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 920 of the apparatus 900 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A headset control method is applied to a split headset, and comprises the following steps:
acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode;
controlling a play function of the headset based on the usage pattern;
the determining a usage pattern of the headset based on the first acceleration data and the second acceleration data comprises:
determining first change index information of the first acceleration data and second change index information of the second acceleration data, wherein the first change index information and the second change index information comprise at least one of a vector sum curve, frequency distribution information and a change amplitude;
determining index information similarity of the first variation index information and the second variation index information;
in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold, determining that the usage mode of the headset is a single usage mode;
in response to determining that the index information similarity is smaller than a set index information similarity threshold, determining that the use mode of the earphone is a multi-user use mode;
in a case where the first change indicator information and the second change indicator information include a vector sum curve, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively calculating the square sum of each axial acceleration data of the first acceleration data and the second acceleration data, and squaring the square sum to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include frequency distribution information, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively carrying out Fourier transform on the first acceleration data and the second acceleration data to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include a change width, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
2. The method according to claim 1, wherein in the case that the usage mode is a multi-user usage mode, the controlling the playing function of the headset based on the usage mode comprises:
receiving a control instruction for a to-be-controlled earphone module in the earphone, wherein the control instruction comprises identification information of the to-be-controlled earphone module, and the to-be-controlled earphone module is the first earphone module or the second earphone module;
and controlling the playing function of the earphone module to be controlled based on the control instruction, wherein the playing function comprises at least one of playing content and playing volume.
3. The method of claim 1, further comprising:
determining states of the first earphone module and the second earphone module based on the first acceleration data and the second acceleration data, wherein the states comprise a wearing state and a non-wearing state;
and in response to the fact that the state of the first earphone module and/or the second earphone module is determined to be the unworn state, controlling the earphone module in the unworn state to stop playing.
4. The method of claim 3, further comprising:
and controlling the earphone module stopping playing to play in response to the fact that the state of the earphone module stopping playing is changed from the unworn state to the worn state.
5. The method as claimed in claim 1, wherein in the case that the usage mode is a single usage mode, the controlling the playing function of the headset based on the usage mode comprises:
determining an activity state of a wearer of the headset based on the first acceleration data and the second acceleration data;
controlling a play function of the headset based on the activity state.
6. The method of claim 5, wherein in the case that the active state is a motion state, the controlling the play function of the headset based on the active state comprises:
acquiring an audio type matched with the motion state;
and controlling at least one earphone module in the earphones to play the audio of the audio type.
7. The method of claim 5, wherein in the case that the active state is a sleep state, the controlling the play function of the headset based on the active state comprises:
in response to receiving a control instruction for playing a prompt tone of an application program, controlling the earphone to play the prompt tone based on a first playing mode;
in response to receiving a control instruction for playing an incoming call ringtone of an instant communication program, determining the total incoming call frequency of an instant communication initiating terminal;
controlling the earphone to play the incoming call ringtone based on a second playing mode under the condition that the total incoming call frequency is less than or equal to a set threshold value;
and controlling the earphone to play the incoming call ringtone based on a third playing mode under the condition that the total incoming call frequency is greater than a set threshold value.
8. An earphone control device, applied to a split type earphone, the device comprising:
the acceleration data acquisition module is used for acquiring first acceleration data acquired by the first acceleration sensor and second acceleration data acquired by the second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
a usage mode determination module for determining usage modes of the headset based on the first acceleration data and the second acceleration data, the usage modes including a single usage mode and a multiple usage mode;
a playing function control module for controlling the playing function of the earphone based on the using mode;
the usage pattern determination module includes:
an index information determination unit configured to determine first change index information of the first acceleration data and second change index information of the second acceleration data, the first change index information and the second change index information including at least one of a vector sum curve, frequency distribution information, and a change amplitude;
an information similarity determination unit configured to determine an index information similarity between the first change index information and the second change index information;
a single-person mode determination unit for determining the use mode of the earphone as a single-person use mode in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold;
the multi-user mode determining unit is used for responding to the fact that the index information similarity is smaller than a set index information similarity threshold value, and determining that the use mode of the earphone is a multi-user use mode;
when the first change index information and the second change index information include a vector sum curve, the index information determination unit is further configured to calculate a sum of squares of respective axial acceleration data of the first acceleration data and the second acceleration data, and perform an evolution on the sum of squares to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
the index information determining unit is further configured to perform fourier transform on the first acceleration data and the second acceleration data, respectively, to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data, when the first change index information and the second change index information include frequency distribution information;
in a case where the first change index information and the second change index information include a change width, the index information determination unit is further configured to:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
9. The apparatus of claim 8, wherein in the case that the usage mode is a multi-user usage mode, the play function control module comprises:
the control instruction receiving unit is used for receiving a control instruction for a to-be-controlled earphone module in the earphone, wherein the control instruction comprises identification information of the to-be-controlled earphone module, and the to-be-controlled earphone module is the first earphone module or the second earphone module;
and the first function control unit is used for controlling the playing function of the earphone module to be controlled based on the control instruction, and the playing function comprises at least one of playing content and playing volume.
10. The apparatus of claim 8, further comprising a headset module control module;
earphone module control module includes:
the module state determining unit is used for respectively determining the states of the first earphone module and the second earphone module based on the first acceleration data and the second acceleration data, wherein the states comprise a wearing state and a non-wearing state;
and the earphone module control unit is used for responding to the situation that the state of the first earphone module and/or the second earphone module is determined to be the unworn state, and controlling the earphone module in the unworn state to stop playing.
11. The device according to claim 10, wherein the headphone module control unit is further configured to control the headphone module that stops playing to play in response to detecting that the headphone module that stops playing is in a state that is changed from an unworn state to a worn state.
12. The apparatus as claimed in claim 8, wherein in case that the usage mode is a single-person usage mode, the play function control module comprises:
an activity state determination unit for determining an activity state of a wearer of the headset based on the first acceleration data and the second acceleration data;
a second function control unit for controlling a play function of the earphone based on the activity state.
13. The apparatus of claim 12, wherein in the case that the active state is a motion state, the second function control unit is further configured to:
acquiring an audio type matched with the motion state;
and controlling at least one earphone module in the earphones to play the audio of the audio type.
14. The apparatus of claim 12, wherein in the case that the active state is a sleep state, the second function control unit is further configured to:
in response to receiving a control instruction for playing a prompt tone of an application program, controlling the earphone to play the prompt tone based on a first playing mode;
in response to receiving a control instruction for playing an incoming call ringtone of an instant communication program, determining the total incoming call frequency of an instant communication initiating terminal;
controlling the earphone to play the incoming call ringtone based on a second playing mode under the condition that the total incoming call frequency is less than or equal to a set threshold value;
and controlling the earphone to play the incoming call ringtone based on a third playing mode under the condition that the total incoming call frequency is greater than a set threshold value.
15. An earphone control device, characterized in that the device comprises:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode;
controlling a play function of the headset based on the usage pattern;
the determining a usage pattern of the headset based on the first acceleration data and the second acceleration data comprises:
determining first change index information of the first acceleration data and second change index information of the second acceleration data, wherein the first change index information and the second change index information comprise at least one of a vector sum curve, frequency distribution information and a change amplitude;
determining index information similarity of the first change index information and the second change index information;
in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold, determining that the usage mode of the headset is a single usage mode;
in response to determining that the index information similarity is smaller than a set index information similarity threshold, determining that the use mode of the earphone is a multi-user use mode;
in a case where the first change indicator information and the second change indicator information include a vector sum curve, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively calculating the square sum of each axial acceleration data of the first acceleration data and the second acceleration data, and squaring the square sum to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include frequency distribution information, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively carrying out Fourier transform on the first acceleration data and the second acceleration data to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include a change width, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
16. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing:
acquiring first acceleration data acquired by a first acceleration sensor and second acceleration data acquired by a second acceleration sensor; the first acceleration sensor is arranged on a first earphone module of the earphone, and the second acceleration sensor is arranged on a second earphone module of the earphone;
determining a usage mode of the headset based on the first acceleration data and the second acceleration data, the usage mode including a single-person usage mode and a multi-person usage mode;
controlling a play function of the headset based on the usage pattern;
the determining a usage pattern of the headset based on the first acceleration data and the second acceleration data comprises:
determining first change index information of the first acceleration data and second change index information of the second acceleration data, wherein the first change index information and the second change index information comprise at least one of a vector sum curve, frequency distribution information and a change amplitude;
determining index information similarity of the first change index information and the second change index information;
in response to determining that the index information similarity is greater than or equal to a set index information similarity threshold, determining that the usage mode of the headset is a single usage mode;
in response to determining that the index information similarity is smaller than a set index information similarity threshold, determining that the use mode of the earphone is a multi-user use mode;
in a case where the first change indicator information and the second change indicator information include a vector sum curve, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively calculating the square sum of each axial acceleration data of the first acceleration data and the second acceleration data, and squaring the square sum to obtain a first vector sum curve of the first acceleration data and a second vector sum curve of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include frequency distribution information, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
respectively carrying out Fourier transform on the first acceleration data and the second acceleration data to obtain first frequency distribution information of the first acceleration data and second frequency distribution information of the second acceleration data;
in a case where the first change indicator information and the second change indicator information include a change width, the determining first change indicator information of the first acceleration data and second change indicator information of the second acceleration data includes:
determining a maximum value and a minimum value of the first acceleration data and the second acceleration data, respectively;
a first magnitude of change of the first acceleration data is determined based on a maximum value and a minimum value of the first acceleration data, and a second magnitude of change of the second acceleration data is determined based on a maximum value and a minimum value of the second acceleration data.
CN202010949094.2A 2020-09-10 2020-09-10 Earphone control method, device, equipment and storage medium Active CN112118502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010949094.2A CN112118502B (en) 2020-09-10 2020-09-10 Earphone control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010949094.2A CN112118502B (en) 2020-09-10 2020-09-10 Earphone control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112118502A CN112118502A (en) 2020-12-22
CN112118502B true CN112118502B (en) 2022-08-05

Family

ID=73801982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010949094.2A Active CN112118502B (en) 2020-09-10 2020-09-10 Earphone control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112118502B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429964A (en) * 2018-05-09 2018-08-21 广东小天才科技有限公司 Control method, TWS earphones, equipment and the storage medium of TWS earphones
CN109151212A (en) * 2018-09-30 2019-01-04 Oppo广东移动通信有限公司 Apparatus control method, device and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8180078B2 (en) * 2007-12-13 2012-05-15 At&T Intellectual Property I, Lp Systems and methods employing multiple individual wireless earbuds for a common audio source
JP2009152666A (en) * 2007-12-18 2009-07-09 Toshiba Corp Sound output control device, sound reproducing device, and sound output control method
US9326058B2 (en) * 2012-09-26 2016-04-26 Sony Corporation Control method of mobile terminal apparatus
CN105004349B (en) * 2015-06-30 2018-08-31 深圳还是威健康科技有限公司 A kind of step-recording method
WO2017026148A1 (en) * 2015-08-12 2017-02-16 ソニー株式会社 Information processing device, information processing method, and program
US10924858B2 (en) * 2018-11-07 2021-02-16 Google Llc Shared earbuds detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429964A (en) * 2018-05-09 2018-08-21 广东小天才科技有限公司 Control method, TWS earphones, equipment and the storage medium of TWS earphones
CN109151212A (en) * 2018-09-30 2019-01-04 Oppo广东移动通信有限公司 Apparatus control method, device and electronic equipment

Also Published As

Publication number Publication date
CN112118502A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN107493500B (en) Multimedia resource playing method and device
CN106454644B (en) Audio playing method and device
CN106445461B (en) Method and device for processing character information
JP6314286B2 (en) Audio signal optimization method and apparatus, program, and recording medium
CN104065818A (en) Method and device for prompting user
EP3024211B1 (en) Method and device for announcing voice call
CN110618805B (en) Method and device for adjusting electric quantity of equipment, electronic equipment and medium
CN106095401A (en) Informing message treatment method and device
CN111128092B (en) Screen brightness adjusting method, screen brightness adjusting device and computer storage medium
CN111049984A (en) Audio playback control method and apparatus, and storage medium
CN111880681A (en) Touch screen sampling rate adjusting method and device and computer storage medium
CN114513571A (en) Device connection method and device, electronic device and readable storage medium
CN108600503B (en) Voice call control method and device
RU2647868C2 (en) State notification method and apparatus
CN112882622A (en) Data processing method and device, terminal and storage medium
CN112019948B (en) Intercommunication method for intercom equipment, intercom equipment and storage medium
CN109215612A (en) Adjusting method and device that screen is shown, electronic equipment, storage medium
CN106603882A (en) Incoming call sound volume adjusting method, incoming call sound volume adjusting device and terminal
CN112118502B (en) Earphone control method, device, equipment and storage medium
CN109922203B (en) Terminal, screen off method and device
CN112752328A (en) Network control method, device and storage medium
CN114416015A (en) Audio adjusting method and device, electronic equipment and readable storage medium
EP3941027A1 (en) Adaptive method and apparatus for intelligent terminal, and terminal
WO2018058331A1 (en) Method and apparatus for controlling volume
CN109408025B (en) Audio playing method, device and storage medium

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