CN114765644B - Volume control method, volume control device, electronic equipment and storage medium - Google Patents

Volume control method, volume control device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114765644B
CN114765644B CN202110037219.9A CN202110037219A CN114765644B CN 114765644 B CN114765644 B CN 114765644B CN 202110037219 A CN202110037219 A CN 202110037219A CN 114765644 B CN114765644 B CN 114765644B
Authority
CN
China
Prior art keywords
electronic equipment
volume
state
acquiring
electronic device
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
CN202110037219.9A
Other languages
Chinese (zh)
Other versions
CN114765644A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110037219.9A priority Critical patent/CN114765644B/en
Publication of CN114765644A publication Critical patent/CN114765644A/en
Application granted granted Critical
Publication of CN114765644B publication Critical patent/CN114765644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041Portable telephones adapted for handsfree use
    • H04M1/605Portable telephones adapted for handsfree use involving control of the receiver volume to provide a dual operational mode at close or far distance from the user

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)
  • Television Receiver Circuits (AREA)

Abstract

The embodiment of the application discloses a volume control method, a volume control device, electronic equipment and a storage medium. The method comprises the following steps: acquiring position information of electronic equipment; if the position information indicates that the electronic equipment is at a preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment; if the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment; and if the audio playing mode is the play mode, adjusting the volume of the electronic equipment to be in a mute state. The method ensures that the electronic equipment can timely detect the change of the running state of the target application program according to the change of the position of the electronic equipment, and then flexibly adjust the sound volume state to be a mute state according to the running condition of audio and video software, the sound volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding embarrassing places caused by overhigh sound volume of the electronic equipment in public places and improving user experience.

Description

Volume control method, volume control device, electronic equipment and storage medium
Technical Field
The present application relates to the field of mobile terminals, and in particular, to a volume control method, a volume control device, an electronic device, and a storage medium.
Background
Along with continuous optimization of the functions of the intelligent terminal, more and more intelligent functions are favored by the vast users, and the use experience of the users is greatly improved. However, the volume of the electronic device (such as call volume, audio/video playing volume, etc.) still needs to be manually set by the user, and for some public places, if the user forgets to take the earphone and opens the audio/video software, or the earphone is not inserted yet when the audio/video software is opened, the audio/video volume released from the outside may cause the user to get in an embarrassed place, and the user experience is reduced.
Disclosure of Invention
In view of the above, the present application proposes a volume control method, apparatus, electronic device, and storage medium to improve the above.
In a first aspect, an embodiment of the present application provides a volume control method, applied to an electronic device, where the method includes: acquiring the position information of the electronic equipment; if the position information represents that the electronic equipment is at a preset position, acquiring the running state of a target application program and acquiring the volume state of the electronic equipment; if the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment; and if the audio playing mode is the play mode, adjusting the volume of the electronic equipment to be in a mute state.
In a second aspect, an embodiment of the present application provides a volume control method, applied to an electronic device, where the method includes: when a target application program of the electronic equipment is in an operating state, acquiring position information of the electronic equipment; if the position information represents that the electronic equipment is at a preset position, acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment; and if the volume state is a non-mute state and the audio playing mode is an play mode, adjusting the volume of the electronic equipment to be in a mute state.
In a third aspect, an embodiment of the present application provides a volume control device, which is operated in an electronic device, where the device includes: the first acquisition module is used for acquiring the position information of the electronic equipment; the second acquisition module is used for acquiring the running state of the target application program and acquiring the volume state of the electronic equipment if the position information represents that the electronic equipment is at a preset position; the third acquisition module is used for acquiring an audio playing mode of the electronic equipment if the running state is an on state and the volume state is an unmuted state; and the volume control module is used for adjusting the volume of the electronic equipment to be in a mute state if the audio playing mode is an outward playing mode.
In a fourth aspect, an embodiment of the present application provides a volume control device, which is operated in an electronic device, and the device includes: a location information obtaining unit, configured to obtain location information of the electronic device when a target application of the electronic device is in an operating state; the volume information acquisition unit is used for acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment if the position information represents that the electronic equipment is at a preset position; and the volume control unit is used for adjusting the volume of the electronic equipment to be in a mute state if the volume state is in an unmuted state and the audio playing mode is an play mode.
In a fifth aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods of the first or second aspects described above.
In a sixth aspect, the present application provides a computer readable storage medium having program code stored therein, wherein the method of the first or second aspect is performed when the program code is run.
The application provides a volume control method, a volume control device, electronic equipment and a storage medium, wherein position information of the electronic equipment is obtained; if the position information indicates that the electronic equipment is at a preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment; if the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment; if the audio playing mode is the play mode, the volume of the electronic equipment is adjusted to be in a mute state, so that the electronic equipment can timely detect the change of the running state of a target application program in the electronic equipment according to the change of the position of the electronic equipment, and then the electronic equipment can flexibly adjust the volume state of the electronic equipment to be in the mute state according to the running condition of audio and video software in the electronic equipment and the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in public places due to the fact that the volume of the electronic equipment is too high, and improving user experience.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a volume control method according to an embodiment of the present application.
Fig. 2 is a flow chart of a volume control method according to another embodiment of the present application.
Fig. 3 shows a method flow chart of a volume control method according to another embodiment of the present application.
Fig. 4 shows a block diagram of a volume control device according to an embodiment of the present application.
Fig. 5 shows a block diagram of a volume control device according to another embodiment of the present application.
Fig. 6 shows a block diagram of an electronic device for performing a volume control method according to an embodiment of the application.
Fig. 7 is a memory unit for storing or carrying program codes for implementing a volume control method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
With the rapid development of mobile terminal technology, mobile terminals have become an indispensable tool in people's lives. Brings great convenience to life, work, travel and the like of people. However, the inventor found that the adjustment manner of the volume of the mobile terminal is still relatively mechanized, especially in some public places, if the user is not ready to fully (e.g. forget to take the earphone) turn on the audio and video functions of the mobile terminal, the audio and video volume released from the mobile terminal may cause the user to get in an embarrassed place or leak the privacy of the user, thereby reducing the user experience.
Therefore, in order to improve the above problem, the inventor proposes the method and the device for controlling the volume, which enable the electronic device to timely detect the change of the running state of the target application program in the electronic device according to the change of the position of the electronic device, and then enable the electronic device to flexibly adjust the volume state of the electronic device to be in a mute state according to the running condition of the audio and video software in the electronic device, the volume of the electronic device and the audio playing mode of the electronic device, so as to avoid the situation that a user falls into embarrassment due to the too high volume of the electronic device in public places, and improve the user experience.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present application provides a volume control method applied to an electronic device, where the volume control method is described by controlling and adjusting a volume by changing a position of the electronic device into a trigger condition, and the method includes:
step S110: and acquiring the position information of the electronic equipment.
In this embodiment, the location information of the electronic device indicates a coordinate location where the electronic device is located, or a location area where the electronic device is located.
Optionally, the electronic device is usually provided with a GPS (Global Positioning System ) module, and in this case, the longitude and latitude of the location where the electronic device is located acquired by the GPS module may be used as the location information of the electronic device. In addition, when the electronic device is connected with the WIFI hotspot, longitude and latitude information of the connected WIFI hotspot can be obtained, and the longitude and latitude information of the WIFI hotspot is used as position information of the electronic device.
Step S120: and if the position information represents that the electronic equipment is at the preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment.
The preset position may be a public place of a fixed point location, for example, the preset position may be an "XXX subway station", "XX bus station", "XX airport", etc.; or the preset location may be a public place of a fixed line, for example, on a bus/subway/plane going to the a direction. Alternatively, in some embodiments, the preset position may be a distance range, for example, a position area with a distance of 50 meters (the specific value may not be limited) from the "XXX subway station".
As a way, if the position information of the electronic device indicates that the electronic device is at the preset position, the operation state of the target application program and the volume state of the electronic device may be acquired, where the target application program includes various audio and video function applications, and the volume state of the electronic device may include a mute state or an unmuted state. Optionally, the longitude and latitude of the position where the electronic device is located may be compared with the longitude and latitude of the preset position (for example, the B subway station), if the longitude and latitude of the position where the electronic device is located is the same as the longitude and latitude of the B subway station, or if the difference value between the longitude and latitude of the position where the electronic device is located and the longitude and latitude of the B subway station is small (for example, smaller than the difference threshold, the specific value of the difference threshold may be set according to the actual situation), then it may be determined that the current position information of the electronic device represents that the electronic device is located at the preset position.
When the electronic equipment is detected to enter the preset position or enter the range of a certain distance where the preset position is located, the running state of the audio and video function application program of the electronic equipment and the volume state of the electronic equipment can be acquired, so that the volume of the electronic equipment can be adjusted in time according to the change of the position where the electronic equipment is located and the change of the running state of the audio and video function application program, and the intelligence of volume adjustment is improved.
Step S130: and if the running state is an opening state and the volume state is a non-mute state, acquiring an audio playing mode of the electronic equipment.
The audio playing mode of the electronic device includes playing audio through a speaker (which may be simply understood as a play mode) or playing audio through a headphone (which may be simply understood as a headphone mode). In one mode, if it is determined that the electronic device is at the preset position and the running state of the audio/video function application program in the electronic device is in the on state and the volume state of the electronic device is in the non-mute state, in order to optimize the problem of embarrassment to the user when playing the audio/video on the outside in the public place, the audio/video playing mode of the electronic device may be acquired.
In one implementation, an audio playing identifier may be configured to record a current volume playing mode, where the audio playing identifier has a different value and characterizes different audio playing modes of the electronic device. For example, an audio playing identifier of "1" may be stored corresponding to an "play mode" of the audio playing mode, and an audio playing identifier of "0" may be stored corresponding to an "earphone mode" of the audio playing mode, in which manner, a current audio playing mode of the electronic device may be obtained by identifying a value of the audio playing identifier.
Step S140: and if the audio playing mode is the play mode, adjusting the volume of the electronic equipment to be in a mute state.
As one way, if the audio play mode is identified as the play mode, the volume of the electronic device may be adjusted to be in a mute state, specifically, the volume of the electronic device may be adjusted to be "0", or the set volume of the electronic device may be maintained, and the volume of the electronic device may be temporarily adjusted to be in a mute mode, so that the situation that the user falls into an embarrassed place due to the play of the audio and video volume in a public place, the privacy of the user is revealed, or the user is disturbed to other users, and the intelligence of the volume control may be improved.
In one implementation manner, after the audio playing mode is identified as the play mode, the volume of the electronic device can be adjusted to be in a mute state instantly, if the audio playing mode is identified as the play mode, a user inserts the earphone immediately, and after the connection of the electronic device and the earphone is detected, if the earphone is in an unworn state, the volume of the electronic device can be adjusted to be in a mute state, so that the audio and video volume is prevented from being transferred to other users to influence other users when the earphone is in the unworn state.
According to the volume control method provided by the application, the position information of the electronic equipment is obtained; if the position information indicates that the electronic equipment is at a preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment; if the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment; if the audio playing mode is the play mode, the volume of the electronic equipment is adjusted to be mute, so that the electronic equipment can timely detect the change of the running state of the target application program in the electronic equipment according to the change of the position of the electronic equipment, and then the electronic equipment can flexibly adjust the volume state of the electronic equipment to be mute according to the running condition of audio and video software in the electronic equipment, the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in public places due to the too high volume of the electronic equipment, and improving the user experience.
Referring to fig. 2, another embodiment of the present application provides a volume control method applied to an electronic device, the method including:
step S210: and acquiring the movement trend of the electronic equipment.
The motion trend of the electronic device may include parameters such as a moving frequency, a moving direction, and a moving acceleration, and specifically, the motion trend of the electronic device may be obtained by acquiring data such as the moving frequency, the moving direction, and the moving acceleration of the electronic device in real time through a GPS positioning function or a base station positioning.
Step S220: and acquiring the position information of the electronic equipment according to the movement trend.
Alternatively, the user may walk at a generally faster rate while carrying the electronic device in the vehicle, so that as an embodiment, the current location information of the electronic device may be determined by the movement trend of the electronic device. In one implementation, it may be determined whether a speed of movement of the electronic device (which may be a speed of movement relative to the ground) within a target time period is above a speed threshold (e.g., the speed of the speed threshold may be 3 m/sec, or another value). Optionally, if the movement speed of the electronic device in the target period is higher than the speed threshold, it may be determined that the electronic device is at the preset position, for example, if the movement speed of the electronic device in 1 minute is greater than 3 m/s, it may be determined that the electronic device is at the preset position.
In another implementation, the current location information of the electronic device may be determined by a direction of movement of the electronic device. Optionally, if the electronic device moves in a direction approaching the preset position and the distance between the electronic device and the preset position is smaller than the specified distance, it may be determined that the electronic device is located at the preset position. If the electronic device moves in a direction away from the preset position, it can be determined that the electronic device is not located at the preset position.
Alternatively, as another implementation manner, the position information of the electronic device may also be obtained through the riding record information, and specifically, if it is detected that the electronic device refreshes the riding record information, it may be determined that the electronic device is at the preset position. The riding record information can be obtained from the using data of riding codes, wherein the riding codes comprise riding codes of proprietary riding application programs or riding codes of third party payment application programs.
Step S230: and if the position information represents that the electronic equipment is at the preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment.
Step S240: and judging whether the running state is an on state or not.
Alternatively, if it is determined that the running state of the target application of the electronic device is an on state, the following determination in step S250 may be continued, and if the running state of the target application is not an on state, for example, an off state, the current determination process may be ended, and the volume control process may be exited.
Step S250: and judging whether the volume state is an unmuted state or not.
Optionally, if the running state of the target application is the on state, if the volume state of the electronic device is the non-mute state, the following content of step S260 may be continued, and if the volume state of the electronic device is the mute state, the current determination process may be ended, and the volume control process may be exited.
Step S260: and acquiring an audio playing mode of the electronic equipment.
Step S270: and judging whether the audio playing mode is a play-out mode or not.
Alternatively, if the audio playing mode is not the play mode, the current judging process may be ended, and the volume control process may be exited.
Step S280: and adjusting the volume of the electronic equipment to be in a mute state.
In order to optimize the problem that the audio/video volume is put out without the earphone to cause the user to get in embarrassing situation, and to optimize the problem that the audio/video content cannot be completely listened to without the earphone, or the problem that the volume of the earphone is transferred to other users to affect other users, in this embodiment, when the audio playing mode is determined to be the put-out mode, after the electronic device is detected to be connected with the earphone, if the earphone is detected to be in the unworn state, the volume of the electronic device can be adjusted to be in the mute state and simultaneously pause playing the audio/video content, that is, in the period from the successful connection of the earphone with the electronic device to the wearing of the earphone, the volume of the electronic device is in the mute state, and the audio/video content can also be in the pause playing state.
For example, the volume of the electronic device may be adjusted to 0, or temporarily adjusted to a mute mode, and the playing of the audio/video content is paused, and when the earphone is detected to be in the wearing state, the volume of the electronic device may be adjusted to the normal playing volume, or the mute mode is released, and the playing of the audio/video content is paused, so that the volume of the electronic device may be flexibly and intelligently controlled according to the operation habit of the user.
Optionally, in this embodiment, after the volume of the electronic device is adjusted to the mute state, after the connection between the electronic device and the earphone is detected, the volume state of the electronic device may be directly switched from the mute state to the non-mute state without taking into consideration whether the earphone is in a wearing state, so that the volume of the audio and video played by the speaker may be switched to the mute state at the fastest speed, and the embarrassing situation of the user is avoided.
Optionally, in some embodiments, adjusting the volume of the electronic device to the mute state may be adjusting the volume of the electronic device to 0, in this way, whether the earphone is connected or not, or whether the earphone is worn or not, the user may control to increase the volume through manual operation, so as to ensure that the user can use the electronic device normally if necessary. For example, when it is detected that the user is playing music through the speaker, the user enters the subway station by brushing the riding code, and the volume of the music played by the speaker is not 0, in this case, the volume may be temporarily adjusted to 0, and if there is a call incoming at this time, the user may manually adjust the volume, for example, the volume may be adjusted to the optimal call volume prompted by the system, so that the user's friendly use experience of the electronic device is improved.
According to the volume control method provided by the embodiment of the application, the position information of the electronic equipment is obtained according to the movement trend of the electronic equipment, so that the electronic equipment can accurately and timely detect the change of the running state of the target application program according to the change of the position of the electronic equipment, and then the volume of the electronic equipment can be automatically adjusted to be in a mute state according to the running condition of audio and video software in the electronic equipment, the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in a public place due to the too high volume of the electronic equipment, and improving the user experience.
Referring to fig. 3, a volume control method is provided in a further embodiment of the present application, and is applied to an electronic device, where the volume is controlled and adjusted by changing an operation state of an application program of the electronic device into a trigger condition, and the method includes:
Step S310: and when the target application program of the electronic equipment is in an operating state, acquiring the position information of the electronic equipment.
The target application programs in this embodiment include various audio and video application programs, and as the life pressure increases, more and more users like to listen to songs or watch videos (such as live webcast or short videos) to relieve work or life pressure, and the audio and video playing in public places is a behavior of being not civilized, which may affect other people, or may cause the users to fall into an embarrassed place due to volume playing, and may also leak the privacy of the users. In order to improve the problem, the embodiment can acquire the position information of the electronic device when the target application program in the electronic device is in an open state (i.e. an operating state), and acquire the position information of the electronic device by taking the operating state of the target application program of the electronic device as a trigger condition, so as to monitor whether a user enters a public place such as a subway or a bus under the condition of watching a short video or the like in time, thereby facilitating subsequent volume adjustment. The specific process of obtaining the location information of the electronic device may refer to the description in the foregoing embodiment, and will not be described herein.
Step S320: and if the position information represents that the electronic equipment is at the preset position, acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment.
Step S330: and if the volume state is a non-mute state and the audio playing mode is an play mode, adjusting the volume of the electronic equipment to be in a mute state.
Optionally, if the volume state of the electronic device is a non-mute state and the audio playing mode of the electronic device is an play mode, the volume of the electronic device may be adjusted to be a mute state, so as to avoid embarrassing situations of users due to overlarge volume in public places.
According to the volume control method provided by the embodiment of the application, when the target application program of the electronic equipment is in the running state, the position information of the electronic equipment is obtained; if the position information represents that the electronic equipment is at a preset position, acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment; if the volume state is a non-mute state and the audio playing mode is an out-put mode, the volume of the electronic equipment is adjusted to be the mute state, so that the electronic equipment can timely detect the change of the position information of the electronic equipment according to the running condition of the target application program, and then the volume state of the electronic equipment is automatically adjusted to be the mute state according to the position of the electronic equipment, the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in a public occasion due to the fact that the volume of the electronic equipment is too high, and improving the user experience.
Referring to fig. 4, an embodiment of the present application provides a volume control device 400, which is operated in an electronic apparatus, the device 400 includes:
A first obtaining module 410, configured to obtain location information of the electronic device.
As an embodiment, the first obtaining module 410 may be configured to obtain a movement trend of the electronic device; acquiring position information of the electronic equipment according to the movement trend, wherein if the movement speed of the electronic equipment in a target time period is higher than a speed threshold value, the electronic equipment is judged to be in a preset position; or if the electronic equipment moves towards the direction close to the preset position and the distance between the electronic equipment and the preset position is smaller than the specified distance, judging that the electronic equipment is positioned at the preset position.
As another embodiment, the first obtaining module 410 may be configured to determine that the electronic device is in a preset position if it is detected that the electronic device refreshes the riding record information.
The second obtaining module 420 is configured to obtain an operation state of the target application program and obtain a volume state of the electronic device if the location information indicates that the electronic device is at a preset location.
And a third obtaining module 430, configured to obtain an audio playing mode of the electronic device if the running state is an on state and the volume state is an unmuted state.
And the volume control module 440 is configured to adjust the volume of the electronic device to a state if the audio playing mode is the play mode.
Optionally, the volume control module 440 may be configured to adjust the volume of the electronic device to a mute state if the headset is in an unworn state after detecting that the electronic device is connected to the headset.
Optionally, the apparatus 400 may further include a state switching module, configured to switch the mute state to the non-mute state after detecting that the electronic device is connected to the earphone after adjusting the volume of the electronic device to the mute state.
The application provides a volume control device, which is characterized by acquiring position information of electronic equipment; if the position information indicates that the electronic equipment is at a preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment; if the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment; if the audio playing mode is the play mode, the volume of the electronic equipment is adjusted to be in a mute state, so that the electronic equipment can timely detect the change of the running state of a target application program in the electronic equipment according to the change of the position of the electronic equipment, and then the electronic equipment can flexibly adjust the volume state of the electronic equipment to be in the mute state according to the running condition of audio and video software in the electronic equipment and the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in public places due to the fact that the volume of the electronic equipment is too high, and improving user experience.
Referring to fig. 5, a volume control device 500 according to an embodiment of the present application is operated in an electronic device, where the device 500 includes:
And the location information obtaining unit 510 is configured to obtain location information of the electronic device when the target application of the electronic device is in an operating state.
The volume information obtaining unit 520 is configured to obtain a volume state of the electronic device and obtain an audio playing mode of the electronic device if the location information indicates that the electronic device is at a preset location.
And the volume control unit 530 is configured to adjust the volume of the electronic device to a mute state if the volume state is an unmuted state and the audio playing mode is an play mode.
According to the volume control device provided by the embodiment of the application, when the target application program of the electronic equipment is in the running state, the position information of the electronic equipment is obtained; if the position information represents that the electronic equipment is at a preset position, acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment; if the volume state is a non-mute state and the audio playing mode is an out-put mode, the volume of the electronic equipment is adjusted to be the mute state, so that the electronic equipment can timely detect the change of the position information of the electronic equipment according to the running condition of the target application program, and then the volume state of the electronic equipment is automatically adjusted to be the mute state according to the position of the electronic equipment, the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in a public occasion due to the fact that the volume of the electronic equipment is too high, and improving the user experience.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In the several embodiments provided by the present application, the illustrated or discussed coupling or direct coupling or communication connection of the modules to each other may be through some interfaces, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other forms.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
Referring to fig. 6, based on the above-mentioned volume control method and apparatus, an embodiment of the present application further provides an electronic device 100 capable of executing the above-mentioned volume control method. The electronic device 100 includes a memory 102 and one or more (only one is shown) processors 104 coupled to each other, with communication lines connecting the memory 102 and the processors 104. The memory 102 stores therein a program that can execute the contents of the foregoing embodiments, and the processor 104 can execute the program stored in the memory 102.
Wherein the processor 104 may include one or more processing cores. The processor 104 utilizes various interfaces and lines to connect various portions of the overall electronic device 100, perform various functions of the electronic device 100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 102, and invoking data stored in the memory 102. Alternatively, the processor 104 may be implemented in hardware in at least one of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 104 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 104 and may be implemented solely by a single communication chip.
Memory 102 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Memory 102 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 102 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the foregoing embodiments, etc. The storage data area may also store data created by the electronic device 100 in use (e.g., phonebook, audiovisual data, chat log data), and the like.
Referring to fig. 7, a block diagram of a computer readable storage medium according to an embodiment of the application is shown. The computer readable storage medium 600 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 600 comprises a non-transitory computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 600 has storage space for program code 610 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 610 may be compressed, for example, in a suitable form.
In summary, the volume control method, the volume control device, the electronic device and the storage medium provided by the application acquire the position information of the electronic device; if the position information indicates that the electronic equipment is at a preset position, acquiring the running state of the target application program and acquiring the volume state of the electronic equipment; if the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment; if the audio playing mode is the play mode, the volume of the electronic equipment is adjusted to be in a mute state, so that the electronic equipment can timely detect the change of the running state of a target application program in the electronic equipment according to the change of the position of the electronic equipment, and then the electronic equipment can flexibly adjust the volume state of the electronic equipment to be in the mute state according to the running condition of audio and video software in the electronic equipment and the volume of the electronic equipment and the audio playing mode of the electronic equipment, thereby avoiding the situation that a user falls into an embarrassed place in public places due to the fact that the volume of the electronic equipment is too high, and improving user experience.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of volume control applied to an electronic device, the method comprising:
Acquiring the position information of the electronic equipment, wherein the acquiring the position information of the electronic equipment comprises the following steps: acquiring a motion trend of the electronic equipment; acquiring the position information of the electronic equipment according to the movement trend, wherein the movement trend comprises the movement direction of the electronic equipment, and acquiring the position information of the electronic equipment according to the movement trend comprises the following steps: if the electronic equipment moves towards the direction close to the preset position and the distance between the electronic equipment and the preset position is smaller than the specified distance, judging that the electronic equipment is positioned at the preset position; if the electronic equipment moves in a direction away from the preset position, judging that the electronic equipment is not at the preset position;
if the position information represents that the electronic equipment is at a preset position, acquiring the running state of a target application program and acquiring the volume state of the electronic equipment;
If the running state is an on state and the volume state is an un-mute state, acquiring an audio playing mode of the electronic equipment;
If the audio playing mode is the play mode, adjusting the volume of the electronic device to a mute state, and adjusting the volume of the electronic device to the mute state includes: and adjusting the volume of the electronic equipment to 0.
2. The method of claim 1, wherein the obtaining location information of the electronic device according to the movement trend comprises:
And if the movement speed of the electronic equipment in the target time period is higher than a speed threshold value, judging that the electronic equipment is at a preset position.
3. The method of claim 1, wherein the obtaining location information of the electronic device comprises:
and if the electronic equipment is detected to refresh the riding record information, judging that the electronic equipment is at a preset position.
4. A method according to any of claims 1-3, wherein said adjusting the volume of the electronic device to a mute state comprises:
And after detecting that the electronic equipment is connected with the earphone, if the earphone is in an unworn state, adjusting the volume of the electronic equipment to be in a mute state.
5. A method according to any one of claims 1-3, wherein after said adjusting the volume of the electronic device to a mute state, the method further comprises:
And when the connection of the electronic equipment and the earphone is detected, switching the mute state into the non-mute state.
6. A method of volume control applied to an electronic device, the method comprising:
When a target application program of the electronic equipment is in an operation state, acquiring the position information of the electronic equipment, wherein the acquiring the position information of the electronic equipment comprises the following steps: acquiring a motion trend of the electronic equipment; acquiring the position information of the electronic equipment according to the movement trend, wherein the movement trend comprises the movement direction of the electronic equipment, and acquiring the position information of the electronic equipment according to the movement trend comprises the following steps: if the electronic equipment moves towards the direction close to the preset position and the distance between the electronic equipment and the preset position is smaller than the specified distance, judging that the electronic equipment is positioned at the preset position; if the electronic equipment moves in a direction away from the preset position, judging that the electronic equipment is not at the preset position;
If the position information represents that the electronic equipment is at a preset position, acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment;
If the volume state is an unmuted state and the audio playing mode is an play mode, adjusting the volume of the electronic device to be in a mute state, wherein the adjusting the volume of the electronic device to be in a mute state comprises: and adjusting the volume of the electronic equipment to 0.
7. A volume control device operable in an electronic apparatus, the device comprising:
The first obtaining module is configured to obtain location information of the electronic device, where the obtaining of the location information of the electronic device includes: acquiring a motion trend of the electronic equipment; acquiring the position information of the electronic equipment according to the movement trend, wherein the movement trend comprises the movement direction of the electronic equipment, and acquiring the position information of the electronic equipment according to the movement trend comprises the following steps: if the electronic equipment moves towards the direction close to the preset position and the distance between the electronic equipment and the preset position is smaller than the specified distance, judging that the electronic equipment is positioned at the preset position; if the electronic equipment moves in a direction away from the preset position, judging that the electronic equipment is not at the preset position;
The second acquisition module is used for acquiring the running state of the target application program and acquiring the volume state of the electronic equipment if the position information represents that the electronic equipment is at a preset position;
the third acquisition module is used for acquiring an audio playing mode of the electronic equipment if the running state is an on state and the volume state is an unmuted state;
and a volume control module, configured to adjust the volume of the electronic device to a mute state if the audio playing mode is an play mode, where the adjusting the volume of the electronic device to the mute state includes: and adjusting the volume of the electronic equipment to 0.
8. A volume control device operable in an electronic apparatus, the device comprising:
A location information obtaining unit, configured to obtain location information of the electronic device when a target application of the electronic device is in an operating state, where the obtaining the location information of the electronic device includes: acquiring a motion trend of the electronic equipment; acquiring the position information of the electronic equipment according to the movement trend, wherein the movement trend comprises the movement direction of the electronic equipment, and acquiring the position information of the electronic equipment according to the movement trend comprises the following steps: if the electronic equipment moves towards the direction close to the preset position and the distance between the electronic equipment and the preset position is smaller than the specified distance, judging that the electronic equipment is positioned at the preset position; if the electronic equipment moves in a direction away from the preset position, judging that the electronic equipment is not at the preset position;
The volume information acquisition unit is used for acquiring the volume state of the electronic equipment and acquiring the audio playing mode of the electronic equipment if the position information represents that the electronic equipment is at a preset position;
and a volume control unit, configured to adjust the volume of the electronic device to a mute state if the volume state is an unmuted state and the audio play mode is an play mode, where the adjusting the volume of the electronic device to the mute state includes: and adjusting the volume of the electronic equipment to 0.
9. An electronic device comprising one or more processors and memory;
One or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-5 or 6.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, wherein the program code, when being executed by a processor, performs the method of any of claims 1-5 or 6.
CN202110037219.9A 2021-01-12 2021-01-12 Volume control method, volume control device, electronic equipment and storage medium Active CN114765644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110037219.9A CN114765644B (en) 2021-01-12 2021-01-12 Volume control method, volume control device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110037219.9A CN114765644B (en) 2021-01-12 2021-01-12 Volume control method, volume control device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114765644A CN114765644A (en) 2022-07-19
CN114765644B true CN114765644B (en) 2024-08-30

Family

ID=82362999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110037219.9A Active CN114765644B (en) 2021-01-12 2021-01-12 Volume control method, volume control device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114765644B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872746A (en) * 2015-11-26 2016-08-17 乐视网信息技术(北京)股份有限公司 Muting method according to use scenes and terminal device
CN108521521A (en) * 2018-04-19 2018-09-11 Oppo广东移动通信有限公司 volume adjusting method, mobile terminal and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130260784A1 (en) * 2012-03-29 2013-10-03 Christopher J. Lutz Personal electronic device locator
US20170187866A1 (en) * 2015-10-17 2017-06-29 Eric Qing Li Automatic Volume Control Based on Context and Location
CN110536012A (en) * 2019-08-28 2019-12-03 北京小米移动软件有限公司 The method and device of the outer playback amount of controlling terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872746A (en) * 2015-11-26 2016-08-17 乐视网信息技术(北京)股份有限公司 Muting method according to use scenes and terminal device
CN108521521A (en) * 2018-04-19 2018-09-11 Oppo广东移动通信有限公司 volume adjusting method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN114765644A (en) 2022-07-19

Similar Documents

Publication Publication Date Title
CN108683798B (en) Sound output control method and mobile terminal
CN109445739B (en) Audio playing method and device, electronic equipment and computer readable medium
CN109284080B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN109151194B (en) Data transmission method, device, electronic equipment and storage medium
CN109041024B (en) Code rate optimization method and device, electronic equipment and storage medium
CN109413526B (en) Earphone control method, earphone control device, electronic equipment and storage medium
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
WO2017181365A1 (en) Earphone channel control method, related apparatus, and system
CN112203206B (en) Microphone hole blockage detection method and related product
WO2020063046A1 (en) Audio playback method and device, electronic device and storage medium
CN109151212B (en) Equipment control method and device and electronic equipment
CN109151789B (en) Translation method, device and system and Bluetooth headset
US20210144498A1 (en) Method for Detecting Blocking of Microphone and Related Products
US10394330B2 (en) Devices and methods for facilitating wireless communications based on implicit user cues
CN107483731A (en) Control method, device and the storage medium and mobile terminal of audio broadcast sound volume
CN109271131B (en) Earphone control method and device, electronic equipment and storage medium
CN109257732B (en) Equipment control method and device and electronic equipment
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
CN109814798B (en) Ear return function control method and device and mobile terminal
CN107506168B (en) Volume adjusting method and device, terminal equipment and storage medium
CN109151669B (en) Earphone control method, earphone control device, electronic equipment and storage medium
WO2020082387A1 (en) Method for changing audio channel, and related device
CN114765644B (en) Volume control method, volume control device, electronic equipment and storage medium
CN113038317B (en) Earphone control method and device, bluetooth earphone 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