CN106487984B - A kind of method and apparatus adjusting volume - Google Patents
A kind of method and apparatus adjusting volume Download PDFInfo
- Publication number
- CN106487984B CN106487984B CN201610856884.XA CN201610856884A CN106487984B CN 106487984 B CN106487984 B CN 106487984B CN 201610856884 A CN201610856884 A CN 201610856884A CN 106487984 B CN106487984 B CN 106487984B
- Authority
- CN
- China
- Prior art keywords
- terminal
- space
- environment
- space size
- volume value
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000001514 detection method Methods 0.000 claims description 64
- 230000006870 function Effects 0.000 claims description 30
- 230000008569 process Effects 0.000 claims description 30
- 230000001419 dependent effect Effects 0.000 claims description 8
- 230000008859 change Effects 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000000694 effects Effects 0.000 abstract description 2
- 238000012545 processing Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000005259 measurement Methods 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/60—Substation equipment, e.g. for use by subscribers including speech amplifiers
- H04M1/6033—Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
- H04M1/6041—Portable telephones adapted for handsfree use
- H04M1/605—Portable telephones adapted for handsfree use involving control of the receiver volume to provide a dual operational mode at close or far distance from the user
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Stereophonic System (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a kind of method and apparatus for adjusting volume, belong to electronic technology field.The described method includes: detecting the bulk of space environment locating for terminal by distance measuring sensor;The corresponding relationship of bulk according to the pre-stored data and volume value determines the corresponding target sound magnitude of the bulk of space environment locating for the terminal;It is the target sound magnitude by the volume adjustment of the terminal.Using the present invention, the auditory effect when space environment changes can be prevented to be deteriorated.
Description
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method and an apparatus for adjusting a volume.
Background
With the development of electronic technology, various terminals are widely used, and the types and functions of application programs on the corresponding terminals are more and more abundant. For example, a user may play videos, music, and the like through a mobile terminal such as a mobile phone.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in daily life, a user may carry the terminal to move at any time in the process of playing music by the terminal, and may move from one space environment to another space environment (for example, move from a living room to a bedroom).
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for adjusting a volume. The technical scheme is as follows:
in a first aspect, a method for adjusting volume is provided, the method comprising:
detecting the space size of the space environment where the terminal is located through a distance measuring sensor;
determining a target volume value corresponding to the space size of the space environment where the terminal is located according to a pre-stored corresponding relation between the space size and the volume value;
and adjusting the volume of the terminal to the target volume value.
Optionally, the spatial dimension of the spatial environment is an area of a horizontal cross section in the spatial environment, or a volume of the spatial environment.
Optionally, the detecting, by the ranging sensor, a spatial size of a spatial environment where the terminal is located includes:
detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period; or,
when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; or,
when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
Optionally, each time the preset detection period is reached, the spatial dimension of the spatial environment where the terminal is located is detected by the ranging sensor, including:
and in the process of playing the audio data by the terminal, detecting the space size of the space environment where the terminal is located through the distance measuring sensor every preset detection period.
Optionally, when receiving a detection instruction input by a user, detecting, by a ranging sensor, a spatial size of a spatial environment where the terminal is located includes:
in the process of playing audio data by the terminal, when a detection instruction input by a user is received, the spatial dimension of the spatial environment where the terminal is located is detected by the ranging sensor.
Optionally, when detecting that the position of the terminal changes, detecting, by the ranging sensor, a spatial size of a spatial environment where the terminal is located includes:
in the process of playing audio data by a terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through a distance measuring sensor.
Optionally, the spatial dimension of the spatial environment is the area of a horizontal cross section in the spatial environment;
through range finding sensor, the space size of the space environment that detects terminal place includes:
detecting the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor through the ranging sensor;
and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
Optionally, the determining, according to a pre-stored correspondence between the space size and the volume value, a target volume value corresponding to the space size of the space environment where the terminal is located includes:
and calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value.
In a second aspect, there is provided an apparatus for adjusting volume, the apparatus comprising:
the detection module is used for detecting the space size of the space environment where the terminal is located through the distance measurement sensor;
the determining module is used for determining a target volume value corresponding to the space size of the space environment where the terminal is located according to the corresponding relation between the pre-stored space size and the volume value;
and the adjusting module is used for adjusting the volume of the terminal to the target volume value.
Optionally, the spatial dimension of the spatial environment is an area of a horizontal cross section in the spatial environment, or a volume of the spatial environment.
Optionally, the detection module is configured to:
detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period; or,
when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; or,
when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
Optionally, the detection module is configured to:
and in the process of playing the audio data by the terminal, detecting the space size of the space environment where the terminal is located through the distance measuring sensor every preset detection period.
Optionally, the detection module is configured to:
in the process of playing audio data by the terminal, when a detection instruction input by a user is received, the spatial dimension of the spatial environment where the terminal is located is detected by the ranging sensor.
Optionally, the detection module is configured to:
in the process of playing audio data by a terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through a distance measuring sensor.
Optionally, the spatial dimension of the spatial environment is the area of a horizontal cross section in the spatial environment;
the detection module is configured to:
detecting the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor through the ranging sensor;
and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
Optionally, the determining module is configured to:
and calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the terminal can measure the space size of the space environment where the terminal is located through the ranging sensor, further, the target volume value corresponding to the space environment where the terminal is currently located can be determined according to the corresponding relation between the pre-stored size of the space environment and the volume value, and finally, the volume of the terminal is adjusted to be the target volume value.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for adjusting volume according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a detection space size provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of a detection space size provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for adjusting volume according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for adjusting volume, wherein an execution main body of the method is a terminal, and the terminal can be a terminal with a function of playing audio data, and can be a mobile terminal such as a mobile phone, a tablet computer and a sound device which are provided with an application program for playing audio data. The terminal can be provided with an audio playing component, a processor, a distance measuring sensor, the audio playing component can be used for playing audio data, for example, a loudspeaker, the processor can be used for determining a target volume value corresponding to the current space environment according to the space size of the space environment, the distance measuring sensor can be used for measuring the distance between the distance measuring sensor and the edge point of the space environment, in addition, the distance measuring sensor can also be an external distance measuring sensor connected with the terminal, the terminal can obtain the distance detected by the distance measuring sensor, and further the space size of the space environment where the terminal is located is determined, wherein the external distance measuring sensor connected with the terminal can be connected with the terminal through a data line, can also be connected with the terminal through a Bluetooth component, and can also be connected with the terminal through a wifi (Wireless Fidelity) signal. In the embodiment of the invention, the distance measuring sensor and the terminal are always in the same space environment. The terminal may further include a Positioning component, and the Positioning component may be configured to detect a current location of the terminal, for example, the Positioning component may be a Global Positioning System (GPS).
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, detecting the space size of the space environment where the terminal is located through a ranging sensor.
The distance measuring sensor may be a sensor for detecting a distance between two points, and may be, for example, an infrared distance measuring sensor, an ultrasonic distance measuring sensor, or the like.
In implementation, an application program for playing audio data (for example, an application program for playing a song or an application program for playing a video) may be installed in the terminal, when the terminal opens the application program for playing audio data, the corresponding automatic volume adjustment function may be started, and in a state that the automatic volume adjustment function is started, the terminal may detect the spatial size of the spatial environment where the terminal is located through the distance measurement sensor. Specifically, a detection trigger event may be pre-stored in the terminal, where the detection trigger event may be used to trigger the ranging sensor to start, that is, may be used to trigger the terminal to detect the spatial size of the spatial environment where the terminal is located through the ranging sensor. When the terminal detects that the preset trigger event occurs, the distance measuring sensor can be started, and then the space size of the space environment where the terminal is located is detected through the distance measuring sensor.
Optionally, the spatial dimension of the spatial environment may be an area of a plane parallel to the ground in the spatial environment (i.e., an area of a horizontal cross section in the spatial environment), or may be a volume of the spatial environment, where the horizontal cross section in the spatial environment may be a horizontal cross section where the distance measuring sensor is located, or may be a horizontal cross section where the distance measuring sensor is located farther from the ground.
Optionally, based on different preset detection trigger events, the processing manner of step 101 may be various, and several feasible processing manners are given below:
in the first mode, every time a preset detection period is reached, the space size of the space environment where the terminal is located is detected through the ranging sensor.
In implementation, a detection period can be preset in the terminal, and the terminal can control the distance measuring sensor to be turned on every preset detection period, detect the space size of the space environment where the terminal is located through the distance measuring sensor, turn off the distance measuring sensor after detection is finished, and turn on the distance measuring sensor again when the next detection period is finished, so as to detect the space size of the space environment where the terminal is currently located.
And in the second mode, when a detection instruction input by a user is received, the space size of the space environment where the terminal is located is detected through the distance measuring sensor.
In implementation, a key (which may be referred to as a detection key) for starting a detection space size is provided in the terminal, where the key may be a touch key or a mechanical key. When a user wants to enable the terminal to detect the space size of the current space environment, the detection key can be pressed, at the moment, the terminal can receive a detection instruction input by the user, and then the terminal can be triggered to detect the space size of the space environment where the terminal is located through the distance measuring sensor.
And in the third mode, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
In implementation, the terminal may detect the position of the terminal by using its own positioning component (e.g., a global positioning system), and when detecting that the position of the terminal changes, the terminal may be triggered to turn on the ranging sensor, and the spatial dimension of the spatial environment where the terminal is located may be detected by the ranging sensor. In addition, a position change amplitude threshold value can be preset in the terminal, and when the position change of the terminal reaches the preset position change amplitude threshold value, the space size of the space environment where the terminal is located is detected through the ranging sensor. For example, the preset position variation amplitude threshold may be a preset distance threshold, at time T, the terminal is at a position a, at time T (where T is greater than T), the terminal is detected at a position B, and if the distance between the position a and the position B is greater than the preset distance threshold, the terminal is triggered to detect the spatial size of the spatial environment where the terminal is located through the ranging sensor.
Optionally, the terminal may detect the spatial size of the spatial environment where the terminal is located through the ranging sensor in the process of playing the audio data, and accordingly, the processing procedure in the first mode may be as follows: detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period in the process of playing the audio data by the terminal; the processing procedure of the second mode can be as follows: in the process of playing audio data by the terminal, when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; the processing procedure of the third mode can be as follows: in the process of playing audio data by the terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the distance measuring sensor.
In implementation, the terminal may further detect whether the terminal is currently playing audio data, and the terminal may detect the spatial size of the spatial environment where the terminal is located through the ranging sensor based on a preset detection period on the premise of playing the audio data, or detect the spatial size of the spatial environment where the terminal is located through the ranging sensor when receiving a detection instruction input by a user in the process of playing the audio data by the terminal, or detect the spatial size of the spatial environment where the terminal is located through the ranging sensor when detecting that the position of the terminal changes in the process of playing the audio data by the terminal. That is to say, in the process of playing audio data at the terminal, the terminal detects the spatial dimension of the spatial environment where the terminal is located through the ranging sensor, so that the spatial dimension of the spatial environment can be prevented from being detected when the terminal does not play audio data, and therefore, the electric quantity can be saved.
Optionally, for the case that the spatial dimension of the spatial environment is the area of the horizontal cross section in the spatial environment, the processing procedure of step 101 may be as follows: detecting the distances between the edge points of the horizontal section in a plurality of different directions and the distance measuring sensor by the distance measuring sensor; and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
In an implementation, whenever a preset detection trigger event is detected to occur, the ranging sensor may rotate in a preset direction (for example, clockwise or counterclockwise) in a horizontal section in the space environment, after each rotation by a preset angle, the terminal may measure a distance between an edge point of the horizontal section in the direction and the ranging sensor through the ranging sensor, and after the rotation by 360 degrees, the terminal may control the ranging sensor to turn off, at this time, the terminal may obtain distances between the edge point of the horizontal section in a plurality of different directions and the ranging sensor, where the edge point may be a position point where an object (the object may be an object, may be an animal, or may be a person) closest to the ranging sensor in the direction is located. For example, the preset angle is 45 degrees, each time a preset detection trigger event is detected, the terminal may detect the distance between the edge point of the horizontal section in the current direction and the ranging sensor through the ranging sensor, then rotate 45 degrees counterclockwise, then the terminal may detect the distance between the edge point of the horizontal section in the direction and the ranging sensor through the ranging sensor, and so on, and finally the terminal may obtain the distances between the edge point of the horizontal section in six different directions and the ranging sensor, as shown in fig. 2.
After the terminal obtains the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor, the area of the horizontal section can be estimated. Specifically, the swept area of the distance measuring sensor at each rotation can be obtained by the distance between the edge point of the horizontal cross section in the two directions and the distance measuring sensor and the included angle between the pair of adjacent directions (i.e. a preset angle, such as 45 degrees), that is, a line segment whose length is the distance between the edge point of the horizontal cross section in the two directions and the distance measuring sensor can be used as the two sides of the triangle, the preset angle is the included angle between the two sides of the triangle, the terminal can calculate the area of the triangle according to the length of the two sides and the included angle between the two sides, and then, the area of the triangle can be used as the area of the area, and so on, the area of the horizontal cross section between each pair of adjacent directions can be calculated, and then, the area of each area is added to obtain the.
For example, as shown in fig. 3, a distance between an edge point of the horizontal cross section in the direction 1 and the ranging sensor is a, and a distance between an edge point of the horizontal cross section in the direction 2 and the ranging sensor is b, where the directions 1 and 2 are two adjacent directions, and a preset included angle is a, the terminal may calculate the length c of the third side according to formula (1), and further, may calculate the area S of the triangle according to formula (2).
S=p(p-a)(p-b)(p-c) (2)
Where p is half the circumference. The terminal may obtain the area of each triangle according to the above method, and then add them to approximately obtain the area of the horizontal section. In addition, for the area of the first region in fig. 3, the obtained area of the triangle is the area of the region, and for the area of the second region in fig. 3, the area of the triangle calculated in this way is the approximate area of the corresponding second region.
And 102, determining a target volume value corresponding to the space size of the space environment where the terminal is located according to the corresponding relation between the pre-stored space size and the volume value.
In an implementation, a correspondence between the spatial size and the volume value may be stored in the terminal in advance, and each time the spatial size of the spatial environment in which the terminal is located is obtained, the spatial size corresponding volume value (i.e., the target volume value) of the spatial environment in which the terminal is located may be determined in the correspondence. Specifically, the terminal may store a correspondence table of the space size and the volume value in advance, as shown in table 1, a difference between the space sizes in the correspondence table may be set to be small, so that the target volume value may be accurately obtained for any space size, and in addition, when the correspondence table does not include the space size of the space environment where the terminal is located, the volume value corresponding to the space size closest to the space size of the space environment where the terminal is located in the correspondence table may be used as the target volume value. In addition, the space size in the correspondence table may also be a space size range, that is, the terminal may determine, according to a correspondence between a space size range and a volume value stored in advance, a target volume value corresponding to a space size range to which the space size of the space environment in which the terminal is located belongs.
TABLE 1
Size of space | Volume value |
3 | 10 |
4 | 13 |
… | … |
20 | 27 |
Optionally, a function of the volume and the spatial size may also be stored in the terminal in advance, and accordingly, the processing procedure of step 102 may be as follows: and calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value.
In an implementation, the terminal may store in advance a function V ═ f (Z) in which an argument is a space size (the space size may be represented by Z) and a dependent variable is a volume value (the volume value may be represented by V), where the function V ═ f (Z) may be as shown in function (3), and after the terminal detects the space size of the space environment where the terminal is located, a target volume value corresponding to the space size may be calculated by function (3).
And 103, adjusting the volume of the terminal to a target volume value.
In implementation, after the terminal obtains the target volume value, the volume value of the terminal may be adjusted to the target volume value, that is, if the terminal is playing the audio data, the terminal may play the audio data based on the volume value corresponding to the space size of the space environment where the terminal is located.
In addition, the terminal can also adjust the sound effect type corresponding to the space size of the current space environment according to the space size of the space environment where the terminal is located, and can also provide a space size external-adjusting interface so as to enable other equipment to call the space size of the space environment where the terminal is located, which is detected by the terminal.
In the embodiment of the invention, the terminal can measure the space size of the space environment where the terminal is located through the ranging sensor, further, the target volume value corresponding to the space environment where the terminal is currently located can be determined according to the corresponding relation between the pre-stored size of the space environment and the volume value, and finally, the volume of the terminal is adjusted to be the target volume value.
Based on the same technical concept, an embodiment of the present invention further provides a device for adjusting volume, as shown in fig. 4, the device includes:
the detection module 410 is used for detecting the space size of the space environment where the terminal is located through the distance measurement sensor;
a determining module 420, configured to determine, according to a pre-stored correspondence between a space size and a volume value, a target volume value corresponding to the space size of a space environment where the terminal is located;
an adjusting module 430, configured to adjust the volume of the terminal to the target volume value.
Optionally, the spatial dimension of the spatial environment is an area of a horizontal cross section in the spatial environment, or a volume of the spatial environment.
Optionally, the detecting module 410 is configured to:
detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period; or,
when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; or,
when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
Optionally, the detecting module 410 is configured to:
and in the process of playing the audio data by the terminal, detecting the space size of the space environment where the terminal is located through the distance measuring sensor every preset detection period.
Optionally, the detecting module 410 is configured to:
in the process of playing audio data by the terminal, when a detection instruction input by a user is received, the spatial dimension of the spatial environment where the terminal is located is detected by the ranging sensor.
Optionally, the detecting module 410 is configured to:
in the process of playing audio data by a terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through a distance measuring sensor.
Optionally, the spatial dimension of the spatial environment is the area of a horizontal cross section in the spatial environment;
the detection module 410 is configured to:
detecting the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor through the ranging sensor;
and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
Optionally, the determining module 420 is configured to:
and calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value.
In the embodiment of the invention, the terminal can measure the space size of the space environment where the terminal is located through the ranging sensor, further, the target volume value corresponding to the space environment where the terminal is currently located can be determined according to the corresponding relation between the pre-stored size of the space environment and the volume value, and finally, the volume of the terminal is adjusted to be the target volume value.
It should be noted that: in the device for adjusting the volume according to the above embodiment, when adjusting the volume, only the division of the above functional modules is taken as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the device for adjusting the volume and the method for adjusting the volume provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Referring to fig. 5, a schematic structural diagram of a terminal according to an embodiment of the present invention is shown, where the terminal may be used to implement the method for adjusting volume provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the terminal 500 may include RF (Radio Frequency) circuitry 110, memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, audio circuitry 160, a WiFi (wireless fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal structure shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (short messaging Service), etc.
The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. The memory 120 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 terminal 500, and the like. Further, the memory 120 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. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means 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 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 500, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 5, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal 500 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or a backlight when the terminal 500 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 500, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 500. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of peripheral headphones with the terminal 500.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 500 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi module 170, and it provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the terminal 500 and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal 500, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 500 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the handset. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 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 180.
The terminal 500 further includes a power supply 190 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 180 via a power management system, such that functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 500 may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the terminal 500 is a touch screen display, and the terminal 500 further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
detecting the space size of the space environment where the terminal is located through a distance measuring sensor;
determining a target volume value corresponding to the space size of the space environment where the terminal is located according to a pre-stored corresponding relation between the space size and the volume value;
and adjusting the volume of the terminal to the target volume value.
Optionally, the spatial dimension of the spatial environment is an area of a horizontal cross section in the spatial environment, or a volume of the spatial environment.
Optionally, the detecting, by the ranging sensor, a spatial size of a spatial environment where the terminal is located includes:
detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period; or,
when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; or,
when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
Optionally, each time the preset detection period is reached, the spatial dimension of the spatial environment where the terminal is located is detected by the ranging sensor, including:
and in the process of playing the audio data by the terminal, detecting the space size of the space environment where the terminal is located through the distance measuring sensor every preset detection period.
Optionally, when receiving a detection instruction input by a user, detecting, by a ranging sensor, a spatial size of a spatial environment where the terminal is located includes:
in the process of playing audio data by the terminal, when a detection instruction input by a user is received, the spatial dimension of the spatial environment where the terminal is located is detected by the ranging sensor.
Optionally, when detecting that the position of the terminal changes, detecting, by the ranging sensor, a spatial size of a spatial environment where the terminal is located includes:
in the process of playing audio data by a terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through a distance measuring sensor.
Optionally, the spatial dimension of the spatial environment is the area of a horizontal cross section in the spatial environment;
through range finding sensor, the space size of the space environment that detects terminal place includes:
detecting the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor through the ranging sensor;
and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
Optionally, the determining, according to a pre-stored correspondence between the space size and the volume value, a target volume value corresponding to the space size of the space environment where the terminal is located includes:
and calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value.
In the embodiment of the invention, the terminal can measure the space size of the space environment where the terminal is located through the ranging sensor, further, the target volume value corresponding to the space environment where the terminal is currently located can be determined according to the corresponding relation between the pre-stored size of the space environment and the volume value, and finally, the volume of the terminal is adjusted to be the target volume value.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (8)
1. A method of adjusting volume, the method comprising:
detecting the space size of a space environment where the terminal is located through a ranging sensor, wherein the space size of the space environment is the area of a horizontal section in the space environment or the volume of the space environment;
determining a target volume value corresponding to the space size of the space environment where the terminal is located according to a pre-stored corresponding relation between the space size and the volume value;
adjusting the volume of the terminal to the target volume value;
the determining a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored corresponding relationship between the space size and the volume value includes:
calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value;
the spatial dimension and volume value functions are as follows:
wherein V is a volume value and Z is a space size;
through range finding sensor, the space size of the space environment that detects terminal place includes:
in the process of playing audio data by a terminal, when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; or,
detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period; or,
when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
2. The method according to claim 1, wherein detecting the spatial size of the spatial environment in which the terminal is located by the ranging sensor every preset detection period comprises:
and in the process of playing the audio data by the terminal, detecting the space size of the space environment where the terminal is located through the distance measuring sensor every preset detection period.
3. The method according to claim 1, wherein the detecting, by a ranging sensor, a spatial size of a spatial environment in which the terminal is located when the change in the position of the terminal is detected comprises:
in the process of playing audio data by a terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through a distance measuring sensor.
4. The method of claim 1, wherein the spatial dimension of the spatial environment is an area of a horizontal cross-section in the spatial environment;
through range finding sensor, the space size of the space environment that detects terminal place includes:
detecting the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor through the ranging sensor;
and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
5. An apparatus for adjusting volume, the apparatus comprising:
the detection module is used for detecting the space size of the space environment where the terminal is located through the ranging sensor, wherein the space size of the space environment is the area of a horizontal section in the space environment or the volume of the space environment;
the determining module is used for determining a target volume value corresponding to the space size of the space environment where the terminal is located according to the corresponding relation between the pre-stored space size and the volume value;
the adjusting module is used for adjusting the volume of the terminal to the target volume value;
the determining module is configured to:
calculating a target volume value corresponding to the space size of the space environment where the terminal is located according to the pre-stored independent variable as the space size and the dependent variable as the function of the volume value;
the spatial dimension and volume value functions are as follows:
wherein V is a volume value and Z is a space size;
the detection module is configured to:
in the process of playing audio data by a terminal, when a detection instruction input by a user is received, detecting the space size of the space environment where the terminal is located through a distance measuring sensor; or,
detecting the space size of the space environment where the terminal is located through a distance measuring sensor every preset detection period; or,
when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through the ranging sensor.
6. The apparatus of claim 5, wherein the detection module is configured to:
and in the process of playing the audio data by the terminal, detecting the space size of the space environment where the terminal is located through the distance measuring sensor every preset detection period.
7. The apparatus of claim 5, wherein the detection module is configured to:
in the process of playing audio data by a terminal, when the position of the terminal is detected to be changed, the space size of the space environment where the terminal is located is detected through a distance measuring sensor.
8. The apparatus of claim 5, wherein the spatial dimension of the spatial environment is an area of a horizontal cross-section in the spatial environment;
the detection module is configured to:
detecting the distances between the edge points of the horizontal section in a plurality of different directions and the ranging sensor through the ranging sensor;
and determining the area of the horizontal section according to the distance between the edge point of the horizontal section in a plurality of different directions and the ranging sensor and the included angle between each pair of adjacent directions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610856884.XA CN106487984B (en) | 2016-09-27 | 2016-09-27 | A kind of method and apparatus adjusting volume |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610856884.XA CN106487984B (en) | 2016-09-27 | 2016-09-27 | A kind of method and apparatus adjusting volume |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106487984A CN106487984A (en) | 2017-03-08 |
CN106487984B true CN106487984B (en) | 2019-01-08 |
Family
ID=58268067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610856884.XA Active CN106487984B (en) | 2016-09-27 | 2016-09-27 | A kind of method and apparatus adjusting volume |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106487984B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106817654B (en) * | 2017-03-22 | 2019-10-22 | 微鲸科技有限公司 | Sound effect treatment method, device and multimedia equipment |
CN109298847A (en) * | 2018-10-18 | 2019-02-01 | 珠海格力电器股份有限公司 | Volume adjusting method, device and system |
CN110267155B (en) * | 2019-06-27 | 2021-10-22 | 维沃移动通信有限公司 | Sound box control method and sound box |
CN110413251A (en) * | 2019-07-02 | 2019-11-05 | 青岛海尔空调器有限总公司 | Method and device for controlling sound box and air conditioner |
CN110851102A (en) * | 2019-10-09 | 2020-02-28 | 重庆特斯联智慧科技股份有限公司 | Output volume control method and device, electronic equipment and medium |
CN111787460B (en) * | 2020-06-23 | 2021-11-09 | 北京小米移动软件有限公司 | Equipment control method and device |
CN113504889A (en) * | 2021-06-25 | 2021-10-15 | 和美(深圳)信息技术股份有限公司 | Automatic robot volume adjusting method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120057725A1 (en) * | 2010-09-03 | 2012-03-08 | Sony Corporation | Control terminal apparatus and control method |
CN103813235A (en) * | 2012-11-13 | 2014-05-21 | 联想(北京)有限公司 | Information processing method and device |
CN105118524A (en) * | 2015-09-18 | 2015-12-02 | 广东欧珀移动通信有限公司 | Audio playing method and device |
-
2016
- 2016-09-27 CN CN201610856884.XA patent/CN106487984B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120057725A1 (en) * | 2010-09-03 | 2012-03-08 | Sony Corporation | Control terminal apparatus and control method |
CN103813235A (en) * | 2012-11-13 | 2014-05-21 | 联想(北京)有限公司 | Information processing method and device |
CN105118524A (en) * | 2015-09-18 | 2015-12-02 | 广东欧珀移动通信有限公司 | Audio playing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN106487984A (en) | 2017-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106487984B (en) | A kind of method and apparatus adjusting volume | |
CN106847298B (en) | Pickup method and device based on diffuse type voice interaction | |
CN107277912B (en) | Radio frequency interference processing method, device, storage medium and terminal | |
US20200125229A1 (en) | Display Processing Method and Apparatus | |
CN103389863B (en) | A kind of display control method and device | |
CN106445340B (en) | Method and device for displaying stereoscopic image by double-screen terminal | |
WO2018166204A1 (en) | Method for controlling fingerprint recognition module, and mobile terminal and storage medium | |
CN109739394B (en) | SAR value processing method and mobile terminal | |
US11689655B2 (en) | Method for adjusting parameter of audio service and terminal | |
CN106936516B (en) | Display screen display state control method, storage medium and terminal | |
CN106126675A (en) | A kind of method of recommendation of audio, Apparatus and system | |
CN111651030B (en) | Sensor detection method and device, storage medium and mobile terminal | |
CN107122036B (en) | Method and device for adjusting frequency of central processing unit | |
CN110099434B (en) | Power adjustment method, terminal equipment and computer readable storage medium | |
CN107104930A (en) | It is a kind of that the methods, devices and systems for checking authority are set | |
CN109041190B (en) | Power control method and terminal | |
CN104316946B (en) | Base station, GNSS joint positioning methods and device | |
CN110851014B (en) | Touch recognition method and device, storage medium and terminal equipment | |
CN111064847B (en) | False touch prevention method and device, storage medium and electronic equipment | |
CN110824516B (en) | Positioning method and electronic equipment | |
CN105577712A (en) | File uploading method, file uploading device, and file uploading system | |
CN109450508B (en) | Antenna determination method and device and mobile terminal | |
CN105159655B (en) | Behavior event playing method and device | |
CN110908586A (en) | Keyboard display method and device and terminal equipment | |
CN115348256A (en) | Posting data downloading method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17 Applicant after: Guangzhou KuGou Networks Co., Ltd. Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F Applicant before: Guangzhou KuGou Networks Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |