CN111479005B - Volume adjusting method and electronic equipment - Google Patents

Volume adjusting method and electronic equipment Download PDF

Info

Publication number
CN111479005B
CN111479005B CN202010296924.6A CN202010296924A CN111479005B CN 111479005 B CN111479005 B CN 111479005B CN 202010296924 A CN202010296924 A CN 202010296924A CN 111479005 B CN111479005 B CN 111479005B
Authority
CN
China
Prior art keywords
audio
volume
condition
electronic equipment
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010296924.6A
Other languages
Chinese (zh)
Other versions
CN111479005A (en
Inventor
喻晟昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010296924.6A priority Critical patent/CN111479005B/en
Publication of CN111479005A publication Critical patent/CN111479005A/en
Application granted granted Critical
Publication of CN111479005B publication Critical patent/CN111479005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions

Abstract

The invention discloses a volume adjusting method and electronic equipment, wherein the method is applied to the electronic equipment and comprises the following steps: collecting a second audio in the process of playing the first audio through a loudspeaker; and in the case that the second audio meets the preset condition, turning up the volume of the loudspeaker. According to the volume adjusting method disclosed by the invention, the electronic equipment can automatically adjust the volume of the loudspeaker based on the condition of the second audio without manual adjustment of a user, and is convenient and intelligent.

Description

Volume adjusting method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a volume adjusting method and electronic equipment.
Background
With the progress and development of society, electronic devices have become indispensable tools in people's lives, and the electronic devices can provide services such as conversation, video browsing, music playing, image shooting and positioning for users. In the process of playing music by using a loudspeaker of the electronic equipment, if the user does not manually adjust the volume, the electronic equipment always plays the music according to the fixed volume. Under this condition, if electronic equipment is in when noisy environment, the volume that the user heared can diminish because of receiving the blockking of external thing, and at this moment, need the user to turn the volume of speaker big manually, complex operation and intelligent inadequately.
Disclosure of Invention
The embodiment of the invention provides a volume adjusting method and electronic equipment, and aims to solve the problems that in the prior art, a user needs to manually adjust the volume of a loudspeaker, the operation is complicated, and the intelligence is insufficient.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a volume adjustment method, which is applied to an electronic device, where the method includes: collecting a second audio in the process of playing the first audio through a loudspeaker; wherein the second audio is an external audio; turning up the volume of the loudspeaker under the condition that the second audio meets a preset condition; wherein the preset condition comprises at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the acquisition module is used for acquiring a second audio in the process of playing the first audio through the loudspeaker; wherein the second audio is an external audio; the adjusting module is used for increasing the volume of the loudspeaker under the condition that the second audio meets a preset condition; wherein the preset condition comprises at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the computer program implements the steps of any one of the volume adjustment methods described in the embodiments of the present invention.
In a fourth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores thereon a computer program, and the computer program, when executed by a processor, implements the steps of any one of the volume adjustment methods described in the embodiments of the present invention.
In the embodiment of the invention, in the process of playing the first audio through the loudspeaker, the second audio is collected; under the condition that the second audio frequency meets the preset condition, the volume of the loudspeaker is increased, the volume of the loudspeaker can be automatically increased based on the condition of the second audio frequency by the electronic equipment, manual adjustment of a user is not needed, and the electronic equipment is convenient and intelligent.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flow chart of the steps of a method of volume adjustment according to an embodiment of the present invention;
FIG. 2 is a flow chart of steps of yet another method of volume adjustment according to an embodiment of the present invention;
FIG. 3 is a block diagram of an electronic device according to an embodiment of the invention;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flow chart of steps of a volume adjustment method according to an embodiment of the present invention is shown.
The volume adjusting method comprises the following steps:
step 101: and acquiring a second audio in the process of playing the first audio through the loudspeaker.
The volume adjusting method provided by the embodiment of the invention is suitable for electronic equipment, wherein the electronic equipment comprises a loudspeaker, a processor and an audio acquisition device, and the volume adjusting method comprises the following steps: a microphone. The audio acquisition device acquires external audio, namely second audio.
Step 102: and in the case that the second audio meets the preset condition, turning up the volume of the loudspeaker.
Wherein the preset condition comprises at least one of the following conditions: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
The matching degree of the first audio and the second audio is higher than a preset value, which indicates that the electronic device has collected a large amount of echoes of the first audio, and it can be preliminarily determined that the electronic device is in a closed or semi-closed interval, for example: in a pocket, a backpack, etc., the volume of the speaker is turned up in order to make the first audio clearly audible to the user.
In the case where the second audio includes ambient noise, the electronic device is illustrated as being in a noisy environment, and the volume of the speaker needs to be increased in order for the user to clearly hear the first audio.
In a specific implementation process, one way of optionally determining whether the second audio meets the preset condition is:
monitoring the sound wave amplitude change condition of the second audio, analyzing the second audio by the processor under the condition that the sound wave amplitude of the second audio is larger than the preset amplitude, and determining the reason for the obvious increase of the sound wave amplitude, wherein the reason for the obvious increase of the sound wave amplitude can be that the first audio played by the loudspeaker is reflected in a large quantity, the electronic equipment enters a noisy environment, and the like. Whether the matching degree of the second audio and the first audio is higher than a preset value can be analyzed by determining whether the sound sources of the first audio and the second audio are the same, and whether the sound wave amplitude of the second audio is increased due to the fact that the first audio is reflected in a large amount can be further analyzed. The preset amplitude can be set by a person skilled in the art according to an experimental value, and the specific value of the preset value is not particularly limited in the embodiment of the present invention. Certainly, the matching degree of the first audio and the second audio can be determined by directly comparing the audio contents of the first audio and the second audio.
According to the volume adjusting method provided by the embodiment of the invention, in the process of playing the first audio through the loudspeaker, the second audio is collected; under the condition that the second audio frequency meets the preset condition, the volume of the loudspeaker is increased, the electronic equipment can automatically increase the volume of the loudspeaker based on the condition of the second audio frequency, manual adjustment of a user is not needed, and the electronic equipment is convenient and intelligent.
Referring to fig. 2, a flow chart illustrating steps of another volume adjustment method according to an embodiment of the present invention is shown.
The volume adjusting method provided by the embodiment of the invention is applied to electronic equipment and comprises the following steps:
step 201: and acquiring a second audio in the process of playing the first audio through the loudspeaker.
The second audio is external audio, and the second audio is acquired through an audio acquisition module such as a microphone arranged in the electronic device.
Step 202: and monitoring whether the second audio meets the preset condition in real time.
Wherein the preset condition comprises at least one of the following conditions: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
And under the condition that the second audio does not meet the preset condition, returning to execute the step 201 to continue to acquire the second audio and monitoring whether the second audio meets the preset condition.
The matching degree of the second audio and the first audio is higher than a preset value, which indicates that the first audio played by the loudspeaker is reflected in a large amount, the electronic equipment may be in a closed or semi-closed space, and in order to enable a user of the electronic equipment to clearly hear the first audio, the volume of the loudspeaker needs to be increased. The second audio contains ambient noise, which indicates that the electronic device enters a noisy environment, and the volume of the speaker is also increased in order to make the user of the electronic device clearly hear the first audio. When determining whether the matching degree of the second audio and the first audio is higher than a preset value, judging whether the sound sources of the second audio and the first audio are the same; if the first audio frequency is the same as the second audio frequency, the matching degree of the second audio frequency and the first audio frequency is determined to be higher than a preset value. One way to optionally determine whether the sound sources of the second audio and the first audio are the same is:
converting the second audio into a spectrogram, extracting the mark point characteristics once every preset length, and taking the extracted mark point characteristics as audio fingerprints; searching and matching the extracted audio fingerprints in the music fragment library, and respectively determining the matching number of each song in the fragment library and each extracted audio fingerprint; determining a first song with the highest matching number; determining whether the first song and the first audio are the same song; if yes, determining that the sound source of the second audio is the same as that of the first audio; if not, determining that the sound source of the second audio is different from that of the first audio. The music segment library comprises fingerprint segments of a plurality of songs, and each song corresponds to a plurality of fingerprint segments.
And under the condition that the matching degree of the second audio and the first audio is higher than a preset value, the state of the user of the electronic equipment is required to be determined, and a loudspeaker adjustment prompt which is more in line with the actual requirement is given according to the state of the user of the electronic equipment. The status of the user may include, but is not limited to: a driving state, a state of the handheld electronic device, a walking state, a stationary state, or the like. The user states are different, the speaker adjustment prompts are different, and the specific flow is from step 203 to step 206.
In the case where the second audio contains ambient noise, the volume of the speaker is turned up, and inquiry prompt information is output.
Wherein, the inquiry prompt message is used for prompting the electronic equipment to access the earphone. The user can respond to the inquiry prompt message according to actual requirements. According to the method for outputting the inquiry prompt information in the noisy environment, the user can adjust the volume or access the earphone according to actual requirements, and personalized requirements of the user can be met.
Step 203: detecting whether the moving speed of the electronic equipment is greater than a preset speed or not under the condition that the second audio meets a preset condition; if yes, go to step 204; if not, go to step 206.
Whether the user of the electronic device is currently in a driving state can be determined by detecting whether the moving speed of the electronic device is greater than a preset speed. The specific value of the preset speed may be set by a person skilled in the art through experiments or experience, and is not particularly limited in the embodiment of the present invention. For example: the preset speed may be set to 3 m/s, 5 m/s, or 6 m/s, etc.
Step 204: and searching whether the started vehicle-mounted system is contained in the driving vehicle or not under the condition that the electronic equipment user is in the driving state. In the case where the moving speed of the electronic device is less than or equal to the preset speed, it is determined that the user of the electronic device is not in a driving state, may be in a stationary or walking state, or the like.
When searching whether the started vehicle-mounted system is included, whether the vehicle-mounted system identification is included can be searched in the connectable device list, and if yes, the vehicle is determined to include the started vehicle-mounted system.
Step 205: when an in-vehicle system for driving a vehicle is turned on, a prompt message is output.
The prompt information is used for prompting the electronic equipment to access the vehicle-mounted system.
The electronic equipment is accessed into the vehicle-mounted system, so that the electronic equipment is controlled when a user drives, for example: switching the playing object, adjusting the volume, etc.
Step 206: and under the condition that the moving speed of the electronic equipment is less than or equal to the preset speed, turning up the volume of the loudspeaker.
The branch is as follows: and under the condition that the second audio meets the preset condition and the moving speed of the electronic equipment is less than or equal to the preset speed, turning up the volume of the loudspeaker.
When the volume of the speaker is increased, the volume of the speaker may be adjusted to a preset volume, or may be adjusted to the maximum volume of the speaker, which is not specifically limited in the embodiment of the present invention.
One optional mode is that, when the second audio meets a preset condition and the moving speed of the electronic device is less than or equal to a preset speed, whether the electronic device is not held by a hand is detected; and in the case that the electronic equipment is not held by hands, the volume of the loudspeaker is turned up again. Namely, under the condition that the second audio meets the preset condition, the moving speed of the electronic equipment is less than or equal to the preset speed, and the electronic equipment is not held by hands, the volume of the loudspeaker is increased. In the case where the electronic device is held in the hand, the volume of the speaker is kept constant. Under the condition that the electronic equipment is not held by hands, the electronic equipment can be preliminarily judged to be possibly placed in a totally-enclosed or semi-enclosed space, and then the matching degree of the second audio and the first audio is higher than a preset value. For example: electronic equipment is placed in a fully or semi-enclosed space such as a user's pocket, an electronic equipment is placed in a user's backpack, and the like. In this case, to ensure that the user of the electronic device can clearly hear the first audio, the volume of the speaker needs to be turned up.
In a specific implementation process, parameters such as the inclination angle and the height of the electronic equipment can be detected based on the gyroscope, and whether the electronic equipment is held by hands or not is judged by combining the detected parameters. The distance of the electronic device from the user's finger may also be determined based on the light-sensitive elements, thereby determining whether the electronic device is being held by the user.
According to the volume adjusting method provided by the embodiment of the invention, in the process of playing the first audio through the loudspeaker, the second audio is collected; under the condition that the second audio frequency meets the preset condition, the volume of the loudspeaker is increased, the electronic equipment can automatically increase the volume of the loudspeaker based on the condition of the second audio frequency, manual adjustment of a user is not needed, and the electronic equipment is convenient and intelligent. In addition, in the volume adjustment method provided by the embodiment of the present invention, under the condition that it is determined that the matching degree of the second audio and the first audio is higher than the preset value, the state of the user is further analyzed, for example: driving, walking, etc. provide more accurate, comprehensive volume adjustment relevant suggestion according to the analysis result, can further promote user's use and experience.
Referring to fig. 3, a block diagram of an electronic device according to an embodiment of the present invention is shown.
The electronic device 300 of the embodiment of the present invention includes: the acquisition module 301 is configured to acquire a second audio in the process of playing the first audio through the speaker; wherein the second audio is an external audio; an adjusting module 302, configured to turn up a volume of the speaker when the second audio meets a preset condition; wherein the preset condition comprises at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
Optionally, the electronic device further comprises: the searching module is used for searching whether an on-vehicle system of a driving vehicle is started or not under the condition that the electronic equipment user is in a driving state before the adjusting module increases the volume of the loudspeaker; the first output module is used for outputting prompt information under the condition that a vehicle-mounted system for driving the vehicle is started, wherein the prompt information is used for prompting that the electronic equipment is connected to the vehicle-mounted system.
Optionally, the adjusting module is specifically configured to: and under the condition that the second audio meets a preset condition and the moving speed of the electronic equipment is less than or equal to a preset speed, turning up the volume of the loudspeaker.
Optionally, the adjusting module is specifically configured to: and under the conditions that the second audio frequency meets a preset condition, the moving speed of the electronic equipment is less than or equal to a preset speed, and the electronic equipment is not held by hands, turning up the volume of the loudspeaker.
Optionally, the adjusting module is specifically configured to: and under the condition that the second audio comprises the environmental noise, turning up the volume of the loudspeaker and outputting inquiry prompting information, wherein the inquiry prompting information is used for prompting the electronic equipment to access an earphone.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
According to the electronic equipment provided by the embodiment of the invention, in the process of playing the first audio through the loudspeaker, the second audio is collected; under the condition that the second audio frequency meets the preset condition, the volume of the loudspeaker is increased, the electronic equipment can automatically increase the volume of the loudspeaker based on the condition of the second audio frequency, manual adjustment of a user is not needed, and the electronic equipment is convenient and intelligent.
Referring to fig. 4, a block diagram of an electronic device according to embodiment 4 of the present invention is shown.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device 400 for implementing various embodiments of the present invention, where the electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The input unit 404 is configured to collect a second audio in a process that the electronic device plays the first audio through the speaker; wherein the second audio is an external audio; a processor 410, configured to turn up the volume of the speaker if the second audio satisfies a preset condition; wherein the preset condition comprises at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
According to the electronic equipment provided by the embodiment of the invention, in the process of playing the first audio through the loudspeaker, the second audio is collected; under the condition that the second audio frequency meets the preset condition, the volume of the loudspeaker is increased, the electronic equipment can automatically increase the volume of the loudspeaker based on the condition of the second audio frequency without manual adjustment of a user, and the electronic equipment is convenient and intelligent.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 402, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The electronic device 400 also includes at least one sensor 405, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 and/or the backlight when the electronic apparatus 400 is moved to the ear. Display panel 401 is the flexible display screen, and the flexible display screen is including the screen base, liftable module array and the flexible screen that superpose the setting in proper order. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the electronic device, and the implementation is not limited herein.
The interface unit 408 is an interface for connecting an external device to the electronic apparatus 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 400 or may be used to transmit data between the electronic apparatus 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby performing overall monitoring of the electronic device. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The electronic device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 400 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the above-mentioned embodiment of the volume adjustment method, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned embodiment of the volume adjustment method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. A volume adjusting method is applied to an electronic device, and is characterized by comprising the following steps:
collecting a second audio in the process of playing the first audio through a loudspeaker; wherein the second audio is an external audio;
turning up the volume of the loudspeaker under the condition that the second audio meets a preset condition;
wherein the preset conditions include: the matching degree of the second audio and the first audio is higher than a preset value;
the step of determining whether the matching degree of the second audio and the first audio is higher than a preset value comprises the following steps:
judging whether the sound source of the second audio is the same as that of the first audio; if the first audio frequency is the same as the second audio frequency, determining that the matching degree of the second audio frequency and the first audio frequency is higher than a preset value;
the step of judging whether the sound sources of the second audio and the first audio are the same comprises the following steps:
converting the second audio into a spectrogram, extracting the mark point characteristics once every preset length, and taking the extracted mark point characteristics as audio fingerprints; searching and matching the extracted audio fingerprints in the music fragment library, and respectively determining the matching number of each song in the fragment library and each extracted audio fingerprint; determining a first song with the highest matching number; determining whether the first song and the first audio are the same song; if yes, determining that the sound source of the second audio is the same as that of the first audio; if not, determining that the sound source of the second audio is different from that of the first audio.
2. The method of claim 1, wherein prior to the turning up the volume of the speaker, the method further comprises:
searching whether a vehicle-mounted system for driving a vehicle is started or not under the condition that the electronic equipment user is in a driving state;
and under the condition that the vehicle-mounted system for driving the vehicle is started, outputting prompt information, wherein the prompt information is used for prompting that the electronic equipment is accessed to the vehicle-mounted system.
3. The method of claim 1, wherein turning up the volume of the speaker if the second audio satisfies a preset condition comprises:
and under the condition that the second audio meets a preset condition and the moving speed of the electronic equipment is less than or equal to a preset speed, turning up the volume of the loudspeaker.
4. The method of claim 3, wherein turning up the volume of the speaker if the second audio satisfies a preset condition and the moving speed of the electronic device is less than or equal to a preset speed comprises:
and under the conditions that the second audio frequency meets a preset condition, the moving speed of the electronic equipment is less than or equal to a preset speed, and the electronic equipment is not held by hands, turning up the volume of the loudspeaker.
5. The method of claim 1, wherein the step of turning up the volume of the speaker comprises:
and under the condition that the second audio comprises the environmental noise, turning up the volume of the loudspeaker and outputting inquiry prompting information, wherein the inquiry prompting information is used for prompting the electronic equipment to access an earphone.
6. The method of claim 1, wherein the second audio comprises ambient noise.
7. An electronic device, characterized in that the electronic device comprises:
the acquisition module is used for acquiring a second audio in the process of playing the first audio through the loudspeaker; wherein the second audio is an external audio;
the adjusting module is used for increasing the volume of the loudspeaker under the condition that the second audio meets a preset condition;
wherein the preset conditions include: the matching degree of the second audio and the first audio is higher than a preset value; determining whether the matching degree of the second audio and the first audio is higher than a preset value comprises the following steps: judging whether the sound source of the second audio is the same as that of the first audio; if the first audio frequency is the same as the second audio frequency, determining that the matching degree of the second audio frequency and the first audio frequency is higher than a preset value; the judging whether the sound sources of the second audio and the first audio are the same comprises the following steps: converting the second audio into a spectrogram, extracting the mark point characteristics once every preset length, and taking the extracted mark point characteristics as audio fingerprints; searching and matching the extracted audio fingerprints in the music fragment library, and respectively determining the matching number of each song in the fragment library and each extracted audio fingerprint; determining a first song with the highest matching number; determining whether the first song and the first audio are the same song; if yes, determining that the sound source of the second audio is the same as that of the first audio; if not, determining that the sound source of the second audio is different from that of the first audio.
8. The electronic device of claim 7, further comprising:
the searching module is used for searching whether an on-vehicle system of a driving vehicle is started or not under the condition that the electronic equipment user is in a driving state before the adjusting module increases the volume of the loudspeaker;
the first output module is used for outputting prompt information under the condition that a vehicle-mounted system for driving the vehicle is started, wherein the prompt information is used for prompting that the electronic equipment is connected to the vehicle-mounted system.
9. The electronic device of claim 7, wherein the adjustment module is specifically configured to:
and under the condition that the second audio meets a preset condition and the moving speed of the electronic equipment is less than or equal to a preset speed, turning up the volume of the loudspeaker.
10. The electronic device of claim 7, wherein the adjustment module is specifically configured to:
and under the conditions that the second audio frequency meets a preset condition, the moving speed of the electronic equipment is less than or equal to a preset speed, and the electronic equipment is not held by hands, turning up the volume of the loudspeaker.
11. The electronic device of claim 7, wherein the adjustment module is specifically configured to:
and under the condition that the second audio comprises the environmental noise, turning up the volume of the loudspeaker and outputting inquiry prompting information, wherein the inquiry prompting information is used for prompting the electronic equipment to access an earphone.
12. The electronic device of claim 7, wherein the second audio comprises ambient noise.
13. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the volume adjustment method according to any one of claims 1 to 6.
CN202010296924.6A 2020-04-15 2020-04-15 Volume adjusting method and electronic equipment Active CN111479005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010296924.6A CN111479005B (en) 2020-04-15 2020-04-15 Volume adjusting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010296924.6A CN111479005B (en) 2020-04-15 2020-04-15 Volume adjusting method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111479005A CN111479005A (en) 2020-07-31
CN111479005B true CN111479005B (en) 2021-07-16

Family

ID=71754248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010296924.6A Active CN111479005B (en) 2020-04-15 2020-04-15 Volume adjusting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111479005B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600976B (en) * 2020-12-16 2022-05-31 维沃移动通信有限公司 Volume adjusting method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904536A (en) * 2011-07-28 2013-01-30 富泰华工业(深圳)有限公司 Volume adjusting device and volume adjusting method
CN107483731A (en) * 2017-08-18 2017-12-15 广东欧珀移动通信有限公司 Control method, device and the storage medium and mobile terminal of audio broadcast sound volume
CN109040449A (en) * 2018-08-06 2018-12-18 维沃移动通信有限公司 A kind of volume adjusting method and terminal device
CN109511037A (en) * 2018-12-19 2019-03-22 努比亚技术有限公司 Earpiece volume adjusting method, device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8041062B2 (en) * 2005-03-28 2011-10-18 Sound Id Personal sound system including multi-mode ear level module with priority logic

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904536A (en) * 2011-07-28 2013-01-30 富泰华工业(深圳)有限公司 Volume adjusting device and volume adjusting method
CN107483731A (en) * 2017-08-18 2017-12-15 广东欧珀移动通信有限公司 Control method, device and the storage medium and mobile terminal of audio broadcast sound volume
CN109040449A (en) * 2018-08-06 2018-12-18 维沃移动通信有限公司 A kind of volume adjusting method and terminal device
CN109511037A (en) * 2018-12-19 2019-03-22 努比亚技术有限公司 Earpiece volume adjusting method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN111479005A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN109343759B (en) Screen-turning display control method and terminal
CN109078319B (en) Game interface display method and terminal
CN109065060B (en) Voice awakening method and terminal
CN108334272B (en) Control method and mobile terminal
CN108279948B (en) Application program starting method and mobile terminal
CN110365853B (en) Prompting method and electronic equipment
CN108962187B (en) Screen brightness adjusting method and mobile terminal
CN108196753B (en) Interface switching method and mobile terminal
CN110096203B (en) Screenshot method and mobile terminal
CN109523253B (en) Payment method and device
CN111443815A (en) Vibration reminding method and electronic equipment
CN110990679A (en) Information searching method and electronic equipment
CN111026305A (en) Audio processing method and electronic equipment
CN111107219B (en) Control method and electronic equipment
CN108196776A (en) A kind of terminal split screen method, terminal and computer readable storage medium
CN109324999B (en) Method and electronic equipment for executing operation based on download instruction
CN111142618A (en) Method for detecting folding angle and electronic equipment
CN107765954B (en) Application icon updating method, mobile terminal and server
CN111427644B (en) Target behavior identification method and electronic equipment
CN111479005B (en) Volume adjusting method and electronic equipment
CN110456959B (en) Terminal control method and terminal
CN111292727A (en) Voice recognition method and electronic equipment
CN111328132A (en) Method for adjusting transmitting power and electronic equipment
CN111103983A (en) AR musical instrument playing method and electronic equipment
CN110928616A (en) Shortcut icon management method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant