Patent Description:
Currently, most audio played by an audio playback device comes from different audio operators. Volume varies during audio recording by different audio operators. In this way, when same playback volume is set in the playback device, there is a significant volume difference for different audio.

Therefore, when a user is listening to audio, a voice fluctuates between different audio, which affects user experience.

<CIT> discloses a volume control method. In the method, a server receives an audio playback request message sent by a terminal, wherein the audio playback request message includes the terminal identifier of the terminal and a file identifier of a to-be-played original audio file. The server obtains a gain value of the to-be-played original audio file based on the file identifier of the to-be-played original audio file. When the gain value of the to-be-played original audio file is not in a preset gain interval, the server queries a preset audio gain file mapping table based on the file identifier of the to-be-played original audio file and the terminal identifier, and obtains an audio gain file corresponding to the terminal identifier. The server sends the audio gain file as a to-be-played audio file to the terminal.

<CIT> discloses a music volume adaptive adjustment method. The method comprises: obtaining a music track currently played by the terminal; obtaining a model number of the terminal, determining a corresponding music library according to the model number of the terminal, and determining a first volume value of the music track according to the music library; obtaining the model number of an earphone to which the terminal accesses, obtaining a noise reduction index corresponding to the model number of the earphone according to an earphone library, and determining a second volume value of the music track according to the noise reduction index and the first volume value; and controlling the terminal to adjust the volume to the second volume value.

Embodiments of this application provide a volume adjustment method and device, and a system, to reduce a volume perception difference when a user plays different audio, thereby improving user experience.

According to a first aspect, an embodiment of this application provides a volume adjustment method. The method includes:
A first terminal device sends a first playback request to a server, where the first playback request is used to request to play first audio on the first terminal device, and the first playback request carries a model of the first terminal device and an identifier of the first audio.

The server determines a first volume value of the first audio based on the identifier of the first audio and the model of the first terminal device.

The server determines, based on the first volume value and a volume threshold of the first terminal device, a first volume gain for playing the first audio on the first terminal device.

The server sends first volume control information to the first terminal device, where the first volume control information is used to indicate the first volume gain.

The first terminal device determines, based on the first volume gain and a second volume value currently set by the first terminal device, a first target volume value for playing the first audio on the first terminal device.

The first terminal device adjusts volume of playing the first audio to the first target volume value.

Optionally, the volume adjustment method provided in this embodiment of this application may be used to adjust volume of playing audio, or may be used to adjust volume of playing a video, or may be used to adjust volume of another file that can be listened to and played on the first terminal device. This is not limited in this embodiment of this application.

It should be noted that a volume value in this embodiment of this application usually does not indicate an absolute volume value. The volume value in this embodiment of this application is a specific value, and the value indicates a proportional relationship between playback volume corresponding to the volume value and maximum playback volume of the first terminal device. A larger volume value indicates higher playback volume corresponding to the volume value, and a smaller volume value indicates lower playback volume corresponding to the volume value.

It should be further noted that the first volume value in this embodiment of this application is a volume value with a good effect when the first audio is listened to.

Optionally, the server may determine the first volume value of the first audio in a plurality of manners based on the identifier of the first audio and the model of the first terminal device. This is not limited in this embodiment of this application.

In a possible implementation, the server may receive a plurality of volume values, where the plurality of volume values include volume values used when a plurality of users play the first audio by using terminal devices that are of a same model as the first terminal device; and determine the first volume value based on the plurality of volume values. In the plurality of volume values, some values are the same, and some values are different.

For example, the server may use a volume value that appears most frequently in the plurality of volume values as the first volume value.

For another example, the server may use an average value of the plurality of volume values as the first volume value.

That is, the server may obtain, through big data statistics, a volume value with a good effect when audio is played on a terminal device of a model.

In another possible implementation, the server may determine the first volume value of the first audio based on the identifier of the first audio, the model of the first terminal device, and volume information. The volume information includes a mapping relationship between the identifier of the first audio, the model of the first terminal device, and the first volume value.

It should be noted that the volume information includes a mapping relationship between an audio identifier, a device model, and a volume value, and is used to indicate a volume value with a good effect when audio is played on a terminal device of a model.

Optionally, the server may obtain the volume information in a plurality of manners. This is not limited in this embodiment of this application.

In a first possible implementation, a person skilled in the art may configure the volume information for the server in advance.

In a second possible implementation, before the server determines the first volume value of the first audio based on the identifier of the first audio and the model of the first terminal device, the server may obtain the volume information through big data statistics, and locally store the volume information. Correspondingly, the server may invoke the locally stored volume information.

In a third possible implementation, the server may obtain the volume information from another terminal device.

It should be noted that the volume threshold in this embodiment of this application is a default volume value configured at delivery of the first terminal device. The default volume value may be measured by a person skilled in the art by using a professional measurement device before delivery. Therefore, it may be considered that a performance effect of the first terminal device is good when standard audio is played on the first terminal device with volume corresponding to the default volume value.

Optionally, the server may obtain the volume threshold in a plurality of manners. This is not limited in this embodiment of this application.

In a possible implementation, a person skilled in the art may preconfigure volume threshold information for the server. The volume threshold information includes a mapping relationship between the device model and the volume threshold.

In another possible implementation, the server may receive the volume threshold from another device, for example, a professional measurement device.

It should be noted that, when the first terminal device is used to play different audio, because volume varies during audio recording by different audio operators, a volume value (for example, the first volume value) with a good listening effect may vary to different degrees. That is, if the volume during audio recording is high, the first volume value is small; or if the volume during audio recording is low, the first volume value is large.

However, the default volume value configured at delivery (for example, the volume threshold) is a volume value with a good performance effect when the standard audio is played on the first terminal device. Therefore, for audio recorded by different audio operators, there is a difference between a volume value with a good listening effect and the default volume value. Therefore, the difference between the two volume values may be equalized by using the first volume gain.

It should be further noted that, because a performance effect of the first terminal device is good when the standard audio is played on the first terminal device with volume corresponding to the default volume value, it may be considered that a volume gain corresponding to the volume threshold is <NUM>, that is, volume corresponding to the volume threshold is volume with good performance, and a volume increase or decrease operation does not need to be performed.

In a possible implementation, the server may determine the first volume gain based on the first volume value, the volume threshold of the first terminal device, and first gain information. The first gain information includes a mapping relationship between a volume value and a volume gain.

It should be noted that, in the first volume gain information, one volume gain may correspond to at least one volume value. When one volume gain corresponds to a plurality of volume values, it may be understood that the volume gain corresponds to a volume value range, and the plurality of volume values in the volume value range belong to a same volume level. Volume values of a same volume level correspond to a same volume gain, that is, same volume adjustment processing may be performed on the volume values of the same volume level.

In a possible implementation, the server may determine, based on volume level information, a first volume level to which the first volume value belongs and a second volume level to which the volume threshold belongs, where the volume level information includes a mapping relationship between a volume value and a volume level; and determine the first volume gain based on the first volume level, the second volume level, and second gain information. The second gain information includes a mapping relationship between a volume level and a volume gain.

In a possible implementation, when the first volume gain is greater than <NUM>, the first target volume value is greater than the second volume value. Alternatively, when the first volume gain is equal to <NUM>, the first target volume value is equal to the second volume value. Alternatively, when the first volume gain is less than <NUM>, the first target volume value is less than the second volume value.

It should be noted that the second volume value in this embodiment of this application may be understood as a volume value currently set by the first terminal device, may be understood as a volume value used for playing previous audio of the first audio, or may be understood as a default volume value when the device is powered on or a player is enabled. The volume value used for playing the previous audio of the first audio may be a volume value manually adjusted by a user. This is not limited in this embodiment of this application.

It should be noted that the user may adjust playback volume of the terminal device in a personalized manner based on different listening environments and/or listening habits. For example, some users may increase playback volume on a noisy road, and some users may decrease the playback volume in a quiet library. For another example, some users prefer to listen to light music in high voice volume, and some users prefer to listen to rock music in low voice volume. Therefore, based on the playback volume (the second volume value) currently used by the user, the first terminal device may further obtain, with reference to the first volume gain, the first target volume value for playing the first audio, that is, use a product of the second volume value and the first volume gain as the first target volume value.

According to the volume adjustment method provided in this embodiment of this application, when the terminal device determines the first target volume value of the first audio, a listening habit and/or a listening scenario of the user are/is considered, so that a perception difference of the user when different audio is played can be further reduced.

In a possible implementation, the method further includes: A second terminal device sends a second playback request to the server, where the second playback request is used to request to play second audio on the second terminal device, and the second playback request carries a model of the second terminal device and an identifier of the second audio. When the server determines that the model of the second terminal device is different from the model of the first terminal device, the server determines a third volume value of the second audio based on the identifier of the second audio and the model of the first terminal device. The server determines, based on the third volume value and the volume threshold, a second volume gain for playing the second audio on the first terminal device. The server sends second volume control information to the second terminal device, where the second volume control information is used to indicate the second volume gain. The second terminal device determines, based on the second volume gain, a fourth volume value currently set by the second terminal device, and a volume distinguishing factor, a second target volume value for playing the second audio on the second terminal device, where the volume distinguishing factor indicates a volume difference between the first terminal device and the second terminal device. The second terminal device adjusts volume of playing the second audio to the second target volume value.

It should be noted that, because audio playback performance of terminal devices of different models is different, the first terminal device may be used as a standard device, and the volume distinguishing factor may indicate a difference between volume of a terminal device of another model and volume of the standard device.

Therefore, the server only needs to calculate a volume gain of each piece of audio played on the first terminal device, and a volume gain of a terminal device of another model may be obtained by calculating a product of the volume gain of the first terminal device and the volume distinguishing factor. That is, the server only needs to store gain information corresponding to the standard device and a volume distinguishing factor between the standard device and a terminal device of another model, and does not need to store gain information of terminal devices of each model, which can reduce a calculation amount and a storage amount of the server.

Optionally, the first terminal device may send a first volume report to the server, where the first volume report includes the model of the first terminal device, the identifier of the first audio, and the first target volume value, so that the server may perform the foregoing big data statistics based on the first volume report.

Optionally, when the first audio is played on the first terminal device with the first target volume value, the user may also manually adjust playback volume. Therefore, the first terminal device may also send a second volume report to the server, where the second volume report includes the model of the first terminal device, the identifier of the first audio, and the second target volume value, and the second target volume value is a volume value obtained by the user manually adjusting the first target volume value, so that the server can perform the foregoing big data statistics based on the second volume report.

Correspondingly, the server may further improve, based on the volume report, accuracy of the first volume value obtained through big data statistics.

According to a second aspect, an embodiment of this application further provides a volume adjustment system. The system includes a first terminal device and a server. A communication connection is established between the first terminal device and the server.

The first terminal device is configured to send a first playback request to the server. The first playback request is used to request to play first audio on the first terminal device, and the first playback request carries a model of the first terminal device and an identifier of the first audio.

The server is configured to: determine a first volume value of the first audio based on the identifier of the first audio and the model of the first terminal device; determine, based on the first volume value and a volume threshold of the first terminal device, a first volume gain for playing the first audio on the first terminal device; and send first volume control information to the first terminal device, where the first volume control information is used to indicate the first volume gain.

The first terminal device is further configured to: determine, based on the first volume gain and a second volume value currently set by the first terminal device, a first target volume value for playing the first audio on the first terminal device; and adjust volume of playing the first audio to the first target volume value.

In a possible implementation, the server is further configured to: receive a plurality of volume values before determining the first volume value of the first audio based on the identifier of the first audio and the model of the first terminal device, where the plurality of volume values include volume values set when a plurality of users play the first audio by using terminal devices that are of a same model as the first terminal device; and determine the first volume value based on the plurality of volume values.

In a possible implementation, the server is specifically configured to determine a volume value that is in the plurality of volume values and that is set for a largest quantity of times as the first volume value.

In a possible implementation, the server is specifically configured to determine an average value of the plurality of volume values as the first volume value.

In a possible implementation, the server is specifically configured to determine the first volume value based on the identifier of the first audio, the model of the first terminal device, and volume information. The volume information includes a mapping relationship between the identifier of the first audio, the model of the first terminal device, and the first volume value.

In a possible implementation, the system further includes a second terminal device. A communication connection is established between the second terminal device and the server. The second terminal device is configured to send a second playback request to the server, where the second playback request is used to request to play second audio on the second terminal device, and the second playback request carries a model of the second terminal device and an identifier of the second audio. The server is configured to: when determining that the model of the second terminal device is different from the model of the first terminal device, determine a third volume value of the second audio based on the identifier of the second audio and the model of the first terminal device; determine, based on the third volume value and the volume threshold, a second volume gain for playing the second audio on the first terminal device; and send second volume control information to the second terminal device, where the second volume control information is used to indicate the second volume gain. The second terminal device is further configured to: determine, based on the second volume gain, a fourth volume value currently set by the second terminal device, and a volume distinguishing factor, a second target volume value for playing the second audio on the second terminal device, where the volume distinguishing factor indicates a volume difference between the first terminal device and the second terminal device; and adjust volume of playing the second audio to the second target volume value.

According to a third aspect, an embodiment of this application further provides a computer-readable storage medium, configured to store a computer program. The computer program includes instructions used to implement the method in each of the foregoing aspects or any one of the possible implementations of each of the foregoing aspects.

<FIG> shows a schematic diagram of a volume adjustment system <NUM> according to an embodiment of this application. As shown in <FIG>, the system <NUM> includes a server <NUM> and a plurality of terminal devices that communicate with the server <NUM>, for example, a terminal device <NUM> and a terminal device <NUM> shown in <FIG>.

It should be noted that the server <NUM> may be a device that has a computing function and a communication function. This is not limited in this embodiment of this application.

For example, the server may be a computer.

Optionally, the server <NUM> in this embodiment of this application may alternatively be a cloud server, for example, a cloud server.

It should be noted that a terminal device may be a device that has an audio playback function, a computing function, and/or a communication function. This is not limited in this embodiment of this application.

For example, the terminal device may be a (smart) speaker, a (smart) mobile phone, a (smart) vehicle-mounted device, a notebook computer, a (smart) television, or a wearable device.

Optionally, in this embodiment of this application, the plurality of terminal devices that communicate with the server <NUM> may also communicate with each other.

Optionally, the plurality of terminal devices may be of a same type or different types. This is not limited in this embodiment of this application.

In a possible implementation, the terminal device <NUM> and the terminal device <NUM> in <FIG> may be a sound box <NUM> and a sound box <NUM>.

In another possible implementation, the terminal device <NUM> and the terminal device <NUM> in <FIG> may be a sound box and a television.

Optionally, the plurality of terminal devices of a same type may be of a same model or different models. This is not limited in this embodiment of this application.

In a possible implementation, the terminal device <NUM> and the terminal device <NUM> in <FIG> may be two sound boxes of a same model.

In a possible implementation, the terminal device <NUM> and the terminal device <NUM> in <FIG> may be two sound boxes of different models.

It should be noted that <FIG> shows only two terminal devices as an example. The system <NUM> may further include another quantity of terminal devices that communicate with the server <NUM>. This is not limited in this embodiment of this application.

<FIG> shows a schematic diagram of a volume adjustment method <NUM> according to an embodiment of this application. As shown in <FIG>, the method <NUM> may be applied to the system <NUM> shown in <FIG>.

S210: A first terminal device sends a first playback request to a server, where the first playback request is used to request to play first audio on the first terminal device, and the first playback request carries a model of the first terminal device and an identifier of the first audio. Correspondingly, the server receives the first playback request sent by the first terminal device.

It should be noted that the first terminal device may be any terminal device (for example, the terminal device <NUM>) in the system <NUM> shown in <FIG>, and the server may be the server <NUM> in the system <NUM> shown in <FIG>.

It should be further noted that the server may communicate with a plurality of terminal devices, that is, the server may provide services for the plurality of terminal devices. The plurality of terminal devices include the first terminal device.

Optionally, the server stores a plurality of pieces of audio, and each of the plurality of pieces of audio has a unique identifier. The plurality of pieces of audio include the first audio.

S220: The server determines a first volume value of the first audio based on the identifier of the first audio and the model of the first terminal device.

It should be noted that a volume value in this embodiment of this application is not a concept of decibel, and does not indicate an absolute volume value. The volume value in this embodiment of this application is a specific value, and the value indicates a proportional relationship between playback volume corresponding to the volume value and maximum playback volume of the first terminal device. A larger volume value indicates higher playback volume corresponding to the volume value, and a smaller volume value indicates lower playback volume corresponding to the volume value.

For example, playback volume corresponding to a volume value <NUM> is the maximum playback volume, and playback volume corresponding to a volume value <NUM> is <NUM>% of the maximum playback volume.

For example, <FIG> shows a statistical diagram, obtained through big data statistics, of volume values used when a plurality of users play first audio by using terminal devices of a first model. The server may use a volume value that appears most frequently in a plurality of volume values as a first volume value, that is, the first volume value may be <NUM> (as shown by a solid circle in <FIG>). Alternatively, the server may use an average value of a plurality of volume values as a first volume value, that is, the first volume value may be <NUM> (as shown by a curve in <FIG>, and may be determined based on a formula <MAT>).

It should be noted that the volume information includes a mapping relationship between an audio identifier, a device model, and a volume value, and indicates a volume value with a good effect when audio is played on a terminal device of a model.

For example, the volume information may be shown in the following Table <NUM>:.

In a second possible implementation, before S220, the server may obtain the volume information through big data statistics, and locally store the volume information. Correspondingly, in S220, the server may invoke the locally stored volume information.

Optionally, the server may obtain the volume information from another terminal device in a plurality of manners. This is not limited in this embodiment of this application.

For example, the server may send a volume information request to the another terminal device. The volume information request carries the model of the first terminal device and the identifier of the first audio. The server receives the volume information that is sent by the another terminal device based on the volume information request.

For another example, the server may receive the volume information sent by the terminal device in a preset period.

S230: The server determines, based on the first volume value and a volume threshold of the first terminal device, a first volume gain for playing the first audio on the first terminal device.

Optionally, the server may determine the first volume gain based on the first volume value, the volume threshold of the first terminal device, and first gain information. The first gain information includes a mapping relationship between a volume value and a volume gain.

For example, that a model of the first terminal device is AAA is used as an example. The first gain information may be shown in the following Table <NUM>:
<IMG>.

For example, as shown by a "black box" in Table <NUM>, a volume threshold of the first terminal device is <NUM>, and a volume gain corresponding to the volume threshold is <NUM>. When a first volume value of first audio played on the first terminal device is <NUM>, it may be learned from Table <NUM> that the first volume value is less than the volume threshold, and it indicates that most users listen to the first audio with volume lower than the volume threshold through the first terminal device, that is, original volume of the first audio is high during recording. Therefore, a volume gain corresponding to the first volume value on the first terminal device is <NUM>. That is, a volume value of the first audio during original recording may be decreased by decreasing the volume gain. This can avoid a case in which volume changes abruptly, thereby improving user experience.

For another example, as shown by the "black box" in Table <NUM>, the volume threshold of the first terminal device is <NUM>, the volume gain corresponding to the volume threshold is <NUM>. When a first volume value of the first audio played on the first terminal device is <NUM>, it may be learned from Table <NUM> that the first volume value is greater than the volume threshold, and it indicates that most users listen to the first audio with volume higher than the volume threshold through the first terminal device, that is, original volume of the first audio is low during recording. Therefore, a volume gain corresponding to the first volume value on the first terminal device is <NUM>. That is, a volume value of the first audio during original recording may be increased by increasing the volume gain. This can avoid a case in which volume changes abruptly, thereby improving user experience.

For another example, as shown by the "black box" in Table <NUM>, the volume threshold of the first terminal device is <NUM>, the volume gain corresponding to the volume threshold is <NUM>. When a first volume value of the first audio played on the first terminal device is <NUM>, it may be learned from Table <NUM> that the first volume value is equal to the volume threshold, and it indicates that most users listen to the first audio with volume of the volume threshold through the first terminal device, that is, the original volume of the first audio during recording is approximately consistent with the volume threshold of the first terminal device. Therefore, a volume gain corresponding to the first volume value on the first terminal device is <NUM>.

Therefore, according to the volume adjustment method provided in this embodiment of this application, a user perception difference caused by a volume difference during audio recording can be avoided.

Optionally, the server may determine, based on volume level information, a first volume level to which the first volume value belongs and a second volume level to which the volume threshold belongs, where the volume level information includes a mapping relationship between a volume value and a volume level; and determine the first volume gain based on the first volume level, the second volume level, and second gain information. The second gain information includes a mapping relationship between a volume level and a volume gain.

For example, the volume level information may be shown in the following Table <NUM>:
<IMG>.

For example, the second gain information may be shown in the following Table <NUM>:
<IMG>.

S240: The server sends first volume control information to the first terminal device, where the first volume control information is used to indicate the first volume gain. Correspondingly, the first terminal device receives the first volume control information sent by the server.

S250: The first terminal device determines, based on the first volume gain and a second volume value currently set by the first terminal device, a first target volume value for playing the first audio on the first terminal device.

For example, the server may determine the first target volume value V<NUM> by using the following formula (<NUM>): <MAT>
α<NUM> represents a total quantity of persons counted by using big data, Vs1 represents a plurality of volume values set by the persons of the total quantity counted by using the big data when the first audio is played on a terminal device whose model is the same as that of the first terminal device, β<NUM> represents a ratio of a quantity of persons that use each of the plurality of volume values to the total quantity of persons counted by using the big data, and Vj1 represents the second volume value.

According to the volume adjustment method provided in this embodiment of this application, when the terminal device determines the first target volume value of the first audio, a listening habit and/or a listening scenario of a user are/is considered, so that a perception difference of the user when different audio is played can be further reduced.

S260: The first terminal device adjusts volume of playing the first audio to the first target volume value.

Optionally, after S260, the first terminal device may send a first volume report to the server, where the first volume report includes the model of the first terminal device, the identifier of the first audio, and the first target volume value, so that the server may perform the foregoing big data statistics based on the first volume report.

Optionally, when the first audio is played on the first terminal device with the first target volume value, the user may also manually adjust playback volume. Therefore, after S260, the first terminal device may also send a second volume report to the server, where the second volume report includes the model of the first terminal device, the identifier of the first audio, and the second target volume value, and the second target volume value is a volume value obtained by the user manually adjusting the first target volume value, so that the server can perform the foregoing big data statistics based on the second volume report.

Optionally, the first terminal device may set media playback volume to the first target volume value, or the first terminal device may set all volume, such as the media playback volume, ringtone volume, alarm volume, and call volume, to the first target volume value. This is not limited in this embodiment of this application.

Optionally, the function implemented by the first terminal device in S250 may also be implemented by the server.

Therefore, before S240, the first terminal device needs to report the currently set second volume value to the server.

Correspondingly, S240 may be replaced with the following: The server determines, based on the first volume gain and the second volume value of the first terminal device, a first target volume value used to play the first audio on the first terminal device.

Correspondingly, S250 may be replaced with the following: The server sends first volume control information to the first terminal device, where the first volume control information is used to indicate the first target volume value.

Optionally, the functions implemented by the server in S210 to S240 may also be implemented by the first terminal device.

In this case, S210 to S240 may be replaced with the following: A first terminal device detects a playback request operation of a user, where the playback request operation is an operation of requesting to play first audio; determine, in response to the playback request operation, a first volume value of the first audio based on an identifier of the first audio and a model of the terminal device; determine, based on the first volume value and a volume threshold of the terminal device, a first volume gain for playing the first audio.

It should be noted that, when the first terminal device performs the foregoing steps, various information required in S210 to S240 needs to be pre-stored in the first terminal device. For example, the information includes volume information, volume level information, first gain information, second gain information, and the like.

Optionally, the functions implemented by the server in S210 to S240 may also be implemented by a third terminal device, or the functions implemented by the server in S210 to S250 are all implemented by a third terminal device. The third terminal device may communicate with the first terminal device.

It should be noted that, to avoid repetition, specific implementation processes of the foregoing replacement processes are not described herein again.

It should be noted that, if the system <NUM> further includes a second terminal device, and a model of the second terminal device is the same as that of the first terminal device, the second terminal device may also adjust volume by using a method similar to S210 to S260.

Optionally, if the model of the second terminal device is different from the model of the first terminal device, the second terminal device may adjust the volume by using the following steps.

Step <NUM>: A second terminal device sends a second playback request to the server, where the second playback request is used to request to play second audio on the second terminal device, and the second playback request carries a model of the second terminal device and an identifier of the second audio. Correspondingly, the server receives the second playback request sent by the second terminal device.

Step <NUM>: When the server determines that the model of the second terminal device is different from the model of the first terminal device, the server determines a third volume value of the second audio based on the identifier of the second audio and the model of the first terminal device.

Step <NUM>: The server determines, based on the third volume value and the volume threshold, a second volume gain for playing the second audio on the first terminal device.

Step <NUM>: The server sends second volume control information to the second terminal device, where the second volume control information is used to indicate the second volume gain. Correspondingly, the second terminal device receives the second volume control information sent by the server.

Step <NUM>: The second terminal device determines, based on the second volume gain, a fourth volume value currently set by the second terminal device, and a volume distinguishing factor, a second target volume value for playing the second audio on the second terminal device, where the volume distinguishing factor indicates a volume difference between the first terminal device and the second terminal device.

For example, the server may determine the second target volume value V<NUM> by using the following formula (<NUM>): <MAT>
α<NUM> represents a total quantity of persons counted by using big data, Vs2 represents a plurality of volume values set by the persons of the total quantity counted by using the big data when the first audio is played on a terminal device whose model is the same as that of the first terminal device, β<NUM> represents a ratio of a quantity of persons that use each of the plurality of volume values to the total quantity of persons counted by using the big data, Vj2 represents the second volume value, and µ represents the volume distinguishing factor.

Step <NUM>: The second terminal device adjusts volume of playing the second audio to the second target volume value.

The foregoing describes the volume adjustment methods provided in the embodiments of this application with reference to <FIG>. The following describes a volume adjustment device provided in an embodiment of this application with reference to <FIG>.

It should be noted that the volume adjustment device may be the first terminal device, the second terminal device, the third terminal device, or the server in the embodiment of the method <NUM>, and is configured to implement the functions implemented by the first terminal device, the second terminal device, the third terminal device, or the server. This is not limited in embodiments of this application.

For example, the volume adjustment device is a mobile phone. <FIG> shows a schematic diagram of a mobile phone <NUM> according to an embodiment of this application.

The mobile phone <NUM> may include a processor <NUM>, an external memory interface <NUM>, an internal memory <NUM>, a USB interface <NUM>, a charging management module <NUM>, a power management module <NUM>, a battery <NUM>, an antenna <NUM>, an antenna <NUM>, a mobile communication module <NUM>, a wireless communication module <NUM>, an audio module <NUM>, a speaker 370A, a receiver 370B, a microphone 370C, a headset jack 370D, a sensor module <NUM>, a button <NUM>, a motor <NUM>, an indicator <NUM>, a camera <NUM>, a display <NUM>, a SIM card interface <NUM>, and the like. The sensor module <NUM> may include a gyroscope sensor 380A, an acceleration sensor 380B, an optical proximity sensor <NUM>, a fingerprint sensor <NUM>, a touch sensor <NUM>, and a rotating shaft sensor <NUM> (certainly, the mobile phone <NUM> may further include another sensor, for example, a temperature sensor, a pressure sensor, a distance sensor, a magnetic sensor, an ambient light sensor, a barometric pressure sensor, or a bone conduction sensor, which is not shown in the figure).

It may be understood that the structure illustrated in this embodiment of this application does not constitute a specific limitation on the mobile phone <NUM>. In some other embodiments of this application, the mobile phone <NUM> may include more or fewer components than components shown in the figure, or some components may be combined, or some components may be split, or there may be a different component arrangement. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.

The processor <NUM> may include one or more processing units. For example, the processor <NUM> may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a neural-network processing unit (Neural-network Processing unit, NPU), and/or the like. Different processing units may be independent components, or may be integrated into one or more processors. The controller may be a nerve center and a command center of the mobile phone <NUM>. The controller may generate an operation control signal based on an instruction operation code and a time sequence signal, to complete control of instruction fetching and instruction execution.

A memory may further be disposed in the processor <NUM>, and is configured to store instructions and data. In some embodiments, the memory in the processor <NUM> is a cache memory. The memory may store instructions or data that has just been used or has been repeatedly used by the processor <NUM>. If the processor <NUM> needs to reuse the instructions or the data, the processor <NUM> may directly invoke the instructions or the data from the memory. This avoids repeated access and reduces waiting time of the processor <NUM>, thereby improving system efficiency.

The processor <NUM> may run functions implemented by the first terminal device, the second terminal device, the third terminal device, or the server in the method <NUM> provided in this application.

When different components are integrated into the processor <NUM>, for example, a CPU and a GPU are integrated, the CPU and the GPU may cooperate to perform the processing method provided in the embodiments of this application. For example, in the processing method, some algorithms are performed by the CPU, and the other algorithms are performed by the GPU, to obtain relatively fast processing efficiency.

The display <NUM> is configured to display an image, a video, and the like. The display <NUM> includes a display panel. The display panel may be a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), an active-matrix organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), a flexible light-emitting diode (flex light-emitting diode, FLED), a mini LED, a micro LED, a micro OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the mobile phone <NUM> may include one or N displays <NUM>, where N is a positive integer greater than <NUM>.

The camera <NUM> (which may be a front-facing camera or a rear-facing camera, or one camera may serve as either a front-facing camera or a rear-facing camera) is used to capture a static image or video. Generally, the camera <NUM> may include a photosensitive element such as a lens group and an image sensor. The lens group includes a plurality of lenses (convex lenses or concave lenses), and is configured to collect an optical signal reflected by a to-be-photographed object and transmit the collected optical signal to the image sensor. The image sensor generates an original image of the to-be-photographed object based on the optical signal.

The internal memory <NUM> may be configured to store computer-executable program code, where the executable program code includes instructions. The processor <NUM> runs the instructions stored in the internal memory <NUM>, to perform various function applications of the mobile phone <NUM> and signal processing. The internal memory <NUM> may include a program storage region and a data storage region. The program storage region may store code of an operating system, an application (for example, a camera application or a WeChat application), and the like. The data storage region may store data (for example, an image or video collected by the camera application) created in a process of using the mobile phone <NUM>, and the like.

The internal memory <NUM> may further store code of an anti-accidental touch algorithm provided in this embodiment of this application. When the code, stored in the internal memory <NUM>, of the anti-accidental touch algorithm is run by the processor <NUM>, a touch operation in a folding or unfolding process may be shielded.

In addition, the internal memory <NUM> may include a high-speed random access memory, and may further include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash memory device, or a universal flash storage (universal flash storage, UFS).

Certainly, code for implementing a video editing algorithm provided in this embodiment of this application may alternatively be stored in an external memory. In this case, the processor <NUM> may run, by using the external memory interface <NUM>, the code of the algorithm stored in the external memory, to edit a video.

The following describes functions of the sensor module <NUM>.

The gyroscope sensor 380A may be configured to determine a motion posture of the mobile phone <NUM>. In some embodiments, the gyroscope sensor 380A may be used to determine angular velocities of the mobile phone <NUM> around three axes (namely, x, y, and z axes). In other words, the gyroscope sensor 380A may be configured to detect a current motion status of the mobile phone <NUM>, for example, a shaken or static state.

The acceleration sensor 380B may detect values of acceleration in various directions (usually on three axes) of the mobile phone <NUM>. In other words, the gyroscope sensor 380A may be configured to detect a current motion status of the mobile phone <NUM>, for example, a shaken or static state.

For example, the optical proximity sensor <NUM> may include a light-emitting diode (LED) and an optical detector, for example, a photodiode. The light-emitting diode may be an infrared light-emitting diode. The mobile phone emits infrared light by using the light-emitting diode. The mobile phone detects infrared reflected light from a nearby object by using the photodiode. When sufficient reflected light is detected, the mobile phone may determine that there is an object near the mobile phone. When insufficient reflected light is detected, the mobile phone may determine that there is no object near the mobile phone.

The gyroscope sensor 380A (or the acceleration sensor 380B) may send detected motion status information (for example, an angular velocity) to the processor <NUM>. The processor <NUM> determines, based on the motion status information, whether the mobile phone is currently in a handheld state or a tripod state (for example, when the angular velocity is not <NUM>, it indicates that the mobile phone <NUM> is in the handheld state).

The fingerprint sensor <NUM> is configured to collect a fingerprint. The mobile phone <NUM> may use a feature of the collected fingerprint to implement fingerprint-based unlocking, application access locking, fingerprint-based photographing, fingerprint-based call answering, and the like.

The touch sensor <NUM> may also be referred to as a "touch panel". The touch sensor <NUM> may be disposed in the display <NUM>. The touch sensor <NUM> and the display <NUM> form a touchscreen, which is also referred to as a "touch screen". The touch sensor <NUM> is configured to detect a touch operation on or near the touch sensor <NUM>. The touch sensor may transfer the detected touch operation to the application processor to determine a type of a touch event. A visual output related to the touch operation may be provided through the display <NUM>. In some other embodiments, the touch sensor <NUM> may alternatively be disposed on a surface of the mobile phone <NUM> at a location different from a location of the display <NUM>.

For example, the display <NUM> of the mobile phone <NUM> displays a home screen, and the home screen includes icons of a plurality of applications (for example, a camera application and a WeChat application). The user taps the icon of the camera application on the home screen by using the touch sensor <NUM>, to trigger the processor <NUM> to enable the camera application and turn on the camera <NUM>. The display <NUM> displays an interface of the camera application, for example, a viewfinder interface.

A wireless communication function of the mobile phone <NUM> may be implemented by using the antenna <NUM>, the antenna <NUM>, the mobile communication module <NUM>, the wireless communication module <NUM>, the modem processor, the baseband processor, and the like.

The antenna <NUM> and the antenna <NUM> are configured to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone <NUM> may be configured to cover one or more communication frequency bands. Different antennas may be multiplexed to improve antenna utilization. For example, the antenna <NUM> may be multiplexed as a diversity antenna in a wireless local area network. In some other embodiments, an antenna may be used in combination with a tuning switch.

The mobile communication module <NUM> may provide a solution, applied to the mobile phone <NUM>, for wireless communication including <NUM>/<NUM>/<NUM>/<NUM>. The mobile communication module <NUM> may include at least one filter, a switch, a power amplifier, a low noise amplifier (low noise amplifier, LNA), and the like. The mobile communication module <NUM> may receive an electromagnetic wave through the antenna <NUM>, perform processing such as filtering and amplification on the received electromagnetic wave, and transmit a processed electromagnetic wave to the modem processor for demodulation. The mobile communication module <NUM> may further amplify a signal modulated by the modem processor, and convert the signal into an electromagnetic wave through the antenna <NUM> for radiation. In some embodiments, at least some functional modules of the mobile communication module <NUM> may be disposed in the processor <NUM>. In some embodiments, at least some functional modules of the mobile communication module <NUM> and at least some modules of the processor <NUM> may be disposed in a same component.

The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into a medium/high-frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then, the demodulator transmits the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then transmitted to the application processor. The application processor outputs a sound signal through an audio device (which is not limited to the speaker 370A, the receiver 370B, or the like), or displays an image or video through the display <NUM>. In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be independent of the processor <NUM>, and disposed in a same component as the mobile communication module <NUM> or another functional module.

The wireless communication module <NUM> may provide a solution, applied to the mobile phone <NUM>, for wireless communication, including a wireless local area network (wireless local area networks, WLAN) (for example, a wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (bluetooth, BT), a global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), a near field communication technology (near field communication, NFC), and an infrared (infrared, IR) technology. The wireless communication module <NUM> may be one or more components integrating at least one communication processing module. The wireless communication module <NUM> receives an electromagnetic wave signal through the antenna <NUM>, modulates and performs filtering processing on the electromagnetic wave signal, and sends a processed signal to the processor <NUM>. The wireless communication module <NUM> may further receive a to-be-sent signal from the processor <NUM>, modulate and amplify the received signal, and convert a signal into an electromagnetic wave through the antenna <NUM> for radiation.

In some embodiments, the antenna <NUM> of the mobile phone <NUM> is coupled to the mobile communication module <NUM>, and the antenna <NUM> is coupled to the wireless communication module <NUM>, so that the mobile phone <NUM> can communicate with a network and another device by using a wireless communication technology. The wireless communication technology may include a global system for mobile communication (global system for mobile communications, GSM), a general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, the GNSS, the WLAN, the NFC, the FM, the IR technology, and/or the like. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a BeiDou navigation satellite system (Beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi-zenith satellite system, QZSS), and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).

In addition, the mobile phone <NUM> may implement an audio function such as music playing or recording through the audio module <NUM>, the speaker 370A, the receiver 370B, the microphone 370C, the headset jack 370D, the application processor, and the like. The mobile phone <NUM> may receive an input from the button <NUM>, and generate a button signal input related to a user setting and function control of the mobile phone <NUM>. The mobile phone <NUM> may generate a vibration prompt (for example, an incoming call vibration prompt) by using the motor <NUM>. The indicator <NUM> in the mobile phone <NUM> may be an indicator light that may be configured to indicate a charging state and a battery power change, and may be further configured to indicate a message, a missed call, a notification, and the like. The SIM card interface <NUM> in the mobile phone <NUM> is configured to connect to a SIM card. The SIM card may be inserted into the SIM card interface <NUM> or removed from the SIM card interface <NUM>, to implement contact with or separation from the mobile phone <NUM>.

In the several embodiments provided in this application, it should be understood that the disclosed system, the apparatus, and the method may be implemented in other manners. For example, division into the units is merely logical function division and may be other division in an actual implementation. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in an electrical form, a mechanical form, or another form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, to be specific, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual requirements to achieve the objectives of the solutions in the embodiments.

In addition, functional units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units may be integrated into one unit.

Claim 1:
A volume adjustment method, comprising:
sending (S210), by a first terminal device, a first playback request to a server, wherein the first playback request is used to request to play first audio on the first terminal device, and the first playback request carries a model of the first terminal device and an identifier of the first audio;
determining (S220), by the server, a first volume value of the first audio based on the identifier of the first audio and the model of the first terminal device;
determining (S230), by the server based on the first volume value and a volume threshold of the first terminal device, a first volume gain for playing the first audio on the first terminal device;
sending (S240), by the server, first volume control information to the first terminal device, wherein the first volume control information is used to indicate the first volume gain;
determining (S250), by the first terminal device based on the first volume gain and a second volume value currently set by the first terminal device, a first target volume value for playing the first audio on the first terminal device; and
adjusting (S260), by the first terminal device, volume of playing the first audio to the first target volume value.