A volume adjustment method, device, terminal and storage medium
By obtaining environmental parameters and judging the headphone access status, the volume of the terminal device is adjusted, which solves the problem of excessive volume before going to bed or in a quiet environment, and improves user experience and environmental tranquility.
Patent Information
- Application Number
- CN202110193531.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-20
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-02-20
AI Technical Summary
When using a terminal device, especially before going to bed or in a quiet environment, it is easy to forget to adjust the volume, causing the sound to be too loud, affecting the user experience and the tranquility of the surrounding environment.
By obtaining environmental parameters, such as noise value and light intensity, it is determined whether the preset conditions are met, and based on these parameters, it is judged whether to connect the earphones. If so, the earphone playback volume is adjusted to ensure that the appropriate volume is maintained in a quiet environment.
It effectively improves the user experience, avoids excessive sound played by headphones in a quiet environment, and ensures that users can enjoy a quiet environment before going to bed.
Smart Images

Figure CN114979360B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of terminal equipment, and in particular to a volume adjustment method, device, terminal and storage medium. Background Art
[0002] With the rapid development of terminal devices, terminal devices are becoming more and more intelligent, and people's lives have become inseparable from terminal devices. For example, after turning off the lights at night, users are often accustomed to lying in bed and using smartphones to read graphic news to adjust their life interests.
[0003] However, when you are reading graphic news for a long time, you may come across a video that interests you and open it to watch. At this time, you forget to adjust the volume. As a result, the sound is relatively loud when it is played, which seems particularly abrupt. If you live with someone, it is easy to disturb your roommates. Or if the user is wearing headphones before going to bed, he may forget to adjust the volume, resulting in a loud video playback problem. Although it will not disturb others, it is not very user-friendly for the headphone wearer himself. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a volume adjustment method, device, terminal and storage medium, which can appropriately adjust the playback volume of the terminal when the user's surrounding environment changes.
[0005] In a first aspect, an embodiment of the present invention provides a volume adjustment method, the method comprising:
[0006] Get the environment parameters in the current environment;
[0007] Determining whether the environmental parameters meet preset environmental conditions;
[0008] If the environmental parameters meet the preset environmental conditions, determining whether to connect the headset;
[0009] If the earphone is connected, the playback volume of the earphone is adjusted according to the environmental parameters.
[0010] In some embodiments, after determining whether the headset is connected, the method further includes:
[0011] If the earphone is not connected, detecting the current volume value;
[0012] Determining a first preset volume value according to the environmental parameter;
[0013] The current volume value is adjusted to the first pre-adjusted volume value.
[0014] In some embodiments, if the earphone is connected, adjusting the playback volume of the earphone according to the environmental parameter includes:
[0015] If the headset is connected, detecting the current state of the headset;
[0016] If it is detected that the current state is a preset state, or the current state changes to the preset state, the playback volume of the earphone is adjusted according to the environmental parameters.
[0017] In some embodiments, the preset state is a state in which the angle between the central axis of the headset and the horizontal coordinate of the world coordinate system is less than a preset angle.
[0018] In some embodiments, adjusting the playback volume of the headset according to the environmental parameter includes:
[0019] Detecting the current playback volume value of the earphone;
[0020] Calculating a second preset volume value according to the environmental parameter;
[0021] The current playback volume value is adjusted to the second pre-adjusted volume value.
[0022] In some embodiments, the method further comprises:
[0023] After the current volume value is adjusted to the first pre-adjusted volume value, or the current playing volume value is adjusted to the second pre-adjusted volume value, a volume adjustment notification is pushed to the screen.
[0024] In some embodiments, the environmental parameters include an environmental noise value and / or an environmental light intensity, and obtaining the environmental parameters in the current environment includes:
[0025] Acquiring the ambient noise value in the current environment through a noise sensor; and / or
[0026] The ambient light intensity in the current environment is obtained through an ambient light sensor.
[0027] In some embodiments, the determining whether the environmental parameter satisfies a preset environmental condition includes:
[0028] Determine whether the environmental noise value is less than a preset noise value; and / or
[0029] Determining whether the ambient light intensity is less than a preset light intensity;
[0030] If the environmental noise value is less than the preset noise value, and / or the environmental light intensity is less than the preset light intensity, it is determined that the environmental parameters meet the preset environmental conditions.
[0031] In a second aspect, an embodiment of the present invention further provides a volume adjustment device, the device comprising:
[0032] Environmental parameter acquisition module, used to obtain environmental parameters in the current environment;
[0033] A first judgment module, used to judge whether the environmental parameters meet the preset environmental conditions;
[0034] A second judgment module, used for judging whether to connect the earphone if the environmental parameter meets the preset environmental condition;
[0035] The headphone volume adjustment module is used to adjust the playback volume of the headphone according to the environmental parameters if the headphone is connected.
[0036] In a third aspect, an embodiment of the present invention further provides a chip, comprising:
[0037] The processor is used to call and run a computer program from the memory, so that the device equipped with the chip executes the method as described above.
[0038] In a fourth aspect, an embodiment of the present invention further provides a terminal, the terminal comprising:
[0039] at least one processor, and
[0040] A memory, wherein the memory is communicatively connected to the at least one processor, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above method.
[0041] In a fifth aspect, an embodiment of the present invention further provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a terminal, the terminal executes the method as described above.
[0042] In a sixth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a terminal, the terminal executes the above method.
[0043] Compared with the prior art, the present application has at least the following beneficial effects: the volume adjustment method, device, terminal and storage medium of the embodiments of the present invention obtain environmental parameters in the current environment, for example, the environmental parameters may include environmental noise values and / or environmental light intensity, and determine whether the environmental parameters meet the preset environmental conditions. If so, it means that the environment in which the user is located at this time is a relatively quiet environment with dim light and / or low noise. At this time, it is determined whether the terminal is connected to the earphone. When the terminal is connected to the earphone, the playback volume of the earphone is adjusted according to the environmental parameters, so that the user will not wear the earphones and play loudly in a relatively quiet environment before going to bed, thereby effectively improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0045] Figure 1 is a schematic structural diagram of an embodiment of a terminal of the present invention;
[0046] Figure 2 is a flow chart of an embodiment of a volume adjustment method of the present invention;
[0047] Figure 3 is a schematic diagram of headphones according to an embodiment of the volume adjustment method of the present invention;
[0048] Figure 4 Schematic diagram of headphones according to an embodiment of the volume adjustment method of the present invention
[0049] Figure 5 It is a structural schematic diagram of an embodiment of a volume adjustment device of the present invention;
[0050] Figure 6 It is a structural schematic diagram of an embodiment of the volume adjustment device of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The terminal may be a mobile phone, a tablet computer, or an electronic device with a visual screen and / or a communication function. The terminal may be connected to a headset or other sound playback device, and the headset may be a wireless headset such as a Bluetooth headset or other wired headset. When the surrounding environment of the user's terminal changes, the playback volume of the terminal is appropriately adjusted.
[0053] Figure 1 The hardware structure of the terminal 100 is schematically shown. Figure 1 As shown, the terminal 100 includes a memory 11 and a processor 12, and the processor 12 is connected to the memory 11. Those skilled in the art can understand that Figure 1 The structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or combine or separate some components, or arrange the components differently.
[0054] Among them, the memory 11, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 11 may optionally include a memory remotely arranged relative to the processor 12, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0055] The processor 12 is the control center of the terminal, and uses various interfaces and lines to connect various parts of the entire terminal. By running or executing software programs and / or modules stored in the memory 11 and calling data stored in the memory 11, it executes various functions of the terminal and processes data, thereby monitoring the terminal as a whole, for example, implementing the volume adjustment method described in any embodiment of the present invention.
[0056] The processor 12 may be one or more, Figure 1 A processor 12 is taken as an example. The processor 12 and the memory 11 may be connected via a bus or other means. Figure 1In the example, the connection through the bus is taken. The processor 12 may include a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a controller, a field programmable gate array (FPGA) device, etc. The processor 12 may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration.
[0057] The volume adjustment method, device, terminal and storage medium provided by the embodiments of the present invention can be executed by the terminal 100. Specifically, in some embodiments, the method can be executed by the processor 12.
[0058] Figure 2 A flow chart of a volume adjustment method provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes:
[0059] 101: Get the environment parameters in the current environment.
[0060] The terminal may obtain environmental parameters in the current environment. Specifically, the environmental parameters may include an environmental noise value and / or an environmental light intensity. Obtaining the environmental parameters in the current environment may include:
[0061] Acquiring the ambient noise value in the current environment through a noise sensor; and / or
[0062] The ambient light intensity in the current environment is obtained through an ambient light sensor.
[0063] A noise sensor and / or an ambient light sensor may be provided on the terminal, and the noise sensor may be used to obtain an ambient noise value in the current environment of the terminal, and / or the ambient light sensor may be used to obtain an ambient light intensity in the current environment of the terminal.
[0064] In the classification of environmental noise values, a noise level of 30 to 40 decibels is a relatively quiet normal environment; exceeding 50 decibels will affect sleep and rest. Due to insufficient rest, fatigue cannot be eliminated, and normal physiological functions will be affected to a certain extent; above 70 decibels will interfere with conversations, causing upset and lack of concentration, affecting work efficiency and even causing accidents; long-term work or living in a noise environment above 90 decibels will seriously affect hearing and lead to the occurrence of other diseases.
[0065] The ambient light intensity can be determined by light sensing data collected by the ambient light sensor.
[0066] Light intensity refers to the luminous flux of visible light received per unit area, measured in lux (Lux or lx), which is used to indicate the intensity of light and the degree of illumination of the surface area of an object.
[0067] The ambient light intensity is generally divided into the following levels: night: 0.001-0.02; moonlit night: 0.02-0.3; cloudy day indoors: 5-50; cloudy day outdoors: 50-500; sunny day indoors: 100-1000; illuminance under sunlight at noon in summer: about 10*9; illuminance required for reading books and periodicals: 50-60.
[0068] After obtaining the ambient noise value and / or the ambient light intensity in the current environment, the user's current environment can be determined based on the ambient noise value and / or the ambient light intensity. For example, if the ambient noise value is very small, it means that the user is in a relatively quiet environment and does not need to turn up the volume very loudly; if the ambient light intensity is very weak, it means that the user is in a relatively dark environment. For example, the user may have turned off the lights and is preparing to go to bed. In this case, a relatively quiet environment is also needed and there is no need to turn up the volume very loudly.
[0069] 102: Determine whether the environmental parameters meet preset environmental conditions.
[0070] After obtaining the environmental parameters, judging whether the environmental parameters meet the preset environmental conditions may include:
[0071] Determine whether the environmental noise value is less than a preset noise value; and / or
[0072] Determining whether the ambient light intensity is less than a preset light intensity;
[0073] If the environmental noise value is less than the preset noise value, and / or the environmental light intensity is less than the preset light intensity, it is determined that the environmental parameters meet the preset environmental conditions.
[0074] For example, the preset noise value is 40 decibels. When you are going to bed at night, the external environment is generally quiet, usually 30-40 decibels. For example, when a user lives with other roommates, when they are going to bed, they usually lower their voice or do not talk. At this time, the noise value of the current environment is usually less than the preset noise value of 40 decibels. When the environmental noise value is less than the preset noise value, it can be determined that the environmental parameters meet the preset environmental conditions.
[0075] For another example, the preset ambient light intensity is 1.2 lux. When the ambient light intensity is less than 1.2 lux, it can be considered that the user is in a relatively dark environment. For example, the user turns off the lights and prepares to go to bed. At this time, if the user uses the terminal to watch videos, if the external sound is too loud, it will obviously disturb the roommate; or, if the user wears headphones, if he is only in a relatively dark environment, or in a relatively dark and relatively quiet environment (that is, the ambient noise value is less than the preset noise value), then the volume of the headphones does not need to be too loud. When the user wears headphones, he feels that the sound of the headphones is too loud because the surrounding environment is quiet.
[0076] Therefore, when the ambient light intensity is less than the preset light intensity, and / or the ambient noise value is less than the preset noise value, it is determined that the environmental parameters meet the preset environmental conditions. When the environmental parameters meet the preset environmental conditions, the playback volume can be adjusted. For example, when the terminal is in the external sound state, the playback volume can be adjusted to a volume that does not disturb others. For example, when the terminal is plugged into headphones and the user listens to the sound of the terminal through the headphones, the playback volume of the headphones can be adjusted to a volume that does not irritate the human ear.
[0077] Correspondingly, if the ambient noise value is not less than the preset noise value, and / or the ambient light intensity is not less than the preset light intensity, it is determined that the environmental parameters do not meet the preset environmental conditions. For example, if the ambient noise value is greater than the preset noise value, it means that the user is still in a relatively noisy environment, and the volume can be maintained at the position originally adjusted by the user so that the user can hear the playback content clearly; for example, if the ambient light intensity is not less than the preset light intensity, it means that the user is still in a relatively bright environment, such as turning on the lights, which means that the user is not ready to go to bed, and the volume can be maintained at the position originally adjusted by the user; for example, if the ambient noise value is greater than the preset noise value and the ambient light intensity is not less than the preset light intensity, it means that the user is in an environment that is both relatively noisy and relatively bright, and the volume can also be maintained at the position originally adjusted by the user.
[0078] 103: If the environmental parameter meets the preset environmental condition, determine whether to connect the earphone.
[0079] When the environmental noise value in the environmental parameter is less than the preset noise value, and / or the environmental light intensity is less than the preset light intensity, it is determined whether the terminal is connected to the headset.
[0080] Since the environmental parameters indicate the environment in which the user is located, for example, when the current environment is quiet and / or the lights are turned off at night, it can be determined that the user is browsing the phone before going to bed. At this time, it can be determined whether the terminal is connected to the headset.
[0081] The user can use headphones to connect to the terminal to listen to the audio and video of the terminal. The terminal can also be in the sound-speaking state, that is, without connecting headphones, and directly play the audio and video sounds.
[0082] In some embodiments, after determining whether to connect a headset, the method further includes:
[0083] If the earphone is not connected, detecting the current volume value;
[0084] Determining a first preset volume value according to the environmental parameter;
[0085] The current volume value is adjusted to the first pre-adjusted volume value.
[0086] Specifically, when the terminal detects that no earphones are connected, it means that the terminal is currently in the sound external speaker state. The current volume value of the terminal is detected, that is, the external speaker volume of the terminal is detected, and the first pre-adjusted volume value is calculated according to the environmental parameters, and the current volume value is adjusted to the first pre-adjusted volume value.
[0087] The dimensionless range of the volume value of the terminal is defined as 0%-100%, for example, the corresponding environmental noise value is 0-100 decibels, and the corresponding environmental light intensity is 0-1lux; if it is detected that the terminal is not connected to the headset, and the current volume value is detected to be 80% of the total volume value, then, according to environmental parameters, for example, when the environmental noise is 30 decibels, and / or the environmental light intensity is 0.4lux, it can be determined that the first pre-adjusted volume value is 100% / 3=30%, and then the current volume value of 80% is adjusted to the first pre-adjusted volume value of 30%. Of course, the adjustment range of the volume is not limited to the above-mentioned corresponding relationship, and other corresponding relationships can also be used, as long as the current volume value can be adjusted to a level that the user can hear and does not affect the volume value of the surrounding roommates.
[0088] When no earphone connection is detected, it is determined that the terminal is in an external sound state, and because the user is in a relatively quiet and dim scene, it can be considered that the user is in a state of turning off the lights before going to bed. At this time, the current volume value of the terminal is adjusted to the first pre-adjusted volume, so that the external sound of the terminal will not only not affect others, but also the user himself can hear it.
[0089] 104: If the earphone is connected, adjusting the playback volume of the earphone according to the environmental parameter.
[0090] In some embodiments, after detecting that a headset is connected to the terminal, adjusting the playback volume of the headset according to environmental parameters may include:
[0091] If the headset is connected, detecting the current state of the headset;
[0092] If it is detected that the current state is a preset state, or the current state changes to the preset state, the playback volume of the earphone is adjusted according to the environmental parameters.
[0093] Specifically, after detecting that the earphone is connected, it means that the terminal is in the earphone playing state, and at this time, the current state of the earphone can be detected. The current state of the earphone can be detected by a built-in gyroscope.
[0094] Taking Bluetooth headset as an example, when the user is sitting or standing, Figure 3 As shown, Figure 3 The L in the figure is the center axis of the headset. The center axis refers to the center line of an axially symmetrical figure, building, or other object. All axially symmetrical objects will overlap when folded over the center axis. The center axis L of the headset is 90 degrees or close to 90 degrees with the horizontal coordinate x-axis of the world coordinate system. When the user is lying on his side or lying down, the ear will tilt with the body, causing the headset to tilt with the body. Figure 4 As shown, at this time, an angle is formed between the central axis L of the earphone and the x-axis of the horizontal coordinate of the world coordinate system. Assuming that the preset angle is 30 degrees, or smaller, it can be basically determined that the user is in a lying state. Then, when it is detected that the current state of the earphone is the preset state, the preset state is a state in which the angle between the central axis L of the earphone and the x-axis of the horizontal coordinate of the world coordinate system is less than the preset angle of 30 degrees, or the user changes from the current sitting state, that is, the central axis L of the earphone and the x-axis of the horizontal coordinate of the world coordinate system are 90 degrees, to the preset state, that is, the angle between the central axis L of the earphone and the x-axis of the horizontal coordinate of the world coordinate system is less than the preset angle of 30 degrees. That is, it is determined that the user changes from a sitting or standing state to a lying state. Then, the playback volume of the earphone is adjusted according to the environmental parameters.
[0095] In some of the embodiments, adjusting the playback volume of the earphone according to the environmental parameters may include:
[0096] Detecting the current playback volume value of the earphone;
[0097] Calculating a second preset volume value according to the environmental parameter;
[0098] The current playback volume value is adjusted to the second pre-adjusted volume value.
[0099] Specifically, you can refer to the volume adjustment method when the above-mentioned headphones are not connected. Since the user is in a relatively quiet and dim scene, it can be considered that the user is in a state of turning off the lights before going to bed. At this time, the current playback volume value of the headphones is adjusted to the second pre-adjusted volume, so that the volume transmitted to the headphones by the terminal is not too loud, causing discomfort in the user's ear canal.
[0100] In some of the embodiments, after the current volume value is adjusted to the first pre-adjusted volume value, or the current playback volume value is adjusted to the second pre-adjusted volume value, a volume adjustment notification is pushed to the screen so that the user knows that the terminal automatically adjusts the volume, and the user can adjust the volume again according to his or her needs.
[0101] The volume adjustment method of the embodiment of the present invention obtains environmental parameters in the current environment. For example, the environmental parameters may include environmental noise values and / or environmental light intensity, and determines whether the environmental parameters meet preset environmental conditions. If so, it means that the environment in which the user is located at this time is a relatively quiet environment with dim light and / or low noise. At this time, it is determined whether the terminal is connected to the headset. When the terminal is connected to the headset, the playback volume of the headset is adjusted according to the environmental parameters, so that the user will not wear the headset in a relatively quiet environment before going to bed. Still playing very loudly, effectively improving the user experience.
[0102] Correspondingly, such as Figure 5 As shown, the embodiment of the present invention also provides a volume adjustment device, which can be applied to a terminal, such as Figure 1 The terminal 100 shown, the volume adjustment device 800 includes:
[0103] Environmental parameter acquisition module 801, used to obtain environmental parameters in the current environment;
[0104] The first judgment module 802 is used to judge whether the environmental parameters meet the preset environmental conditions;
[0105] The second judgment module 803 is used to judge whether to connect the earphone if the environmental parameter meets the preset environmental condition;
[0106] The earphone volume adjustment module 804 is used to adjust the playback volume of the earphone according to the environmental parameters if the earphone is connected.
[0107] The volume adjustment method, device, terminal and storage medium of the embodiments of the present invention obtain environmental parameters in the current environment. For example, the environmental parameters may include environmental noise values and / or environmental light intensity, and determine whether the environmental parameters meet preset environmental conditions. If so, it means that the environment in which the user is located at this time is a relatively quiet environment with dim light and / or low noise. At this time, it is determined whether the terminal is connected to headphones. When the terminal is connected to headphones, the playback volume of the headphones is adjusted according to the environmental parameters, so that the user will not wear headphones that play loudly in a relatively quiet environment before going to bed, thereby effectively improving the user experience.
[0108] In some embodiments, see Figure 6 , the volume adjustment device 800 further includes:
[0109] The external speaker volume adjustment module 805 is used to:
[0110] If the earphone is not connected, detecting the current volume value;
[0111] Determining a first preset volume value according to the environmental parameter;
[0112] The current volume value is adjusted to the first pre-adjusted volume value.
[0113] In some embodiments, the headphone volume adjustment module 804 is further configured to:
[0114] If the headset is connected, detecting the current state of the headset;
[0115] If it is detected that the current state is a preset state, or the current state changes to the preset state, the playback volume of the earphone is adjusted according to the environmental parameters.
[0116] In some embodiments, the preset state is a state in which the angle between the central axis of the headset and the horizontal coordinate of the world coordinate system is less than a preset angle.
[0117] In some embodiments, the headphone volume adjustment module 804 is further configured to:
[0118] Detecting the current playback volume value of the earphone;
[0119] Calculating a second preset volume value according to the environmental parameter;
[0120] The current playback volume value is adjusted to the second pre-adjusted volume value.
[0121] In some embodiments, see Figure 6 , the volume adjustment device 800 further includes:
[0122] The notification module 806 is used to push a volume adjustment notification to the screen after the current volume value is adjusted to the first pre-adjusted volume value, or the current playing volume value is adjusted to the second pre-adjusted volume value.
[0123] In some embodiments, the environmental parameters include an environmental noise value and / or an environmental light intensity, and the environmental parameter acquisition module 801 is further used to:
[0124] Acquiring the ambient noise value in the current environment through a noise sensor; and / or
[0125] The ambient light intensity in the current environment is obtained through an ambient light sensor.
[0126] In some other embodiments, the first determining module 802 is further configured to:
[0127] Determine whether the environmental noise value is less than a preset noise value; and / or
[0128] Determining whether the ambient light intensity is less than a preset light intensity;
[0129] If the environmental noise value is less than the preset noise value, and / or the environmental light intensity is less than the preset light intensity, it is determined that the environmental parameters meet the preset environmental conditions.
[0130] It should be noted that the above device has the functional modules and beneficial effects corresponding to the method. For technical details not fully described in the device embodiment, please refer to the method provided in the embodiment of this application.
[0131] The present application also provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example Figure 1 A processor 12 in the embodiment may enable the one or more processors to execute the volume adjustment method in any of the above method embodiments, for example, to execute the above described Figure 2 Steps 101 to 104 of the method; implementing Figure 5 Modules 801-804 in Figure 6 The functions of modules 801-806 in.
[0132] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0133] Through the description of the above embodiments, a person of ordinary skill in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course by hardware. A person of ordinary skill in the art can understand that all or part of the processes in the above embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A volume adjustment method, characterized in that: The method comprises: Acquire environmental parameters in the current environment; the environmental parameters include environmental noise value and environmental light intensity; Determining whether the environmental parameters meet preset environmental conditions; If the environmental parameters meet the preset environmental conditions, determining whether to connect the headset; If the earphone is connected, adjusting the playback volume of the earphone according to the environmental parameters; The determining whether the environmental parameters meet the preset environmental conditions includes: Determining whether the environmental noise value is less than a preset noise value; and, Determining whether the ambient light intensity is less than a preset light intensity; If the environmental noise value is less than the preset noise value, and the environmental light intensity is less than the preset light intensity, it is determined that the environmental parameter meets the preset environmental condition; If the earphone is connected, adjusting the playback volume of the earphone according to the environmental parameter includes: If the headset is connected, detecting the current state of the headset; If it is detected that the current state is a preset state, or the current state changes to the preset state, adjusting the playback volume of the earphone according to the environmental parameters; The preset state is a state in which the angle between the central axis of the earphone and the horizontal coordinate of the world coordinate system is less than a preset angle.
2. The volume adjustment method according to claim 1, characterized in that: After determining whether the headset is connected, the method further includes: If the earphone is not connected, detecting the current volume value; Determining a first preset volume value according to the environmental parameter; The current volume value is adjusted to the first pre-adjusted volume value.
3. The volume adjustment method according to claim 1, characterized in that: The step of adjusting the playback volume of the earphone according to the environmental parameter includes: Detecting the current playback volume value of the earphone; Calculating a second preset volume value according to the environmental parameter; The current playback volume value is adjusted to the second pre-adjusted volume value.
4. The volume adjustment method according to claim 2 or 3, characterized in that: The method further comprises: After the current volume value is adjusted to the first pre-adjusted volume value, or the current playing volume value is adjusted to the second pre-adjusted volume value, a volume adjustment notification is pushed to the screen.
5. The volume adjustment method according to claim 1, characterized in that: The obtaining of the environmental parameters in the current environment includes: Acquiring the ambient noise value in the current environment through a noise sensor; and, The ambient light intensity in the current environment is obtained through an ambient light sensor.
6. A volume adjustment device, characterized in that: The device comprises: An environmental parameter acquisition module is used to acquire environmental parameters in the current environment; the environmental parameters include environmental noise value and environmental light intensity; A first judgment module, used to judge whether the environmental parameters meet the preset environmental conditions; A second judgment module, used for judging whether to connect the earphone if the environmental parameter meets the preset environmental condition; An earphone volume adjustment module, used to adjust the playback volume of the earphone according to the environmental parameters if the earphone is connected; The first judgment module is further used for: Determining whether the environmental noise value is less than a preset noise value; and, Determining whether the ambient light intensity is less than a preset light intensity; If the environmental noise value is less than the preset noise value, and the environmental light intensity is less than the preset light intensity, it is determined that the environmental parameter meets the preset environmental condition; The headphone volume adjustment module is also used for: If the headset is connected, detecting the current state of the headset; If it is detected that the current state is a preset state, or the current state changes to the preset state, adjusting the playback volume of the earphone according to the environmental parameters; The preset state is a state in which the angle between the central axis of the earphone and the horizontal coordinate of the world coordinate system is less than a preset angle.
7. A terminal, characterized in that: The terminal comprises: at least one processor, and A memory, wherein the memory is communicatively connected to the at least one processor, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1 to 5.
8. A non-volatile computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a terminal, the terminal is enabled to execute the method according to any one of claims 1 to 5.
