CN113157246A - Volume adjusting method and device, electronic equipment and storage medium - Google Patents

Volume adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113157246A
CN113157246A CN202110707732.4A CN202110707732A CN113157246A CN 113157246 A CN113157246 A CN 113157246A CN 202110707732 A CN202110707732 A CN 202110707732A CN 113157246 A CN113157246 A CN 113157246A
Authority
CN
China
Prior art keywords
volume
target
distance
terminal equipment
determining
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.)
Granted
Application number
CN202110707732.4A
Other languages
Chinese (zh)
Other versions
CN113157246B (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.)
Shenzhen Xiaomi Communication Technology Co ltd
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Shenzhen Xiaomi Communication Technology Co ltd
Beijing Xiaomi Mobile Software 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 Shenzhen Xiaomi Communication Technology Co ltd, Beijing Xiaomi Mobile Software Co Ltd filed Critical Shenzhen Xiaomi Communication Technology Co ltd
Priority to CN202110707732.4A priority Critical patent/CN113157246B/en
Publication of CN113157246A publication Critical patent/CN113157246A/en
Application granted granted Critical
Publication of CN113157246B publication Critical patent/CN113157246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application provides a volume adjusting method and device, electronic equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: acquiring the target volume of the current environment of the terminal equipment; acquiring the distance between a user and terminal equipment; determining the target volume of the terminal equipment according to the target volume and the distance; and adjusting the current play volume of the terminal equipment to the target play volume. According to the method, the volume of the played sound of the terminal equipment can be automatically adjusted, the user does not need to perform complicated volume adjustment operation, the method is convenient and fast, the volume of the played sound can be automatically adjusted in real time according to the distance between the terminal equipment and the user and the target volume change of the environment, the volume adjustment efficiency is improved, and the user has better experience.

Description

Volume adjusting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a volume adjustment method and apparatus, an electronic device, and a storage medium.
Background
When the terminal equipment plays sound in a noisy environment, the volume is increased to enable a user to clearly listen to the played content, but the volume may affect other people to bring new environmental noise; reducing the volume may cause the user to not hear the content being played, which may affect the user experience. In the related art, the volume of the played sound of the terminal equipment depends on manual adjustment of a user, and when the size of the environmental noise changes, the user needs to adjust the volume for many times so as to balance the self requirement and the influence on other people. The volume adjusting method is relatively complicated, so how to conveniently adjust the volume and improve the user experience becomes one of important research directions.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art. To this end, an embodiment of a first aspect of the present application provides a volume adjustment method, including:
acquiring the target volume of the current environment of the terminal equipment;
acquiring the distance between a user and terminal equipment;
determining the target volume of the terminal equipment according to the target volume and the distance;
and adjusting the current play volume of the terminal equipment to the target play volume.
According to the method, the volume of the played sound of the terminal equipment can be automatically adjusted, the user does not need to perform complicated volume adjustment operation, the method is convenient and fast, the volume of the played sound can be adjusted in real time according to the distance between the terminal equipment and the user and the target volume of the current environment, the volume adjustment efficiency is improved, and the user has better experience.
In order to achieve the above object, a second aspect of the present application provides a volume adjustment device, including:
the volume acquisition module is used for acquiring the target volume of the current environment of the terminal equipment;
the distance acquisition module is used for acquiring the distance between the user and the terminal equipment;
the processing module is used for determining the target volume of the terminal equipment according to the target volume and the distance;
and the adjusting module is used for adjusting the current play volume of the terminal equipment to the target play volume.
To achieve the above object, a third aspect of the present application provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the volume adjustment method provided in the embodiments of the first aspect of the present application.
To achieve the above object, a fourth aspect of the present application provides a computer-readable storage medium having computer instructions stored thereon, where the computer instructions are used to cause a computer to execute the volume adjustment method provided in the first aspect of the present application.
To achieve the above object, a fifth aspect of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the volume adjustment method provided in the first aspect of the present application.
Drawings
FIG. 1 is a flow chart of a volume adjustment method according to an embodiment of the present application;
FIG. 2 is a flow chart of a volume adjustment method according to an embodiment of the present application;
FIG. 3 is a flow chart of a volume adjustment method according to an embodiment of the present application;
FIG. 4 is a block diagram of a volume adjustment method according to an embodiment of the present application;
fig. 5 is a block diagram of a volume adjusting apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The volume adjusting method, apparatus, electronic device and storage medium according to the embodiments of the present application are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a volume adjustment method according to an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
s101, acquiring the target volume of the current environment of the terminal equipment.
The terminal equipment can select sound play for playing audio, video or answering a call, and the like, under the condition, environmental noise is one of important factors influencing the play volume, when the environmental noise is large, the play volume is correspondingly increased, so that a user can be ensured to clearly hear the play sound, and when the environmental noise is small, the play volume is correspondingly reduced, so that the influence on the periphery is reduced. Therefore, in order to obtain an accurate volume for external sound, it is necessary to refer to the volume of the environment in which the terminal device is currently located.
Optionally, the terminal device may include an electronic device, such as a tablet computer, a palm computer, a mobile phone, and the like, which can implement the volume adjustment method provided in the embodiment of the present application, and is not limited herein. In the embodiment of the application, a processor and a memory can be arranged in the electronic device. Alternatively, the memory may store an operating system, an application program or other program modules, and the processor implements the volume adjustment method provided by the embodiment of the present application by executing the application program stored in the memory.
Optionally, after the terminal device starts the play volume function, a microphone of the terminal device may be used to detect noise of the current environment, or a noise sensor or a microphone (MIC device) arranged inside the terminal device may be used to detect noise; optionally, the collected environmental noise may be analyzed by a decibel meter, so as to obtain the volume of the current environment of the terminal device.
Optionally, the volume of the current environment of the terminal device may be detected for multiple times to obtain multiple candidate volumes, and then an average value of the candidate volumes is obtained as the target volume of the current environment of the terminal device.
Alternatively, the terminal device may be a hardware device with various operating systems, such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and the like.
S102, obtaining the distance between the user and the terminal equipment.
The distance between the user and the terminal equipment is also one of factors influencing the target play-out volume, when the distance is longer, the play-out volume is correspondingly increased, so that the user can clearly hear the play-out volume, and when the distance is shorter, the play-out volume is correspondingly reduced, so that the influence on the periphery is reduced. Therefore, in order to obtain accurate play volume, the distance between the user and the terminal device needs to be referred.
In some implementations, an image of the user may be collected, and the distance between the user and the terminal device may be obtained by analyzing the image. In some implementations, the distance between the user and the terminal device may be obtained by a hardware device, such as a sensor with a distance detection function.
S103, determining the target volume of the terminal device according to the target volume and the distance.
As a possible implementation manner, a mapping function with the target volume and the distance as inputs may be constructed, and the target play-out volume of the terminal device is determined by the mapping function. Alternatively, the mapping function may be as follows:
r=f(Ve,le)
wherein r is the target playback volume, f (V)e,le) Indicating information about target volume VeAnd a distance leThe mapping function of (2).
After the target volume and the distance are acquired, the target volume and the distance can be input into a mapping function, and the target volume for playing out is acquired.
As another possible implementation, a mapping table between the target volume, the distance, and the playback volume of the environment may be established. After the target volume and the distance are obtained, the mapping relation table is correspondingly inquired, and the target volume of playing outside matched with the target volume and the distance can be inquired.
As another possible implementation manner, since the distance reflects the relative position between the user and the terminal device, different position relationships may correspond to different adjustment strategies for the loud volume, and the environmental noise, that is, the target volume of the environment is a parameter strongly related to the loud volume, the target volume may be used as an input variable under different strategies to determine the target loud volume. That is, the distance may be used as a reference condition for the selected adjustment strength or policy, the target acquisition policy may be determined based on the reference condition, and the target playback volume may be determined according to the selected target acquisition policy and the target volume.
And S104, adjusting the current play-out volume of the terminal equipment to the target play-out volume.
And the processor of the terminal equipment adjusts the current play volume according to the target play volume, namely, the current play volume is adjusted to the target play volume, so that the play volume meets the requirements of users.
In the embodiment of the application, the target volume of the current environment of the terminal equipment is obtained; acquiring the distance between a user and terminal equipment; determining the target volume of the terminal equipment according to the target volume and the distance; and adjusting the current play volume of the terminal equipment to the target play volume. The volume adjusting method can automatically adjust the playback volume of the terminal device, does not need a user to perform complicated volume adjusting operation, is convenient and quick, can automatically adjust the playback volume in real time according to the distance between the terminal device and the user and the change of the environment target volume, improves the volume adjusting efficiency, and enables the user to have better experience.
On the basis of the foregoing embodiment, the step S102 of acquiring the distance between the user and the terminal device includes the following steps:
as a possible implementation manner, a proximity sensor is generally installed on the terminal device, and the distance between the user and the terminal device can be detected through the proximity sensor. Alternatively, the proximity sensor may be a distance sensor, the distance sensor transmits a signal to the surroundings, forms a reflection process after contacting a human body, receives the signal after reflecting to the sensor, processes data of a time difference between the transmitted signal and the received signal, and calculates the distance between the user and the terminal device.
As another possible implementation manner, the image acquisition device may be started by the terminal device, and the image acquisition device acquires an image within its own shooting range. Alternatively, the image acquisition device may be a front camera on the terminal. Further, the terminal device may perform face recognition on the acquired image to determine whether the acquired image includes a face, for example, the acquired image is processed by using a face recognition algorithm, which may include but is not limited to: a Feature-based Recognition algorithm (Feature-based Recognition algorithms), an algorithm for recognizing by using a neural network (Recognition algorithms network), and the like.
Optionally, after the face recognition is performed on the acquired image based on the face recognition algorithm, if a face appears in the acquired image, the position of the face in the image is extracted. After the face is extracted to be in the image, the coordinate system is converted based on the camera parameters, and the distance between the user and the terminal equipment can be determined.
Optionally, in this embodiment of the application, after the face position appears in the acquired image, the size of the area of the face may be identified, and the distance between the user and the terminal device may be determined based on the size of the area. For example, the terminal device stores a mapping relationship between the size of the area of the face and the distance in advance, and after the size of the area is obtained, the mapping relationship is queried, so that the distance between the user and the terminal device can be queried.
The volume adjusting method can automatically acquire the distance between the user and the terminal equipment and the target volume of the environment, and can automatically adjust the external volume in real time according to the distance between the terminal equipment and the user and the change of the target volume of the environment, namely, the adjustment of the external volume is related to the actual condition of the environment, so that the interference of external noise to the external volume can be reduced, and the volume adjusting efficiency and accuracy are improved. The method can be automatically realized, so that the volume can be conveniently and quickly adjusted.
Fig. 2 is a flowchart of a volume adjustment method according to an embodiment of the present application, as shown in fig. 2, the method includes the following steps:
s201, determining a target acquisition strategy of the target volume according to the distance.
In order to improve the accuracy of the target volume for playing out, in the embodiment of the application, different acquisition strategies are constructed according to the target volume of the environment and the distance between the user and the terminal device, and then the target acquisition strategy of the volume for playing out is determined from the acquisition strategies according to the distance. The obtaining strategy is used for obtaining the target playing volume.
In some implementations, the state of the user relative to the terminal device is determined based on the distance, optionally, in response to the distance continuing to be a set value indicating that the user is not present in the acquired image or the sensor does not detect the presence of the user, determining the target acquisition policy as a first acquisition policy, wherein the set value is less than a minimum value of the set distance range; optionally, in response to the distance being within the set distance range, determining the state of the user relative to the terminal device as the position of the user relative to the terminal device is stable, and further determining the target acquisition policy as a second acquisition policy; optionally, in response to that the distance is larger than the set range and continuously decreases, determining the state of the user relative to the terminal device as that the user gradually approaches the terminal device from a far distance, and further determining the target acquisition policy as a third acquisition policy, wherein when the distance continuously decreases, the target acquisition policy starts to decrease from a distance larger than the set distance range.
In some implementations, a target distance range at which the distance is located is obtained; and inquiring the mapping relation between the distance range and the acquisition strategy based on the target distance range, and determining the target acquisition strategy. The method comprises the steps of collecting images through an image collecting device of the terminal equipment, carrying out face recognition on the collected images, responding to the situation that no face appears in the collected images, enabling a target distance to be a set value continuously, determining a target obtaining strategy as a first obtaining strategy according to a mapping relation, and determining the target obtaining strategy as a first distance range, namely the first obtaining strategy corresponding to the set value, for example, the target distance is a set value of-1.
Responding to the appearance of a face in an acquired image, determining a distance according to the face position in the image with the face, and if the distance is between numerical intervals (0, d 1), which indicates that the position of a user relative to the terminal device is stable, determining a target acquisition strategy as a second acquisition strategy corresponding to a second distance range, wherein d1 represents a preset value, and if the distance is continuously reduced and 0< d1. indicates that the user gradually approaches the terminal device from a far distance, determining the target acquisition strategy as a third acquisition strategy corresponding to a third distance range 1 is 0.5 meters.
S202, calculating the target volume and the distance according to the target obtaining strategy to obtain the target volume for playing.
In some implementations, the target acquisition policy is a first acquisition policy, that is, if the user does not appear in the acquired image or the sensor does not detect the presence of the user, the target volume may only be acquired depending on the target volume of the environment, and the environment volume needs to be exponentially increased to meet the user's requirement. Therefore, in the embodiment of the present application, according to a first obtaining strategy, a target volume is calculated, and a target playback volume is obtained as r = λ1×Ve×Ve×Ve2Wherein r represents a target playback volume, VeSaid target volume, λ, representing the environment1、λ2Representing preset parameters; optionally, in the embodiment of the present application, λ1A value of 3, λ2The value is 7.
In some implementations, the target obtaining policy is a second obtaining policy, that is, the position of the user relative to the terminal device is kept stable, and the play volume needs to be exponentially increased to meet the requirement of the user at this time, where the play volume increase speed of the second obtaining policy is smaller than that of the first obtaining policy, and therefore in this embodiment of the application, the target volume and the distance are calculated according to the second obtaining policy, and the obtained target play volume is r = λ3×Ve×Ve+D×Ve4Where D represents a plurality of acquired distances leAverage value of (a) (-)3、λ4Indicating preset parameters, optionally, the practice of the present applicationIn the examples, λ3A value of 6, λ4The value is 63.
In some implementations, the target acquisition policy is a third acquisition policy, that is, the user gradually approaches the terminal device from a distance, and then the playback volume increases with the increase of the target volume of the environment, so that the user demand can be met. Therefore, in the embodiment of the present application, the target volume is calculated according to the third acquisition strategy, and the target playback volume is acquired as r = λ5×Ve6Wherein λ is5、λ6Denotes a preset parameter, and135,λ246. Optionally, in the embodiment of the present application, λ5Value of 12, λ6The value is 127.
In the embodiment of the application, a target obtaining strategy of the playing volume is determined according to the distance, and then the target volume and the distance are calculated according to the target obtaining strategy to obtain the target playing volume. The method can automatically adjust the playing volume of the terminal equipment, can acquire the accurate target playing volume according to the target acquisition strategy, and further automatically adjust the terminal equipment without complicated volume adjustment operation of a user.
In order to improve accuracy, in the embodiment of the present application, a target volume of an environment may be obtained according to candidate volumes of multiple environments, and the volume adjustment method in the embodiment of the present application is further described below. Fig. 3 is a flowchart of a volume adjustment method according to an embodiment of the present application, and as shown in fig. 3, on the basis of the above embodiment, the method includes the following steps:
s301, a plurality of candidate volumes of the current environment are collected, and the difference between the last collected candidate volume and the target volume obtained in the previous step is obtained.
And detecting the volume of the current environment of the terminal equipment within a preset time according to a preset frequency or preset times, acquiring a plurality of candidate volumes, and caching the candidate volumes so as to obtain the target volume of the environment from the candidate volumes.
It should be noted that, for the content of acquiring the volume of the environment where the terminal device is currently located in step S301, reference may be made to the foregoing embodiment, and details are not described here again.
And (4) subtracting the last bit of the candidate volumes, namely the last candidate volume from the previously acquired target volume to acquire a difference value. For example, the acquired candidate volume is Ve1、Ve2、Ve3、Ve4、Ve5Then V will bee5And the target volume V acquired before the acquisitioneMaking difference to obtain difference value | Ve5-Ve’|。
S302, in response to the fact that the difference is not within the set range, obtaining an average value of the candidate volumes, wherein the average value is used as a target volume of the environment where the terminal device is located.
In response to the difference amount not being within the set range, that is, | Ve5-Ve' l ∉ d, wherein d is a preset range, an average value of a plurality of candidate volumes is obtained as the target volume of the environment where the terminal device is currently located.
In some implementations, in response to the amount of difference being within a set range, that is, | Ve5-Ve' I belongs to d, and the last candidate volume V can be obtainede5And the volume is used as the target volume of the environment where the terminal equipment is currently located.
In some implementations, in response to the amount of difference being within a set range, that is, | Ve5-Ve' is equal to d, and the target volume V acquired previously can be obtainede' as the target volume of the environment in which the terminal device is currently located.
Optionally, the number of times of the candidate volumes with the same volume may be determined from the multiple candidate volumes, and the volume with the largest occurrence number may be selected as the first target volume, or an average value of the multiple candidate volumes may be selected as the first target volume.
In the embodiment of the application, a plurality of candidate volumes of the current environment are collected, the difference between the last collected candidate volume and the target volume obtained before is obtained, and in response to the fact that the difference is not within the set range, the average value of the candidate volumes is obtained and serves as the target volume of the current environment. According to the method and the device, the target volume of the current environment of the terminal device is obtained according to the candidate volumes, and therefore reference data are provided for obtaining the target volume of the playback volume subsequently. The method is convenient and quick, has high accuracy, can acquire real-time environment target volume according to environmental noise change, and improves data effectiveness.
On the basis of the above embodiment, in the embodiment of the present application, two threads are provided, and the target volume of the current environment of the terminal device and the distance between the user and the terminal device are respectively obtained through the two threads.
Fig. 4 is a structural diagram of a volume adjustment method according to an embodiment of the present application, and as shown in fig. 4, an implementation architecture of a terminal device according to the embodiment of the present application includes a bottom layer, a frame (frame) layer, and an application layer. The bottom layer comprises a volume acquisition device and an image acquisition device, the candidate volume of the current environment of the terminal equipment is acquired through the volume acquisition device and is sent to a first thread started by a system server (system server) of the terminal, and an audio manager (audio manager) of the system server reports the acquired candidate volume to all classes registered to the environment volume detection event; similarly, the image acquisition device can acquire images, and when the image indicates that the position of the user changes, the image is sent to a second thread started by the system server, the position of the user is converted into the distance between the user and the terminal equipment, and the distance is reported to all classes registered to be related to the distance event of the detected user. The framework layer monitors the bottom layer, obtains the target volume of the environment according to the candidate volume, further takes the target volume of the environment and the distance between the user and the terminal equipment as independent variables, takes the target play volume as a dependent variable, initializes a sound curve, obtains the target play volume, finally inputs the target play volume into the application layer, and adjusts the play volume of the terminal equipment.
According to the method, the target volume of the current environment of the terminal equipment is obtained according to the candidate volumes, the user does not need to perform complicated volume adjustment operation, the method is convenient and rapid, the accuracy is high, the volume of the played sound can be automatically adjusted in real time according to the distance between the terminal equipment and the user and the change of the target volume of the environment, the volume adjustment efficiency is improved, and the user has better experience.
Fig. 5 is a block diagram of a volume adjustment device according to an embodiment of the present application, and as shown in fig. 5, based on the same application concept, an embodiment of the present application further provides a volume adjustment device 500, including:
a volume obtaining module 510, configured to obtain a target volume of an environment where the terminal device is currently located;
a distance obtaining module 520, configured to obtain a distance between a user and a terminal device;
the processing module 530 is configured to determine a target volume of the terminal device according to the target volume and the distance;
and the adjusting module 540 is configured to adjust the current play-out volume of the terminal device to the target play-out volume.
According to the method, the volume of the played sound of the terminal equipment can be automatically adjusted, the user does not need to perform complicated volume adjustment operation, the method is convenient and fast, the volume of the played sound can be automatically adjusted in real time according to the distance between the terminal equipment and the user and the change of the environment target volume, the volume adjustment efficiency is improved, and the user has better experience.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 530 is further configured to: determining a target acquisition strategy of the volume to be played out according to the distance; and calculating the target volume and the distance according to a target acquisition strategy to acquire the target volume for playing.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 530 is further configured to: determining the state of the user relative to the terminal equipment according to the distance; and determining a target acquisition strategy according to the state of the user relative to the terminal equipment.
Further, in a possible implementation manner of the embodiment of the present application, the target obtaining policy includes one of the following policies: the first acquisition policy is r = λ 1 × Ve + λ 2; wherein r represents the target volume, Ve represents the target volume of the environment, and λ 1 and λ 2 represent preset parameters; the second acquisition policy is r = λ 3 × Ve + D × Ve + λ 4; d represents the average value of the obtained distances le, and lambda 3 and lambda 4 represent preset parameters; the third acquisition strategy is r = λ 5 × Ve + λ 6, where λ 5 and λ 6 represent preset parameters, where λ 1< λ 3< λ 5 and λ 2< λ 4< λ 6.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 530 is further configured to: in response to the fact that the distance is continuously a set value, determining the state of the user relative to the terminal equipment as that the terminal equipment does not detect the user, wherein the target acquisition strategy is a first acquisition strategy; in response to the change of the distance within the set distance range, determining the state of the user relative to the terminal equipment as the position stability of the user relative to the terminal equipment, wherein the target acquisition strategy is a second acquisition strategy; and in response to the distance continuously becoming smaller, determining the state of the user relative to the terminal equipment as the user gradually approaches the terminal equipment from far, wherein the target acquisition strategy is a third acquisition strategy.
Further, in a possible implementation manner of the embodiment of the present application, the distance obtaining module 520 is further configured to: acquiring an image through an image acquisition device of the terminal equipment, and identifying the face of the acquired image; in response to the fact that no human face appears in the acquired image, determining the distance to be a set value; and responding to the appearance of the face in the acquired image, and determining the distance according to the face position in the image with the face.
Further, in a possible implementation manner of the embodiment of the present application, the volume obtaining module 510 is further configured to: acquiring a plurality of candidate volumes of the current environment, and acquiring the difference between the last acquired candidate volume and the target volume acquired previously; in response to the fact that the difference is not within the set range, obtaining an average value of the candidate volumes, and using the average value as a target volume of the current environment where the terminal equipment is located; or, in response to the difference being within the set range, acquiring the last candidate volume as the target volume of the current environment of the terminal device; or, taking the previously acquired target volume as the target volume of the current environment where the terminal device is located.
It should be noted that the above description of the volume adjusting method is also applicable to the volume adjusting device of the present application, and is not repeated herein.
Based on the same application concept, the embodiment of the application also provides the electronic equipment.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic device 600 includes a storage medium 610, a processor 620, and a computer program product stored in the memory 610 and executable on the processor 620, and when the processor executes the computer program, the volume adjustment method is implemented.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Based on the same application concept, embodiments of the present application further provide a computer-readable storage medium having computer instructions stored thereon, where the computer instructions are used to enable a computer to execute the volume adjustment method in the foregoing embodiments.
Based on the same application concept, embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the volume adjustment method in the foregoing embodiments is provided.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (17)

1. A method of adjusting volume, comprising:
acquiring the target volume of the current environment of the terminal equipment;
acquiring the distance between a user and terminal equipment;
determining the target volume of the terminal equipment according to the target volume and the distance;
and adjusting the current play volume of the terminal equipment to the target play volume.
2. The method according to claim 1, wherein the determining the target volume of play out of the terminal device according to the target volume and the distance comprises:
determining a target acquisition strategy of the target playing volume according to the distance;
and calculating the target volume and the distance according to the target acquisition strategy to acquire the target volume for playing.
3. The method of claim 2, wherein determining a target acquisition strategy for the play-out volume according to the distance comprises:
determining the state of the user relative to the terminal equipment according to the distance;
and determining the target acquisition strategy according to the state of the user relative to the terminal equipment.
4. The method of claim 2 or 3, wherein the target acquisition policy comprises one of the following policies:
the first acquisition strategy is r = λ1×Ve×Ve×Ve2(ii) a Wherein r represents a target playback volume, VeSaid target volume, λ, representing the environment1、λ2Representing preset parameters;
the second acquisition strategy is r = λ3×Ve×Ve+D×Ve4(ii) a Where D represents a plurality of acquired distances leAverage value of (a) (-)3、λ4Representing preset parameters;
the third acquisition strategy is r = λ5×Ve6Wherein λ is5、λ6Representing preset parameters;
wherein λ is135,λ246
5. The method of claim 4, wherein the determining the state of the user relative to the terminal device according to the distance comprises:
in response to that the distance is continuously a set value, determining the state of the user relative to the terminal device as that the terminal device does not detect the user, wherein the target acquisition policy is the first acquisition policy;
determining the state of the user relative to the terminal equipment as the position stability of the user relative to the terminal equipment in response to the distance being within a set distance range, wherein the target acquisition strategy is the second acquisition strategy;
and in response to the distance continuously becoming smaller, determining the state of the user relative to the terminal equipment as the user gradually approaches the terminal equipment from far, wherein the target acquisition strategy is the third acquisition strategy.
6. The method of claim 4, wherein determining a target acquisition strategy for the play-out volume according to the distance comprises:
acquiring a target distance range where the distance is located;
and inquiring the mapping relation between the distance range and the acquisition strategy based on the target distance range, and determining the target acquisition strategy.
7. The method of claim 1, wherein the obtaining the distance between the user and the terminal device comprises:
acquiring an image through an image acquisition device of the terminal equipment, and performing face recognition on the acquired image;
in response to the fact that no human face appears in the acquired image, determining the distance to be a set value;
and responding to the appearance of the human face in the acquired image, and determining the distance according to the position of the human face in the image with the human face.
8. The method according to any one of claims 1-3 or 7, wherein the obtaining of the target volume of the current environment in which the terminal device is located comprises:
acquiring a plurality of candidate volumes of the current environment, and acquiring the difference between the last acquired candidate volume and the target volume acquired previously;
in response to that the difference is not within the set range, acquiring an average value of the candidate volumes as a target volume of the current environment of the terminal equipment; alternatively, the first and second electrodes may be,
responding to the difference amount within a set range, and acquiring the last candidate volume as the target volume of the current environment; or, the previous target volume is used as the target volume of the current environment where the terminal device is located.
9. A volume adjustment device, comprising:
the volume acquisition module is used for acquiring the target volume of the current environment of the terminal equipment;
the distance acquisition module is used for acquiring the distance between the user and the terminal equipment;
the processing module is used for determining the target volume of the terminal equipment according to the target volume and the distance;
and the adjusting module is used for adjusting the current play volume of the terminal equipment to the target play volume.
10. The apparatus of claim 9, wherein the processing module is further configured to:
determining a target acquisition strategy of the target playing volume according to the distance;
and calculating the target volume and the distance according to the target acquisition strategy to acquire the target volume for playing.
11. The apparatus of claim 10, wherein the processing module is further configured to:
determining the state of the user relative to the terminal equipment according to the distance;
and determining the target acquisition strategy according to the state of the user relative to the terminal equipment.
12. The apparatus of claim 10 or 11, wherein the target acquisition policy comprises one of the following policies:
the first acquisition strategy is r = λ1×Ve×Ve×Ve2(ii) a Wherein r represents a target playback volume, VeSaid target volume, λ, representing the environment1、λ2Representing preset parameters;
the second acquisition strategy is r = λ3×Ve×Ve+D×Ve4(ii) a Where D represents a plurality of acquired distances leAverage value of (a) (-)3、λ4Representing preset parameters;
the third acquisition strategy is r = λ5×Ve6Wherein λ is5、λ6Representing preset parameters;
wherein λ is135,λ246
13. The apparatus of claim 12, wherein the processing module is further configured to:
in response to that the distance is continuously a set value, determining the state of the user relative to the terminal device as that the terminal device does not detect the user, wherein the target acquisition policy is the first acquisition policy;
determining the state of the user relative to the terminal equipment as the position stability of the user relative to the terminal equipment in response to the change of the distance within a set distance range, wherein the target acquisition strategy is the second acquisition strategy;
and in response to the distance continuously becoming smaller, determining the state of the user relative to the terminal equipment as the user gradually approaches the terminal equipment from far, wherein the target acquisition strategy is the third acquisition strategy.
14. The apparatus of claim 9, wherein the distance obtaining module is further configured to:
carrying out image acquisition on an image acquisition device of the terminal equipment, and carrying out face recognition on the acquired image;
in response to the fact that no human face appears in the acquired image, determining the distance to be a set value;
and responding to the appearance of the human face in the acquired image, and determining the distance according to the position of the human face in the image with the human face.
15. The apparatus according to any one of claims 9-11 or 14, wherein the volume obtaining module is further configured to:
acquiring a plurality of candidate volumes of the current environment, and acquiring the difference between the last acquired candidate volume and the target volume acquired in the previous time;
in response to that the difference is not within the set range, acquiring an average value of the candidate volumes as a target volume of the current environment of the terminal equipment; alternatively, the first and second electrodes may be,
responding to the difference amount within a set range, and acquiring the last candidate volume as the target volume of the current environment; or, the previous target volume is used as the target volume of the current environment where the terminal device is located.
16. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
17. A computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any of claims 1-8.
CN202110707732.4A 2021-06-25 2021-06-25 Volume adjusting method and device, electronic equipment and storage medium Active CN113157246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110707732.4A CN113157246B (en) 2021-06-25 2021-06-25 Volume adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110707732.4A CN113157246B (en) 2021-06-25 2021-06-25 Volume adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113157246A true CN113157246A (en) 2021-07-23
CN113157246B CN113157246B (en) 2021-11-02

Family

ID=76875944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110707732.4A Active CN113157246B (en) 2021-06-25 2021-06-25 Volume adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113157246B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965641A (en) * 2021-09-16 2022-01-21 Oppo广东移动通信有限公司 Volume adjusting method and device, terminal and computer readable storage medium
CN114125659A (en) * 2021-10-29 2022-03-01 歌尔科技有限公司 Volume real-time compensation method, electronic device and readable storage medium
CN114205453A (en) * 2021-12-15 2022-03-18 惠州Tcl移动通信有限公司 Terminal control method and device, computer equipment and storage medium
CN115484117A (en) * 2022-08-30 2022-12-16 海尔优家智能科技(北京)有限公司 Call answering method and device, storage medium and electronic device
CN117278895A (en) * 2023-11-21 2023-12-22 恩平市海天电子科技有限公司 Microphone signal optimization method and system based on data enhancement

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060022053A (en) * 2004-09-06 2006-03-09 삼성전자주식회사 Audio-visual system and tuning method thereof
CN104618796A (en) * 2015-02-13 2015-05-13 京东方科技集团股份有限公司 Volume adjusting method and display equipment
CN106331371A (en) * 2016-09-14 2017-01-11 维沃移动通信有限公司 Volume adjustment method and mobile terminal
CN106648527A (en) * 2016-11-08 2017-05-10 乐视控股(北京)有限公司 Volume control method, device and playing equipment
US20170277509A1 (en) * 2016-03-24 2017-09-28 Onkyo Corporation Volume adjustment device
CN108628572A (en) * 2018-04-10 2018-10-09 平安科技(深圳)有限公司 Robot adjusts method, apparatus, computer equipment and the storage medium of volume
CN109445744A (en) * 2018-11-09 2019-03-08 苏州诚满信息技术有限公司 A kind of broadcasting regulating system based on broadcasting distance

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060022053A (en) * 2004-09-06 2006-03-09 삼성전자주식회사 Audio-visual system and tuning method thereof
CN104618796A (en) * 2015-02-13 2015-05-13 京东方科技集团股份有限公司 Volume adjusting method and display equipment
US20170277509A1 (en) * 2016-03-24 2017-09-28 Onkyo Corporation Volume adjustment device
CN106331371A (en) * 2016-09-14 2017-01-11 维沃移动通信有限公司 Volume adjustment method and mobile terminal
CN106648527A (en) * 2016-11-08 2017-05-10 乐视控股(北京)有限公司 Volume control method, device and playing equipment
CN108628572A (en) * 2018-04-10 2018-10-09 平安科技(深圳)有限公司 Robot adjusts method, apparatus, computer equipment and the storage medium of volume
CN109445744A (en) * 2018-11-09 2019-03-08 苏州诚满信息技术有限公司 A kind of broadcasting regulating system based on broadcasting distance

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965641A (en) * 2021-09-16 2022-01-21 Oppo广东移动通信有限公司 Volume adjusting method and device, terminal and computer readable storage medium
WO2023040547A1 (en) * 2021-09-16 2023-03-23 Oppo广东移动通信有限公司 Volume adjustment method and apparatus, terminal, and computer-readable storage medium
CN114125659A (en) * 2021-10-29 2022-03-01 歌尔科技有限公司 Volume real-time compensation method, electronic device and readable storage medium
CN114205453A (en) * 2021-12-15 2022-03-18 惠州Tcl移动通信有限公司 Terminal control method and device, computer equipment and storage medium
CN115484117A (en) * 2022-08-30 2022-12-16 海尔优家智能科技(北京)有限公司 Call answering method and device, storage medium and electronic device
CN117278895A (en) * 2023-11-21 2023-12-22 恩平市海天电子科技有限公司 Microphone signal optimization method and system based on data enhancement
CN117278895B (en) * 2023-11-21 2024-01-26 恩平市海天电子科技有限公司 Microphone signal optimization method and system based on data enhancement

Also Published As

Publication number Publication date
CN113157246B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN113157246B (en) Volume adjusting method and device, electronic equipment and storage medium
CN109506568B (en) Sound source positioning method and device based on image recognition and voice recognition
US20170289681A1 (en) Method, apparatus and computer program product for audio capture
CN109032039B (en) Voice control method and device
CN110808048A (en) Voice processing method, device, system and storage medium
CN109640224B (en) Pickup method and device
CN113014983B (en) Video playing method and device, storage medium and electronic equipment
CN113676592B (en) Recording method, recording device, electronic equipment and computer readable medium
CN108933911B (en) Volume adjusting method, device, equipment and storage medium
WO2022017006A1 (en) Video processing method and apparatus, and terminal device and computer-readable storage medium
CN111091845A (en) Audio processing method and device, terminal equipment and computer storage medium
CN104376855A (en) Intelligent information processing method and system and intelligent handset
US20150049247A1 (en) Method and apparatus for using face detection information to improve speaker segmentation
CN107450882B (en) Method and device for adjusting sound loudness and storage medium
CN113596240B (en) Recording method, recording device, electronic equipment and computer readable medium
CN111294704B (en) Audio processing method, device and storage medium
CN113676593B (en) Video recording method, video recording device, electronic equipment and storage medium
CN110297929A (en) Image matching method, device, electronic equipment and storage medium
CN112634879B (en) Voice conference management method, device, equipment and medium
US20220343931A1 (en) Information processing method, electronic equipment, and storage medium
CN112185413B (en) Voice processing method and device for voice processing
CN114745537A (en) Sound and picture delay testing method and device, electronic equipment and storage medium
CN111144287B (en) Audiovisual auxiliary communication method, device and readable storage medium
CN114125365A (en) Video conference method, device and readable storage medium
CN112380938A (en) Face recognition and temperature measurement method, device, equipment and medium

Legal Events

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