CN112689051A - Audio playing control method and device, mobile terminal and storage medium - Google Patents

Audio playing control method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN112689051A
CN112689051A CN201910993291.1A CN201910993291A CN112689051A CN 112689051 A CN112689051 A CN 112689051A CN 201910993291 A CN201910993291 A CN 201910993291A CN 112689051 A CN112689051 A CN 112689051A
Authority
CN
China
Prior art keywords
magnetic field
mobile terminal
field strength
control instruction
earphone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910993291.1A
Other languages
Chinese (zh)
Other versions
CN112689051B (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 CN201910993291.1A priority Critical patent/CN112689051B/en
Publication of CN112689051A publication Critical patent/CN112689051A/en
Application granted granted Critical
Publication of CN112689051B publication Critical patent/CN112689051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The disclosure relates to an audio playing control method, an audio playing control device, a mobile terminal and a storage medium, and belongs to the technical field of mobile terminals. The method comprises the following steps: the method comprises the steps that the magnetic field intensity detected by a geomagnetic sensor arranged in a mobile terminal is obtained, the mobile terminal is in communication connection with an earphone, and the magnetic field intensity is used for reflecting the relative position between the mobile terminal and the earphone; determining a playing control instruction based on the magnetic field intensity; and controlling the audio playing of the mobile terminal by adopting the playing control instruction. The audio playback of the mobile terminal can be controlled based on the magnetic field strength detected by the mobile terminal.

Description

Audio playing control method and device, mobile terminal and storage medium
Technical Field
The present disclosure relates to the field of mobile terminal technologies, and in particular, to an audio playing control method and apparatus, a mobile terminal, and a storage medium.
Background
Most mobile terminals have a function of playing music, and a user can select whether to listen to music by using an earphone or a loudspeaker of the mobile terminal according to needs.
In the process of listening to music by using the earphone, a user can shake the mobile terminal, the motion state of the mobile terminal is detected by the acceleration sensor and the gyroscope in the mobile terminal, so that a play control instruction corresponding to the motion state is generated, and the audio play of the mobile terminal is controlled according to the generated play control instruction.
However, this method is prone to cause misoperation, for example, if the mobile terminal is put in a pocket during running, the mobile terminal may generate a play control command if the mobile terminal is slightly shaken along with the movement of the human body.
Disclosure of Invention
The embodiment of the disclosure provides an audio playing control method and device, a mobile terminal and a storage medium, which can control audio playing of the mobile terminal based on the magnetic field intensity detected by the mobile terminal and reduce misoperation.
The technical scheme is as follows:
according to an aspect of an embodiment of the present disclosure, there is provided an audio playback control method, including:
the method comprises the steps that the magnetic field intensity detected by a geomagnetic sensor arranged in a mobile terminal is obtained, the mobile terminal is in communication connection with an earphone, and the magnetic field intensity is used for reflecting the relative position between the mobile terminal and the earphone;
determining a playing control instruction based on the magnetic field intensity;
and controlling the audio playing of the mobile terminal by adopting the playing control instruction.
Optionally, the determining, based on the magnetic field strength, a play control instruction includes:
determining a magnetic field intensity range to which the magnetic field intensity belongs;
and determining the detected playing control instruction corresponding to the magnetic field strength based on the corresponding relation between the magnetic field strength range and the playing control instruction.
Optionally, the determining, based on the correspondence between the magnetic field strength range and the play control instruction, the play control instruction corresponding to the detected magnetic field strength includes:
if the magnetic field intensity belongs to a first magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a first playing control instruction; alternatively, the first and second electrodes may be,
if the magnetic field intensity belongs to a second magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a second playing control instruction;
wherein the first magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a first side of the mobile terminal, the second magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a second side of the mobile terminal, and the first side and the second side are opposite sides of the mobile terminal.
Optionally, the determining, based on the magnetic field strength, a play control instruction includes:
determining the variation trend of the magnetic field intensity;
and determining the playing control instruction corresponding to the detected magnetic field intensity based on the corresponding relation between the variation trend and the playing control instruction.
Optionally, the determining, based on the correspondence between the variation trend and a playback control instruction, a playback control instruction corresponding to the detected magnetic field strength includes:
if the variation trend of the magnetic field strength is gradually increased, determining that the playing control instruction corresponding to the magnetic field strength is a first playing control instruction; alternatively, the first and second electrodes may be,
if the variation trend of the magnetic field strength is gradually reduced, determining that the playing control instruction corresponding to the magnetic field strength is a second playing control instruction;
wherein, the trend of change of the magnetic field strength is gradually increased to indicate that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the trend of change of the magnetic field strength is gradually decreased to indicate that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are two opposite side faces of the mobile terminal.
Optionally, one of the first playing control instruction and the second playing control instruction is a previous switching instruction, and the other of the first playing control instruction and the second playing control instruction is a next switching instruction; alternatively, the first and second electrodes may be,
one of the first playing control instruction and the second playing control instruction is a volume increasing instruction, and the other of the first playing control instruction and the second playing control instruction is a volume decreasing instruction.
Optionally, one of the first side surface and the second side surface is a side surface where a display screen of the mobile terminal is located, and the other of the first side surface and the second side surface is a back surface of the mobile terminal.
Optionally, the method further comprises:
acquiring a first endpoint value, wherein the first endpoint value is a magnetic field intensity detected by a geomagnetic sensor when the earphone approaches the mobile terminal from a first side face of the mobile terminal;
acquiring a second endpoint value, wherein the second endpoint value is the magnetic field intensity detected by a geomagnetic sensor when the earphone approaches the mobile terminal from the second side of the mobile terminal;
acquiring a reference value, wherein the reference value is the magnetic field intensity detected by the mobile terminal through a geomagnetic sensor under the condition that the mobile terminal is not influenced by the earphone;
determining the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value.
Optionally, the determining the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value comprises:
dividing a magnetic field strength range between the first end value and the second end value into a set number of subintervals;
taking a partial subinterval close to the first endpoint value as a first magnetic field strength range;
taking a partial subinterval close to the second endpoint value as a second magnetic field strength range;
wherein the reference value is in a sub-interval other than the sub-intervals comprised by the first and second magnetic field strength ranges.
According to an aspect of the embodiments of the present disclosure, there is provided an audio playback control apparatus, the apparatus including:
the mobile terminal comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire the magnetic field intensity detected by a geomagnetic sensor built in the mobile terminal, the mobile terminal is in communication connection with an earphone, and the magnetic field intensity is used for reflecting the relative position between the mobile terminal and the earphone;
a determination module configured to determine a play control instruction based on the magnetic field strength acquired by the acquisition module;
and the control module is configured to control the audio playing of the mobile terminal by adopting the playing control instruction determined by the determination module.
Optionally, the determining module includes:
a first determination submodule configured to determine a magnetic field strength range to which the magnetic field strength belongs;
and the second determination submodule is configured to determine the playing control instruction corresponding to the detected magnetic field strength based on the corresponding relation between the magnetic field strength range and the playing control instruction.
Optionally, the second determining submodule is configured to, if the magnetic field strength belongs to a first magnetic field strength range, determine that the playback control instruction corresponding to the magnetic field strength is a first playback control instruction; alternatively, the first and second electrodes may be,
if the magnetic field intensity belongs to a second magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a second playing control instruction;
wherein the first magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a first side of the mobile terminal, the second magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a second side of the mobile terminal, and the first side and the second side are opposite sides of the mobile terminal.
Optionally, the determining module includes:
a first determination submodule configured to determine a trend of change of the magnetic field strength;
and the second determination submodule is configured to determine the playing control instruction corresponding to the detected magnetic field intensity based on the corresponding relation between the variation trend and the playing control instruction.
Optionally, the second determining submodule is configured to determine that the playing control instruction corresponding to the magnetic field strength is the first playing control instruction if the variation trend of the magnetic field strength is gradually increased; alternatively, the first and second electrodes may be,
if the variation trend of the magnetic field strength is gradually reduced, determining that the playing control instruction corresponding to the magnetic field strength is a second playing control instruction;
wherein, the trend of change of the magnetic field strength is gradually increased to indicate that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the trend of change of the magnetic field strength is gradually decreased to indicate that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are two opposite side faces of the mobile terminal.
Optionally, one of the first playing control instruction and the second playing control instruction is a previous switching instruction, and the other of the first playing control instruction and the second playing control instruction is a next switching instruction; alternatively, the first and second electrodes may be,
one of the first playing control instruction and the second playing control instruction is a volume increasing instruction, and the other of the first playing control instruction and the second playing control instruction is a volume decreasing instruction.
Optionally, one of the first side surface and the second side surface is a side surface where a display screen of the mobile terminal is located, and the other of the first side surface and the second side surface is a back surface of the mobile terminal.
Optionally, the obtaining module is further configured to obtain a first endpoint value, where the first endpoint value is a magnetic field strength detected by a geomagnetic sensor when the earphone approaches the mobile terminal from a first side of the mobile terminal; acquiring a second endpoint value, wherein the second endpoint value is the magnetic field intensity detected by a geomagnetic sensor when the earphone approaches the mobile terminal from the second side of the mobile terminal; acquiring a reference value, wherein the reference value is the magnetic field intensity detected by the mobile terminal through a geomagnetic sensor under the condition that the mobile terminal is not influenced by the earphone;
the determination module further includes a third determination submodule configured to determine the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value.
Optionally, the third determination submodule is configured to divide the range of magnetic field strengths between the first end value and the second end value into a set number of subintervals; taking a partial subinterval close to the first endpoint value as a first magnetic field strength range; taking a partial subinterval close to the second endpoint value as a second magnetic field strength range; wherein the reference value is in a sub-interval other than the sub-intervals comprised by the first and second magnetic field strength ranges.
According to an aspect of the embodiments of the present disclosure, there is provided a mobile terminal, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to load and execute the executable instructions to implement the aforementioned audio playback control method.
According to an aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, in which instructions are executable by a processor to perform the audio playback control method as described above.
The embodiment of the disclosure detects the magnetic field intensity through the built-in geomagnetic sensor of the mobile terminal, and because the earphone influences the magnetic field intensity detected by the built-in geomagnetic sensor of the mobile terminal when being close to the mobile terminal, the detected magnetic field intensity can reflect the relative position between the mobile terminal and the earphone, namely, the detected magnetic field intensity can change along with the change of the relative position between the mobile terminal and the earphone. The user can make the mobile terminal close to the earphone through moving the mobile terminal, so that the magnetic field intensity detected by the mobile terminal changes, a playing control instruction is generated according to the detected magnetic field intensity, and the generated playing control instruction is adopted to control the mobile terminal to play audio. When listening to music, the earphone is worn on the ear, and the mobile terminal cannot be moved to the vicinity of the earphone unless the mobile terminal is operated by people intentionally, so that the magnetic field intensity can accurately reflect the operation intention of the user, and the possibility of misoperation is reduced.
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 schematic diagram of a network architecture provided by an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a sound generating unit of an earphone according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a detection result of a geomagnetic sensor according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a detection result of a geomagnetic sensor according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating a detection result of a geomagnetic sensor according to an embodiment of the present disclosure;
FIG. 6 is a flow diagram illustrating a method of audio playback control in accordance with an exemplary embodiment;
FIG. 7 is a flow diagram illustrating a method of audio playback control in accordance with an exemplary embodiment;
fig. 8 is a flowchart illustrating a setting process of a correspondence relationship of a magnetic field intensity range and a play control instruction in an audio play control method according to an exemplary embodiment;
FIG. 9 is a graphical illustration of the relationship of a first endpoint value, a second endpoint value, a reference value, a first magnetic field strength range, and a second magnetic field strength range;
FIG. 10 is a flow diagram illustrating a method of audio playback control in accordance with an exemplary embodiment;
fig. 11 is a schematic structural diagram illustrating an audio playback control apparatus according to an exemplary embodiment;
fig. 12 is a block diagram illustrating a mobile terminal according to 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 implementations described in the exemplary embodiments below are not intended to represent all implementations 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 block diagram illustrating a system provided by an exemplary embodiment of the present disclosure, and as shown in fig. 1, the system may include: a mobile terminal 11 and an earpiece 12.
The mobile terminal 11 is installed with audio playing software, which may be carried by an operating system of the mobile terminal 11, or downloaded and installed from an application market by the mobile terminal 11. Through the audio playback software, the mobile terminal 11 can play various audio files, such as songs.
The mobile terminal 11 is provided with a geomagnetic sensor for detecting a magnetic field intensity in an environment where the mobile terminal 11 is located. Alternatively, the geomagnetic sensor may be a three-axis sensor, a two-axis sensor, or the like. Illustratively, the geomagnetic sensor may be a hall sensor, a magnetoresistance effect sensor, or the like, which is not limited by the present disclosure as long as it can detect a magnetic field of an environment in which the mobile terminal is located.
Illustratively, the mobile terminal 11 may be a mobile phone, a tablet computer, a music player, and the like. For mobile terminals such as mobile phones and tablet computers, most of the mobile terminals are provided with geomagnetic sensors, so that the existing components of the mobile terminals can be utilized, and the cost is not increased.
Illustratively, the headset 12 may be a headset, an in-ear headset, a neckset, or the like.
The mobile terminal 11 and the headset 12 are communicatively coupled. Alternatively, the mobile terminal 11 and the headset 12 may be communicatively connected in a wired manner or a wireless manner, for example, by bluetooth technology.
The earphone 12 may receive an audio signal transmitted from the mobile terminal 11 and convert the received audio signal into sound to be played, so that the user may listen to music through the earphone 12. The headphones 12 have a sound emitting unit by which an audio signal is converted into sound to be emitted. Currently, most sound units include magnets, such as moving-coil sound units, moving-iron sound units, and flat sound units.
The main structure and principle of the most common moving-coil sound generating unit will be briefly described with reference to fig. 2. As shown in fig. 2, the moving-coil sound generating unit includes a magnet 21, a diaphragm 22, and a voice coil 23. The diaphragm 22 is fixedly connected with the voice coil 23. When the audio signal is introduced into the voice coil 23, the audio signal is an alternating current signal, and a magnetic field with an alternating direction is generated in the voice coil 23 and interacts with the magnet 21, so that the voice coil 23 moves left and right relative to the magnet 21, and the diaphragm 22 is driven to vibrate to drive air to generate sound waves.
Since the magnet is disposed in the earphone 12, when the earphone 12 is close to the mobile terminal, the detection result of the geomagnetic sensor in the mobile terminal is greatly affected, and therefore, the detection result of the geomagnetic sensor in the mobile terminal can be used to reflect the relative position of the earphone and the mobile terminal, for example, whether the earphone is located within a certain magnetic field intensity range of the mobile terminal, or the relative movement trend of the earphone and the mobile terminal.
At present, most mobile phones are equipped with three-axis geomagnetic sensors, so the following description is made by taking three-axis geomagnetic sensors as an example.
For a three-axis geomagnetic sensor, the three axes are X, Y, Z axes perpendicular to each other, where the X axis and the Y axis are both parallel to the plane of the mobile terminal, for example, for a rectangular mobile terminal, the X axis may be parallel to the long side of the mobile terminal, the Y axis may be parallel to the short side of the mobile terminal, and the Y axis is perpendicular to the plane of the mobile terminal.
When the mobile phone is close to the mobile terminal, the detection result of the geomagnetic sensor changes. If the earphone is close to the mobile terminal from different sides of the mobile terminal, the influence degree on different axes of the geomagnetic sensor of the mobile terminal is different. For example, if the long side of a rectangular mobile terminal is vertically placed and the front side of the mobile terminal (i.e., the side where the display screen is located) faces the user, the detection result of the Y-axis will change significantly if the earphones are close to the mobile terminal from the left and right sides. For another example, if the earphone is moved closer to the mobile terminal from both the upper and lower sides, the detection result of the X-axis will change significantly. For another example, if the earphone is moved closer to the front and rear sides of the mobile terminal, the detection result of the Z-axis will change significantly.
The following description will be given taking an example in which the earphone is brought close to the mobile terminal from the front side of the mobile terminal and the earphone is brought close to the mobile terminal from the back side of the mobile terminal. As shown in fig. 3, when the earphone is far from the mobile terminal, that is, when the earphone does not affect the detection result of the geomagnetic sensor of the mobile terminal, the detection value of the Z-axis is 137.696701 ut. As shown in fig. 4, when the earphone approaches the mobile terminal from the front of the mobile terminal, the Z-axis detection value is 1005.339783 ut. As shown in fig. 5, when the earphone approaches the mobile terminal from the rear surface of the mobile terminal, the Z-axis detection value is-662.781250 ut. It can be seen that the change in the detected value of the Z-axis is very significant.
Therefore, the magnetic field intensity output by the geomagnetic sensor can be used for reflecting the relative position between the earphone and the mobile terminal, and the audio playing software of the mobile terminal is controlled by the magnetic field intensity output by the geomagnetic sensor.
Fig. 6 is a flowchart illustrating an audio playback control method according to an exemplary embodiment. Referring to fig. 6, the method is performed by the aforementioned mobile terminal 11, and includes the steps of:
in step 601, the magnetic field strength detected by a geomagnetic sensor built in the mobile terminal is acquired.
The mobile terminal is in communication connection with the earphone, and the magnetic field intensity is used for reflecting the relative position between the mobile terminal and the earphone.
In step 602, a playback control instruction is determined based on the magnetic field strength.
Optionally, the play control instruction may be at least one of the following instructions: a previous switch instruction, a next switch instruction, a volume up instruction, a volume down instruction, a pause play instruction, a resume play instruction, and so on.
For example, the last switching instruction may be used to instruct the mobile terminal to stop playing currently played music and play music in the playlist before the currently played music; the next switching instruction can be used for instructing the mobile terminal to stop playing the currently played music and playing the music in the playlist after the currently played music; the volume increasing instruction is used for indicating the mobile terminal to increase the playing volume of the music; the volume reduction instruction is used for indicating the mobile terminal to turn down the playing volume of the music; the pause playing instruction is used for indicating the mobile terminal to pause playing the currently played music; and the music playing resuming instruction is used for instructing the mobile terminal to continue playing the music in the pause state.
In step 603, the audio playing of the mobile terminal is controlled by using the playing control instruction.
The embodiment of the disclosure detects the magnetic field intensity through the built-in geomagnetic sensor of the mobile terminal, and because the earphone influences the magnetic field intensity detected by the built-in geomagnetic sensor of the mobile terminal when being close to the mobile terminal, the detected magnetic field intensity can reflect the relative position between the mobile terminal and the earphone, namely, the detected magnetic field intensity can change along with the change of the relative position between the mobile terminal and the earphone. The user can make the mobile terminal close to the earphone through moving the mobile terminal, so that the magnetic field intensity detected by the mobile terminal changes, a playing control instruction is generated according to the detected magnetic field intensity, and the generated playing control instruction is adopted to control the mobile terminal to play audio. When listening to music, the earphone is worn on the ear, and the mobile terminal cannot be moved to the vicinity of the earphone unless the mobile terminal is operated by people intentionally, so that the magnetic field intensity can accurately reflect the operation intention of the user, and the possibility of misoperation is reduced.
In one possible implementation, the step 602 may include:
determining the magnetic field intensity range to which the magnetic field intensity belongs;
and determining the playing control instruction corresponding to the detected magnetic field intensity based on the corresponding relation between the magnetic field intensity range and the playing control instruction.
Optionally, determining the playback control instruction corresponding to the detected magnetic field strength based on the correspondence between the magnetic field strength range and the playback control instruction includes:
if the magnetic field intensity belongs to the first magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a first playing control instruction; alternatively, the first and second electrodes may be,
if the magnetic field intensity belongs to the second magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a second playing control instruction;
the first magnetic field intensity range is used for indicating that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the second magnetic field intensity range is used for indicating that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are opposite side faces of the mobile terminal.
In another possible implementation, the step 602 may include:
determining the variation trend of the magnetic field intensity;
and determining the playing control instruction corresponding to the detected magnetic field intensity based on the corresponding relation between the variation trend and the playing control instruction.
Optionally, determining the play control instruction corresponding to the detected magnetic field strength based on the corresponding relationship between the variation trend and the play control instruction includes:
if the variation trend of the magnetic field intensity is gradually increased, determining that the playing control instruction corresponding to the magnetic field intensity is a first playing control instruction; alternatively, the first and second electrodes may be,
if the variation trend of the magnetic field strength is gradually reduced, determining that the playing control instruction corresponding to the magnetic field strength is a second playing control instruction;
the change trend of the magnetic field strength is gradually increased to indicate that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the change trend of the magnetic field strength is gradually decreased to indicate that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are opposite side faces of the mobile terminal.
Optionally, one of the first playing control instruction and the second playing control instruction is a previous switching instruction, and the other one of the first playing control instruction and the second playing control instruction is a next switching instruction; alternatively, the first and second electrodes may be,
one of the first play control instruction and the second play control instruction is a volume up instruction, and the other of the first play control instruction and the second play control instruction is a volume down instruction.
Optionally, one of the first side surface and the second side surface is a side surface where a display screen of the mobile terminal is located, and the other of the first side surface and the second side surface is a back surface of the mobile terminal.
Optionally, the method further comprises:
acquiring a first endpoint value, wherein the first endpoint value is the magnetic field intensity detected by a geomagnetic sensor when an earphone approaches the mobile terminal from a first side face of the mobile terminal;
acquiring a second endpoint value, wherein the second endpoint value is the magnetic field intensity detected by the geomagnetic sensor when the earphone approaches the mobile terminal from the second side surface of the mobile terminal;
acquiring a reference value, wherein the reference value is the magnetic field intensity detected by the mobile terminal through the geomagnetic sensor under the condition that the mobile terminal is not influenced by the earphone;
a first magnetic field strength range and a second magnetic field strength range are determined from the first endpoint value, the second endpoint value, and the reference value.
Optionally, determining the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value comprises:
dividing the magnetic field strength range between the first end value and the second end value into a set number of subintervals;
taking a partial subinterval close to the first endpoint value as a first magnetic field strength range;
a partial subinterval near the second end value is taken as the second magnetic field strength range.
It should be noted that the aforementioned steps 601-603 and the aforementioned optional steps can be arbitrarily combined.
Fig. 7 is a flowchart illustrating an audio playback control method according to an exemplary embodiment. Referring to fig. 7, the method is performed by the aforementioned mobile terminal 11, and includes the steps of:
in step 701, the magnetic field strength detected by a geomagnetic sensor built in the mobile terminal is acquired.
Alternatively, the mobile terminal may perform step 701 upon detecting that the headset is connected.
Optionally, the mobile terminal may further determine whether to enable an audio playback control function implemented based on the magnetic field strength detected by the geomagnetic sensor by receiving a user setting instruction.
If the above functions of the mobile terminal are in the enabled state, the mobile terminal performs step 701 and subsequent steps when detecting that the earphone is connected. If the above-mentioned functions of the mobile terminal are not enabled, step 701 and the subsequent steps are not executed even if the earphone is detected to be connected.
In step 702, a magnetic field strength range to which the magnetic field strength belongs is determined.
For example, a plurality of magnetic field strength ranges are preset in the mobile terminal, and the magnetic field strength can be compared with the plurality of magnetic field strength ranges one by one, so as to determine the magnetic field strength range to which the magnetic field strength belongs.
In step 703, a playback control command corresponding to the detected magnetic field strength is determined based on the correspondence between the magnetic field strength range and the playback control command.
This step 703 may include: if the magnetic field intensity belongs to a first magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a first playing control instruction; or if the magnetic field strength belongs to a second magnetic field strength range, the playing control instruction corresponding to the magnetic field strength is a second playing control instruction. Wherein the first magnetic field strength range is used to indicate that the earphone is approaching the mobile terminal from a first side of the mobile terminal and the second magnetic field strength range is used to indicate that the earphone is approaching the mobile terminal from a second side of the mobile terminal.
The first side and the second side are opposite sides of the mobile terminal, for example, the first side and the second side are a front side and a back side of the mobile terminal, respectively, and for example, when the front side of the mobile terminal faces a user, the first side and the second side are a top side and a bottom side of the mobile terminal, respectively; for another example, when the front of the mobile terminal faces the user, the first side and the second side are the left side and the right side of the mobile terminal, respectively.
Since the front and back of the mobile terminal have large areas and are easy to distinguish, the first side and the second side can be the front and back of the mobile terminal respectively, so as to reduce misoperation as much as possible.
In a possible implementation manner, one of the first playing control instruction and the second playing control instruction is a previous switching instruction, and the other of the first playing control instruction and the second playing control instruction is a next switching instruction. For some headsets, it may be possible to have only a few function keys, for example only volume adjustment keys, or even no function keys. In this case, if the user needs to switch songs, or needs to multiplex the volume adjustment keys, for example, long-time pressing and short-time pressing, which is a situation that misoperation easily occurs, or needs to switch songs through the screen of the mobile terminal, the operation is cumbersome, and at this time, the volume adjustment can be realized through the method in the embodiment of the present disclosure, so that the misoperation is reduced and the user operation is simplified.
In another possible implementation, one of the first playing control command and the second playing control command is a volume-up command, and the other of the first playing control command and the second playing control command is a volume-down command. Some earphones are not provided with function keys, such as a volume adjustment key, and the step of adjusting the volume through a screen or a side key of the mobile terminal is troublesome.
In step 704, the audio playing of the mobile terminal is controlled by using the playing control command.
The embodiment of the disclosure detects the magnetic field intensity through the built-in geomagnetic sensor of the mobile terminal, and because the earphone influences the magnetic field intensity detected by the built-in geomagnetic sensor of the mobile terminal when being close to the mobile terminal, the detected magnetic field intensity can reflect the relative position between the mobile terminal and the earphone, namely, the detected magnetic field intensity can change along with the change of the relative position between the mobile terminal and the earphone. The user can make the mobile terminal close to the earphone through moving the mobile terminal, so that the magnetic field intensity detected by the mobile terminal changes, a playing control instruction is generated according to the detected magnetic field intensity, and the generated playing control instruction is adopted to control the mobile terminal to play audio. When listening to music, the earphone is worn on the ear, and the mobile terminal cannot be moved to the vicinity of the earphone unless the mobile terminal is operated by people intentionally, so that the magnetic field intensity can accurately reflect the operation intention of the user, and the possibility of misoperation is reduced.
Because the influence degree of the earphone not used on the magnetic field is different, in order to accurately identify the magnetic field intensity range where the magnetic field intensity is located, calibration needs to be performed once when the earphone is used for the first time, namely, the corresponding relation between the magnetic field intensity range corresponding to the earphone and the playing control instruction is set. Fig. 8 is a flowchart illustrating a setting process of a correspondence relationship between a magnetic field strength range and a play control instruction in an audio play control method according to an exemplary embodiment, where as shown in fig. 8, the setting process may include the following steps:
in step 801, a first endpoint value is obtained, where the first endpoint value is a magnetic field strength detected by a geomagnetic sensor when an earphone approaches a mobile terminal from a first side of the mobile terminal.
Alternatively, when the first endpoint value is acquired, the first side of the mobile terminal may be brought into contact with a portion of the earphone exposed to the outside of the ear, and then the magnetic field strength output by the geomagnetic sensor at that time may be taken as the first endpoint value.
In step 802, a second endpoint value is obtained, where the second endpoint value is a magnetic field strength detected by the geomagnetic sensor when the earphone approaches the mobile terminal from the second side of the mobile terminal.
Alternatively, when the second end value is acquired, the second side of the mobile terminal may be brought into contact with a portion of the earphone exposed to the outside of the ear, and then the magnetic field strength output by the geomagnetic sensor at that time may be taken as the second end value.
In step 803, a reference value is obtained, where the reference value is the magnetic field strength detected by the mobile terminal through the geomagnetic sensor without being affected by the headset.
Alternatively, when the reference value is obtained, the mobile terminal may be placed far enough away from the earphone so that the detection result of the geomagnetic sensor of the mobile terminal is not affected by the earphone, and the magnetic field strength output by the geomagnetic sensor at this time is used as the reference value.
In step 804, a first magnetic field strength range and a second magnetic field strength range are determined from the first endpoint value, the second endpoint value, and the reference value.
For example, in this step 804, the magnetic field strength range between the first end value and the second end value may be divided into a set number of sub-intervals, a part of the sub-interval near the first end value being a first magnetic field strength range and a part of the sub-interval near the second end value being a second magnetic field strength range, the part of the sub-interval near the reference value not belonging to the first magnetic field strength range nor to the second magnetic field strength range, i.e. the reference value being in a sub-interval other than the sub-intervals comprised by the first magnetic field strength range and the second magnetic field strength range.
Fig. 9 is a schematic diagram of the relationship of a first endpoint value, a second endpoint value, a reference value, a first magnetic field strength range, and a second magnetic field strength range. As one example shown in fig. 9, the first endpoint value is a, the second endpoint value is B, and a and B are both endpoints of the magnetic field strength range, respectively. The magnetic field intensity range is divided into 10 equal-length subintervals X1-X10, a section formed by 4 subintervals X1-X4 close to the first end point value A is taken as a first magnetic field intensity range X1, a section formed by 4 subintervals X7-X10 close to the second end point value B is taken as a second magnetic field intensity range X2, and the reference value O is positioned in the subintervals X5-X6 outside the first magnetic field intensity range X1 and the second magnetic field intensity range X1.
It should be noted that, the execution sequence of the foregoing steps 801 to 803 is not limited in the embodiment of the present disclosure, and the execution sequence may be adjusted as needed.
Fig. 10 is a flowchart illustrating an audio playback control method according to an exemplary embodiment. Referring to fig. 10, the method is performed by the aforementioned mobile terminal 11, and includes the steps of:
in step 1001, the magnetic field strength detected by a geomagnetic sensor built in the mobile terminal is acquired.
In this step 1001, the magnetic field strength detected by the geomagnetic sensor may be periodically acquired.
Alternatively, the mobile terminal may perform step 1001 upon detecting that the headset is connected.
Optionally, the mobile terminal may further determine whether to enable an audio playback control function implemented based on the magnetic field strength detected by the geomagnetic sensor by receiving a user setting instruction.
If the above functions of the mobile terminal are in the enabled state, the mobile terminal performs step 1001 and subsequent steps when detecting that the earphone is connected. If the above-mentioned functions of the mobile terminal are not enabled, step 1001 and the following steps are not executed even if it is detected that the earphone is connected.
In step 1002, a trend of change in magnetic field strength is determined.
For example, the variation trend of the magnetic field strength may be determined from the acquired continuous plurality of magnetic field strengths.
In step 1003, a playback control command corresponding to the detected magnetic field strength is determined based on the correspondence between the trend of change and the playback control command.
Illustratively, this step 1003 may include: if the variation trend of the magnetic field intensity is gradually increased, determining that the playing control instruction corresponding to the magnetic field intensity is a first playing control instruction; or if the variation trend of the magnetic field strength is gradually reduced, determining the playing control command corresponding to the magnetic field strength as a second playing control command.
Wherein, the trend of the magnetic field intensity is gradually increased to indicate that the earphone is close to the mobile terminal from the first side surface of the mobile terminal, and the trend of the magnetic field intensity is gradually decreased to indicate that the earphone is close to the mobile terminal from the second side surface of the mobile terminal.
The first side and the second side are opposite sides of the mobile terminal. For the related description of the first side and the second side and the related description of the first playing control command and the second playing control command, refer to step 803, which is not described herein again.
In step 1004, the audio playing of the mobile terminal is controlled by using the playing control instruction.
This step is the same as step 704 described previously, and the detailed process is referred to step 704.
Optionally, the method may further include setting a corresponding relationship between the variation trend and the play control instruction according to the user instruction, so as to satisfy usage habits of different users.
The embodiment of the disclosure detects the magnetic field intensity through the built-in geomagnetic sensor of the mobile terminal, and because the earphone influences the magnetic field intensity detected by the built-in geomagnetic sensor of the mobile terminal when being close to the mobile terminal, the detected magnetic field intensity can reflect the relative position between the mobile terminal and the earphone, namely, the detected magnetic field intensity can change along with the change of the relative position between the mobile terminal and the earphone. The user can make the mobile terminal close to the earphone through moving the mobile terminal, so that the magnetic field intensity detected by the mobile terminal changes, a playing control instruction is generated according to the detected magnetic field intensity, and the generated playing control instruction is adopted to control the mobile terminal to play audio. When listening to music, the earphone is worn on the ear, and the mobile terminal cannot be moved to the vicinity of the earphone unless the mobile terminal is operated by people intentionally, so that the magnetic field intensity can accurately reflect the operation intention of the user, and the possibility of misoperation is reduced.
Fig. 11 is a schematic structural diagram illustrating an audio playback control apparatus according to an exemplary embodiment. The device has the function of realizing the mobile terminal in the embodiment of the method, and the function can be realized by hardware or by executing corresponding software by hardware. As shown in fig. 11, the apparatus includes: an acquisition module 1101, a determination module 1102 and a control module 1103.
The obtaining module 1101 is configured to obtain a magnetic field strength detected by a geomagnetic sensor built in the mobile terminal, wherein the mobile terminal is in communication connection with the earphone, and the magnetic field strength is used for reflecting a relative position between the mobile terminal and the earphone; the determination module 1102 is configured to determine a play control instruction based on the magnetic field strength acquired by the acquisition module; the control module 1103 is configured to control audio playing of the mobile terminal by using the playing control instruction determined by the determining module.
In one possible implementation, the determining module 1102 includes:
a first determination submodule 1121 configured to determine a magnetic field strength range to which a magnetic field strength belongs;
the second determining submodule 1122 is configured to determine a playback control instruction corresponding to the detected magnetic field strength based on the correspondence between the magnetic field strength range and the playback control instruction.
Optionally, the second determining submodule 1122 is configured to, if the magnetic field strength belongs to the first magnetic field strength range, determine that the playing control instruction corresponding to the magnetic field strength is the first playing control instruction; alternatively, the first and second electrodes may be,
if the magnetic field intensity belongs to the second magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a second playing control instruction;
the first magnetic field intensity range is used for indicating that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the second magnetic field intensity range is used for indicating that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are opposite side faces of the mobile terminal.
In another possible implementation manner, the determining module 1102 includes:
a first determination submodule 1121 configured to determine a variation tendency of the magnetic field strength;
the second determining sub-module 1122 is configured to determine a play control instruction corresponding to the detected magnetic field strength based on the corresponding relationship between the variation trend and the play control instruction.
Optionally, the second determining submodule 1122 is configured to determine that the playing control instruction corresponding to the magnetic field strength is the first playing control instruction if the variation trend of the magnetic field strength is gradually increased; alternatively, the first and second electrodes may be,
if the variation trend of the magnetic field strength is gradually reduced, determining that the playing control instruction corresponding to the magnetic field strength is a second playing control instruction;
the change trend of the magnetic field strength is gradually increased to indicate that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the change trend of the magnetic field strength is gradually decreased to indicate that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are opposite side faces of the mobile terminal.
Optionally, one of the first playing control instruction and the second playing control instruction is a previous switching instruction, and the other one of the first playing control instruction and the second playing control instruction is a next switching instruction; alternatively, the first and second electrodes may be,
one of the first play control instruction and the second play control instruction is a volume up instruction, and the other of the first play control instruction and the second play control instruction is a volume down instruction.
Optionally, one of the first side surface and the second side surface is a side surface where a display screen of the mobile terminal is located, and the other of the first side surface and the second side surface is a back surface of the mobile terminal.
Optionally, the obtaining module 1101 is further configured to obtain a first endpoint value, where the first endpoint value is a magnetic field strength detected by the geomagnetic sensor when the earphone approaches the mobile terminal from the first side of the mobile terminal; acquiring a second endpoint value, wherein the second endpoint value is the magnetic field intensity detected by the geomagnetic sensor when the earphone approaches the mobile terminal from the second side surface of the mobile terminal; acquiring a reference value, wherein the reference value is the magnetic field intensity detected by the mobile terminal through the geomagnetic sensor under the condition that the mobile terminal is not influenced by the earphone;
the determination module 1102 further includes a third determination submodule 1123 configured to determine the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value.
Optionally, the third determining submodule 1123 is configured to divide the magnetic field strength range between the first end value and the second end value into a set number of subintervals; taking a partial subinterval close to the first endpoint value as a first magnetic field strength range; taking a partial subinterval close to the second endpoint value as a second magnetic field strength range; wherein the reference value is located in a sub-interval other than the sub-intervals comprised by the first and second magnetic field strength ranges.
The embodiment of the disclosure detects the magnetic field intensity through the built-in geomagnetic sensor of the mobile terminal, and because the earphone influences the magnetic field intensity detected by the built-in geomagnetic sensor of the mobile terminal when being close to the mobile terminal, the detected magnetic field intensity can reflect the relative position between the mobile terminal and the earphone, namely, the detected magnetic field intensity can change along with the change of the relative position between the mobile terminal and the earphone. The user can make the mobile terminal close to the earphone through moving the mobile terminal, so that the magnetic field intensity detected by the mobile terminal changes, a playing control instruction is generated according to the detected magnetic field intensity, and the generated playing control instruction is adopted to control the mobile terminal to play audio. When listening to music, the earphone is worn on the ear, and the mobile terminal cannot be moved to the vicinity of the earphone unless the mobile terminal is operated by people intentionally, so that the magnetic field intensity can accurately reflect the operation intention of the user, and the possibility of misoperation is reduced.
Fig. 12 is a block diagram illustrating a mobile terminal according to an example embodiment. Referring to fig. 12, a mobile terminal 1200 may include one or more of the following components: processing component 1202, memory 1204, power component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214, and communications component 1216.
Processing component 1202 generally controls overall operation of mobile terminal 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operation at the device 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 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.
A power component 1206 provides power to the various components of the device 1200. Power components 1206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for apparatus 1200.
The multimedia components 1208 include a screen that provides an output interface between the device 1200 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 1208 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 1200 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.
Audio component 1210 is configured to output and/or input audio signals. For example, audio component 1210 includes a Microphone (MIC) configured to receive external audio signals when apparatus 1200 is in an operational 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 1204 or transmitted via the communication component 1216. In some embodiments, audio assembly 1210 further includes a speaker for outputting audio signals.
The I/O interface 1212 provides an interface between the processing component 1202 and peripheral interface modules, which may be keyboards, click wheels, buttons, 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 assembly 1214 includes one or more sensors for providing various aspects of state assessment for the apparatus 1200. For example, the sensor assembly 1214 may detect an open/closed state of the device 1200, the relative positioning of the components, such as a display and keypad of the apparatus 1200, the sensor assembly 1214 may also detect a change in the position of the apparatus 1200 or a component of the apparatus 1200, the presence or absence of user contact with the apparatus 1200, an orientation or acceleration/deceleration of the apparatus 1200, and a change in the temperature of the apparatus 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 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 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1216 is configured to facilitate communications between the apparatus 1200 and other devices in a wired or wireless manner. The apparatus 1200 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 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 1216 further includes a Near Field Communication (NFC) module to facilitate short-range communications.
In an exemplary embodiment, the apparatus 1200 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 memory 1204 comprising instructions, executable by processor 1220 of apparatus 1200 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.
A non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the aforementioned audio playback control method.
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 application 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 within 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 (20)

1. An audio playback control method, comprising:
the method comprises the steps that the magnetic field intensity detected by a geomagnetic sensor arranged in a mobile terminal is obtained, the mobile terminal is in communication connection with an earphone, and the magnetic field intensity is used for reflecting the relative position between the mobile terminal and the earphone;
determining a playing control instruction based on the magnetic field intensity;
and controlling the audio playing of the mobile terminal by adopting the playing control instruction.
2. The method of claim 1, wherein determining the playback control instruction based on the magnetic field strength comprises:
determining a magnetic field intensity range to which the magnetic field intensity belongs;
and determining the detected playing control instruction corresponding to the magnetic field strength based on the corresponding relation between the magnetic field strength range and the playing control instruction.
3. The method according to claim 2, wherein the determining the playback control command corresponding to the detected magnetic field strength based on the correspondence between the magnetic field strength range and the playback control command comprises:
if the magnetic field intensity belongs to a first magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a first playing control instruction; alternatively, the first and second electrodes may be,
if the magnetic field intensity belongs to a second magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a second playing control instruction;
wherein the first magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a first side of the mobile terminal, the second magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a second side of the mobile terminal, and the first side and the second side are opposite sides of the mobile terminal.
4. The method of claim 1, wherein determining the playback control instruction based on the magnetic field strength comprises:
determining the variation trend of the magnetic field intensity;
and determining the playing control instruction corresponding to the detected magnetic field intensity based on the corresponding relation between the variation trend and the playing control instruction.
5. The method according to claim 4, wherein the determining the playback control command corresponding to the detected magnetic field strength based on the correspondence between the trend of change and the playback control command comprises:
if the variation trend of the magnetic field strength is gradually increased, determining that the playing control instruction corresponding to the magnetic field strength is a first playing control instruction; alternatively, the first and second electrodes may be,
if the variation trend of the magnetic field strength is gradually reduced, determining that the playing control instruction corresponding to the magnetic field strength is a second playing control instruction;
wherein, the trend of change of the magnetic field strength is gradually increased to indicate that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the trend of change of the magnetic field strength is gradually decreased to indicate that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are two opposite side faces of the mobile terminal.
6. The method according to claim 3 or 5, wherein one of the first playback control command and the second playback control command is a previous switching command, and the other of the first playback control command and the second playback control command is a next switching command; alternatively, the first and second electrodes may be,
one of the first playing control instruction and the second playing control instruction is a volume increasing instruction, and the other of the first playing control instruction and the second playing control instruction is a volume decreasing instruction.
7. The method according to claim 3 or 5, wherein one of the first side and the second side is a side on which a display of the mobile terminal is located, and the other of the first side and the second side is a back side of the mobile terminal.
8. The method of claim 3, further comprising:
acquiring a first endpoint value, wherein the first endpoint value is a magnetic field intensity detected by a geomagnetic sensor when the earphone approaches the mobile terminal from a first side face of the mobile terminal;
acquiring a second endpoint value, wherein the second endpoint value is the magnetic field intensity detected by a geomagnetic sensor when the earphone approaches the mobile terminal from the second side of the mobile terminal;
acquiring a reference value, wherein the reference value is the magnetic field intensity detected by the mobile terminal through a geomagnetic sensor under the condition that the mobile terminal is not influenced by the earphone;
determining the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value.
9. The method of claim 8, wherein the determining the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value comprises:
dividing a magnetic field strength range between the first end value and the second end value into a set number of subintervals;
taking a partial subinterval close to the first endpoint value as a first magnetic field strength range;
taking a partial subinterval close to the second endpoint value as a second magnetic field strength range;
wherein the reference value is in a sub-interval other than the sub-intervals comprised by the first and second magnetic field strength ranges.
10. An audio playback control apparatus, characterized in that the apparatus comprises:
the mobile terminal comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire the magnetic field intensity detected by a geomagnetic sensor built in the mobile terminal, the mobile terminal is in communication connection with an earphone, and the magnetic field intensity is used for reflecting the relative position between the mobile terminal and the earphone;
a determination module configured to determine a play control instruction based on the magnetic field strength acquired by the acquisition module;
and the control module is configured to control the audio playing of the mobile terminal by adopting the playing control instruction determined by the determination module.
11. The apparatus of claim 10, wherein the determining module comprises:
a first determination submodule configured to determine a magnetic field strength range to which the magnetic field strength belongs;
and the second determination submodule is configured to determine the playing control instruction corresponding to the detected magnetic field strength based on the corresponding relation between the magnetic field strength range and the playing control instruction.
12. The apparatus according to claim 11, wherein the second determining submodule is configured to determine that the playback control command corresponding to the magnetic field strength is a first playback control command if the magnetic field strength belongs to a first magnetic field strength range; alternatively, the first and second electrodes may be,
if the magnetic field intensity belongs to a second magnetic field intensity range, the playing control instruction corresponding to the magnetic field intensity is a second playing control instruction;
wherein the first magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a first side of the mobile terminal, the second magnetic field strength range is used to indicate that the earphone is close to the mobile terminal from a second side of the mobile terminal, and the first side and the second side are opposite sides of the mobile terminal.
13. The apparatus of claim 10, wherein the determining module comprises:
a first determination submodule configured to determine a trend of change of the magnetic field strength;
and the second determination submodule is configured to determine the playing control instruction corresponding to the detected magnetic field intensity based on the corresponding relation between the variation trend and the playing control instruction.
14. The apparatus according to claim 13, wherein the second determining submodule is configured to determine that the playback control instruction corresponding to the magnetic field strength is the first playback control instruction if the trend of change of the magnetic field strength is gradually increasing; alternatively, the first and second electrodes may be,
if the variation trend of the magnetic field strength is gradually reduced, determining that the playing control instruction corresponding to the magnetic field strength is a second playing control instruction;
wherein, the trend of change of the magnetic field strength is gradually increased to indicate that the earphone is close to the mobile terminal from a first side face of the mobile terminal, the trend of change of the magnetic field strength is gradually decreased to indicate that the earphone is close to the mobile terminal from a second side face of the mobile terminal, and the first side face and the second side face are two opposite side faces of the mobile terminal.
15. The apparatus according to claim 12 or 14, wherein one of the first playback control command and the second playback control command is a previous switching command, and the other of the first playback control command and the second playback control command is a next switching command; alternatively, the first and second electrodes may be,
one of the first playing control instruction and the second playing control instruction is a volume increasing instruction, and the other of the first playing control instruction and the second playing control instruction is a volume decreasing instruction.
16. The apparatus according to claim 12 or 14, wherein one of the first side and the second side is a side on which a display of the mobile terminal is located, and the other of the first side and the second side is a back side of the mobile terminal.
17. The apparatus of claim 12, wherein the obtaining module is further configured to obtain a first endpoint value, the first endpoint value being a magnetic field strength detected by a geomagnetic sensor when the headset is proximate to the mobile terminal from a first side of the mobile terminal; acquiring a second endpoint value, wherein the second endpoint value is the magnetic field intensity detected by a geomagnetic sensor when the earphone approaches the mobile terminal from the second side of the mobile terminal; acquiring a reference value, wherein the reference value is the magnetic field intensity detected by the mobile terminal through a geomagnetic sensor under the condition that the mobile terminal is not influenced by the earphone;
the determination module further includes a third determination submodule configured to determine the first and second magnetic field strength ranges from the first endpoint value, the second endpoint value, and the reference value.
18. The apparatus of claim 17, wherein the third determination submodule is configured to divide a magnetic field strength range between the first endpoint value and the second endpoint value into a set number of subintervals; taking a partial subinterval close to the first endpoint value as a first magnetic field strength range; taking a partial subinterval close to the second endpoint value as a second magnetic field strength range; wherein the reference value is in a sub-interval other than the sub-intervals comprised by the first and second magnetic field strength ranges.
19. A mobile terminal, characterized in that the mobile terminal comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to load and execute the executable instructions to implement the audio playback control method of any of claims 1 to 9.
20. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor, are capable of performing the audio playback control method of any of claims 1 to 9.
CN201910993291.1A 2019-10-18 2019-10-18 Audio playing control method and device, mobile terminal and storage medium Active CN112689051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910993291.1A CN112689051B (en) 2019-10-18 2019-10-18 Audio playing control method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910993291.1A CN112689051B (en) 2019-10-18 2019-10-18 Audio playing control method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112689051A true CN112689051A (en) 2021-04-20
CN112689051B CN112689051B (en) 2022-05-20

Family

ID=75445606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910993291.1A Active CN112689051B (en) 2019-10-18 2019-10-18 Audio playing control method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112689051B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189788A (en) * 2021-11-24 2022-03-15 深圳市豪恩声学股份有限公司 Tuning method, tuning device, electronic device, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104919887A (en) * 2013-01-11 2015-09-16 Lg电子株式会社 Device for transmitting and receiving data using earphone and method for controlling the same
CN105630357A (en) * 2015-12-28 2016-06-01 联想(北京)有限公司 Electronic equipment and information processing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104919887A (en) * 2013-01-11 2015-09-16 Lg电子株式会社 Device for transmitting and receiving data using earphone and method for controlling the same
CN105630357A (en) * 2015-12-28 2016-06-01 联想(北京)有限公司 Electronic equipment and information processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189788A (en) * 2021-11-24 2022-03-15 深圳市豪恩声学股份有限公司 Tuning method, tuning device, electronic device, and storage medium
CN114189788B (en) * 2021-11-24 2024-01-23 深圳市豪恩声学股份有限公司 Tuning method, tuning device, electronic device and storage medium

Also Published As

Publication number Publication date
CN112689051B (en) 2022-05-20

Similar Documents

Publication Publication Date Title
CN106454644B (en) Audio playing method and device
US10051368B2 (en) Mobile apparatus and control method thereof
CN105138319B (en) Event-prompting method and device
CN104902059A (en) Call reminding method and device
US11743355B2 (en) Prompting method and device
CN105468236A (en) Message prompting method and apparatus and terminal
EP4175317A1 (en) Earphone, method and device for controlling earphone, electronic apparatus and storage medium
CN104682908A (en) Method and device for controlling volume
CN108093132B (en) Terminal device and ringtone volume control method
CN112689051B (en) Audio playing control method and device, mobile terminal and storage medium
CN111698593B (en) Active noise reduction method and device, and terminal
US20200106936A1 (en) Full screen terminal, operation control method, and device based on full screen terminal
WO2018058331A1 (en) Method and apparatus for controlling volume
EP3941027A1 (en) Adaptive method and apparatus for intelligent terminal, and terminal
KR102364324B1 (en) Electronic device
CN111694539A (en) Method, apparatus and medium for switching between earpiece and speaker
CN104601126A (en) Method and device for adjusting volume
CN112769981A (en) Electronic device and audio output method
US11064307B2 (en) Electronic device and method of outputting audio
CN112019677B (en) Electronic equipment control method and device
CN114567840B (en) Audio output method and device, mobile terminal and storage medium
CN114828171A (en) Power management method, power management device and storage medium
CN107454306B (en) Method and device for collecting image
CN105094334A (en) Method and device for importing data file in calculator
CN114554348A (en) Method, device and medium for controlling sound signal output

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