Volume adjustment method, electronic equipment and computer readable storage medium
By detecting the target scene and audio output status, combining physiological and environmental data, the volume of electronic devices is intelligently adjusted, which solves the problem of sudden noise in quiet scenes, and reduces frequent adjustments and user interference.
Patent Information
- Application Number
- CN202510402044.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, electronic devices are prone to make loud sounds due to failure to adjust the volume in time in a quiet scene, which leads to interference with others or exposing privacy, and frequent volume adjustment is inconvenient to operate.
By detecting whether the electronic device is in the target scene and audio output state, if so, the volume is adjusted to less than the current set volume, and combined with physiological data and ambient audio data, the volume is intelligently adjusted to reduce burst noise.
In scenarios where volume control is required, the volume is reduced or turned off only when the device outputs audio, which reduces the frequent adjustment of the device volume and improves the user experience.
Smart Images

Figure CN120335756A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a volume adjustment method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the popularization of electronic devices such as mobile phones and tablets, smartphones and tablets have become indispensable communication and entertainment tools for people.
[0003] However, these devices often encounter an embarrassing problem during use: in some quiet scenes where volume control is required (such as offices, libraries, conference rooms, hospital wards, etc.), the device suddenly makes a sound (such as incoming call ringtones, message alerts, or media playback sounds), and the user may not be able to find the volume adjustment button or software setting switch in time, resulting in the sound being played outward, disturbing others or exposing privacy.
[0004] Of course, when the phone is detected to be in a quiet scene where volume control is required, the device volume can be adjusted by lowering or turning off the volume. However, this adjustment method requires adjusting the device volume every time the device is detected to be in a quiet scene, resulting in the need to frequently adjust the device volume.
[0005] Therefore, how to intelligently adjust the volume of the device to reduce the situation where the electronic device suddenly makes a loud sound in a quiet scene and reduce the frequent adjustment of the volume of the device is a technical problem that needs to be solved urgently in the field of this technology.
[0006] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0007] The main purpose of the present application is to provide a volume adjustment method, an electronic device and a computer-readable storage medium, aiming to solve the technical problem of how to intelligently adjust the volume of a device to reduce the situation where the electronic device suddenly emits a loud sound in a quiet scene and reduce the frequent adjustment of the device volume.
[0008] To achieve the above object, the present application provides a volume adjustment method, which is applied to an electronic device and includes the following steps:
[0009] In the case where it is determined that the electronic device is in the target scene, detecting whether the electronic device is in an audio output state;
[0010] If it is detected that the electronic device is in an audio output state, the volume of the electronic device is adjusted from a first volume to a second volume, wherein the second volume is smaller than the first volume, and the first volume is the currently set volume of the electronic device.
[0011] In one embodiment, the step of adjusting the electronic device from the first volume to the second volume if it is detected that the electronic device is in the audio output state includes:
[0012] If it is detected that the electronic device is in the audio output state, obtain the physiological data of the user;
[0013] Detect whether the user is in a tense state according to the physiological data;
[0014] If it is detected that the user is in a tense state, adjust the electronic device from the first volume to the second volume.
[0015] In one embodiment, the physiological data is the user's heart rate and / or the user's breathing rate. The step of detecting whether the user is in a tense state according to the physiological data includes:
[0016] If the user's heart rate is greater than or equal to a preset heart rate threshold, and / or the user's breathing rate is greater than or equal to a preset frequency threshold, it is determined that the user is in a tense state.
[0017] In one embodiment, before the step of obtaining the physiological data of the user, the method further includes:
[0018] Obtain the screen display state of the electronic device;
[0019] If the screen display state is the screen-on state, execute the step of adjusting the electronic device from the first volume to the second volume;
[0020] If the screen display state is the screen-off state, execute the step of obtaining the physiological data of the user.
[0021] In one embodiment, the step of detecting whether the electronic device is in the audio output state according to the reference data includes:
[0022] If there is a media program in the currently running program of the electronic device and / or the currently set volume of the electronic device is not zero, it is determined that the electronic device is in the audio output state.
[0023] In one embodiment, the target scenario is a meeting scenario. Before the step of detecting whether the electronic device is in the audio output state when it is determined that the electronic device is in the target scenario, the method further includes:
[0024] Obtain the audio data of the environment where the electronic device is located;
[0025] If it is detected according to the audio data that the sound pressure level in the environment where the electronic device is located gradually decreases, it is determined that the electronic device is in the meeting scenario.
[0026] In one embodiment, the electronic device is a mobile terminal, the mobile terminal is connected to a wearable device, and after the step of adjusting the volume of the electronic device from a first volume to a second volume, the method further includes:
[0027] When a target feedback instruction sent by the wearable device is received, the volume of the mobile terminal is restored to the first volume;
[0028] Wherein, the target feedback instruction is an instruction for indicating the mobile terminal to exit the volume adaptive adjustment function.
[0029] In one embodiment, before the step of detecting whether the electronic device is in an audio output state, the method further includes:
[0030] If the electronic device is communicatively connected to a headphone device, obtain the headphone state of the headphone device;
[0031] If the headphone state indicates that the headphone device is in a worn state, output a prompt message through the headphone device and end the current volume adjustment process.
[0032] In addition, to achieve the above object, the present application further provides an electronic device, the electronic device includes: a memory, a processor, and a volume adjustment program stored on the memory and executable on the processor, and when the volume adjustment program is executed by the processor, the steps of the volume adjustment method as described above are implemented.
[0033] In addition, to achieve the above object, the present application further provides a readable storage medium, the readable storage medium is a computer-readable storage medium, and a program for implementing the volume adjustment method is stored on the computer-readable storage medium, and when the program for implementing the volume adjustment method is executed by a processor, the steps of the volume adjustment method as described above are implemented.
[0034] The present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the volume adjustment method as described above are implemented.
[0035] One or more technical solutions proposed by the present application have at least the following technical effects:
[0036] When it is determined that the electronic device is in the target scenario, this application detects whether the electronic device is in the audio output state; if it is detected that the electronic device is in the audio output state, the volume of the electronic device is adjusted from the first volume to the second volume, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device. In this way, when it is determined that the electronic device is in the target scenario, this application further detects the audio output state of the electronic device, and when the electronic device is in the audio output state, that is, when the electronic device is outputting audio, the volume of the electronic device is adjusted to the second volume to reduce or turn off the volume of the electronic device, so as to intelligently adjust the volume of the electronic device when the electronic device is in the target scenario that requires volume control and the electronic device is in the audio output state, so as to reduce the situation that the electronic device suddenly makes a loud noise in a quiet scenario. And when the electronic device is in the target scenario that requires volume control, but the device itself is not in the audio output state, that is, it is not outputting audio, the volume of the electronic device can be not adjusted, rather than adjusting the volume of the electronic device when it is detected that the electronic device is in the scenario that requires volume control, thus reducing the frequent adjustment of the device volume. Description of the Drawings
[0037] The drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with this application and used together with the description to explain the principles of this application.
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative labor.
[0039] Figure 1 It is a schematic flowchart of the first embodiment of the volume adjustment method of this application;
[0040] Figure 2 It is a schematic structural diagram of a mobile terminal related to an embodiment of the volume adjustment method of this application;
[0041] Figure 3 It is a schematic structural diagram of a wearable device related to an embodiment of the volume adjustment method of this application;
[0042] Figure 4 It is a schematic flowchart of the volume adjustment process related to an embodiment of the volume adjustment method of this application;
[0043] Figure 5 It is a schematic structural diagram of a device of the hardware operating environment related to the volume adjustment device in the embodiments of this application.
[0044] The realization of the purpose, functional features and advantages of this application will be further described with reference to the accompanying drawings in conjunction with the embodiments. Detailed implementation manners
[0045] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
[0046] In daily life, electronic devices such as smart phones and tablet computers have become indispensable communication and entertainment tools for people. However, these devices often encounter an embarrassing problem during use: in a quiet environment (such as a library, a meeting room, a hospital ward, etc.), the device suddenly makes a sound (such as a ringing tone for an incoming call, a message notification tone, or a media playback sound), and the user may not be able to find the volume adjustment button or the software setting switch in time, resulting in the sound being played externally, disturbing others or exposing privacy.
[0047] To avoid this situation, the existing solutions mainly focus on two levels: hardware and software. In terms of hardware, many devices are equipped with special mode adjustment buttons (such as a mute button or a volume button), and users can manually switch the device to the mute mode or the vibration mode. In terms of software, the device usually provides mode adjustment options, and users can select the "Do Not Disturb Mode" or the "Mute Mode" in the settings menu to control the device not to make a sound during a specific period.
[0048] However, these existing solutions all have a common defect: they rely on the active operation of the user. The user needs to manually change the mode of the device before entering a quiet environment, otherwise the device may still make a sound at an inappropriate time. In actual use, the user may forget to change the mode, or fail to operate in time when entering a quiet environment, resulting in the device making a sound, thus causing embarrassment or inconvenience.
[0049] Of course, when it is detected that the device is in a quiet scenario where the volume needs to be controlled, the volume of the device can be adjusted by reducing or turning off the volume. However, this adjustment method triggers the volume adjustment in some irrelevant situations. For example, although the device is in a quiet scenario, the device is actually not playing sound externally, resulting in frequent mis-triggering of the volume adjustment of the device.
[0050] Based on this, the main solution of this application is: when it is determined that the electronic device is in the target scenario, detect whether the electronic device is in the audio output state; if it is detected that the electronic device is in the audio output state, adjust the volume of the electronic device from the first volume to the second volume, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device.
[0051] In this application, when it is determined that the electronic device is in the target scenario, the audio output state of the electronic device is further detected, and when the electronic device is in the audio output state, that is, when the electronic device is outputting audio, the volume of the electronic device is adjusted to the second volume to reduce or turn off the volume of the electronic device, so as to intelligently adjust the volume of the electronic device when the electronic device is in the target scenario where the volume needs to be controlled and the electronic device is in the audio output state, so as to reduce the situation that the electronic device suddenly makes a loud noise in a quiet scenario. And when the electronic device is in the target scenario where the volume needs to be controlled, but the device itself is not in the audio output state, that is, it is not playing audio externally, the volume of the electronic device can be not adjusted, rather than adjusting the volume of the electronic device when it is detected that the electronic device is in the scenario where the volume needs to be controlled, thus reducing the frequent adjustment of the device volume.
[0052] It should be noted that the execution subject of each embodiment of the volume adjustment method of this application can be an electronic device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., and the volume adjustment method of this application does not make specific limitations on this.
[0053] Based on this, the volume adjustment method of the first embodiment of this application is proposed. Please refer to Figure 1 , the volume adjustment method includes steps S10 to S20:
[0054] Step S10, when it is determined that the electronic device is in the target scenario, detect whether the electronic device is in the audio output state;
[0055] The target scenario refers to a scenario where the volume of an electronic device needs to be controlled. For example, specifically, it can be any one of a meeting scenario, a work scenario, a home scenario, or an out-and-about scenario. This embodiment does not make specific limitations thereto. The electronic device can determine the scenario in which the electronic device is located based on the location information of the electronic device, the current time, or the current ambient audio. For example, taking the target scenario as a meeting scenario, if the current ambient audio indicates a transition from a noisy environment to a quiet environment, it is determined that the scenario in which the electronic device is located is a meeting scenario, that is, the electronic device is in the target scenario. Another example is that the target scenario is a home scenario. If the location information of the electronic device indicates that the location of the electronic device is within the coverage of a preset home scenario, it is determined that the scenario in which the electronic device is located is a home scenario, that is, the electronic device is in the target scenario. Another example is that the target scenario is a work scenario. If the current time is the same as the working time set by the user, it is determined that the scenario in which the electronic device is located is a work scenario, that is, the electronic device is in the target scenario.
[0056] It should be noted that determining that the electronic device is in the target scenario can be achieved in the following ways:
[0057] I. User setting. For example, the first scenario is a meeting scenario. When the user is in a meeting, the scenario in which the electronic device is located is set to a meeting scenario, and it is determined that the electronic device is in the target scenario. Another example is that the first scenario is a work scenario. When the user is at the work location, the scenario in which the electronic device is located is set to a work scenario, and it is determined that the electronic device is in the target scenario.
[0058] II. Automatic determination. For example, when the electronic device detects that the current ambient audio indicates a transition from a noisy environment to a quiet environment, it is determined that the electronic device is in the target scenario; another example is that when the electronic device detects that the location information of the electronic device is within a preset range, it is determined that the electronic device is in the target scenario; another example is that when the electronic device detects that the current time is within a preset time period, it is determined that the electronic device is in the target scenario.
[0059] After determining that the electronic device is in the target scenario, it is detected whether the electronic device is in an audio output state, where the audio output state refers to a state where the electronic device is currently outputting or can output audio. For example, the speaker (also known as the horn) of the electronic device is currently outputting sound, and the volume of the speaker of the electronic device is not turned off.
[0060] Step S20, if it is detected that the electronic device is in the audio output state, the electronic device is adjusted from a first volume to a second volume, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device.
[0061] It should be noted that the volume of the electronic device includes one or more of the media volume, alarm volume, notification volume, or incoming call volume of the electronic device. Among them, the media volume is specifically the volume of each application software (such as music software, video software, chat software, game software, etc.), the alarm volume is the volume when the alarm rings, the notification volume is specifically the volume when the system notifies and reminds (such as text message, WeChat message notification, application update reminder, schedule reminder, important event reminder, etc.), and the incoming call volume is the ringtone volume played when an incoming call is received.
[0062] If it is detected that the electronic device is in the audio output state, it means that the electronic device is currently outputting audio. At this time, the volume of the electronic device is adjusted from the first volume to the second volume. Among them, the second volume can be any value less than the first volume, such as 0. The first volume is the current set volume of the electronic device, specifically it can be the volume set by the user most recently. And it should be noted that one or more of the media volume, alarm volume, notification volume, or incoming call volume of the electronic device can be adjusted from the first volume to the corresponding second volume respectively. Preferably, the second volume can be selected to be less than all the first volumes to uniformly adjust one or more of the media volume, alarm volume, notification volume, or incoming call volume of the electronic device to this second volume. For example, in a specific embodiment, assume that the current media volume of the electronic device is 3, the alarm volume is 4, the notification volume is 2, and the incoming call volume is 2, and the second volume can be selected as 0. Then the media volume, alarm volume, notification volume, and incoming call volume of the electronic device can be adjusted to 0, so as to uniformly adjust the four first volumes of [3, 4, 2, 2] to the second volume of 0.
[0063] If it is detected that the electronic device is not in the audio output state, the volume of the electronic device may not be adjusted.
[0064] Furthermore, after the volume of the electronic device is adjusted from the first volume to the second volume, the electronic device can also output a prompt message to prompt the user that the volume of the electronic device has been reduced or turned off, so as to achieve the purpose of reminding the user to restore the volume of the electronic device in time based on the actual situation, and to reduce the phenomenon that the volume of the electronic device is not restored in time after the volume of the electronic device is reduced or turned off.
[0065] Furthermore, after the volume of the electronic device is adjusted from the first volume to the second volume by using the volume adaptive adjustment function, if it is detected that the user intervenes in the operation, the adaptive adjustment function can be exited. Among them, the user intervention operation can be any one of the operations of increasing the volume, decreasing the volume, and exiting the adaptive adjustment function.
[0066] In this embodiment, when it is determined that the electronic device is in the target scenario, it is detected whether the electronic device is in the audio output state; if it is detected that the electronic device is in the audio output state, the electronic device is adjusted from the first volume to the second volume, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device. In this way, in this embodiment, when it is determined that the electronic device is in the target scenario, the audio output state of the electronic device is further detected, and when the electronic device is in the audio output state, that is, when the electronic device is outputting audio, the volume of the electronic device is adjusted to the second volume to reduce or turn off the volume of the electronic device, so as to intelligently adjust the volume of the electronic device when the electronic device is in the target scenario where the volume needs to be controlled and the electronic device is in the audio output state, so as to reduce the situation that the electronic device suddenly makes a loud noise in a quiet scenario. And when the electronic device is in the target scenario where the volume needs to be controlled, but the device itself is not in the audio output state, that is, it is not outputting audio, the volume of the electronic device can be not adjusted, rather than adjusting the volume of the electronic device when it is detected that the electronic device is in the scenario where the volume needs to be controlled, thus reducing the frequent adjustment of the device volume.
[0067] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as in the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated hereinafter. On this basis, the step of if it is detected that the electronic device is in the audio output state, then adjusting the electronic device from the first volume to the second volume includes:
[0068] Step A10, if it is detected that the electronic device is in the audio output state, obtain the physiological data of the user;
[0069] Wherein, the physiological data of the user refers to the information about the human physiological state collected through various sensors or other devices, and these data are usually collected by wearable devices (such as smart watches, bracelets), medical devices or embedded sensors. Further, the physiological data of the user can be obtained periodically, and the subsequent steps are executed to timely reduce or turn off the volume of the electronic device when it is detected that the user is in a tense state.
[0070] Step A20, detect whether the user is in a tense state according to the physiological data;
[0071] It can be understood that when the user is in a tense state, the physiological data is usually different from the data in the normal state, so it can be detected whether the user is in a tense state according to the physiological data based on this difference.
[0072] Step A30, if it is detected that the user is in a tense state, adjust the electronic device from the first volume to the second volume.
[0073] It should be noted that if it is detected that the user is not in a tense state, the volume of the electronic device is adjusted.
[0074] It can be understood that in a target scenario, if the electronic device suddenly outputs audio (such as a sudden message notification sound, incoming call ringtone, alarm sound, etc.), it usually makes the user feel embarrassed and causes a tense emotion. Based on this, in this embodiment, when it is detected that the electronic device is in an audio output state, it is further detected whether the user is in a tense state. When it is detected that the user is in a tense state, the volume of the electronic device is reduced or turned off. In this way, when the electronic device suddenly outputs audio and makes the user feel embarrassed, the volume of the electronic device is timely reduced or turned off to achieve adaptive adjustment of the device volume.
[0075] In a possible implementation manner, the physiological data is the user's heart rate and / or the user's breathing rate. The step of detecting whether the user is in a tense state based on the physiological data includes:
[0076] Step A201, if the user's heart rate is greater than or equal to a preset heart rate threshold, and / or the user's breathing rate is greater than or equal to a preset frequency threshold, it is determined that the user is in a tense state.
[0077] The user's heart rate can be specifically collected by a heart rate sensor, and the user's breathing rate can be specifically collected by a photoelectric sensor.
[0078] It should be noted that if the electronic device itself cannot directly collect the user's physiological data, for example, the electronic device is a mobile phone that cannot collect the user's heart rate or breathing rate, the user's physiological data can be obtained from a wearable device (such as headphones, bracelets, watches, etc.) connected to the electronic device, and the wearable device is a device integrated with a sensor that can collect the user's physiological data.
[0079] On the contrary, if the user's heart rate is less than the preset heart rate threshold, or / and the user's breathing rate is less than the preset frequency threshold, it is determined that the user is not in a tense state.
[0080] It can be understood that when the user is in a tense state, there are usually phenomena such as an accelerated heart rate and an accelerated breathing rate. Based on this, this application obtains the user's heart rate and / or the user's breathing rate to quickly and effectively detect whether the user is in a tense state based on the user's heart rate and / or the user's breathing rate.
[0081] Further, before the step of obtaining the physiological data of the user, the method further includes:
[0082] Step C10, obtaining the screen display state of the electronic device;
[0083] Step C20, if the screen display state is the screen-on state, then execute the step of adjusting the electronic device from the first volume to the second volume;
[0084] The screen-on state refers to the state where the screen of the electronic device is in the on state and can display content (such as interfaces, applications, videos, etc.). When the electronic device is in the screen-on state, when obtaining the device data of the electronic device and when the electronic device is running a program with an audio output requirement, the volume of the electronic device is timely reduced or turned off.
[0085] Considering that when the electronic device is in the screen-on state, the user is usually using the electronic device and the user's attention should also be on the electronic device. At this time, the external sound of the electronic device may not have a great impact on the user's emotional state. Based on this, in the screen-on state, when it is detected that the electronic device is in the audio output state, the volume of the electronic device is adjusted.
[0086] Step C30, if the screen display state is the screen-off state, then execute the step of obtaining the physiological data of the user.
[0087] The screen-off state refers to the state where the screen of the electronic device is in the off state and does not display any content. When the electronic device is in the screen-off state, the physiological data of the user is obtained to timely reduce or turn off the volume of the electronic device when the electronic device suddenly outputs audio due to reasons such as incoming calls, notifications, alarms, etc.
[0088] Considering that when the electronic device is in the screen-off state, the user is usually not using the electronic device and the user's attention should not be on the electronic device. At this time, the sudden external sound of the electronic device usually affects the user's emotional state. Based on this, in the screen-off state, when it is detected that the electronic device is in the audio output state, the physiological data of the user is further obtained to detect whether the user is in a tense state.
[0089] Further, the step of detecting whether the electronic device is in the audio output state according to the reference data includes:
[0090] Step D10, if there is a media program and / or in the currently running programs of the electronic device, and the currently set volume of the electronic device is not zero, then determine that the electronic device is in the audio output state.
[0091] The currently running program refers to all the currently running tasks or processes in the electronic device, including foreground programs and background programs. A media program (Media Application) refers to a program that is used to manage and play multimedia content (including audio, video, etc.) and has an audio output requirement.
[0092] Further, when it is detected that there is a media program in the currently running program of the electronic device, the running of the media program in the currently running program can also be terminated, that is, the media program currently running in the electronic device is closed, so as to intelligently close the media program of the electronic device, reduce the power consumption of the electronic device, and thus improve the battery life of the electronic device.
[0093] It should be noted that when the screen display state of the electronic device is the lit screen state, it can be when there is a media program in the currently running program of the electronic device, it is determined that the electronic device is in the audio output state. In this way, by obtaining the program currently running on the electronic device, the rapid detection of whether the electronic device is in the audio output state is realized, so as to quickly adjust the volume of the device when the electronic device is running a program with an audio output requirement, and realize the timely adjustment of the device volume. When the screen display state of the electronic device is the screen-off state, even if the media program that is not closed on the electronic device is usually suspended, at this time, the electronic device has a high possibility of playing external audio due to factors such as receiving notifications, incoming calls, and messages. Based on this, when the screen display state of the electronic device is the screen-off state, it can be when the currently set volume of the electronic device is not zero, it is determined that the electronic device is in the audio output state.
[0094] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the content that is the same as or similar to the above-mentioned first embodiment and the second embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, the target scenario is a meeting scenario. Before the step of detecting whether the electronic device is in the audio output state when it is determined that the electronic device is in the target scenario, the method further includes:
[0095] Step E10, obtaining audio data of the environment where the electronic device is located;
[0096] The audio data can be the audio collected by the microphone on the electronic device, and the electronic device can collect the audio data in the environment in real time, so as to facilitate the perception of the change of the sound in the environment.
[0097] Step E20, if it is detected according to the audio data that the sound pressure level in the environment where the electronic device is located gradually decreases, it is determined that the electronic device is in the meeting scenario.
[0098] It can be understood that the sound pressure level of the sound can be calculated according to the audio data. Specifically, the existing sound pressure level calculation method can be used to obtain the sound pressure level, and the specific calculation method of the sound pressure level will not be elaborated in this embodiment.
[0099] It should be noted that the sound pressure level of the audio data in each time window can be calculated in units of time windows to determine whether the sound level in the environment is gradually decreasing.
[0100] When the sound pressure level in the environment gradually decreases, it indicates that the electronic device moves from a noisy environment to a quiet environment. For example, when moving from an office to a meeting room, it is determined that the electronic device is in a meeting scenario, and the subsequent volume adjustment process is carried out. When it is recognized that the electronic device moves from a noisy environment to a quiet environment, the device volume can be intelligently adjusted to reduce the phenomenon that the electronic device makes a relatively loud sound and causes embarrassment to the user when the user enters a quiet environment.
[0101] In a possible implementation manner, the electronic device is a mobile terminal, and the mobile terminal is connected to a wearable device. After the step of adjusting the electronic device from a first volume to a second volume, the method further includes:
[0102] Step F10, when receiving a target feedback instruction sent by the wearable device, restore the volume of the mobile terminal to the first volume; wherein, the target feedback instruction is an instruction indicating that the mobile terminal exits the volume adaptive adjustment function.
[0103] A mobile terminal, also known as a mobile device, refers to an electronic device that can be conveniently carried by a user and used anytime and anywhere, such as a mobile phone, a tablet computer, etc.
[0104] In this embodiment, the connection between the mobile terminal and the wearable device means that the mobile terminal is communicatively connected to the wearable device. The connection manners of the communicative connection include but are not limited to Bluetooth communicative connection, Wi-Fi (Wireless Fidelity) communicative connection, ZigBee communicative connection, NFC (Near Field Communication) communicative connection, infrared communicative connection, etc.
[0105] When the mobile terminal is connected to the wearable device, the user can restore the volume of the mobile terminal through the wearable device to exit the volume adaptive adjustment function of the mobile terminal. Specifically, when the wearable device detects a preset operation of the user, a target feedback instruction is generated to the mobile terminal, so that after receiving the target feedback instruction, the mobile terminal restores the volume and exits the volume adaptive adjustment function. Among them, the preset operation can be an operation set in advance by the user to exit the volume adaptive adjustment function. For example, it can be a touch, a tap, a press, an exit instruction selected on a preset volume adaptive adjustment function management interface, etc. This embodiment does not make specific limitations on this.
[0106] In this embodiment, when the mobile terminal receives the target feedback instruction sent by the wearable device, the volume of the mobile terminal is restored to the first volume. In this way, the user can restore the volume of the mobile terminal through the wearable device. Thus, when the user wears the wearable device to use the mobile terminal, the volume of the mobile terminal can be conveniently restored by operating the wearable device, thereby improving the convenience of user operation and the user experience.
[0107] In a possible implementation manner, before the step of detecting whether the electronic device is in an audio output state, the method further includes:
[0108] Step G10, if the electronic device is communicatively connected to the headphone device, obtain the headphone state of the headphone device;
[0109] In this embodiment, the connection methods of the communication connection between the electronic device and the headphone device include but are not limited to Bluetooth communication connection, Wi-Fi communication connection, ZigBee communication connection, NFC communication connection, infrared communication connection, etc.
[0110] A headphone device refers to an electronic device that can be worn on the ear and is used to receive and play audio signals. For example, TWS (True Wireless Stereo) headphones, OWS (Open Wearable Stereo) headphones, etc. It should be noted that the headphone device may include one headphone or two headphones.
[0111] The headphone state of the headphone device includes a worn state, a dropped state, and an in-case state. The worn state can be the state when the headphones are worn on the user's ears. The in-case state can be the state when the headphones are placed in the charging case. The dropped state can be the state when the headphones fall from the ears but are not placed in the charging case. The headphone state of the headphones can be detected by a wearing detection sensor built in the headphones. When it is detected that the charging contacts in the headphones and the charging case are connected, it is determined that the headphones are in the in-case state. If the charging contacts in the headphones and the charging case are not connected, it can be determined that the headphones are not in the in-case state. At this time, it can be further determined whether the headphones are in the worn state or the dropped state.
[0112] Specifically, it can be determined by the wearing detection sensor in the headphones, that is, comparing the value obtained by the wearing detection sensor with a pre-set threshold. If the value obtained by the wearing detection sensor is less than the threshold, it can be determined that the headphones are far from the user's ears and the headphones are in the dropped state. That is, the signal in the wearing detection sensor is output through the speaker and the signal is received by the microphone, and the signal received by the microphone is used as the value of the sensor. Among them, the closer the headphones are to the user, the greater the signal value collected by the wearing detection sensor.
[0113] It is also possible to determine whether the earphone is in a worn state or a dropped state through distance detection. That is, when the wearing sensor in the earphone detects a human ear, the wearing sensor emits a trigger signal, determines the distance between the earphone and the human ear according to the trigger signal, and then compares the distance with a pre-set distance. If the distance is less than the pre-set distance, it is determined that the earphone is in a worn state; if the distance is greater than or equal to the pre-set distance, it is determined that the earphone is in a dropped state.
[0114] It should be noted that the above is only a feasible embodiment for detecting the state of the earphone provided in this embodiment, but does not limit the detection method of the earphone state.
[0115] Step G20, if the earphone state indicates that the earphone device is in a worn state, output a prompt message through the earphone device, and end the current volume adjustment process.
[0116] It should be noted that it can be in the case where it is determined that the electronic device is in the target scenario, and step G10 is executed to output a prompt message through the earphone device when the user wears the earphone to use the electronic device, so as to notify the user that the current is in the target scenario where the volume needs to be controlled, facilitating the user to perform subsequent operations based on actual needs.
[0117] Exemplarily, in order to help understand the technical concept or technical principle of the volume adjustment method after combining this embodiment with the first embodiment and the second embodiment, a specific embodiment is now listed. In this specific embodiment, the volume adjustment method is applied to a mobile terminal, and the mobile terminal is communicatively connected to a wearable device. Specifically, referring to Figure 2 As shown, the mobile terminal includes an audio input / output unit (specifically a microphone and a speaker), a screen state recognition module, a program running detection module, a wireless module and a microprocessor. Among them, the audio input / output unit, the screen state recognition module, the program running detection module and the wireless module are respectively connected to the microprocessor. Referring to Figure 3 As shown, the wearable device includes a wireless module, a microprocessor and a heart rate detection module. Among them, the wireless module and the heart rate detection module are respectively connected to the microprocessor. The mobile terminal and the wearable device are communicatively connected through the wireless module. The wireless module can be composed of a chip based on protocols such as WI-FI or Bluetooth. The microprocessor can be composed of a single chip. The microphone is used to collect ambient sound, the speaker is used to output audio externally, the program running detection module is used to identify the current program running state of the mobile terminal, the screen state recognition module is used to detect the screen display state of the mobile terminal, and the heart rate detection module is used to detect the user's heart rate. Based on this, referring to Figure 4 As shown, the volume adjustment process includes:
[0118] Step S11, the mobile terminal collects ambient sound through the microphone, that is, collects the audio data of the environment where the mobile terminal is located.
[0119] Step S12, determine whether the mobile terminal is in the target scenario according to the collected ambient sound. If so, execute Step S13. If not, return to Step S11. Specifically, if the collected ambient sound indicates that the mobile terminal enters a quiet environment from a noisy environment, it is determined that the mobile terminal is in the target scenario.
[0120] Step S13, obtain the screen display status of the mobile terminal.
[0121] Step S14, determine whether the mobile terminal is in the screen-on state according to the screen display status. If so, execute Step S15. If not, execute Step S17.
[0122] Step S15, when the mobile terminal is in the screen-on state, obtain the currently running program in the mobile terminal.
[0123] Step S16, determine whether there is a media program in the currently running program. If so, execute Step S19. If not, return to execute Step S15.
[0124] Step S17, obtain the user's heart rate from the wearable device.
[0125] Step S18, determine whether the current set volume of the mobile terminal is zero. If it is not zero ( Figure 4 not shown in the figure), periodically determine whether the user's heart rate is greater than the preset threshold. If it is greater than the preset threshold, execute Step S19. If it is less than or equal to the preset threshold, return to execute Step S17.
[0126] Step S19, adjust the volume of the mobile terminal to zero, that is, turn off the speaker output of the mobile terminal.
[0127] It should be noted that the above examples are only used to assist in understanding the present application and do not constitute a limitation on the volume adjustment process of the present application. Based on this technical concept, more forms of simple transformation are within the protection scope of the present application.
[0128] In addition, an embodiment of the present application also proposes a volume adjustment device, and the volume adjustment device includes:
[0129] A detection module, configured to detect whether the electronic device is in an audio output state when it is determined that the electronic device is in the target scenario;
[0130] An adjustment module, configured to adjust the electronic device from a first volume to a second volume if it is detected that the electronic device is in an audio output state, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device.
[0131] The volume adjustment device provided in the embodiments of the present application can solve the technical problems of how to intelligently adjust the volume of the device to reduce the situation where the electronic device suddenly emits a large sound in a quiet scene and reduce the frequent adjustment of the device volume. Compared with the prior art, the beneficial effects of the volume adjustment device provided in the present application are the same as those of the volume adjustment method provided in the above embodiments, and other technical features in the volume adjustment device are the same as the features disclosed in the method of the previous embodiment, which will not be elaborated here.
[0132] In addition, an electronic device is further proposed in the embodiments of the present application. The electronic device includes a memory, a processor, and a volume adjustment program stored on the memory and executable on the processor. When the volume adjustment program is executed by the processor, the steps of the volume adjustment method as described above are implemented.
[0133] Reference Figure 5 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may further include, but is not limited to, mobile terminals such as mobile phones, tablet computers, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0134] Such as Figure 5As shown, the electronic device may include a processing system 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage system 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the electronic device are also stored. The processing system 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input system 1007 including, for example, a touch screen, a touchpad, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output system 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage system 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication system 1009. The communication system 1009 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an electronic device having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.
[0135] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are performed.
[0136] The electronic device provided by the embodiments of the present application adopts the volume adjustment method in the above embodiments, which can solve the technical problems of how to intelligently adjust the volume of the device to reduce the situation that the electronic device suddenly emits a relatively large sound in a quiet scene and reduce the frequent adjustment of the device volume. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as those of the volume adjustment method provided by the above embodiments, and other technical features in the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0137] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0138] As mentioned above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0139] In addition, to achieve the above object, an embodiment of this application further provides a readable storage medium, having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the volume adjustment method in the above embodiments.
[0140] The computer-readable storage medium provided by the embodiment of this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0141] The above computer-readable storage medium can be included in an electronic device; it can also exist separately without being assembled into the electronic device.
[0142] The above computer-readable storage medium stores one or more programs which, when executed by an electronic device, cause the electronic device to: when determining that the electronic device is in a target scenario, detect whether the electronic device is in an audio output state; if it is detected that the electronic device is in an audio output state, adjust the volume of the electronic device from a first volume to a second volume, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device.
[0143] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., by connecting through an Internet service provider via the Internet).
[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0145] The modules described in the embodiments of the present application may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0146] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above volume adjustment method, which can solve the technical problems of how to intelligently adjust the volume of the device to reduce the situation where the electronic device suddenly emits a large sound in a quiet scenario and reduce the frequent adjustment of the device volume. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the volume adjustment method provided by the above embodiments, and will not be elaborated here.
[0147] In addition, an embodiment of this application also proposes a computer program product, including a volume adjustment program. When the volume adjustment program is executed by a processor, it implements the steps of the volume adjustment method as described above.
[0148] The specific implementation manners of the computer program product of this application are basically the same as those of the embodiments of the above volume adjustment method, and will not be elaborated here.
[0149] It should be noted that in this article, the term "including", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0150] The serial numbers of the above embodiments of this application are only for description and do not represent the superiority or inferiority of the embodiments.
[0151] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software sensor. This computer software sensor is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0152] The above are only the preferred embodiments of this application, and do not limit the patent scope of this application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of this application.
Claims
1. A volume adjustment method, characterized in that, The volume adjustment method is applied to an electronic device, and the volume adjustment method includes the following steps: When it is determined that the electronic device is in a target scenario, detect whether the electronic device is in an audio output state; If it is detected that the electronic device is in an audio output state, adjust the electronic device from a first volume to a second volume, where the second volume is less than the first volume, and the first volume is the currently set volume of the electronic device.
2. The volume adjustment method according to claim 1, wherein The step of, if it is detected that the electronic device is in an audio output state, adjusting the electronic device from a first volume to a second volume, includes: If it is detected that the electronic device is in an audio output state, obtain the physiological data of the user; Detect whether the user is in a tense state based on the physiological data; If it is detected that the user is in a tense state, adjust the electronic device from the first volume to the second volume.
3. The volume adjustment method according to claim 2, characterized in that The physiological data is the user's heart rate and / or the user's breathing rate, and the step of detecting whether the user is in a tense state based on the physiological data includes: If the user's heart rate is greater than or equal to a preset heart rate threshold, and / or the user's breathing rate is greater than or equal to a preset frequency threshold, it is determined that the user is in a tense state.
4. The volume adjustment method according to claim 2, wherein, Before the step of obtaining the physiological data of the user, the method further includes: Obtain the screen display state of the electronic device; If the screen display state is a lit screen state, execute the step of adjusting the electronic device from the first volume to the second volume; If the screen display state is a screen-off state, execute the step of obtaining the physiological data of the user.
5. The volume adjustment method according to any one of claims 1 to 4, characterized in that The step of detecting whether the electronic device is in an audio output state based on the reference data includes: If there is a media program in the currently running program of the electronic device and / or the currently set volume of the electronic device is not zero, it is determined that the electronic device is in an audio output state.
6. The volume adjustment method according to any one of claims 1 to 4, characterized in that The target scenario is a meeting scenario. Before the step of, when it is determined that the electronic device is in the target scenario, detecting whether the electronic device is in an audio output state, the method further includes: Obtain the audio data of the environment where the electronic device is located; If it is detected based on the audio data that the sound pressure level in the environment where the electronic device is located is gradually decreasing, it is determined that the electronic device is in a meeting scenario.
7. The volume adjustment method according to any one of claims 1 to 4, characterized in that The electronic device is a mobile terminal, the mobile terminal is connected to a wearable device, and after the step of adjusting the electronic device from the first volume to the second volume, the method further includes: When receiving a target feedback instruction sent by the wearable device, restore the volume of the mobile terminal to the first volume; Wherein, the target feedback instruction is an instruction for instructing the mobile terminal to exit the volume adaptive adjustment function.
8. The volume adjustment method according to any one of claims 1 to 4, characterized in that, Before the step of detecting whether the electronic device is in an audio output state, the method further includes: If the electronic device is communicatively connected to a headphone device, obtain the headphone state of the headphone device; If the headphone state indicates that the headphone device is in a worn state, output a prompt message through the headphone device and end the current volume adjustment process.
9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a volume adjustment program stored on the memory and executable on the processor. When the volume adjustment program is executed by the processor, the steps of the volume adjustment method described in any one of claims 1 to 8 are implemented.
10. A readable storage medium, characterized in that, The readable storage medium is a computer-readable storage medium. A program for implementing the volume adjustment method is stored on the computer-readable storage medium. The program for implementing the volume adjustment method is executed by the processor to implement the steps of the volume adjustment method described in any one of claims 1 to 8.