Volume adjustment method, device and electronic device
By receiving the volume value of the speaker and calculating the volume change ratio, it solves the problem of inconsistency in volume adjustment between the mobile phone and the speaker, achieves timely and accurate display of volume changes, and improves the user experience.
Patent Information
- Application Number
- CN202111543948.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-16
AI Technical Summary
After the mobile phone is wirelessly connected to the speaker, when the volume is adjusted, the speaker's volume value changes range is greater than the volume value displayed on the mobile phone, resulting in inconsistent user operations and mobile phone display, resulting in poor response timeliness.
By receiving the volume value of the speaker and converting it into a value suitable for the volume adjustment range of the mobile phone, the volume change ratio is calculated to display the volume change to ensure that the mobile phone interface is consistent with the user's operation.
It improves the timeliness and accuracy of volume changes displayed on mobile phones, enhances user experience, and ensures real-time feedback of volume adjustment operations.
Smart Images

Figure CN116266852B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to communication technology, and in particular to a volume adjustment method, device and electronic device. Background Art
[0002] 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 set on the speaker, or use voice interaction with the speaker to control the volume value of the audio played by the speaker.
[0003] Currently, in order to allow users to see changes in the volume of audio played by a speaker on their mobile phones, when the user adjusts the volume of the speaker on the speaker, the speaker can send the adjusted volume to the mobile phone, and the mobile phone can display the changes in the volume of the speaker on the interface.
[0004] Currently, the volume range of mobile phones is smaller than that of speakers. There is a problem that even if a user adjusts the volume of the speaker multiple times, the mobile phone only displays the change of the speaker volume once on the interface, causing the volume of the speaker displayed on the mobile phone to be inconsistent with the user's operation. Summary of the invention
[0005] The present application provides a volume adjustment method, device and electronic device, which can achieve the purpose of displaying the volume of a second device on a first device in accordance with the user's operation, thereby improving the response timeliness of the first device.
[0006] The first aspect of the present application provides a volume adjustment method, which is applied to a first device, wherein the first device is wirelessly connected to a second device, the first device controls the second device through the wireless connection, and 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 a volume value determined based on the second volume value adjustment range; converting the first volume value to a second volume value, and the second volume value is a volume value determined based on the first volume value adjustment range; if the second volume value is the same as the third volume value, then according to the first volume value and the fourth volume value, obtaining the volume change ratio corresponding to the first volume value, the fourth volume value is the volume value received from the second device last time, and the third volume value is obtained by converting the fourth volume value; according to the volume value change ratio, displaying the volume of the second device.
[0007] In a possible implementation, obtaining a volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value includes: obtaining a volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and a maximum value of an adjustment range of the second volume value.
[0008] In a possible implementation, obtaining 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 includes: 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; and dividing the first difference by the second difference to obtain the volume change ratio corresponding to the first volume value.
[0009] In a possible implementation, displaying the volume of the second device according to the volume value change ratio includes: displaying an increase or decrease in the volume of the volume value change ratio on a volume change progress bar of the first device.
[0010] In a possible implementation, the method further includes: if 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, displaying the volume of the second device on the volume change progress bar; 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, displaying the volume of the second device on the volume change progress bar.
[0011] In a possible implementation, after converting the first volume value into a second volume value, the method further includes: if the second volume value is different from a third volume value, displaying the volume of the second device according to the second volume value and the adjustment range of the first volume value.
[0012] In a possible implementation manner, the method further includes: adjusting the volume of the first device according to the second volume value.
[0013] In a possible implementation, the method further includes: in response to a user input for an adjustment operation on the volume of the second device, determining a fifth volume value corresponding to the adjustment operation according to the first volume value adjustment range; and adjusting the volume of the second device according to the fifth volume value.
[0014] A second aspect of the present application provides a volume adjustment device, the volume adjustment device being included in a first device, the first device being wirelessly connected to a second device, the first device controlling the second device through the wireless connection, a first volume value adjustment range of the first device being different from a second volume value adjustment range of the second device, the device comprising:
[0015] The transceiver module is used to receive a first volume value from the 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 an adjustment range of the second volume value.
[0016] a processing module, configured to 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; and if the second volume value is the same as a third volume value, obtaining a volume change ratio corresponding to the first volume value according to the first volume value and a fourth volume value, where the fourth volume value is a volume value received from the second device last time, and the third volume value is obtained by converting the fourth volume value.
[0017] The display module is used to display the volume of the second device according to the change ratio of the volume value.
[0018] In a possible implementation, the processing module is specifically configured to obtain a volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and a maximum value of an adjustment range of the second volume value.
[0019] In a possible implementation, the processing module is specifically used to obtain a first difference between the first volume value and the fourth volume value; obtain a second difference between a maximum value of the second volume value adjustment range and the fourth volume value; and divide the first difference by the second difference to obtain a volume change ratio corresponding to the first volume value.
[0020] In a possible implementation, the display module is specifically configured to display the increase or decrease of the volume of the volume value change ratio on a volume change progress bar of the first device.
[0021] In a possible implementation, the display module is specifically used to display the volume of the second device on the volume change progress bar if 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; 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 is specifically used to display the volume of the second device on the volume change progress bar.
[0022] In a possible implementation, the display module is further configured to display the volume of the second device according to the second volume value and the first volume value adjustment range if the second volume value is different from the third volume value.
[0023] 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.
[0024] In a possible implementation, the processing module is further used to respond to a user input for an adjustment operation on the volume of the second device, determine a fifth volume value corresponding to the adjustment operation according to the first volume value adjustment range; and adjust the volume of the second device according to the fifth volume value.
[0025] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0026] The memory stores computer-executable instructions;
[0027] The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method in the above-mentioned first aspect.
[0028] The fourth aspect of the present application provides a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the method in the above-mentioned first aspect is implemented.
[0029] A fifth aspect of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method in the first aspect.
[0030] The present application provides a volume adjustment method, apparatus and electronic device. If a first device detects that a first volume value from a second device is the same as a volume value mapped to the first device by a fourth volume value received last time, the first device can obtain a volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value, and then display a change in the volume value according to the volume change ratio corresponding to the first volume value, so that the volume of the second device displayed by the first device is consistent with the user's operation, thereby improving response timeliness. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0032] Figure 1A A schematic diagram of a volume progress change bar;
[0033] Figure 1BA schematic diagram of another volume progress change bar;
[0034] Figure 2 A schematic diagram of a scenario applicable to an embodiment of the present application;
[0035] Figure 3A A schematic diagram of volume adjustment;
[0036] Figure 3B A schematic diagram of another volume adjustment;
[0037] Figure 4 A flow chart of an embodiment of a volume adjustment method provided in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of volume adjustment provided in an embodiment of the present application;
[0039] Figure 6 A flow chart of another embodiment of the volume adjustment method provided in the embodiment of the present application;
[0040] Figure 7 A schematic diagram of another volume adjustment provided in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of another volume adjustment provided in an embodiment of the present application;
[0042] Fig. 9 A schematic diagram of another volume adjustment provided in an embodiment of the present application;
[0043] Fig.10 A schematic diagram of another volume adjustment provided in an embodiment of the present application;
[0044] Fig.11 A schematic diagram of the structure of a volume adjustment device provided in an embodiment of the present application;
[0045] Fig.12 A schematic diagram of the structure of the electronic device provided in this application.
[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0048] Explanation of terms in the embodiments of this application:
[0049] Volume change progress bar: A progress bar representing the volume value displayed on the interface of an electronic device. Figure 1A As shown in a in FIG. 1 , the electronic device may display a volume change progress bar 11 on the right side of the electronic device, and the black portion of the volume change progress bar 11 represents the volume of the electronic device. Figure 1A As shown in b in FIG. 1 , the electronic device can display a volume change progress bar 12 on the upper side of the interface of the electronic device. The embodiment of the present application does not limit the style of the volume change progress bar and the position displayed on the interface. Figure 1A The volume change progress bar shown in a in the figure is used as an example to illustrate.
[0050] Figure 1B A schematic diagram of a scenario in which the volume adjustment method provided in the embodiment of the present application is applicable. Figure 1B , the scene may include: electronic equipment and audio playback equipment. Figure 1B In the example, the electronic device is a mobile phone and the audio playback device is a speaker. In one embodiment, the electronic device and the audio playback device can be interconnected through a communication network to achieve wireless signal interaction. The communication network can be, but is not limited to, a short-range communication network such as a WI-FI hotspot network, a WI-FI peer-to-peer (P2P) network, a Bluetooth network, a zigbee network, or a near field communication (NFC) network.
[0051] After the electronic device and the audio player are interconnected, the user can operate on the electronic device so that the electronic device plays the audio in the electronic device through the audio player. For example, a mobile phone can be connected to a speaker via Bluetooth, and the mobile phone can send audio data to the speaker to play the audio in the mobile phone through the speaker, such as music, songs, or videos containing audio.
[0052] In one embodiment, the electronic device in the embodiment of the present application can be referred to as user equipment (UE), terminal, etc. For example, the electronic device can be a mobile phone, a portable android device (PAD), a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device, a vehicle-mounted device or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in a smart home, etc. The form of the electronic device is not specifically limited in the embodiment of the present application.
[0053] In one embodiment, the audio playback device may include but is not limited to: a speaker, a headset, a wearable device, a VR terminal device, an AR terminal device, a wireless terminal in a smart home, etc. The form of the audio playback device is not specifically limited in the embodiment of the present application. The following embodiments and drawings are described by taking the electronic device as a mobile phone and the audio playback device as a speaker as an example.
[0054] When the electronic device and the speaker are connected, the electronic device plays the audio in the electronic device through the speaker. When the user adjusts the volume of the audio played by the speaker on the speaker, the speaker can send the current volume value of the audio to the mobile phone, so that the mobile phone synchronously displays the volume change progress bar on the interface. In one embodiment, the volume value adjustment range of the speaker can be 0-127, refer to Figure 2 , the volume value of the audio played by the speaker is 50, the user can operate the volume button on the speaker, or say "reduce the volume to 30", then the speaker can respond to the user's operation and adjust the volume value of the audio played by the speaker from 50 to 30. The speaker will also synchronize the volume value "30" to the mobile phone, and the mobile phone can display a volume change progress bar on the interface of the mobile phone to indicate the volume reduction, such as Figure 2 The black part of the volume change progress bar on the mobile phone interface drops from position A to position B, indicating that the volume value of the audio is reduced. It should be understood that Figure 2 The black portion of the volume change progress bar at position A is not shown, and only the black portion of the volume change progress bar dropping to position B is shown.
[0055] 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 volume level of 0-15 of the mobile phone according to the volume value of the speaker and the preset mapping algorithm, thereby controlling 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) evenly, and the volume change progress bar can be increased by one grid for each increase of the volume level corresponding to the volume value of the speaker, or the volume change progress bar can be reduced by one grid for each decrease of the volume level corresponding to the volume value of the speaker.
[0056] 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, the relationship of "multiple volume values of the speaker correspond to one volume level of the mobile phone" as shown in Table 1 will appear. 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, which can be shown in Table 1 below:
[0057] Table 1
[0058] Speaker volume value Phone volume level 0-7 0 8-15 1 16-23 2 24-31 3 …… …… 120-127 15
[0059] According to the mapping algorithm shown in Table 1, Figure 3A As shown in a in the figure, when the user reduces the audio volume value from 31 to 15 on the speaker, the mobile phone can correspondingly obtain the audio volume level from 3 to 2 according to the mapping algorithm, and can reduce one grid in the volume change progress bar, such as the black position in the volume change progress bar changes from position B to position C, and the user can see the change of the audio volume value on the mobile phone interface.
[0060] Reference Figure 3B As shown in a and b in the figure, when the user reduces the volume value of the audio on the speaker from 31 to 30, the mobile phone can obtain the audio volume level of 3 according to the mapping algorithm. In response to the unchanged volume level, the mobile phone may not display the 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 of the volume value on the mobile phone interface, causing the user to think that the volume adjusted by the user on the speaker is not effective, and the user experience is poor. Figure 3B As shown in b in the figure, the mobile phone will not display the volume change progress bar on the interface. Alternatively, the user presses the volume button on the speaker multiple times in succession (such as the volume value from 26 to 25, then from 25 to 24, and then from 24 to 23), and the volume change progress bar is only displayed once on the mobile phone interface, which leads to poor user experience.
[0061] The volume adjustment method provided in the embodiment of the present application is intended to solve the above technical problems of the prior art. In the embodiment of the present application, if the mobile phone detects that the volume values of the audio from the speaker twice adjacently are mapped to the same volume level of the mobile phone, a volume change progress bar can be displayed according to the volume values of the audio from the speaker twice adjacently, and the change of the volume value of the audio can be represented, so that the user can feel the change of the volume value of the audio in real time, thereby improving the user experience.
[0062] It should be understood that the volume adjustment method in the embodiment of the present application can be applied not only to the scenario in which the electronic device plays audio through the audio playback device, but also to the scenario in which the electronic device plays other audio-containing scenes through the audio playback device, such as playing videos.
[0063] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0064] Figure 4 A flow chart of an embodiment of a volume adjustment method provided in an embodiment of the present application. It should be understood that in the following embodiments, the electronic device in FIG. 1 is represented by a first device, and the audio playback device in FIG. 1 is represented by a second device for description. The first device is wirelessly connected to the second device, and the wireless connection method can refer to the interconnection method in FIG. 1. The first device controls the second device through the wireless connection. For example, the first device can control the second device to play the 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 levels, and the second volume value adjustment range of the second device (such as a speaker) is 0-127 volume values.
[0065] Figure 4 In the example, the first device and the second device interact with each other. Figure 4 , the volume adjustment method provided in the embodiment of the present application may include:
[0066] S401, receiving a first volume value from a second device, where the first volume value is used to indicate a volume of the second device, and the first volume value is a volume value determined based on an adjustment range of a second volume value.
[0067] Reference Figure 3A and Figure 3B, when the user adjusts the volume on the second device (such as a speaker), the second device can send the adjusted volume value, i.e., the first volume value of the second device, to the first device through the wireless connection with the first device. For example, when the user reduces the volume value from 31 to 30 on the speaker, the second device sends the first volume value to the first device, and the first volume value is 30.
[0068] The first volume value is a volume value determined based on the second volume value adjustment range, which can be understood as: the first volume value is a 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, such as the first volume value 30 is included in the second volume value adjustment range "0-127".
[0069] The first volume value is used to indicate the volume of the second device, which can be understood as follows: the second device can determine the volume of the second device corresponding to the first volume value according to the first volume value. For example, the second device can obtain the volume of the second device according to the "mapping relationship between the first volume value adjustment range and the second volume value adjustment range (such as the mapping relationship shown in Table 1)" and the first volume value.
[0070] 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.
[0071] The first volume value adjustment range and the second volume value adjustment range have a mapping relationship, and the first device can obtain the second volume value mapped by the first volume value according to the first volume value and the mapping relationship. 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.
[0072] Exemplarily, the first volume value adjustment range and the second volume value adjustment range have a mapping relationship, and the mapping relationship is shown in Table 1. If the first volume value is 30, the first device can obtain the second volume value of 3 according to the mapping relationship shown in Table 1.
[0073] S403: If the second volume value is the same as the third volume value, obtain the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value, wherein the fourth volume value is the volume value received from the second device last time, and the third volume value is obtained by converting the fourth volume value.
[0074] The fourth volume value is the volume value received by the second device from the second device last time, 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, wherein the conversion process can refer to the relevant description of "conversion process of the first volume value and the second volume value". Among them, exemplarily, the fourth volume value is 31, and the first device can obtain the third volume value of 3 according to the mapping relationship shown in Table 1.
[0075] Wherein, if the second volume value is the same as the third volume value, the first device obtains the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value. Exemplarily, if the second volume value and the third volume value are both 3, the first device obtains the volume change ratio corresponding to the first volume value according to the first volume value and the fourth volume value.
[0076] In one embodiment, the first device may determine the larger volume value between the first volume value and the fourth volume value, and then use the larger volume value as the denominator, and use the difference between the first volume value and the fourth volume value as the numerator to obtain the volume change ratio corresponding to the first volume value. Exemplarily, the fourth volume value is 31, and the first volume value is 30, then the larger volume value determined between the first volume value and the fourth volume value is 31, 31 is used as the denominator, and the difference between the first volume value and the fourth volume value is 1, as the numerator, then the volume change ratio corresponding to the first volume value is 1 / 31.
[0077] S404: Display the volume of the second device according to the volume value change ratio.
[0078] The first device may display the volume of the second device according to the volume value change ratio. Specifically, the first device may display the change representing "the fourth volume value to the first volume value" on the volume change progress bar of the first device.
[0079] For example, Figure 5 a in Figure 3B The a in is the same as that in , so it will not be repeated here. Figure 5 As shown in b in FIG. 1 , when the user reduces the volume value on the speaker from 31 to 30, the mobile phone can obtain, according to the mapping algorithm, that the volume level of the mobile phone corresponding to the volume value 31 (the fourth volume value) and the volume value 30 (the first volume value) is 3. In the prior art (such as Figure 3B In the embodiment of the present application, in order to make the user feel that the volume value of the speaker is reduced, S403 can be executed to obtain the volume value change ratio, and then the volume of the second device can be displayed according to the volume value change ratio. Figure 5As shown in b in the figure, if the mobile phone follows the volume value change ratio of 1 / 31, the volume change progress bar can be divided into 31 grids. Since the volume is reduced by 1, the black part of the volume change progress bar can be reduced by one grid (one grid in 31 grids, which is the same as the above Figure 3A In this way, the user can see the volume value drop on the phone's interface.
[0080] In an 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 by the fourth volume value received last time, the volume change ratio corresponding to the first volume value can be obtained based on the first volume value and the fourth volume value, and then the change in volume value can be displayed based on the volume change ratio corresponding to the first volume value, so that the user can feel the change in the volume value of the audio, thereby improving the user experience.
[0081] In the above-mentioned 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. 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, the calculation amount of the first device is large. In the embodiment of the present 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 maximum value of the first volume value, the fourth volume value, and the adjustment range of the second volume value. For details, refer to Figure 6 Description in .
[0082] Reference Figure 6 In one embodiment, Figure 4 S403 in can be replaced by S601:
[0083] S601: If the second volume value is the same as the third volume value, obtaining 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 adjustment range of the second volume value.
[0084] In one embodiment, the first device stores a second volume value adjustment range, such as 0-127. In this embodiment, the first device can 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. For example, the maximum value of the second volume value adjustment range is 127.
[0085] In this embodiment, the first device can 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 numerator of the volume change ratio corresponding to the first volume value. In this way, not only can the volume change ratio corresponding to the first volume value be obtained, but also because the maximum value of the second volume value adjustment range is unchanged, the first device only needs to calculate the difference between the first volume value and the fourth volume value, which can reduce the amount of calculation for the first device to obtain the volume change ratio corresponding to the first volume value, thereby improving the processing efficiency of the first device.
[0086] Reference Figure 7 As shown in a and b in FIG, when the user reduces the volume value on the speaker from 31 to 30, the mobile phone can obtain, according to the mapping algorithm, that the volume level of the mobile phone corresponding to the volume value 31 (the fourth volume value) and the volume value 30 (the first volume value) is 3, and 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. For example, Figure 7 As shown in b, if the mobile phone divides the volume change progress bar into 127 grids according to the volume value change ratio of 1 / 127, because the volume is reduced by 1, the black part of the volume change progress bar can drop by one grid (one of the 127 grids). In this way, the user can see the volume value drop on the mobile phone interface. It should be understood that Figure 7 a in Figure 5 The a in is the same.
[0087] 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 second difference between the maximum value of the second volume value adjustment range and the fourth volume value, and then divide the first difference by the second difference to obtain the volume change ratio corresponding to the first volume value.
[0088] That is to say, if 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). For example, if 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.
[0089] In this embodiment, the first device may display the increase or decrease of 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. Figure 8As shown in a and b in FIG. 1 , when the user reduces the volume value on the speaker from 31 to 30, the mobile phone can obtain, according to the mapping algorithm, that the volume level of the mobile phone corresponding to the volume value 31 (the fourth volume value) and the volume value 30 (the first volume value) is 3, and the mobile phone can obtain the volume value change ratio of 1 / 96 according to the steps in this embodiment. For example, Figure 8 As shown in b, if the mobile phone divides the black part of the volume change progress bar into 96 grids according to the volume value change ratio of 1 / 96, because the volume is reduced by 1, the black part of the volume change progress bar can be reduced by one grid (one grid in 96 grids), that is, the volume change progress bar of the first device shows a volume reduction of 1 / 96. In this way, the user can see the volume value decrease on the interface of the mobile phone. It should be understood that Figure 8 a in Figure 5 The a in is the same.
[0090] In an embodiment of the present 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 of the second device on the volume change progress bar in the above manner. When the third volume value is the minimum value of the first volume value adjustment range, and the first volume value is less than the fourth volume value, the first device does not display the volume change progress bar. For example, 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 first volume value adjustment range. In this case, refer to Fig. 9 In a, if the first volume value, such as 7, is greater than 6, the first device can display the increase of the volume of the volume value change ratio based on 0 in the manner of the volume value change ratio. Fig. 9 However, if the first volume value, such as 5, is less than 6, the volume change bar displayed by the first device has reached the minimum value and cannot be further reduced, so the first device may not display the volume change bar.
[0091] Similarly, 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 first device can display the volume of the second device on the volume change progress bar in the above manner. 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 first volume value adjustment range. In this case, if the first volume value is greater than 125, such as 120, the first device can display the increase in volume of the volume value change ratio on the basis of 0 in the manner of the volume value change ratio. However, 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 cannot be increased further, so the first device may not display the volume change bar.
[0092] In the embodiment of the present application, the first device can obtain the volume change ratio corresponding to the first volume value based on the first volume value, the fourth volume value, and the maximum value of the adjustment range of the second volume value, and display the increase or decrease of the volume of the volume value change ratio on the volume change progress bar of the first device based on the volume change ratio, which can not only effectively prompt the user of the change in the volume of the second device, but also reduce the calculation amount of the first device and improve the processing efficiency of the first device.
[0093] The above embodiments all describe examples in which the second volume value and the third volume value are the same. The following embodiments describe examples in which the second volume value and the third volume value are different. In this embodiment, if the second volume value is different from the third volume value, the first device can display the volume of the second device based on the second volume value and the adjustment range of the first volume value. In other words, the first device can display the volume of the second device based on the proportion of the second volume value in the adjustment range of the first volume value. Exemplarily, when the user reduces the volume value of the audio on the speaker from 31 to 15, the mobile phone can, based on the mapping algorithm, obtain that the volume level of the audio is reduced from 3 to 2, and then the volume change progress bar can be reduced by one grid. You can refer to Figure 3A Related description in .
[0094] In this embodiment, the first device can adjust the volume of the first device according to the second volume value. In other words, the first device can store the second volume value, and then when the first device disconnects the wireless connection with the second device, the first device can play the audio according to the second volume value.
[0095] The advantage of this embodiment is that, for example, in a quiet environment, the mobile phone is wirelessly connected to the speaker, the mobile phone plays audio through the speaker, and the user reduces the volume value of the audio on the speaker from 31 to 15, then the mobile phone can obtain the volume level of the audio from 3 to 2 according to the mapping algorithm, and then store the second volume value 2. After the mobile phone and the speaker are disconnected from the wireless connection, the mobile phone can use the second volume value 2 instead of the third volume value 3 to play the audio, so that the volume value of the audio played by the mobile phone is more suitable for the environment where the user is, thereby improving the user experience.
[0096] In one embodiment, the user can adjust the volume of the audio played by the second device on the first device. 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 user input for the volume adjustment operation of the second device (i.e., the operation of pressing the volume button of the mobile phone), and can determine the fifth volume value corresponding to the adjustment operation according to the first volume value adjustment range, and then adjust the volume of the second device according to the fifth volume value.
[0097] For example, if the volume value of the audio played by the speaker is 30, and the volume value of the mobile phone corresponding to the volume value 30 is 3, 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 increases by 1. Assuming that the user only presses the volume button "plus" of the mobile phone once, the mobile phone can determine that the volume value of the second device mapped to the volume value of 4 of the mobile phone is "32-39" according to the "mapping relationship between the first volume value adjustment range and the second volume value adjustment range". It should be understood that the mobile phones in other figures do not show volume buttons.
[0098] In the example, refer to Fig.10 In response to the user pressing the volume button "plus" of the mobile phone once, the mobile phone can increase the volume change progress bar by one grid in a 1 / 16 grid manner.
[0099] 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 the audio according to the volume value in response to the volume value from the mobile phone. Alternatively, in one embodiment, the mobile phone can send the middle value 35 or 36 in "32-39" to the speaker, and the speaker can play the audio according to the middle value 35 or 36 in response to the volume value from the mobile phone.
[0100] Fig.11 A schematic diagram of the structure of a volume adjustment device provided in an embodiment of the present application. The volume adjustment device involved in the embodiment of the present application can be the first device mentioned above, or it can be a chip applied to the first device. The volume adjustment device can be used to execute the action of the first device in the above method embodiment. The volume adjustment device is included in 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 volume value adjustment range of the first device is different from the second volume value adjustment range of the second device.
[0101] Reference Fig.11 The volume adjustment device 1100 may include: a transceiver module 1101 , a processing module 1102 , and a display module 1103 .
[0102] The transceiver module 1101 is used to 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 an adjustment range of the second volume value.
[0103] The processing module 1102 is used to convert the first volume value into a second volume value, where 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 first volume value and the fourth volume value, obtain the volume change ratio corresponding to the first volume value, where the fourth volume value is the volume value received from the second device last time, and the third volume value is obtained by converting the fourth volume value.
[0104] The display module 1103 is used to display the volume of the second device according to the volume value change ratio.
[0105] In a possible implementation, the processing module 1102 is specifically configured to obtain a volume change ratio corresponding to the first volume value according to the first volume value, the fourth volume value, and a maximum value of an adjustment range of the second volume value.
[0106] In a possible implementation, the processing module 1102 is specifically used to obtain a first difference between the first volume value and the fourth volume value; obtain a second difference between the maximum value of the second volume value adjustment range and the fourth volume value; and divide the first difference by the second difference to obtain a volume change ratio corresponding to the first volume value.
[0107] In a possible implementation, the display module 1103 is specifically configured to display the increase or decrease of the volume value change ratio on the volume change progress bar of the first device.
[0108] In one possible implementation, the display module 1103 is specifically used to display the volume of the second device on the volume change progress bar if 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; 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 of the second device on the volume change progress bar.
[0109] In a possible implementation, 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.
[0110] In a possible implementation, the processing module 1102 is further configured to adjust the volume of the first device according to the second volume value.
[0111] In a possible implementation, the processing module 1102 is further configured to, in response to a user input for adjusting the volume of the second device, determine a fifth volume value corresponding to the adjustment operation according to the first volume value adjustment range; and adjust the volume of the second device according to the fifth volume value.
[0112] 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. Its implementation principle and technical effect are similar and will not be repeated here.
[0113] Fig.12 Schematic diagram of the structure of the electronic device provided in this application. The electronic device may be the first device in the above embodiment. Fig.12 As shown, the electronic device 1200 includes: a memory 1201 and at least one processor 1202 .
[0114] The memory 1201 is used to store program instructions.
[0115] The processor 1202 is used to implement the volume adjustment method in this embodiment when the program instructions are executed. The specific implementation principle can be found in the above embodiment, and this embodiment will not be repeated here.
[0116] The electronic device 1200 may further include: an input / output interface 1203 and a display screen 1204 .
[0117] 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. The output interface is used to output data, and the input interface is used to obtain input data. The output data is a general term for the output in the above method embodiment, and the input data is a general term for the input in the above method embodiment.
[0118] Display screen 1204 is used to display the volume of the second device (eg, it can be a volume change progress bar).
[0119] The present application also provides a readable storage medium, in which execution instructions are stored. When at least one processor of an electronic device executes the execution instruction, when the computer execution instruction is executed by the processor, the volume adjustment method in the above embodiment is implemented.
[0120] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of the electronic device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the electronic device implements the volume adjustment method provided by the above various embodiments.
[0121] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0122] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0123] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0124] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0125] In the above-mentioned embodiment of the volume adjustment device, it should be understood that the processing module can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the present application can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A volume adjustment method, characterized in that: 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, a first volume value adjustment range of the first device is different from a second volume value adjustment range of the second device, and the first volume value adjustment range and the second volume value adjustment range have a mapping relationship, the method comprising: receiving a first volume value from the 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 an adjustment range of the second volume value; converting the first volume value into a second volume value, where the second volume value is a volume value determined based on the adjustment range of the first volume value; and acquiring, by the first device, the second volume value corresponding to the first volume value according to the first volume value and the mapping relationship; If the second volume value is the same as the third volume value, obtaining a volume value change ratio corresponding to the first volume value according to the first volume value and the fourth volume value, the fourth volume value being a volume value received from the second device last time, and the third volume value being obtained by converting the fourth volume value; the first device obtaining the third volume value corresponding to the fourth volume value according to the fourth volume value and the mapping relationship; The volume of the second device is displayed on the first device according to the volume value change ratio.
2. The method according to claim 1, characterized in that The acquiring, according to the first volume value and the fourth volume value, a volume change ratio corresponding to the first volume value includes: According to the first volume value, the fourth volume value, and the maximum value of the adjustment range of the second volume value, a volume change ratio corresponding to the first volume value is obtained.
3. The method according to claim 2, characterized in that The obtaining, according to the first volume value, the fourth volume value, and the maximum value of the adjustment range of the second volume value, a volume change ratio corresponding to the first volume value includes: Obtaining a first difference between the first volume value and the fourth volume value; Obtaining a second difference between a maximum value of the second volume value adjustment range and the fourth volume value; The first difference is divided by the second difference to obtain a volume change ratio corresponding to the first volume value.
4. The method according to any one of claims 1 to 3, characterized in that The step of displaying the volume of the second device according to the volume value change ratio includes: The increase or decrease of the volume according to the volume value change ratio is displayed on the volume change progress bar of the first device.
5. The method according to claim 4, characterized in that The method further comprises: If 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 volume of the second device is displayed on the volume change progress bar; 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 volume of the second device is displayed on the volume change progress bar.
6. The method according to any one of claims 1 to 3, characterized in that 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, the volume of the second device is displayed according to the second volume value and the adjustment range of the first volume value.
7. The method according to claim 6, characterized in that The method further comprises: The volume of the first device is adjusted according to the second volume value.
8. The method according to any one of claims 1 to 3, characterized in that The method further comprises: In response to a user input for adjusting the volume of the second device, determining a fifth volume value corresponding to the adjustment operation according to the first volume value adjustment range; The volume of the second device is adjusted according to the fifth volume value.
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, the first device controls the second device through the wireless connection, a first volume value adjustment range of the first device is different from a second volume value adjustment range of the second device, and the first volume value adjustment range and the second volume value adjustment range have a mapping relationship, the device includes: a transceiver module, configured to receive a first volume value from the second device, wherein 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 an adjustment range of the second volume value; Processing modules for: Converting the first volume value into a second volume value, where the second volume value is a volume value determined based on the adjustment range of the first volume value; acquiring, by the first device, the second volume value corresponding to the first volume value according to the mapping relationship between the first volume value and the mapping relationship; If the second volume value is the same as the third volume value, obtaining a volume value change ratio corresponding to the first volume value according to the first volume value and the fourth volume value, the fourth volume value being the volume value received from the second device last time, and the third volume value being obtained by converting the fourth volume value; the first device obtaining the third volume value corresponding to the fourth volume according to the fourth volume value and the mapping relationship; The display module is used to display the volume of the second device on the first device according to the change ratio of the volume value.
10. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.
Citation Information
Patent Citations
Volume display method and device
CN106155640A
Loudspeaker box and volume control method
CN107783708A
