CN116266852A - Volume adjustment method, device and electronic equipment - Google Patents

Volume adjustment method, device and electronic equipment Download PDF

Info

Publication number
CN116266852A
CN116266852A CN202111543948.8A CN202111543948A CN116266852A CN 116266852 A CN116266852 A CN 116266852A CN 202111543948 A CN202111543948 A CN 202111543948A CN 116266852 A CN116266852 A CN 116266852A
Authority
CN
China
Prior art keywords
volume value
volume
value
adjustment range
change ratio
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
CN202111543948.8A
Other languages
Chinese (zh)
Other versions
CN116266852B (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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202111543948.8A priority Critical patent/CN116266852B/en
Publication of CN116266852A publication Critical patent/CN116266852A/en
Application granted granted Critical
Publication of CN116266852B publication Critical patent/CN116266852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a volume adjustment method, a volume adjustment device and electronic equipment, wherein if a first device detects that a first volume value from a second device is the same as a volume value which is received last time and is mapped to the first device by a fourth volume value, the first device can acquire a volume change proportion corresponding to the first volume value according to the first volume value and the fourth volume value, and further display the change of the volume value according to the volume change proportion corresponding to the first volume value, so that the volume of the second device displayed by the first device is consistent with the operation of a user, and response timeliness is improved.

Description

音量调整方法、装置和电子设备Volume adjustment method, device and electronic equipment

技术领域technical field

本申请涉及通信技术,尤其涉及一种音量调整方法、装置和电子设备。The present application relates to communication technologies, and in particular to a volume adjustment method, device and electronic equipment.

背景技术Background technique

手机与音箱无线连接后,手机可以控制音箱播放音频。用户可以操作音箱上设置的音量按键,或者采用与音箱语音交互的方式,控制音箱播放的音频的音量值。After the mobile phone is wirelessly connected to the speaker, the mobile phone can control the speaker to play audio. The user can operate the volume button provided on the speaker, or control the volume value of the audio played by the speaker by voice interaction with the speaker.

目前,为了使得用户在手机上可以看到音箱播放的音频的音量值的变化,当用户在音箱上调整音箱的音量值时,音箱可以将调整后的音量值发送给手机,手机可以在界面上显示音箱的音量值的变化。At present, in order for the user to see the change of the volume value of the audio played by the speaker on the mobile phone, when the user adjusts the volume value of the speaker on the speaker, the speaker can send the adjusted volume value to the mobile phone, and the mobile phone can display the volume value on the interface. Displays changes in the volume value of the speakers.

目前手机的音量值变化范围小于音箱的音量值变化范围,存在用户多次调整音箱的音量值,手机在界面上才显示一次音箱的音量值的变化,造成手机显示音箱的音量与用户的操作不一致的问题。At present, the range of the volume value of the mobile phone is smaller than that of the speaker. There are many times when the user adjusts the volume value of the speaker, and the mobile phone only displays the change of the volume value of the speaker once on the interface. The problem.

发明内容Contents of the invention

本申请提供一种音量调整方法、装置和电子设备,可以达到第一设备显示第二设备的音量与用户的操作相一致的目的,提高第一设备的响应及时性。The present application provides a volume adjustment method, device and electronic equipment, which can achieve the purpose of the first equipment displaying that the volume of the second equipment is consistent with the user's operation, and improve the response timeliness of the first equipment.

本申请的第一方面提供一种音量调整方法,该方法应用于第一设备,所述第一设备与第二设备无线连接,所述第一设备通过所述无线连接控制所述第二设备,所述第一设备的第一音量值调节范围和所述第二设备的第二音量值调节范围不同。该音量调整方法包括:接收来自所述第二设备的第一音量值,所述第一音量值用于指示所述第二设备的音量,所述第一音量值为基于所述第二音量值调节范围确定的音量值;将所述第一音量值转换为第二音量值,所述第二音量值为基于所述第一音量值调节范围确定的音量值;若所述第二音量值与第三音量值相同,则根据所述第一音量值和第四音量值,获取所述第一音量值对应的音量变化比例,所述第四音量值为上一次接收的来自所述第二设备的音量值,所述第三音量值为对所述第四音量值转换得到的;根据所述音量值变化比例,显示所述第二设备的音量。The first aspect of the present application provides a volume adjustment method, the method is applied to a first device, the first device is wirelessly connected to a second device, and the first device controls the second device through the wireless connection, The first volume value adjustment range of the first device is different from the second volume value adjustment range of the second device. The volume adjustment method includes: receiving a first volume value from the second device, the first volume value is used to indicate the volume of the second device, and the first volume value is based on the second volume value adjusting the volume value determined by the range; converting the first volume value into a second volume value, the second volume value being a volume value determined based on the adjustment range of the first volume value; if the second volume value is the same as The third volume value is the same, then according to the first volume value and the fourth volume value, the volume change ratio corresponding to the first volume value is obtained, and the fourth volume value is received last time from the second device The third volume value is converted from the fourth volume value; and the volume of the second device is displayed according to the change ratio of the volume value.

在一种可能的实现方式中,所述根据所述第一音量值和第四音量值,获取所述第一音量值对应的音量变化比例,包括:根据所述第一音量值、第四音量值、以及,所述第二音量值调节范围的最大值,获取所述第一音量值对应的音量变化比例。In a possible implementation manner, the acquiring the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value includes: according to the first volume value, the fourth volume value, value, and, the maximum value of the second volume value adjustment range, to obtain the volume change ratio corresponding to the first volume value.

在一种可能的实现方式中,所述根据所述第一音量值、第四音量值、以及,所述第二音量值调节范围的最大值,获取所述第一音量值对应的音量变化比例,包括:获取所述第一音量值与所述第四音量值之间的第一差值;获取所述第二音量值调节范围的最大值与所述第四音量值之间的第二差值;将所述第一差值与所述第二差值相除,得到所述第一音量值对应的音量变化比例。In a possible implementation manner, the volume change ratio corresponding to the first volume value is acquired according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range. , including: obtaining a first difference between the first volume value and the fourth volume value; obtaining a second difference between the maximum value of the second volume value adjustment range and the fourth volume value value; dividing the first difference value by the second difference value to obtain a volume change ratio corresponding to the first volume value.

在一种可能的实现方式中,所述根据所述音量值变化比例,显示所述第二设备的音量,包括:在所述第一设备的音量变化进度条上显示所述音量值变化比例的音量的增加或减少。In a possible implementation manner, the displaying the volume of the second device according to the volume value change ratio includes: displaying the volume value change ratio on the volume change progress bar of the first device Volume increase or decrease.

在一种可能的实现方式中,所述方法还包括:若所述第三音量值为所述第一音量值调节范围的最小值,且所述第一音量值大于所述第四音量值,则在所述音量变化进度条上显示所述第二设备的音量;或者,若所述第三音量值为所述第一音量值调节范围的最大值,且所述第一音量值小于所述第四音量值,则在所述音量变化进度条上显示所述第二设备的音量。In a possible implementation manner, the method further includes: if the third volume value is the minimum value of the adjustment range of the first volume value, and the first volume value is greater than the fourth volume value, Then display the volume of the second device on the volume change progress bar; or, if the third volume value is the maximum value of the adjustment range of the first volume value, and the first volume value is smaller than the the fourth volume value, the volume of the second device is displayed on the volume change progress bar.

在一种可能的实现方式中,所述将所述第一音量值转换为第二音量值之后,所述方法还包括:若所述第二音量值与第三音量值不同,则根据所述第二音量值,以及所述第一音量值调节范围,显示所述第二设备的音量。In a possible implementation manner, after converting the first volume value into a second volume value, the method further includes: if the second volume value is different from the third volume value, then according to the The second volume value, and the adjustment range of the first volume value, display the volume of the second device.

在一种可能的实现方式中,所述方法还包括:根据所述第二音量值,调整所述第一设备的音量。In a possible implementation manner, the method further includes: adjusting the volume of the first device according to the second volume value.

在一种可能的实现方式中,所述方法还包括:响应于用户输入的针对所述第二设备的音量的调整操作,根据所述第一音量值调节范围,确定所述调整操作对应的第五音量值;根据所述第五音量值,调整所述第二设备的音量。In a possible implementation manner, the method further includes: in response to an adjustment operation of the volume of the second device input by the user, and according to the first volume value adjustment range, determining the first volume value corresponding to the adjustment operation. Five volume values; adjust the volume of the second device according to the fifth volume value.

本申请的第二方面提供一种音量调整装置,所述音量调整装置包含于第一设备,所述第一设备与第二设备无线连接,所述第一设备通过所述无线连接控制所述第二设备,所述第一设备的第一音量值调节范围和所述第二设备的第二音量值调节范围不同,所述装置包括:The second aspect of the present application provides a volume adjustment device, the volume adjustment device is included in a first device, the first device is wirelessly connected to a second device, and the first device controls the first device through the wireless connection. Two devices, the first volume value adjustment range of the first device is different from the second volume value adjustment range of the second device, and the device includes:

收发模块,用于接收来自所述第二设备的第一音量值,所述第一音量值用于指示所述第二设备的音量,所述第一音量值为基于所述第二音量值调节范围确定的音量值。A transceiver module, configured to receive a first volume value from the second device, the first volume value is used to indicate the volume of the second device, and the first volume value is adjusted based on the second volume value Range determines the volume value.

处理模块,用于将所述第一音量值转换为第二音量值,所述第二音量值为基于所述第一音量值调节范围确定的音量值;若所述第二音量值与第三音量值相同,则根据所述第一音量值和第四音量值,获取所述第一音量值对应的音量变化比例,所述第四音量值为上一次接收的来自所述第二设备的音量值,所述第三音量值为对所述第四音量值转换得到的。A processing module, configured to convert the first volume value into a second volume value, and the second volume value is a volume value determined based on the adjustment range of the first volume value; if the second volume value is the same as the third volume value If the volume values are the same, the volume change ratio corresponding to the first volume value and the fourth volume value are obtained according to the first volume value and the fourth volume value, and the fourth volume value is the volume received last time from the second device value, the third volume value is converted from the fourth volume value.

显示模块,用于根据所述音量值变化比例,显示所述第二设备的音量。A display module, configured to display the volume of the second device according to the change ratio of the volume value.

在一种可能的实现方式中,处理模块,具体用于根据所述第一音量值、第四音量值、以及,所述第二音量值调节范围的最大值,获取所述第一音量值对应的音量变化比例。In a possible implementation manner, the processing module is specifically configured to obtain the first volume value corresponding to the first volume value according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range. volume change ratio.

在一种可能的实现方式中,处理模块,具体用于获取所述第一音量值与所述第四音量值之间的第一差值;获取所述第二音量值调节范围的最大值与所述第四音量值之间的第二差值;将所述第一差值与所述第二差值相除,得到所述第一音量值对应的音量变化比例。In a possible implementation manner, the processing module is specifically configured to obtain a first difference between the first volume value and the fourth volume value; obtain the maximum value and the value of the second volume value adjustment range A second difference between the fourth volume values; dividing the first difference by the second difference to obtain a volume change ratio corresponding to the first volume value.

在一种可能的实现方式中,显示模块,具体用于在所述第一设备的音量变化进度条上显示所述音量值变化比例的音量的增加或减少。In a possible implementation manner, the display module is specifically configured to display the volume increase or decrease of the volume value change ratio on the volume change progress bar of the first device.

在一种可能的实现方式中,显示模块,具体用于若所述第三音量值为所述第一音量值调节范围的最小值,且所述第一音量值大于所述第四音量值,则在所述音量变化进度条上显示所述第二设备的音量;或者,若所述第三音量值为所述第一音量值调节范围的最大值,且所述第一音量值小于所述第四音量值,则显示模块,具体用于在所述音量变化进度条上显示所述第二设备的音量。In a possible implementation manner, the display module is specifically configured to: if the third volume value is the minimum value of the adjustment range of the first volume value, and the first volume value is greater than the fourth volume value, Then display the volume of the second device on the volume change progress bar; or, if the third volume value is the maximum value of the adjustment range of the first volume value, and the first volume value is smaller than the The fourth volume value is a display module, specifically configured to display the volume of the second device on the volume change progress bar.

在一种可能的实现方式中,显示模块,还用于若所述第二音量值与第三音量值不同,则根据所述第二音量值,以及所述第一音量值调节范围,显示所述第二设备的音量。In a possible implementation manner, the display module is further configured to, if the second volume value is different from the third volume value, display the Describe the volume of the second device.

在一种可能的实现方式中,处理模块,还用于根据所述第二音量值,调整所述第一设备的音量。In a possible implementation manner, the processing module is further configured to adjust the volume of the first device according to the second volume value.

在一种可能的实现方式中,处理模块,还用于响应于用户输入的针对所述第二设备的音量的调整操作,根据所述第一音量值调节范围,确定所述调整操作对应的第五音量值;根据所述第五音量值,调整所述第二设备的音量。In a possible implementation manner, the processing module is further configured to, in response to an adjustment operation input by the user for the volume of the second device, determine the first volume value adjustment range corresponding to the adjustment operation according to the first volume value adjustment range. Five volume values; adjust the volume of the second device according to the fifth volume value.

本申请的第三方面提供一种电子设备,包括:至少一个处理器和存储器;A third aspect of the present application provides an electronic device, including: at least one processor and a memory;

所述存储器存储计算机执行指令;the memory stores computer-executable instructions;

所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备执行上述第一方面中的方法。The at least one processor executes the computer-executed instructions stored in the memory, so that the electronic device executes the method in the first aspect above.

本申请的第四方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机执行指令,当所述计算机执行指令被处理器执行时,实现上述第一方面中的方法。A fourth aspect of the present application provides a computer-readable storage medium, on which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the method in the above-mentioned first aspect is implemented.

本申请的第五方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面中的方法。A fifth aspect of the present application provides a computer program product containing instructions, which, when run on a computer, cause the computer to execute the method in the first aspect above.

本申请提供一种音量调整方法、装置和电子设备,第一设备若检测到来自第二设备的第一音量值与上一次接收到的第四音量值映射至第一设备的音量值相同,则可以根据第一音量值和第四音量值,获取第一音量值对应的音量变化比例,进而根据第一音量值对应的音量变化比例,显示音量值的变化,使得第一设备显示的第二设备的音量与用户的操作一致,提高响应及时性。The present application provides a volume adjustment method, device, and electronic device. If the first device detects that the first volume value from the second device is the same as the volume value mapped to the first device from the fourth volume value received last time, then According to the first volume value and the fourth volume value, the volume change ratio corresponding to the first volume value can be obtained, and then according to the volume change ratio corresponding to the first volume value, the change of the volume value can be displayed, so that the first device displays the second device The volume is consistent with the user's operation, improving the timeliness of response.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.

图1A为一种音量进度变化条的示意图;FIG. 1A is a schematic diagram of a volume progress change bar;

图1B为另一种音量进度变化条的示意图;FIG. 1B is a schematic diagram of another volume progress change bar;

图2为本申请实施例适用的一种场景示意图;FIG. 2 is a schematic diagram of a scene applicable to an embodiment of the present application;

图3A为一种音量调整的示意图;FIG. 3A is a schematic diagram of volume adjustment;

图3B为另一种音量调整的示意图;FIG. 3B is a schematic diagram of another volume adjustment;

图4为本申请实施例提供的音量调整方法的一种实施例的流程示意图;FIG. 4 is a schematic flowchart of an embodiment of a volume adjustment method provided in an embodiment of the present application;

图5为本申请实施例提供的一种音量调整的示意图;FIG. 5 is a schematic diagram of volume adjustment provided by an embodiment of the present application;

图6为本申请实施例提供的音量调整方法的另一种实施例的流程示意图;FIG. 6 is a schematic flowchart of another embodiment of the volume adjustment method provided by the embodiment of the present application;

图7为本申请实施例提供的另一种音量调整的示意图;FIG. 7 is a schematic diagram of another volume adjustment provided by the embodiment of the present application;

图8为本申请实施例提供的另一种音量调整的示意图;FIG. 8 is a schematic diagram of another volume adjustment provided by the embodiment of the present application;

图9为本申请实施例提供的另一种音量调整的示意图;FIG. 9 is a schematic diagram of another volume adjustment provided by the embodiment of the present application;

图10为本申请实施例提供的另一种音量调整的示意图;FIG. 10 is a schematic diagram of another volume adjustment provided by the embodiment of the present application;

图11为本申请实施例提供的音量调整装置的结构示意图;FIG. 11 is a schematic structural diagram of a volume adjustment device provided by an embodiment of the present application;

图12为本申请提供的电子设备的结构示意图。FIG. 12 is a schematic structural diagram of an electronic device provided by the present application.

通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。By means of the above drawings, specific embodiments of the present application have been shown, which will be described in more detail hereinafter. These drawings and text descriptions are not intended to limit the scope of the concept of the application in any way, but to illustrate the concept of the application for those skilled in the art by referring to specific embodiments.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present application as recited in the appended claims.

本申请实施例中的术语解释:Explanation of terms in the embodiments of this application:

音量变化进度条:在电子设备的界面上显示的表征音量值的进度条。参照图1A中的a所示,如电子设备可以在电子设备的右侧显示音量变化进度条11,音量变化进度条11上的黑色部分表征电子设备的音量。或者,如图1A中的b所示,电子设备可以在电子设备的界面的上侧显示音量变化进度条12,本申请实施例对音量变化进度条的样式和在界面上显示的位置不做限制,下述实施例中以图1A中的a所示的音量变化进度条为例进行说明。Volume change progress bar: a progress bar representing the volume value displayed on the interface of the electronic device. Referring to a in FIG. 1A , for example, the electronic device can display a volume change progress bar 11 on the right side of the electronic device, and the black part on the volume change progress bar 11 represents the volume of the electronic device. Alternatively, as shown in b in Figure 1A, the electronic device can display a volume change progress bar 12 on the upper side of the interface of the electronic device, and the embodiment of the present application does not limit the style of the volume change progress bar and the position displayed on the interface In the following embodiments, the volume change progress bar shown in a in FIG. 1A is taken as an example for illustration.

图1B为本申请实施例提供的音量调整方法适用的一种场景示意图。参照图1B,该场景中可以包括:电子设备和音频播放设备。图1B中以电子设备为手机,音频播放设备为音箱为例进行说明。在一种实施例中,电子设备和音频播放设备可以通过通信网络进行互联,以实现无线信号的交互。该通信网络可以但不限于为:WI-FI热点网络、WI-FI点对点(peer-to-peer,P2P)网络、蓝牙网络、zigbee网络或近场通信(near field communication,NFC)网络等近距离通信网络。FIG. 1B is a schematic diagram of a scenario where the volume adjustment method provided in the embodiment of the present application is applicable. Referring to FIG. 1B , the scene may include: an electronic device and an audio playback device. In FIG. 1B , the electronic device is a mobile phone, and the audio playback device is a speaker for example. In an embodiment, the electronic device and the audio playback device may be interconnected through a communication network to realize wireless signal interaction. The communication network can be, but not limited to: WI-FI hotspot network, WI-FI point-to-point (peer-to-peer, P2P) network, Bluetooth network, zigbee network or near field communication (near field communication, NFC) network and other short-distance Communications network.

其中,电子设备和音频播放设备进行互联后,用户可以在电子设备上进行操作,使得电子设备通过音频播放设备播放电子设备中的音频。示例性的,如手机可以与音箱蓝牙连接,手机可以向音箱发送音频数据,以实现通过音箱播放手机中的音频,音频如音乐、歌曲,或者包含有音频的视频等。Wherein, after the electronic device and the audio playback device are interconnected, the user can perform operations on the electronic device, so that the electronic device plays the audio in the electronic device through the audio playback device. Exemplarily, if the mobile phone can be connected to the speaker via Bluetooth, the mobile phone can send audio data to the speaker, so that the audio in the mobile phone can be played through the speaker, such as music, songs, or videos containing audio.

在一种实施例中,本申请实施例中的电子设备可以称为用户设备(userequipment,UE)、终端(terminal)等,例如,电子设备可以为手机、平板电脑(portableandroid device,PAD)、个人数字处理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备、车载设备或可穿戴设备,虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、智慧家庭(smart home)中的无线终端等,本申请实施例中对电子设备的形态不做具体限定。In one embodiment, the electronic device in the embodiment of the present application may be called user equipment (user equipment, UE), terminal (terminal), etc., for example, the electronic device may be a mobile phone, a tablet computer (portable android device, PAD), a personal Digital processing (personal digital assistant, PDA), handheld devices with wireless communication functions, computing devices, vehicle-mounted devices or wearable devices, virtual reality (virtual reality, VR) terminal equipment, augmented reality (augmented reality, AR) terminal equipment, The form of the electronic device is not specifically limited in the embodiments of the present application, such as wireless terminals in industrial control and smart homes.

在一种实施例中,音频播放设备可以包括但不限于可以为:音箱、耳机、可穿戴设备、VR终端设备、AR终端设备,智慧家庭中的无线终端等,本申请实施例中对音频播放设备的形态不做具体限定。下述实施例以及附图中以电子设备为手机,音频播放设备为音箱为例进行说明。In one embodiment, audio playback devices may include, but are not limited to: speakers, earphones, wearable devices, VR terminal devices, AR terminal devices, wireless terminals in smart homes, etc. The form of the device is not specifically limited. In the following embodiments and drawings, the electronic device is a mobile phone, and the audio playback device is a sound box as an example for illustration.

当电子设备和音箱进行互联后,电子设备通过音箱播放电子设备中的音频。用户在音箱上调节音箱播放的音频的音量,音箱可以将音频当前的音量值发送至手机,使得手机同步在界面上显示音量变化进度条。在一种实施例中,音箱的音量值调节范围可以为0-127,参照图2,音箱播放的音频的音量值为50,用户可以操作音箱上的音量按键,或者说出“将音量减小至30”,则音箱响应于用户的操作,可以将音箱播放的音频的音量值从50调节至30。音箱也会将音量值“30”同步至手机,手机可以在手机的界面上显示表征音量减少的音量变化进度条,如图2中手机界面上音量变化进度条上的黑色部分从A位置下降至B位置,表征音频的音量值降低。应理解,图2中未示出A位置处的音量变化进度条上的黑色部分,仅示出了下降至B位置的音量变化进度条上的黑色部分。After the electronic device and the speaker are interconnected, the electronic device plays the audio in the electronic device through the speaker. The user adjusts the volume of the audio played by the speaker on the speaker, and the speaker can send the current volume value of the audio to the mobile phone, so that the mobile phone simultaneously displays a volume change progress bar on the interface. In one embodiment, the volume value of the speaker can be adjusted from 0 to 127. Referring to FIG. 2, the volume of the audio played by the speaker is 50. The user can operate the volume button on the speaker, or say "decrease the volume to 30", the speaker can adjust the volume value of the audio played by the speaker from 50 to 30 in response to the user's operation. The speaker will also synchronize the volume value "30" to the mobile phone, and the mobile phone can display a volume change progress bar representing the volume reduction on the mobile phone interface, as shown in Figure 2. The black part on the volume change progress bar on the mobile phone interface drops from position A to In the B position, the volume value representing the audio is reduced. It should be understood that the black part on the volume change progress bar at position A is not shown in FIG. 2 , but only the black part on the volume change progress bar descending to position B is shown.

手机的音量目前有16个(0-15)音量等级,即手机接收到来自音箱的音量值时,可以根据音箱的音量值,按照预设的映射算法,将音箱的音量值映射至手机的0-15的音量等级中,进而控制手机的界面上的音量变化进度条。其中,手机可以将音量变化进度条平均分成16格(或16份),音箱的音量值对应的音量等级每增加1,可以在音量变化进度条中增加一格,或者,音箱的音量值对应的音量等级每减少1,可以在音量变化进度条中降低一格。The volume of the mobile phone currently has 16 (0-15) volume levels, that is, when the mobile phone receives the volume value from the speaker, it can map the volume value of the speaker to the 0 of the mobile phone according to the volume value of the speaker and according to the preset mapping algorithm. In the volume level of -15, and then control the volume change progress bar on the interface of the mobile phone. Among them, the mobile phone can divide the volume change progress bar into 16 grids (or 16 parts) on average, and every time the volume level corresponding to the volume value of the speaker increases by 1, one grid can be added to the volume change progress bar, or the volume value of the speaker corresponds to Every time the volume level decreases by 1, it can be reduced by one bar in the volume change progress bar.

因为手机的音量等级少于音箱的音量值调节范围中的音量值的数量,因此会出现表一中所示的“音箱的多个音量值对应手机的一个音量等级”的关系。在一种实施例中,示例性的,如音量的音量值调节范围0-127可以平均映射至手机的16个音量等级,可以如下表一所示:Because the volume level of the mobile phone is less than the number of volume values in the volume value adjustment range of the speaker, there will be a relationship shown in Table 1 that "multiple volume values of the speaker correspond to one volume level of the mobile phone". In one embodiment, for example, the volume value adjustment range of 0-127 can be evenly mapped to 16 volume levels of the mobile phone, as shown in Table 1 below:

表一Table I

音箱的音量值speaker volume 手机的音量等级The volume level of the phone 0-70-7 00 8-158-15 11 16-2316-23 22 24-3124-31 33 ……... ……... 120-127120-127 1515

根据表一所示的映射算法,参照图3A中的a所示,当用户在音箱上将音频的音量值从31减小至15时,相应的,手机可以根据映射算法,得到音频的音量等级从3降低至2,则可以在音量变化进度条中降低一格,如音量变化进度条中的黑色位置从B位置变化至C位置,用户可以在手机的界面上看到音频的音量值的变化。According to the mapping algorithm shown in Table 1, as shown in a in Figure 3A, when the user reduces the audio volume value from 31 to 15 on the speaker, the mobile phone can obtain the audio volume level according to the mapping algorithm. Decrease from 3 to 2, then you can lower one step in the volume change progress bar, for example, the black position in the volume change progress bar changes from B position to C position, and the user can see the change of the audio volume value on the phone interface .

参照图3B中的a和b所示,当用户在音箱上将音频的音量值从31减小至30时,相应的,手机可以根据映射算法,得到音频的音量等级一直为3。手机响应于音量等级无变化,可以在界面上不显示音量变化进度条。在该种示例中,用户虽然在音箱上调节了音频的音量值,但是用户在手机界面上看不到音量值的变化,导致用户以为用户在音箱处调节的音量没有生效,用户体验低,如图3B中的b所示,手机不会在界面上显示音量变化进度条。或者,用户在音箱上连续按压了多次音量按键(如音量值从26至25,再从25至24,再从24至23),手机界面上才显示一次音量变化进度条,用户体验差。Referring to a and b in FIG. 3B , when the user reduces the audio volume value from 31 to 30 on the speaker, correspondingly, the mobile phone can obtain the audio volume level as 3 all the time according to the mapping algorithm. In response to no change in the volume level, the mobile phone may not display a volume change progress bar on the interface. In this example, although the user adjusts the volume value of the audio on the speaker, the user cannot see the change in the volume value on the mobile phone interface, causing the user to think that the volume adjusted by the user on the speaker does not take effect, and the user experience is poor, such as As shown in b in FIG. 3B , the mobile phone does not display a volume change progress bar on the interface. Or, the user presses the volume button several times continuously on the speaker (such as the volume value is from 26 to 25, then from 25 to 24, and then from 24 to 23), and the volume change progress bar is displayed on the mobile phone interface only once, which is a poor user experience.

本申请实施例提供的音量调整方法,旨在解决现有技术的如上技术问题。其中,本申请实施例中,手机若检测到相邻两次来自音箱的音频的音量值映射至手机的音量等级相同,可以根据相邻两次来自音箱的音频的音量值,显示音量变化进度条,且表征音频的音量值的变化,使得用户可以实时感受到音频的音量值的变化,提高用户体验。The volume adjustment method provided in the embodiment of the present application aims to solve the above technical problems in the prior art. Among them, in the embodiment of the present application, if the mobile phone detects that the volume level of the mobile phone is mapped to the same volume level of the two adjacent audio volumes from the speakers, the volume change progress bar can be displayed according to the volume values of the two adjacent audios from the speakers. , and represents the change of the volume value of the audio, so that the user can feel the change of the volume value of the audio in real time, thereby improving the user experience.

应理解的是,本申请实施例中的音量调整方法,不仅可以适用在电子设备通过音频播放设备播放音频的场景中,还可以适用于电子设备通过音频播放设备播放其他包含有音频的场景中,如播放视频等。It should be understood that the volume adjustment method in the embodiment of the present application is applicable not only to the scenario where the electronic device plays audio through the audio playback device, but also to the scenario where the electronic device plays other audio through the audio playback device. Such as playing video, etc.

下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below in conjunction with the accompanying drawings.

图4为本申请实施例提供的音量调整方法的一种实施例的流程示意图。应理解的是,下述实施例中以第一设备表征上述图1中的电子设备,以第二设备表征图1中的音频播放设备进行说明,所述第一设备与第二设备无线连接,无线连接方式可以参照上述图1中的互联方式。第一设备通过所述无线连接控制所述第二设备,示例性的,第一设备可以控制第二设备播放第一设备上的音频。所述第一设备的第一音量值调节范围和所述第二设备的第二音量值调节范围不同,示例性的,如第一设备(如手机)的第一音量值调节范围为0-15音量等级,第二设备(如音箱)的第二音量值调节范围为0-127个音量值。Fig. 4 is a schematic flow chart of an embodiment of a volume adjustment method provided by the embodiment of the present application. It should be understood that, in the following embodiments, the first device is used to represent the electronic device in FIG. 1 above, and the second device is used to represent the audio playback device in FIG. 1 for illustration. The first device is wirelessly connected to the second device, For the wireless connection mode, refer to the interconnection mode in FIG. 1 above. The first device controls the second device through the wireless connection. Exemplarily, the first device may control the second device to play audio on the first device. The first volume value adjustment range of the first device is different from the second volume value adjustment range of the second device. For example, the first volume value adjustment range of the first device (such as a mobile phone) is 0-15 Volume level, the adjustment range of the second volume value of the second device (such as a speaker) is 0-127 volume values.

图4中以第一设备和第二设备交互的方式进行说明,参照图4,本申请实施例提供的音量调整方法可以包括:In FIG. 4, the interaction between the first device and the second device is illustrated. Referring to FIG. 4, the volume adjustment method provided by the embodiment of the present application may include:

S401,接收来自第二设备的第一音量值,第一音量值用于指示第二设备的音量,第一音量值为基于第二音量值调节范围确定的音量值。S401. Receive a first volume value from a second device, where the first volume value is used to indicate the volume of the second device, and the first volume value is a volume value determined based on a second volume value adjustment range.

参照图3A和图3B中的描述,用户在第二设备(如音箱)上调节音量时,第二设备可以通过与第一设备之间的无线连接,向第一设备发送调节后的音量值,即第二设备的第一音量值。示例性的,当用户在音箱上将音量值从31减小至30时,第二设备向第一设备发送第一音量值,该第一音量值为30。Referring to the description in FIG. 3A and FIG. 3B, when the user adjusts the volume on the second device (such as a speaker), the second device can send the adjusted volume value to the first device through a wireless connection with the first device, That is, the first volume value of the second device. Exemplarily, when the user decreases the volume value from 31 to 30 on the sound box, the second device sends the first volume value to the first device, and the first volume value is 30.

第一音量值为基于第二音量值调节范围确定的音量值,可以理解为:第一音量值为第二设备基于第二音量值调节范围确定的音量值,即第一音量值包含于第二音量值调节范围,如第一音量值30包含于第二音量值调节范围“0-127”。The first volume value is the volume value determined based on the second volume value adjustment range, which can be understood as: the first volume value is the volume value determined by the second device based on the second volume value adjustment range, that is, the first volume value is included in the second volume value adjustment range. The volume value adjustment range, for example, the first volume value 30 is included in the second volume value adjustment range "0-127".

其中,第一音量值用于指示第二设备的音量,可以理解为:第二设备可以根据第一音量值,确定第一音量值对应的第二设备的音量。示例性的,如第二设备可以根据“第一音量值调节范围和第二音量值调节范围的映射关系(如表一所示的映射关系)”,以及第一音量值,得到第二设备的音量。Wherein, the first volume value is used to indicate the volume of the second device, it can be understood that: the second device can determine the volume of the second device corresponding to the first volume value according to the first volume value. Exemplarily, for example, the second device can obtain the second device's volume based on the "mapping relationship between the first volume value adjustment range and the second volume value adjustment range (mapping relationship shown in Table 1)" and the first volume value. volume.

S402,将第一音量值转换为第二音量值,第二音量值为基于第一音量值调节范围确定的音量值。S402. Convert the first volume value into a second volume value, where the second volume value is a volume value determined based on an adjustment range of the first volume value.

第一音量值调节范围和第二音量值调节范围具有映射关系,第一设备可以根据第一音量值,以及该映射关系,获取第一音量值映射的第二音量值。其中,第二音量值为基于第一音量值调节范围确定的音量值,可以理解为:第二音量值包含于第一音量值调节范围。The first volume value adjustment range and the second volume value adjustment range have a mapping relationship, and the first device may acquire the second volume value mapped to the first volume value according to the first volume value and the mapping relationship. Wherein, the second volume value is a volume value determined based on the first volume value adjustment range, which can be understood as: the second volume value is included in the first volume value adjustment range.

示例性的,第一音量值调节范围和第二音量值调节范围具有映射关系,该映射关系如表一所示,第一音量值为30,则第一设备根据表一所示的映射关系,可以得到第二音量值为3。Exemplarily, the first volume value adjustment range and the second volume value adjustment range have a mapping relationship, the mapping relationship is shown in Table 1, the first volume value is 30, then the first device according to the mapping relationship shown in Table 1, The second volume value can be obtained as 3.

S403,若第二音量值与第三音量值相同,则根据第一音量值和第四音量值,获取第一音量值对应的音量变化比例,第四音量值为上一次接收的来自第二设备的音量值,第三音量值为对第四音量值转换得到的。S403. If the second volume value is the same as the third volume value, according to the first volume value and the fourth volume value, obtain the volume change ratio corresponding to the first volume value, and the fourth volume value is the volume received last time from the second device. volume value, the third volume value is converted from the fourth volume value.

第四音量值为第二设备上一次接收的来自第二设备的音量值,第四音量值包含于第二音量值调节范围。第三音量值为对第四音量值转换得到的,其中转换过程可以参照“第一音量值和第二音量值的转换过程”的相关描述。其中,示例性的,第四音量值为31,第一设备可以根据如表一所示的映射关系,得到第三音量值为3。The fourth volume value is the volume value received by the second device last time from the second device, and the fourth volume value is included in the second volume value adjustment range. The third volume value is obtained by converting the fourth volume value, and the conversion process may refer to the related description of "conversion process between the first volume value and the second volume value". Wherein, for example, the fourth volume value is 31, and the first device can obtain the third volume value as 3 according to the mapping relationship shown in Table 1.

其中,若第二音量值与第三音量值相同,则第一设备根据第一音量值和第四音量值,获取第一音量值对应的音量变化比例。示例性的,第二音量值和第三音量值均为3,则第一设备根据第一音量值和第四音量值,获取第一音量值对应的音量变化比例。Wherein, if the second volume value is the same as the third volume value, the first device acquires the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value. Exemplarily, if both the second volume value and the third volume value are 3, the first device acquires the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value.

在一种实施例中,第一设备可以在第一音量值和第四音量值中确定较大的音量值,进而将该较大的音量值作为分母,将第一音量值和第四音量值的差值作为分子,得到第一音量值对应的音量变化比例。示例性的,第四音量值为31,第一音量值为30,则第一音量值和第四音量值中确定较大的音量值为31,31作为分母,第一音量值和第四音量值的差值为1,作为分子,则第一音量值对应的音量变化比例为1/31。In an embodiment, the first device may determine the larger volume value among the first volume value and the fourth volume value, and then use the larger volume value as the denominator, and combine the first volume value and the fourth volume value The difference of is used as the numerator to obtain the volume change ratio corresponding to the first volume value. Exemplarily, the fourth volume value is 31, the first volume value is 30, then the larger volume value is determined to be 31 among the first volume value and the fourth volume value, and 31 is used as the denominator, the first volume value and the fourth volume value The value difference is 1, and as a numerator, the volume change ratio corresponding to the first volume value is 1/31.

S404,根据音量值变化比例,显示第二设备的音量。S404. Display the volume of the second device according to the change ratio of the volume value.

第一设备可以根据音量值变化比例,显示第二设备的音量。具体的,第一设备可以在第一设备的音量变化进度条上显示表征“第四音量值至第一音量值”的变化。The first device may display the volume of the second device according to the change ratio of the volume value. Specifically, the first device may display a change representing "the fourth volume value to the first volume value" on the volume change progress bar of the first device.

示例性的,图5中的a与图3B中的a相同,在此不做赘述。参照图5中的b所示,当用户在音箱上将音量值从31减小至30时,手机可以根据映射算法,得到音量值31(第四音量值)和音量值30(第一音量值)对应的手机的音量等级均为3,现有技术中(如图3B所示)手机响应于音量等级均为3,不在手机上显示音量的变化。而本申请实施例中,为了使得用户感知音箱的音量值减小,可以执行S403得到音量值变化比例,进而根据音量值变化比例,显示第二设备的音量。示例性的,如图5中的b所示,如手机按照音量值变化比例1/31,可以将音量变化进度条划分为31格,因为音量减少了1,则可以在音量变化进度条上黑色部分下降一格(31格中的一格,与上述图3A中16格中的一格不同)。如此,用户可以在手机的界面上看到音量值下降。Exemplarily, a in FIG. 5 is the same as a in FIG. 3B , and details are not repeated here. Referring to b in Figure 5, when the user reduces the volume value from 31 to 30 on the speaker, the mobile phone can obtain a volume value of 31 (the fourth volume value) and a volume value of 30 (the first volume value) according to the mapping algorithm. ) corresponding to the volume level of the mobile phone is 3, in the prior art (as shown in FIG. 3B ), the mobile phone responds to the volume level of 3, and does not display the volume change on the mobile phone. However, in the embodiment of the present application, in order to make the user perceive that the volume value of the speaker is decreasing, S403 may be executed to obtain the volume value change ratio, and then the volume of the second device may be displayed according to the volume value change ratio. Exemplarily, as shown in b in Figure 5, if the volume change ratio of the mobile phone is 1/31, the volume change progress bar can be divided into 31 grids, because the volume is reduced by 1, then the volume change progress bar can be black Partial drop of one space (one of 31 spaces, different from one of 16 in Figure 3A above). In this way, the user can see the volume value decrease on the interface of the mobile phone.

本申请实施例中,第一设备若检测到来自第二设备的第一音量值与上一次接收到的第四音量值映射至第一设备的音量值相同,则可以根据第一音量值和第四音量值,获取第一音量值对应的音量变化比例,进而根据第一音量值对应的音量变化比例,显示音量值的变化,使得用户可以感受到音频的音量值的变化,提高用户体验。In this embodiment of the present application, if the first device detects that the first volume value from the second device is the same as the volume value mapped to the first device from the fourth volume value received last time, it may Four volume values, obtain the volume change ratio corresponding to the first volume value, and then display the change of the volume value according to the volume change ratio corresponding to the first volume value, so that the user can feel the change of the audio volume value and improve user experience.

上述实施例第一设备计算第一音量值对应的音量变化比例时,是基于第一音量值和第四音量值中较大的音量值,以及第一音量值和第四音量值的差值计算的,因为第一音量值和第四音量值可以连续变化,即第一音量值对应的音量变化比例中的分子和分母也是连续变化的,第一设备的计算量大。本申请实施例中,为了减少第一设备的计算量,可以根据第一音量值、第四音量值、以及第二音量值调节范围的最大值,获取第一音量值对应的音量变化比例,具体参照图6中的描述。In the above embodiment, when the first device calculates the volume change ratio corresponding to the first volume value, it is calculated based on the larger volume value of the first volume value and the fourth volume value, and the difference between the first volume value and the fourth volume value. Yes, because the first volume value and the fourth volume value can change continuously, that is, the numerator and denominator in the volume change ratio corresponding to the first volume value also change continuously, and the calculation amount of the first device is large. In this embodiment of the application, in order to reduce the calculation amount of the first device, the volume change ratio corresponding to the first volume value can be obtained according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range, specifically Refer to the description in Figure 6.

参照图6,在一种实施例中,图4中的S403可以替换为S601:Referring to FIG. 6, in one embodiment, S403 in FIG. 4 can be replaced with S601:

S601,若第二音量值与第三音量值相同,则根据第一音量值、第四音量值、以及,第二音量值调节范围的最大值,获取第一音量值对应的音量变化比例。S601. If the second volume value is the same as the third volume value, obtain a volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range.

在一种实施例中,第一设备中存储有第二音量值调节范围,如0-127。在该种实施例中,第一设备可以根据第一音量值、第四音量值,以及第二音量值调节范围的最大值,获取第一音量值对应的音量变化比例。示例性的,如第二音量值调节范围的最大值为127。In an embodiment, the second volume value adjustment range, such as 0-127, is stored in the first device. In this embodiment, the first device may obtain the volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and the maximum value of the adjustment range of the second volume value. Exemplarily, the maximum value of the second volume value adjustment range is 127.

在该实施例中,第一设备可以将第二音量值调节范围的最大值作为第一音量值对应的音量变化比例的分母,将第一音量值和第四音量值的差值作为第一音量值对应的音量变化比例的分子,这样不仅可以得到第一音量值对应的音量变化比例,也因为第二音量值调节范围的最大值是不变的,因此第一设备仅需计算第一音量值和第四音量值的差值即可,可以减少第一设备计算获取第一音量值对应的音量变化比例的计算量,提高第一设备的处理效率。In this embodiment, the first device may use the maximum value of the second volume value adjustment range as the denominator of the volume change ratio corresponding to the first volume value, and use the difference between the first volume value and the fourth volume value as the first volume value The numerator of the volume change ratio corresponding to the value, so that not only the volume change ratio corresponding to the first volume value can be obtained, but also because the maximum value of the second volume value adjustment range is unchanged, so the first device only needs to calculate the first volume value The difference from the fourth volume value is enough, which can reduce the calculation amount of the first device to calculate and obtain the volume change ratio corresponding to the first volume value, and improve the processing efficiency of the first device.

参照图7中的a和b所示,当用户在音箱上将音量值从31减小至30时,手机可以根据映射算法,得到音量值31(第四音量值)和音量值30(第一音量值)对应的手机的音量等级均为3,手机可以执行S601得到音量值变化比例,进而根据音量值变化比例,显示第二设备的音量。示例性的,如图7中的b所示,如手机按照音量值变化比例1/127,可以将音量变化进度条划分为127格,因为音量减少了1,则可以在音量变化进度条上黑色部分下降一格(127格中的一格)。如此,用户可以在手机的界面上看到音量值下降。应理解,图7中的a与图5中的a相同。Referring to a and b in Figure 7, when the user reduces the volume value from 31 to 30 on the speaker, the mobile phone can obtain the volume value 31 (the fourth volume value) and the volume value 30 (the first volume value) according to the mapping algorithm. The volume level of the mobile phone corresponding to the volume value) is 3, the mobile phone can execute S601 to obtain the volume value change ratio, and then display the volume of the second device according to the volume value change ratio. Exemplarily, as shown in b in Figure 7, if the volume change ratio of the mobile phone is 1/127, the volume change progress bar can be divided into 127 grids, because the volume is reduced by 1, then the volume change progress bar can be black Partially drop one space (one of 127). In this way, the user can see the volume value decrease on the interface of the mobile phone. It should be understood that a in FIG. 7 is the same as a in FIG. 5 .

换句话说,第一设备还可以将第一音量值与第四音量值之间的差值作为第一差值,第一设备还可以获取第二音量值调节范围的最大值与第四音量值之间的第二差值,进而将第一差值与第二差值相除,得到第一音量值对应的音量变化比例。In other words, the first device may also use the difference between the first volume value and the fourth volume value as the first difference, and the first device may also obtain the maximum value of the second volume value adjustment range and the fourth volume value The second difference between them, and then divide the first difference by the second difference to obtain the volume change ratio corresponding to the first volume value.

也就是说,第一音量值为a,第四音量值为b,第二音量值调节范围的最大值为127,则第一音量值对应的音量变化比例为(b-a)/(127-a)。示例性的,第一音量值为30,第四音量值为31,第二音量值调节范围的最大值为127,则第一音量值对应的音量变化比例为(31-30)/(127-31)=1/96。That is to say, the first volume value is a, the fourth volume value is b, and the maximum value of the second volume value adjustment range is 127, then the volume change ratio corresponding to the first volume value is (b-a)/(127-a) . Exemplarily, the first volume value is 30, the fourth volume value is 31, and the maximum value of the second volume value adjustment range is 127, then the volume change ratio corresponding to the first volume value is (31-30)/(127- 31) = 1/96.

在该种实施例中,第一设备可以根据该第一音量值对应的音量变化比例,在第一设备的音量变化进度条上显示音量值变化比例的音量的增加或减少。示例性的,参照图8中的a和b所示,当用户在音箱上将音量值从31减小至30时,手机可以根据映射算法,得到音量值31(第四音量值)和音量值30(第一音量值)对应的手机的音量等级均为3,手机可以该实施例中的步骤得到音量值变化比例1/96。示例性的,如图8中的b所示,如手机按照音量值变化比例1/96,可以将音量变化进度条的黑色部分划分为96格,因为音量减少了1,则可以在音量变化进度条上黑色部分下降一格(96格中的一格),即在第一设备的音量变化进度条上显示1/96的音量的减少。如此,用户可以在手机的界面上看到音量值下降。应理解,图8中的a与图5中的a相同。In this embodiment, the first device may display volume increase or decrease according to the volume value change ratio on the volume change progress bar of the first device according to the volume change ratio corresponding to the first volume value. Exemplarily, as shown in a and b in FIG. 8, when the user reduces the volume value from 31 to 30 on the speaker, the mobile phone can obtain the volume value 31 (the fourth volume value) and the volume value according to the mapping algorithm The volume level of the mobile phone corresponding to 30 (the first volume value) is 3, and the mobile phone can obtain the volume value change ratio of 1/96 through the steps in this embodiment. Exemplarily, as shown in b in Figure 8, if the mobile phone follows the volume change ratio of 1/96, the black part of the volume change progress bar can be divided into 96 grids, because the volume is reduced by 1, then the volume change progress can be The black part on the bar drops by one grid (one grid in 96 grids), that is, a volume reduction of 1/96 is displayed on the volume change progress bar of the first device. In this way, the user can see the volume value decrease on the interface of the mobile phone. It should be understood that a in FIG. 8 is the same as a in FIG. 5 .

本申请实施例中,当第三音量值为第一音量值调节范围的最小值,且第一音量值大于第四音量值,则第一设备可以采用如上方式,在音量变化进度条上显示第二设备的音量。当第三音量值为第一音量值调节范围的最小值,且第一音量值小于第四音量值,则第一设备不显示音量变化进度条。示例性的,如第四音量值为6,第四音量值转换成的第三音量值为0,0为第一音量值调节范围的最小值。在该种情况下,参照图9中的a,若第一音量值如7,大于6,则第一设备可以按照音量值变化比例的方式在0的基础上,显示音量值变化比例的音量的增加。参照图9中的b,但若第一音量值如5,小于6,则第一设备显示的音量变化条已经达到最小值,没办法再继续减小,因此第一设备可以不显示音量变化条。In this embodiment of the application, when the third volume value is the minimum value of the first volume value adjustment range, and the first volume value is greater than the fourth volume value, the first device can display the volume change progress bar in the above manner in the above manner. Second, the volume of the device. When the third volume value is the minimum value of the adjustment range of the first volume value, and the first volume value is smaller than the fourth volume value, the first device does not display the volume change progress bar. Exemplarily, if the fourth volume value is 6, the third volume value converted from the fourth volume value is 0, and 0 is the minimum value of the adjustment range of the first volume value. In this case, referring to a in FIG. 9, if the first volume value is greater than 6, such as 7, the first device can display the volume value of the volume value change ratio based on 0 according to the volume value change ratio. Increase. Referring to b in Figure 9, but if the first volume value is less than 6, such as 5, the volume change bar displayed by the first device has reached the minimum value, and there is no way to continue to decrease, so the first device may not display the volume change bar .

同理的,若第三音量值为第一音量值调节范围的最大值,且第一音量值小于第四音量值,则第一设备可以采用如上方式,在音量变化进度条上显示第二设备的音量。当第三音量值为第一音量值调节范围的最大值,且第一音量值大于第四音量值,则第一设备不显示音量变化进度条。示例性的,如第四音量值为125,第四音量值转换成的第三音量值为15,15为第一音量值调节范围的最小值。在该种情况下,若第一音量值如120,大于125,则第一设备可以按照音量值变化比例的方式在0的基础上,显示音量值变化比例的音量的增加。但若第一音量值如126,大于125,则第一设备显示的音量变化条已经达到最大值,没办法再继续增大,因此第一设备可以不显示音量变化条。Similarly, if the third volume value is the maximum value of the first volume value adjustment range, and the first volume value is smaller than the fourth volume value, the first device can display the second device on the volume change progress bar in the above manner. volume. When the third volume value is the maximum value of the first volume value adjustment range, and the first volume value is greater than the fourth volume value, the first device does not display the volume change progress bar. Exemplarily, if the fourth volume value is 125, the third volume value converted from the fourth volume value is 15, and 15 is the minimum value of the adjustment range of the first volume value. In this case, if the first volume value, such as 120, is greater than 125, the first device may display an increase in the volume of the volume value change ratio based on 0 based on the volume value change ratio. But if the first volume value is greater than 125, such as 126, the volume change bar displayed by the first device has reached the maximum value, and there is no way to continue to increase, so the first device may not display the volume change bar.

本申请实施例中,第一设备可以根据第一音量值、第四音量值、以及,第二音量值调节范围的最大值,获取第一音量值对应的音量变化比例,以及根据该音量变化比例,在第一设备的音量变化进度条上显示音量值变化比例的音量的增加或减少,不仅可以有效提示用户第二设备的音量的变化,还可以减少第一设备的计算量,提高第一设备的处理效率。In this embodiment of the application, the first device may obtain the volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range, and according to the volume change ratio , on the volume change progress bar of the first device, the volume increase or decrease of the volume value change ratio is displayed, which can not only effectively prompt the user to change the volume of the second device, but also reduce the calculation amount of the first device and improve the volume of the first device. processing efficiency.

如上实施例中讲述的均为第二音量值和第三音量值相同的示例,下述实施例中讲述第二音量值与第三音量值不同的示例,在该种实施例中,若第二音量值与第三音量值不同,则第一设备可以根据第二音量值,以及第一音量值调节范围,显示第二设备的音量。也就是说,第一设备可以根据第二音量值在第一音量值调节范围中所占的比例,显示第二设备的音量。示例性的,当用户在音箱上将音频的音量值从31减小至15时,相应的,手机可以根据映射算法,得到音频的音量等级从3降低至2,则可以在音量变化进度条中降低一格,可以参照图3A中的相关描述。As described in the above embodiment, the second volume value is the same as the third volume value. The following embodiments describe the example in which the second volume value is different from the third volume value. In this embodiment, if the second If the volume value is different from the third volume value, the first device can display the volume of the second device according to the second volume value and the adjustment range of the first volume value. That is to say, the first device may display the volume of the second device according to the proportion of the second volume value in the first volume value adjustment range. Exemplarily, when the user reduces the volume value of the audio from 31 to 15 on the speaker, correspondingly, the mobile phone can obtain the volume level of the audio from 3 to 2 according to the mapping algorithm, and then it can be displayed in the volume change progress bar For lowering one frame, refer to the related description in Fig. 3A.

在该实施例中,第一设备可以根据第二音量值,调整第一设备的音量。换句话说,第一设备可以存储第二音量值,进而在第一设备与第二设备断开无线连接时,第一设备可以按照第二音量值播放音频。In this embodiment, the first device may adjust the volume of the first device according to the second volume value. In other words, the first device may store the second volume value, and then when the first device is disconnected from the second device wirelessly, the first device may play audio according to the second volume value.

该实施例的优点在于:如在一安静的环境中,手机和音箱无线连接,手机通过音箱播放音频,用户在音箱上将音频的音量值从31减小至15时,则手机可以根据映射算法,得到音频的音量等级从3降低至2,进而存储该第二音量值2。以便手机和音箱断开无线连接后,手机可以采用第二音量值2,而非第三音量值3播放音频,使得手机播放的音频的音量值更适配于用户所在的环境,提高用户体验。The advantage of this embodiment is: if in a quiet environment, the mobile phone and the speaker are connected wirelessly, the mobile phone plays audio through the speaker, and when the user reduces the volume value of the audio from 31 to 15 on the speaker, the mobile phone can , it is obtained that the volume level of the audio is reduced from 3 to 2, and the second volume value 2 is further stored. So that after the wireless connection between the mobile phone and the speaker is disconnected, the mobile phone can play audio with the second volume value of 2 instead of the third volume value of 3, so that the volume value of the audio played by the mobile phone is more suitable for the user's environment and improves user experience.

在一种实施例中,用户可以在第一设备上调整第二设备播放的音频的音量值。参照图10,用户可以按压手机的音量按键,调整第二设备播放的音频的音量值,其中手机响应于用户输入的针对第二设备的音量的调整操作(即按压手机的音量按键的操作),可以根据第一音量值调节范围,确定调整操作对应的第五音量值,进而根据第五音量值,调整第二设备的音量。In one embodiment, the user can adjust the volume value of the audio played by the second device on the first device. Referring to FIG. 10 , the user can press the volume button of the mobile phone to adjust the volume value of the audio played by the second device, wherein the mobile phone responds to the adjustment operation of the volume of the second device input by the user (that is, the operation of pressing the volume button of the mobile phone), A fifth volume value corresponding to the adjustment operation may be determined according to the first volume value adjustment range, and then the volume of the second device may be adjusted according to the fifth volume value.

示例性的,如音箱播放音频的音量值为30,该音量值30对应的手机的音量值为3,用户按压一次手机的音量按键“加(或+)”,手机可以确定手机的音量值增加1。假设用户仅按压一次手机的音量按键“加”,则手机可以按照“第一音量值调节范围和第二音量值调节范围的映射关系”,确定手机的音量值为4映射的第二设备的音量值为“32-39”。应理解,其他图示中的手机未示出音量按键。Exemplarily, if the volume value of the audio played by the speaker is 30, the volume value of the mobile phone corresponding to the volume value 30 is 3, and the user presses the volume button "plus (or +)" of the mobile phone once, and the mobile phone can determine that the volume value of the mobile phone has increased 1. Assuming that the user only presses the volume button "plus" of the mobile phone once, the mobile phone can determine the volume of the second device mapped to the volume value of the mobile phone by 4 according to the "mapping relationship between the first volume value adjustment range and the second volume value adjustment range". The value is "32-39". It should be understood that the mobile phones in other figures do not show volume buttons.

在示例中,参照图10,手机响应于用户按压一次手机的音量按键“加”的操作,可以在显示音量变化进度条按照1/16格的方式增加一格。In an example, referring to FIG. 10 , in response to the user's operation of pressing the volume button "plus" of the mobile phone once, the mobile phone may display a progress bar of volume change by one step in the manner of 1/16.

在一种实施例中,参照图10,手机可以将“32-39”中的任一值发送给音箱,音箱响应于来自手机的音量值,可以按照该音量值播放音频。或者,在一种实施例中,手机可以将“32-39”中的中间值35或36发送给音箱,音箱响应于来自手机的音量值,可以按照中间值35或36播放音频。In one embodiment, referring to FIG. 10 , the mobile phone can send any value in "32-39" to the speaker, and the speaker can play audio according to the volume value in response to the volume value from the mobile phone. Or, in an embodiment, the mobile phone can send the intermediate value 35 or 36 in "32-39" to the speaker, and the speaker can play audio according to the intermediate value 35 or 36 in response to the volume value from the mobile phone.

图11为本申请实施例提供的音量调整装置的结构示意图。本申请实施例所涉及的音量调整装置可以为前述所说的第一设备,也可以为应用于第一设备的芯片。该音量调整装置可以用于执行上述方法实施例中第一设备的动作。音量调整装置包含于第一设备,所述第一设备与第二设备无线连接,所述第一设备通过所述无线连接控制所述第二设备,所述第一设备的第一音量值调节范围和所述第二设备的第二音量值调节范围不同。FIG. 11 is a schematic structural diagram of a volume adjustment device provided by an embodiment of the present application. The volume adjusting device involved in the embodiment of the present application may be the aforementioned first device, or may be a chip applied to the first device. The volume adjustment apparatus may be used to perform the actions of the first device in the foregoing method embodiments. The volume adjustment device is included in the first device, the first device is wirelessly connected to the second device, the first device controls the second device through the wireless connection, and the first volume value adjustment range of the first device It is different from the second volume value adjustment range of the second device.

参照图11,音量调整装置1100可以包括:收发模块1101、处理模块1102,以及显示模块1103。Referring to FIG. 11 , the volume adjustment device 1100 may include: a transceiver module 1101 , a processing module 1102 , and a display module 1103 .

收发模块1101,用于接收来自第二设备的第一音量值,第一音量值用于指示第二设备的音量,第一音量值为基于第二音量值调节范围确定的音量值。The transceiver module 1101 is configured to receive a first volume value from the second device, the first volume value is used to indicate the volume of the second device, and the first volume value is a volume value determined based on the second volume value adjustment range.

处理模块1102,用于将第一音量值转换为第二音量值,第二音量值为基于第一音量值调节范围确定的音量值;若第二音量值与第三音量值相同,则根据第一音量值和第四音量值,获取第一音量值对应的音量变化比例,第四音量值为上一次接收的来自第二设备的音量值,第三音量值为对第四音量值转换得到的。The processing module 1102 is configured to convert the first volume value into a second volume value, and the second volume value is a volume value determined based on the adjustment range of the first volume value; if the second volume value is the same as the third volume value, then according to the A volume value and a fourth volume value, to obtain the volume change ratio corresponding to the first volume value, the fourth volume value is the volume value received last time from the second device, and the third volume value is obtained by converting the fourth volume value .

显示模块1103,用于根据音量值变化比例,显示第二设备的音量。The display module 1103 is configured to display the volume of the second device according to the change ratio of the volume value.

在一种可能的实现方式中,处理模块1102,具体用于根据第一音量值、第四音量值、以及,第二音量值调节范围的最大值,获取第一音量值对应的音量变化比例。In a possible implementation manner, the processing module 1102 is specifically configured to acquire the volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range.

在一种可能的实现方式中,处理模块1102,具体用于获取第一音量值与第四音量值之间的第一差值;获取第二音量值调节范围的最大值与第四音量值之间的第二差值;将第一差值与第二差值相除,得到第一音量值对应的音量变化比例。In a possible implementation manner, the processing module 1102 is specifically configured to obtain the first difference between the first volume value and the fourth volume value; obtain the difference between the maximum value of the second volume value adjustment range and the fourth volume value; the second difference between; and divide the first difference by the second difference to obtain the volume change ratio corresponding to the first volume value.

在一种可能的实现方式中,显示模块1103,具体用于在第一设备的音量变化进度条上显示音量值变化比例的音量的增加或减少。In a possible implementation manner, the display module 1103 is specifically configured to display the increase or decrease of the volume in volume value change ratio on the volume change progress bar of the first device.

在一种可能的实现方式中,显示模块1103,具体用于若第三音量值为第一音量值调节范围的最小值,且第一音量值大于第四音量值,则在音量变化进度条上显示第二设备的音量;或者,若第三音量值为第一音量值调节范围的最大值,且第一音量值小于第四音量值,则显示模块1103,具体用于在音量变化进度条上显示第二设备的音量。In a possible implementation manner, the display module 1103 is specifically configured to, if the third volume value is the minimum value of the adjustment range of the first volume value, and the first volume value is greater than the fourth volume value, then on the volume change progress bar Display the volume of the second device; or, if the third volume value is the maximum value of the first volume value adjustment range, and the first volume value is less than the fourth volume value, the display module 1103 is specifically used to display the volume on the volume change progress bar Displays the volume of the second device.

在一种可能的实现方式中,显示模块1103,还用于若第二音量值与第三音量值不同,则根据第二音量值,以及第一音量值调节范围,显示第二设备的音量。In a possible implementation manner, the display module 1103 is further configured to display the volume of the second device according to the second volume value and the adjustment range of the first volume value if the second volume value is different from the third volume value.

在一种可能的实现方式中,处理模块1102,还用于根据第二音量值,调整第一设备的音量。In a possible implementation manner, the processing module 1102 is further configured to adjust the volume of the first device according to the second volume value.

在一种可能的实现方式中,处理模块1102,还用于响应于用户输入的针对第二设备的音量的调整操作,根据第一音量值调节范围,确定调整操作对应的第五音量值;根据第五音量值,调整第二设备的音量。In a possible implementation manner, the processing module 1102 is further configured to determine a fifth volume value corresponding to the adjustment operation according to the first volume value adjustment range in response to the volume adjustment operation input by the user for the second device; Fifth volume value, adjust the volume of the second device.

本申请实施例提供的音量调整装置,可以执行上述方法实施例中第一设备的动作,其实现原理和技术效果类似,在此不再赘述。The volume adjustment device provided in the embodiment of the present application can perform the actions of the first device in the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.

图12为本申请提供的电子设备的结构示意图。该电子设备可以为上述实施例中的第一设备。如图12所示,该电子设备1200包括:存储器1201和至少一个处理器1202。FIG. 12 is a schematic structural diagram of an electronic device provided by the present application. The electronic device may be the first device in the foregoing embodiments. As shown in FIG. 12 , the electronic device 1200 includes: a memory 1201 and at least one processor 1202 .

存储器1201,用于存储程序指令。The memory 1201 is used for storing program instructions.

处理器1202,用于在程序指令被执行时实现本实施例中的音量调整方法,具体实现原理可参见上述实施例,本实施例此处不再赘述。The processor 1202 is configured to implement the volume adjustment method in this embodiment when the program instructions are executed. For specific implementation principles, please refer to the above-mentioned embodiments, and details will not be repeated here in this embodiment.

该电子设备1200还可以包括:输入/输出接口1203、以及显示屏1204。The electronic device 1200 may also include: an input/output interface 1203 and a display screen 1204 .

输入/输出接口1203可以包括独立的输出接口和输入接口,也可以为集成输入和输出的集成接口。其中,输出接口用于输出数据,输入接口用于获取输入的数据,上述输出的数据为上述方法实施例中输出的统称,输入的数据为上述方法实施例中输入的统称。The input/output interface 1203 may include an independent output interface and an input interface, or may be an integrated interface integrating input and output. Wherein, the output interface is used to output data, and the input interface is used to obtain input data, the above-mentioned output data is a general term for output in the above method embodiments, and the input data is a general term for input in the above method embodiments.

显示屏1204,用于显示第二设备的音量(如可以为音量变化进度条)。The display screen 1204 is configured to display the volume of the second device (for example, it may be a volume change progress bar).

本申请还提供一种可读存储介质,可读存储介质中存储有执行指令,当电子设备的至少一个处理器执行该执行指令时,当计算机执行指令被处理器执行时,实现上述实施例中的音量调整方法。The present application also provides a readable storage medium, wherein execution instructions are stored in the readable storage medium, and when at least one processor of the electronic device executes the execution instructions, when the computer execution instructions are executed by the processor, the above-mentioned embodiments are implemented. volume adjustment method.

本申请还提供一种程序产品,该程序产品包括执行指令,该执行指令存储在可读存储介质中。电子设备的至少一个处理器可以从可读存储介质读取该执行指令,至少一个处理器执行该执行指令使得电子设备实施上述的各种实施方式提供的音量调整方法。The present application also provides a program product, which includes execution instructions, and the execution instructions are stored in a readable storage medium. At least one processor of the electronic device may read the execution instruction from the readable storage medium, and the at least one processor executes the execution instruction so that the electronic device implements the volume adjustment method provided in the foregoing various implementations.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software function modules.

上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(英文:processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取存储器(英文:Random Access Memory,简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The above-mentioned software functional modules are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor (English: processor) to execute the functions described in various embodiments of the present application. part of the method. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disc, etc. Various media that can store program code.

在上述音量调整装置的实施例中,应理解,处理模块可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application SpecificIntegrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the embodiment of the above-mentioned volume adjustment device, it should be understood that the processing module can be a central processing unit (English: Central Processing Unit, referred to as: CPU), and can also be other general-purpose processors, digital signal processors (English: Digital Signal Processor , referred to as: DSP), application specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) and so on. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. scope.

Claims (12)

1.一种音量调整方法,其特征在于,应用于第一设备,所述第一设备与第二设备无线连接,所述第一设备通过所述无线连接控制所述第二设备,所述第一设备的第一音量值调节范围和所述第二设备的第二音量值调节范围不同,所述方法包括:1. A volume adjustment method, characterized in that it is applied to a first device, the first device is wirelessly connected to a second device, the first device controls the second device through the wireless connection, and the first device controls the second device through the wireless connection. The first volume value adjustment range of a device is different from the second volume value adjustment range of the second device, and the method includes: 接收来自所述第二设备的第一音量值,所述第一音量值用于指示所述第二设备的音量,所述第一音量值为基于所述第二音量值调节范围确定的音量值;receiving a first volume value from the second device, the first volume value is used to indicate the volume of the second device, and the first volume value is a volume value determined based on the second volume value adjustment range ; 将所述第一音量值转换为第二音量值,所述第二音量值为基于所述第一音量值调节范围确定的音量值;converting the first volume value into a second volume value, the second volume value being a volume value determined based on an adjustment range of the first volume value; 若所述第二音量值与第三音量值相同,则根据所述第一音量值和第四音量值,获取所述第一音量值对应的音量变化比例,所述第四音量值为上一次接收的来自所述第二设备的音量值,所述第三音量值为对所述第四音量值转换得到的;If the second volume value is the same as the third volume value, the volume change ratio corresponding to the first volume value is obtained according to the first volume value and the fourth volume value, and the fourth volume value is the last time The received volume value from the second device, the third volume value is obtained by converting the fourth volume value; 根据所述音量值变化比例,显示所述第二设备的音量。Displaying the volume of the second device according to the change ratio of the volume value. 2.根据权利要求1所述的方法,其特征在于,所述根据所述第一音量值和第四音量值,获取所述第一音量值对应的音量变化比例,包括:2. The method according to claim 1, wherein the obtaining the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value comprises: 根据所述第一音量值、第四音量值、以及,所述第二音量值调节范围的最大值,获取所述第一音量值对应的音量变化比例。According to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range, the volume change ratio corresponding to the first volume value is acquired. 3.根据权利要求2所述的方法,其特征在于,所述根据所述第一音量值、第四音量值、以及,所述第二音量值调节范围的最大值,获取所述第一音量值对应的音量变化比例,包括:3. The method according to claim 2, wherein the first volume value is acquired according to the first volume value, the fourth volume value, and the maximum value of the second volume value adjustment range. The volume change ratio corresponding to the value, including: 获取所述第一音量值与所述第四音量值之间的第一差值;acquiring a first difference between the first volume value and the fourth volume value; 获取所述第二音量值调节范围的最大值与所述第四音量值之间的第二差值;Acquiring a second difference between the maximum value of the second volume value adjustment range and the fourth volume value; 将所述第一差值与所述第二差值相除,得到所述第一音量值对应的音量变化比例。The first difference value is divided by the second difference value to obtain a volume change ratio corresponding to the first volume value. 4.根据权利要求1-3中任一项所述的方法,其特征在于,所述根据所述音量值变化比例,显示所述第二设备的音量,包括:4. The method according to any one of claims 1-3, wherein the displaying the volume of the second device according to the change ratio of the volume value comprises: 在所述第一设备的音量变化进度条上显示所述音量值变化比例的音量的增加或减少。The volume increase or decrease of the volume value change ratio is displayed on the volume change progress bar of the first device. 5.根据权利要求4所述的方法,其特征在于,所述方法还包括:5. method according to claim 4, is characterized in that, described method also comprises: 若所述第三音量值为所述第一音量值调节范围的最小值,且所述第一音量值大于所述第四音量值,则在所述音量变化进度条上显示所述第二设备的音量;或者,If the third volume value is the minimum value of the adjustment range of the first volume value, and the first volume value is greater than the fourth volume value, displaying the second device on the volume change progress bar volume; or, 若所述第三音量值为所述第一音量值调节范围的最大值,且所述第一音量值小于所述第四音量值,则在所述音量变化进度条上显示所述第二设备的音量。If the third volume value is the maximum value of the adjustment range of the first volume value, and the first volume value is smaller than the fourth volume value, displaying the second device on the volume change progress bar volume. 6.根据权利要求1-3中任一项所述的方法,其特征在于,所述将所述第一音量值转换为第二音量值之后,所述方法还包括:6. The method according to any one of claims 1-3, wherein after converting the first volume value into a second volume value, the method further comprises: 若所述第二音量值与第三音量值不同,则根据所述第二音量值,以及所述第一音量值调节范围,显示所述第二设备的音量。If the second volume value is different from the third volume value, the volume of the second device is displayed according to the second volume value and the adjustment range of the first volume value. 7.根据权利要求6所述的方法,其特征在于,所述方法还包括:7. The method according to claim 6, further comprising: 根据所述第二音量值,调整所述第一设备的音量。Adjusting the volume of the first device according to the second volume value. 8.根据权利要求1-3中任一项所述的方法,其特征在于,所述方法还包括:8. The method according to any one of claims 1-3, wherein the method further comprises: 响应于用户输入的针对所述第二设备的音量的调整操作,根据所述第一音量值调节范围,确定所述调整操作对应的第五音量值;In response to an adjustment operation input by the user on the volume of the second device, according to the first volume value adjustment range, determine a fifth volume value corresponding to the adjustment operation; 根据所述第五音量值,调整所述第二设备的音量。Adjusting the volume of the second device according to the fifth volume value. 9.一种音量调整装置,其特征在于,所述音量调整装置包含于第一设备,所述第一设备与第二设备无线连接,所述第一设备通过所述无线连接控制所述第二设备,所述第一设备的第一音量值调节范围和所述第二设备的第二音量值调节范围不同,所述装置包括:9. A volume adjustment device, characterized in that the volume adjustment device is included in a first device, the first device is wirelessly connected to a second device, and the first device controls the second device through the wireless connection. device, the first volume value adjustment range of the first device is different from the second volume value adjustment range of the second device, and the apparatus includes: 收发模块,用于接收来自所述第二设备的第一音量值,所述第一音量值用于指示所述第二设备的音量,所述第一音量值为基于所述第二音量值调节范围确定的音量值;A transceiver module, configured to receive a first volume value from the second device, the first volume value is used to indicate the volume of the second device, and the first volume value is adjusted based on the second volume value Range-determined volume value; 处理模块,用于:Processing modules for: 将所述第一音量值转换为第二音量值,所述第二音量值为基于所述第一音量值调节范围确定的音量值;converting the first volume value into a second volume value, the second volume value being a volume value determined based on an adjustment range of the first volume value; 若所述第二音量值与第三音量值相同,则根据所述第一音量值和第四音量值,获取所述第一音量值对应的音量变化比例,所述第四音量值为上一次接收的来自所述第二设备的音量值,所述第三音量值为对所述第四音量值转换得到的;If the second volume value is the same as the third volume value, the volume change ratio corresponding to the first volume value is obtained according to the first volume value and the fourth volume value, and the fourth volume value is the last time The received volume value from the second device, the third volume value is obtained by converting the fourth volume value; 显示模块,用于根据所述音量值变化比例,显示所述第二设备的音量。A display module, configured to display the volume of the second device according to the change ratio of the volume value. 10.一种电子设备,包括:处理器,以及与所述处理器通信连接的存储器;10. An electronic device, comprising: a processor, and a memory communicatively connected to the processor; 所述存储器存储计算机执行指令;the memory stores computer-executable instructions; 所述处理器执行所述存储器存储的计算机执行指令,以实现如权利要求1-8中任一项所述的方法。The processor executes the computer-implemented instructions stored in the memory to implement the method according to any one of claims 1-8. 11.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现如权利要求1-8中任一项所述的方法。11. A computer-readable storage medium, characterized in that, computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to implement any one of claims 1-8 when executed by a processor. method described in the item. 12.一种计算机程序产品,其特征在于,包括计算机程序,该计算机程序被处理器执行时实现权利要求1-8中任一项所述的方法。12. A computer program product, characterized by comprising a computer program, which implements the method according to any one of claims 1-8 when the computer program is executed by a processor.
CN202111543948.8A 2021-12-16 2021-12-16 Volume adjustment method and device and electronic equipment Active CN116266852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111543948.8A CN116266852B (en) 2021-12-16 2021-12-16 Volume adjustment method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111543948.8A CN116266852B (en) 2021-12-16 2021-12-16 Volume adjustment method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN116266852A true CN116266852A (en) 2023-06-20
CN116266852B CN116266852B (en) 2024-10-29

Family

ID=86743206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111543948.8A Active CN116266852B (en) 2021-12-16 2021-12-16 Volume adjustment method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116266852B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100157172A1 (en) * 2008-12-22 2010-06-24 Wistron Corp. Electronic device, control volume system and method
CN106155640A (en) * 2015-03-24 2016-11-23 海信集团有限公司 A kind of volume display methods and device
CN107783708A (en) * 2016-08-30 2018-03-09 深圳市艾思脉电子股份有限公司 Audio amplifier and method for controlling volume
CN108182097A (en) * 2016-12-08 2018-06-19 武汉斗鱼网络科技有限公司 The implementation method and device of a kind of volume bar
CN108920060A (en) * 2018-07-06 2018-11-30 北京微播视界科技有限公司 Display methods, device, terminal device and the storage medium of volume
CN111490987A (en) * 2020-04-08 2020-08-04 国光电器股份有限公司 Control method and device of intelligent sound box, computer equipment and storage medium
WO2021197311A1 (en) * 2020-03-31 2021-10-07 维沃移动通信有限公司 Volume adjustment display method and electronic apparatus
CN113542860A (en) * 2021-07-13 2021-10-22 Vidaa美国公司 Bluetooth device sound output method and display device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100157172A1 (en) * 2008-12-22 2010-06-24 Wistron Corp. Electronic device, control volume system and method
CN106155640A (en) * 2015-03-24 2016-11-23 海信集团有限公司 A kind of volume display methods and device
CN107783708A (en) * 2016-08-30 2018-03-09 深圳市艾思脉电子股份有限公司 Audio amplifier and method for controlling volume
CN108182097A (en) * 2016-12-08 2018-06-19 武汉斗鱼网络科技有限公司 The implementation method and device of a kind of volume bar
CN108920060A (en) * 2018-07-06 2018-11-30 北京微播视界科技有限公司 Display methods, device, terminal device and the storage medium of volume
WO2021197311A1 (en) * 2020-03-31 2021-10-07 维沃移动通信有限公司 Volume adjustment display method and electronic apparatus
CN111490987A (en) * 2020-04-08 2020-08-04 国光电器股份有限公司 Control method and device of intelligent sound box, computer equipment and storage medium
CN113542860A (en) * 2021-07-13 2021-10-22 Vidaa美国公司 Bluetooth device sound output method and display device

Also Published As

Publication number Publication date
CN116266852B (en) 2024-10-29

Similar Documents

Publication Publication Date Title
US11159887B2 (en) Method and apparatus for controlling portable audio devices
US9154877B2 (en) Collaborative sound system
CN107509153A (en) Detection method, device, storage medium and terminal of sound playback device
KR20160075060A (en) Method for controlling function based on battery information and electronic device thereof
RU2607994C2 (en) Information sharing device, information sharing method, information sharing program and terminal device
KR102226817B1 (en) Method for reproducing contents and an electronic device thereof
JP2020109968A (en) Customized voice processing based on user-specific voice information and hardware-specific voice information
US11210056B2 (en) Electronic device and method of controlling thereof
CN116347320B (en) Audio playing method and electronic equipment
CN114040319B (en) Method, device, equipment and medium for optimizing playback quality of terminal equipment
EP4319116A1 (en) Volume adjustment method and terminal device
CN116266852B (en) Volume adjustment method and device and electronic equipment
JP2020030571A (en) Information processing apparatus, computer program, and information processing method
CN105955695A (en) Method for setting volume of intelligent terminal, and intelligent terminal
JP5598589B1 (en) Equalizer device and equalizer program
KR20220125026A (en) Audio processing method and electronic device including same
CN115696172B (en) Sound image calibration method and device
JP6119783B2 (en) Music playback device and music playback program
CN111698292A (en) Volume control method, device, equipment, system and storage medium
CN114125638B (en) Earphone playing control method and control device
CN114286245A (en) A volume adjustment method, system, device and computer-readable storage medium
CN117931116A (en) Volume adjustment method, electronic device and medium
CN116204152A (en) Control method, control device, terminal and storage medium
CN117707464A (en) Audio processing method and related equipment
CN105828172A (en) Play control method and device in audio and video play system

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