Volume adjusting method and related device

By setting the volume key function after receiving user input in an electronic device, the problem of difficulty for users to judge the volume key function in the folded state is solved, and convenient volume adjustment is achieved and user experience is improved.

CN119271164APending Publication Date: 2025-01-07HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310816585.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When the electronic device is in a folded state, it is difficult for users to judge the function of the volume key, resulting in an increase in the probability of accidentally touching when adjusting the volume, affecting the user experience.

Method used

After receiving user input, the volume key function of the electronic device is set so that the user can determine the function without distinguishing the relative position of the volume key, including the function of setting the volume key in the folded state, and adjusting the volume in a specified scene, such as in the package Or in a scene with weak light.

Benefits of technology

It improves the convenience of users to adjust the volume without being convenient to view the position of the volume key, reduces the probability of accidentally touching, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271164A_ABST
    Figure CN119271164A_ABST
Patent Text Reader

Abstract

The invention discloses a volume adjusting method and a related device. After the electronic equipment receives touch control of a user on the volume keys in the folded state, the functions of the two volume keys are set firstly, for example, the function of the touched key is volume increasing; and the other volume key has the function of reducing the volume. Therefore, the user does not need to distinguish the position of the volume key, the volume can be controlled according to the latest function setting, the user can conveniently adjust the volume of the electronic equipment, and the user experience of the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a volume adjustment method and related devices. Background Art

[0002] With the development of screen technology, the display screens of electronic devices are becoming larger and larger to provide users with richer information and better user experience. However, if the display screen of an electronic device is too large, it will seriously affect its portability. In recent years, electronic devices equipped with folding screens (such as folding screen mobile phones) have been proposed, which not only have larger display screens, but are also convenient for users to carry.

[0003] Electronic devices usually have two volume buttons, which can be used to adjust the volume of the electronic device. When the electronic device is in an unfolded state, the user can identify the function corresponding to the volume button by the position of the volume button on the electronic device. However, when the electronic device is in a folded state, since the electronic device does not have the long strip shape when in the unfolded state, the user cannot confirm the direction of the electronic device in the folded state. In this way, when the user wants to adjust the volume of the electronic device, it is difficult for the user to determine the function of the volume button, which increases the difficulty for the user to adjust the volume, increases the probability of accidental touch, and seriously affects the user experience. Summary of the invention

[0004] The present application provides a volume adjustment method and related devices. After receiving input for a volume key, the electronic device sets the function of the volume key of the electronic device, thereby solving the problem that it is difficult to determine the function of the volume key.

[0005] In the first aspect, the present application provides a volume adjustment method, which is applied to an electronic device including a folding screen, a first volume key and a second volume key, wherein the state of the electronic device includes an undeployed state and an unfolded state, and the method includes: receiving a first input from a user for the first volume key; determining that the electronic device is in an undeployed state; in response to the first input, setting the first volume key to a first function and setting the second volume key to a second function; wherein the first function and the second function are different. In this way, after receiving the user's input for the volume key, the electronic device sets the function of the volume key, so that when the electronic device is in a folded state, the user does not need to distinguish the relative position of the volume key, and can determine the function corresponding to the pressed volume key, and determine the function corresponding to another volume key, so that the user can adjust the volume of the electronic device. Implementing the volume adjustment method provided in the embodiment of the present application can also facilitate the user to adjust the volume of the electronic device in a specified scene. For example, the specified scene may include but is not limited to a scene where the electronic device is placed in a bag or a pocket, a scene with weak light intensity such as an underground garage, a scene where the user is running or walking, and the like. In these specified scenes, it is not convenient for the user to check the position of the volume key and then adjust the volume of the electronic device. Therefore, the volume adjustment method is adopted to facilitate the user to set the function of the volume key when it is not convenient to check the position of the volume key.

[0006] Among them, the unfolded state may include the folded state of a horizontally folded folding screen device, and may also include the unfolded state of a scroll-folded folding screen device.

[0007] In a possible implementation, before setting the first volume key to the first function, the method further includes: determining that the electronic device is in a state of playing audio data. In this way, the electronic device can set the function of the volume key and adjust the volume of the electronic device only when it determines that the audio data is being played, thereby avoiding the situation where the volume of the electronic device is adjusted by mistake.

[0008] In a possible implementation, in response to the first input, the first volume key is set to the first function, and the second volume key is set to the second function, and the method further includes: executing the first function. In this way, the electronic device executes the function of the triggered volume key while setting the function of the volume key, so as to be used to adjust the volume of the electronic device.

[0009] In a possible implementation, the method further includes: if the electronic device is in an unfolded state and receives a second input for the first volume key within a first preset time period of receiving the first input, executing the first function; or if the electronic device is in an unfolded state and receives a second input for the second volume key within a first preset time period of receiving the first input, executing the second function. In this way, the electronic device maintains the function of the first volume key and the function of the second volume key unchanged within the preset time period, and the user has determined the function of each volume key within the preset time period, which is convenient for adjusting the electronic device to a suitable volume.

[0010] In a possible implementation, the method further includes: if the electronic device does not receive a third input for the first volume key or the second volume key within a second preset time period after receiving the first input; setting the first volume key and the second volume key to default value functions. In this way, if the electronic device does not receive a user input within the preset time period, the first volume key and the second volume key will be restored to the default value functions, so as not to affect the normal use of the volume key of the electronic device in the unfolded state.

[0011] In a possible implementation, the method further includes: if the electronic device is switched to the unfolded state, setting the first volume key and the second volume key to default functions. In this way, when the electronic device is in the unfolded state, the functions of the volume keys are set to default functions, which can avoid affecting the normal use of the volume keys of the electronic device in the unfolded state.

[0012] In a possible implementation, before setting the first volume key to the first function, the method further includes: detecting environmental information; determining the first function according to the environmental information. In this way, the electronic device determines the function of the first volume key based on the environmental information. When the environmental information indicates that the surrounding is noisy, the user is more inclined to increase the volume of the electronic device, and the electronic device sets the first volume key to increase the volume of the electronic device. When the environmental information indicates that the surrounding is quiet, the user is more inclined to reduce the volume of the electronic device, and the electronic device sets the first volume key to reduce the volume of the electronic device.

[0013] In a possible implementation, before setting the first volume key to the first function, the method further includes: detecting the volume of the electronic device; determining the first function according to the environmental information is specifically: determining the first function according to the environmental information and the volume. In this way, when the volume of the electronic device is loud and the environmental information indicates that the environment is relatively quiet, the electronic device sets the first volume key to the volume reduction function. When the volume of the electronic device is low and the environmental information indicates that the environment is relatively noisy, the electronic device sets the first volume key to the volume increase function. When the volume of the electronic device is low and the environmental information indicates that the environment is relatively noisy or the volume of the electronic device is loud and the environmental information indicates that the environment is relatively quiet, the electronic device determines the function of the first volume key according to the volume of the electronic device and the environmental information to increase the volume of the electronic device or to reduce the volume of the electronic device. The electronic device determines the function of the volume key that better meets the user's wishes based on the environmental information and the volume, thereby improving the user experience.

[0014] In a possible implementation, the method further includes: obtaining the user's commonly used volume; determining the first function according to the environmental information and the volume specifically includes: determining the first function according to the environmental information, the volume, and the user's commonly used volume. In this way, when the environmental information indicates that the environment is noisy, the volume of the electronic device is low, and the user's commonly used volume is greater than the volume of the electronic device, the electronic device sets the first volume key to increase the volume of the electronic device. When the environmental information indicates that the environment is quiet, the volume of the electronic device is high, and the user's commonly used volume is less than the volume of the electronic device, the electronic device sets the first volume key to decrease the volume of the electronic device. Based on the environmental information, the volume, and the user's commonly used volume, the electronic device jointly determines the function of the volume key that better meets the user's wishes, thereby improving the user experience.

[0015] When the electronic device cannot determine the function of the volume key based on environmental information, the volume of the electronic device and the user's commonly used volume, the electronic device determines the function of the volume key based on any one of the environmental information, the volume of the electronic device and the user's commonly used volume. Alternatively, when the electronic device cannot determine the function of the volume key based on environmental information, the volume of the electronic device and the user's commonly used volume, the electronic device determines the function of the volume key according to the number of results. For example, when the environmental information indicates that the first volume key is set to increase the volume, the volume of the electronic device is used to indicate that the first volume key is set to decrease the volume, and the user's commonly used volume is used to indicate that the first volume key is set to decrease the volume, the number of results of setting the first volume key to increase the volume is less than the number of results of setting the first volume key to decrease the volume, and the electronic device sets the function of the first volume key to decrease the volume. The electronic device determines the function of the volume key based on the environmental information, the volume of the electronic device and the user's commonly used volume, and uses the function with the largest number in the determination results as the function of the volume key. The determined function is more in line with the user's wishes and improves the user experience.

[0016] In a possible implementation, before setting the first volume key to the first function, the method further includes: detecting the volume of the electronic device; obtaining the user's commonly used volume; and determining the first function according to the volume of the electronic device and the user's commonly used volume. In this way, the user is more inclined to use the user's commonly used volume to listen to the sound signal played by the electronic device. When the volume of the electronic device is greater than the user's commonly used volume, the electronic device sets the function of the first volume key to reduce the volume, and when the volume of the electronic device is less than the commonly used volume, the function of the first volume key is set to increase the volume. Based on the volume of the electronic device and the user's commonly used volume, the electronic device jointly determines the function of the volume key that better meets the user's wishes, thereby improving the user experience.

[0017] In a possible implementation, before setting the first volume key to the first function, the method further includes: detecting location information of the electronic device; and determining the first function according to the location information. In this way, the electronic device sets the function of the volume key based on the location information. In different occasions, the triggered volume key is set to a more appropriate function, which facilitates the user to adjust the volume of the electronic device in multiple scenarios.

[0018] In a possible implementation, the first function is to increase the volume of the audio played by the first electronic device, and the second function is to decrease the volume of the audio played by the first electronic device; or the first function is to decrease the volume of the audio played by the first electronic device, and the second function is to increase the volume of the audio played by the first electronic device. In this way, when the electronic device is in the folded state, the electronic device sets the function of the volume key received as increasing the volume (or decreasing the volume), so that the user can determine the function of the volume key each time the volume key is pressed, so that the user can adjust the volume of the electronic device when touching the electronic device.

[0019] In a second aspect, the present application provides an electronic device, comprising: one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, the computer program codes including computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method in any possible implementation of the first aspect.

[0020] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes a method in any possible implementation of the first aspect described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1A-Figure 1C A schematic diagram of a product form of an electronic device with a foldable screen provided in an embodiment of the present application;

[0022] Figure 2A-2D A schematic diagram of a volume key of an electronic device 100 provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0024] Figure 4 A flow chart of a volume adjustment method provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram of a module provided in an embodiment of the present application;

[0026] Figure 6 Another flow chart provided for an embodiment of the present application;

[0027] Figure 7 A schematic diagram of a scenario provided for the implementation of this application;

[0028] Figure 8A-8C A schematic diagram of a product form of another electronic device with a foldable screen provided in an embodiment of the present application;

[0029] Fig. 9 A flow chart of another volume adjustment method provided in an embodiment of the present application;

[0030] Fig.10 A flowchart of another volume adjustment method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0032] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0033] Next, a folding screen device provided in an embodiment of the present application is introduced.

[0034] The display screen of the electronic device 100 is a folding screen. The folding method of the folding screen may include but is not limited to horizontal folding, scroll folding, etc. The folding screen of the scroll folding (referred to as the scroll screen for short) can refer to Figure 8A-8C The embodiment shown. Among them, the folding methods of the horizontally folding folding screen can be divided into two categories. One is a folding screen that folds outward (referred to as the outward-folding folding screen), and the other is a folding screen that folds inward (referred to as the inward-folding folding screen). Among them, take the example of a horizontally folding folding screen that can be folded (for example, the horizontally folding folding screen can be folded along a folding edge or a folding axis) to form a first display screen and a second display screen. After the outward-folding folding screen is folded, the first display screen and the second display screen are opposite to each other. After the inward-folding folding screen is folded, the first display screen and the second display screen are opposite to each other.

[0035] The state of the horizontally folded folding screen can be divided into a folded state and an unfolded state. Among them, the unfolded state includes a semi-expanded state and a fully unfolded state. When the horizontally folded folding screen is in the folded state, the horizontally folded folding screen can be folded into a first display screen and a second display screen. The horizontally folded folding screen can be unfolded from the folded state to a semi-expanded state. When the horizontally folded folding screen is in the semi-expanded state, it can continue to unfold to a fully unfolded state. When the horizontally folded folding screen is in the fully unfolded state, the horizontally folded folding screen is a complete screen, including a first display screen and a second display screen. It should be noted that the first display screen and the second display screen are two display areas of the folding screen, or two independent display screens.

[0036] The folding screen includes one or more buttons, including a volume button. The volume button can be set at the side of the body where the first display screen or the second display screen of the folding screen is located. When the state of the folding screen changes, the position of the volume button also changes accordingly.

[0037] In an embodiment of the present application, the angle α between the first display screen and the second display screen of the horizontally folded folding screen of the electronic device 100 has a value range of [0°, 180°]. Among them, if α∈[0°, P1], the electronic device 100 can determine that the horizontally folded folding screen is in a fully folded state. If α∈(P1, P2), the electronic device 100 can determine that the horizontally folded folding screen is in a semi-expanded state; α∈[P2, 180°], the electronic device 100 can determine that the horizontally folded folding screen is in a fully expanded state. Among them, 0°<P1<P2<180°. P1 and P2 can be preset angle thresholds. P1 and P2 can be determined based on the usage habits of a large number of users using the horizontally folded folding screen; or, P1 and P2 can be set by the user in the electronic device 100.

[0038] In some examples, according to the usage habits of most users, when the angle α between the first display screen and the second display screen is greater than 150 degrees, the user is more likely to use the first display screen and the second display screen as a whole (i.e., as a complete display screen), and the horizontally folded folding screen is in a fully unfolded state. When the angle α between the first display screen and the second display screen is less than 30 degrees, the user is more likely to use a certain display screen alone or to store the electronic device 100, and the horizontally folded folding screen can be in a folded state. When the angle α between the first display screen and the second display screen is between 30 degrees and 150 degrees, the user is more likely to use the first display screen and the second display screen to display different display contents, and the horizontally folded folding screen can be in a semi-expanded state.

[0039] Therefore, in the embodiment of the present application, the value range of the preset angle threshold P1 may be (0°, 30°], and the value range of the preset angle threshold P2 may be [150°, 180°]. For example, the preset angle threshold P1 may be 25°, the preset angle threshold P2 may be 155°, and so on. The above examples are only used to explain the present application and should not be construed as limitations.

[0040] For example, please refer to Figures 1A to 1C , which shows a schematic diagram of the product form of an electronic device 100 with an inward folding screen provided in an embodiment of the present application. Figure 1A The inward folding screen is shown in a fully unfolded state. The inward folding screen can be folded along the folding edge, with the first display screen and the second display screen folded toward each other to form Figure 1B The electronic device 100 is in a semi-expanded state. The inward folding screen can be further folded along the folding edge to form Figure 1C The inward folding screen in the folded state shown. After the folding screen of the electronic device 100 is completely folded, the first display screen and the second display screen are opposite to each other and are not visible to the user.

[0041] like Figures 1A to 1C As shown, the first display screen is located on the body 12, the second display screen is located on the body 13, and the body 12 and the body 13 together constitute the body 11. The body 12 of the electronic device 100 also includes a volume key, and the volume key includes a key 11 and a key 12. The key 11 and the key 12 can be used to adjust the volume of the electronic device 100. In some examples, the body 12 of the electronic device 100 may also include a power key. It is understood that when the electronic device 100 includes multiple keys, the multiple keys may be located on the same side or different sides of the electronic device 100, and the embodiments of the present application are not limited to this.

[0042] In some examples, the electronic device 100 with an inward folding screen provided in an embodiment of the present application may also include a display screen, which may be referred to as a third display screen. The third display screen may be on the back of the first display screen or the second display screen, and this application does not limit this. Among them, when the user uses the rear camera to take photos or videos, the image captured by the rear camera can be displayed on the third display screen. When the inward folding screen is in a folded state, an interface (for example, displaying time information, etc.) can be displayed on the third display screen.

[0043] It should be noted that the electronic device 100 is not limited to including two volume keys (for example, key 11 and key 12). The electronic device 100 may include only one volume key, which includes two push switches, and the two push switches can be used to adjust the volume of the electronic device 100.

[0044] Depend on Figures 1A to 1C It can be seen that when the electronic device 100 is in a fully unfolded state or a semi-expanded state, the user can determine that the button 11 can be used to increase the volume of the electronic device 100 and the button 12 can be used to decrease the volume of the electronic device 100 by the positions of the buttons 11 and 12 on the body 11. However, when the electronic device 100 is in a folded state, due to the change in the shape of the electronic device 100, the volume button is located in the middle of the electronic device 100, and the user cannot determine the corresponding function of the button by the positions of the buttons 11 and 12.

[0045] For example, Figure 2A-2D As shown, the electronic device 100 is in a folded state. When the posture of the electronic device 100 is different, the positions of the keys 11 and 12 also change accordingly. Figure 2A The illustrated key 12 and key 13 are located on the left side of the electronic device 100 , and the key 12 is located on the upper side of the key 13 . Figure 2B The illustrated key 12 and key 13 are also located on the left side of the electronic device 100 , and the key 12 is located below the key 13 . Figure 2C The illustrated key 12 and key 13 are located on the right side of the electronic device 100 , and the key 12 is located below the key 13 . Figure 2D The buttons 12 and 13 are also shown to be located on the right side of the electronic device 100, and the button 12 is located above the button 13. In this way, when the electronic device 100 is in the folded state, the relative positions of the buttons 12 and 13 are uncertain, and the user cannot accurately determine the position of the volume button by touch, and therefore cannot accurately determine whether the function of the button is to increase or decrease the volume. When the user puts the electronic device 100 in a bag or a pocket, the user needs to take out the electronic device 100 to determine the function of the volume button.

[0046] It should be noted that the above Figures 1A to 1Cas well as FIG. 2A to FIG. 2D The folding screen of the electronic device 100 shown is an inward folding screen. In the embodiment of the present application, the folding screen of the electronic device 100 may also be an outward folding screen. Figures 1A to 1C The folding screen shown as folding up and down, the folding screen of the electronic device 100 can also be a folding screen that folds left and right. Not limited to the above two-fold folding screen that can be folded into two display screens, the folding screen of the electronic device 100 can also be a three-fold folding screen that can be folded into three display screens, or a multi-fold folding screen that can be folded into a larger number of display screens, which is not limited in the embodiments of the present application.

[0047] It should be noted that the at least two screens formed after the folding screen in the embodiment of the present application is folded can be multiple independent screens, or can be a complete screen with an integrated structure, which is just folded into at least two parts.

[0048] For example, the folding screen may be a flexible folding screen, and the flexible folding screen includes a folding edge made of a flexible material. Part or all of the flexible folding screen is made of a flexible material. The at least two screens formed after the flexible folding screen is folded are a complete screen of an integrated structure, but are folded to form at least two parts.

[0049] For another example, the folding screen may be a multi-screen folding screen. The multi-screen folding screen may include multiple (two or more) screens. The multiple screens are multiple separate display screens. The multiple screens may be connected in sequence through folding axes. Each screen may rotate around the folding axis connected thereto to achieve folding of the multi-screen folding screen.

[0050] In the subsequent embodiments of the present application, the folding screen is a flexible folding screen that can be folded up and down as an example to illustrate the method provided by the embodiment of the present application. Exemplarily, the electronic device 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, and a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (Augmented reality, AR)\virtual reality (virtual reality, VR) device and other devices including the above-mentioned folding screen. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device 100.

[0051] The following is a schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of the present application.

[0052] Figure 3 A schematic structural diagram of an electronic device 100 is shown.

[0053] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0054] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0055] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0056] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0057] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0058] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0059] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0060] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.

[0061] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0062] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0063] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0064] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0065] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0066] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0067] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0068] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0069] The display screen 194 is used to display images, videos, etc. The display screen 194 may include the above-mentioned folding screen.

[0070] The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0071] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0072] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, etc. of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0073] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0074] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0075] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0076] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0077] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0078] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0079] The electronic device 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor, etc. For example, music playing, recording, etc. The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as a "speaker", is used to convert audio electrical signals into sound signals. The receiver 170B, also known as a "earpiece", is used to convert audio electrical signals into sound signals. The microphone 170C, also known as a "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0080] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .

[0081] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.

[0082] In an embodiment of the present application, the display screen 194 of the electronic device 100 can be folded to form multiple screens. A gyroscope sensor 180B can be provided in the multiple screens to measure the orientation of the corresponding screen (i.e., the direction vector of the orientation). The electronic device 100 can determine the angle between adjacent display screens (e.g., the angle α between the first display screen and the second display screen) based on the change in the orientation angle of each screen measured by the gyroscope sensor 180B. The electronic device 100 can determine whether the electronic device 100 is in a folded state based on the angle between the adjacent display screens.

[0083] In some examples, the gyroscope sensor 180B may be a virtual gyroscope sensor formed by cooperation with multiple other sensors, and the virtual gyroscope sensor may be used to calculate the angle between adjacent screens of the folding screen.

[0084] In some examples, one or more acceleration sensors 180E may be provided in multiple screens of the electronic device 100, and the electronic device 100 may use the acceleration sensor 180E to measure the angle between adjacent display screens in the multiple display screens formed by folding. For example, an acceleration sensor 180E may be provided in each screen of the folding screen. The electronic device 100 (such as the processor 110) may use the acceleration sensor 180E to measure the motion acceleration of each screen when it is rotated; and then calculate the angle of rotation of one screen relative to another screen, such as the angle α between the first display screen and the second display screen, based on the measured motion acceleration. The electronic device 100 may determine whether the electronic device 100 is in a folded state based on the angle between adjacent display screens.

[0085] In some examples, the display screen 194 of the electronic device 100 can be folded to form multiple screens. The multiple screens can be provided with magnetic sensors 180D, and the electronic device 100 can use the magnetic sensors 180D to detect whether the electronic device 100 is folded. The magnetic sensors 180D include Hall sensors.

[0086] In some examples, an angle sensor is installed at the folding part (e.g., on the hinge) of the folding screen of the electronic device 100, and the electronic device 100 can measure the angle between adjacent display screens through the angle sensor arranged at the folding part of the folding screen. The electronic device 100 can determine whether the electronic device 100 is in a folded state based on the angle between adjacent display screens.

[0087] In some examples, the electronic device 100 may be provided with one or more of the above sensors, and the electronic device 100 may use these sensors to jointly determine whether the electronic device 100 is in a folded state.

[0088] The air pressure sensor 180C is used to measure air pressure. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching, pedometers, etc. In the embodiment of the present application, the acceleration sensor 180E can be used to detect whether the posture of the electronic device 100 has changed.

[0089] The proximity light sensor 180G can also be used for automatic unlocking and locking of the holster mode and pocket mode. The ambient light sensor 180L is used to sense the brightness of ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect temperature. The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194. The bone conduction sensor 180M can obtain a vibration signal.

[0090] The key 190 includes a power button, a volume button, etc. The key 190 may be a mechanical button. It may also be a touch button. The electronic device 100 may receive a key input and generate a key signal input related to the user settings and function control of the electronic device 100. The volume key may include a volume key for increasing the volume and a volume key for decreasing the volume, or the volume key includes two push switches, a push switch for increasing the volume and a push switch for decreasing the volume. The volume key may be located on the side of the body of the electronic device 100.

[0091] In the embodiment of the present application, the processor 110 can be used to process the data collected by the above-mentioned sensor to determine whether the electronic device 100 is in a folded state. When the electronic device 100 is in a folded state, the processor 110 can also be used to set the function of the volume key of the electronic device 100. Specifically, the specific description of setting the volume key function of the electronic device 100 can be found in Figure 4 The illustrated embodiments will not be described in detail here.

[0092] The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.

[0093] The methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.

[0094] The embodiment of the present application introduces a volume adjustment method. The electronic device 100 includes two volume keys. When the electronic device 100 is in a folded state, the electronic device 100 receives a user input (e.g., a press input) for any volume key. In response to the input, the electronic device 100 may set the volume key that receives the user input to reduce the volume of the electronic device 100 within a preset duration (e.g., 5 minutes), and set the other volume key to increase the volume of the electronic device 100. The electronic device 100 can also reduce the volume of the electronic device 100. Alternatively, the electronic device 100 may set the volume key that receives the user input to increase the volume of the electronic device 100 within a preset duration, and set the other volume key to reduce the volume of the electronic device 100, in response to the input. The electronic device 100 can also increase the volume of the electronic device 100.

[0095] In this way, when the electronic device 100 is in the folded state, the user does not need to distinguish the relative position of the volume key to determine the function corresponding to the pressed volume key, and determine the function corresponding to another volume key, so that the user can more conveniently adjust the volume of the electronic device 100. The implementation of the volume adjustment method provided in the embodiment of the present application can also facilitate the user to adjust the volume of the electronic device 100 in a specified scene. For example, the specified scene may include but is not limited to the scene where the electronic device 100 is placed in a bag or pocket, the scene with weak light intensity such as an underground garage, the scene where the user is running or walking, and the like.

[0096] It should be noted that an electronic device 100 with a horizontally folded folding screen is used as an example to illustrate the volume adjustment method provided in the embodiment of the present application. Not limited to horizontally folding folding screens, folding screen devices with scroll folding can also use the volume adjustment method provided in the embodiment of the present application. When a folding screen device with a scroll folding uses the volume adjustment method provided in the embodiment of the present application, the folding state is the unfolded state of the folding screen device with the scroll folding. The folding screen device with a scroll folding can set the function of the volume key with reference to the volume adjustment method provided in the embodiment of the present application.

[0097] It should also be noted that in the embodiment of the present application, the unfolded state may include a folded state of a horizontally folded folding screen device (for example, Figure 1C ), and the unfolded state of the scroll-folded folding screen device (for example, Fig. 8A shown) etc.

[0098] It should be noted that when the electronic device 100 is in the unfolded state, the volume button of the electronic device 100 is in the default state. In the default state, the volume button closer to the front camera of the electronic device 100 (for example, Figure 1A-Figure 1C The key 11 shown is used to increase the volume of the electronic device 100, and another volume key (eg Figure 1A-Figure 1C The button 12) shown is used to reduce the volume of the electronic device 100.

[0099] When the electronic device 100 in the folded state receives user input, the volume key pressed by the user can be set to increase the volume within a preset time period, and another volume key can be set to decrease the volume. After the preset time period, the electronic device 100 cancels the function corresponding to the volume key. After the preset time period, the electronic device 100 in the folded state can receive user input for a certain volume key, and within the preset time period after receiving the input, the pressed volume key can be set to increase the volume, and another volume key can be set to decrease the volume, and so on.

[0100] Alternatively, when the electronic device 100 in the folded state receives user input, the volume key pressed by the user can be set to reduce the volume within a preset time period, and another volume key can be set to increase the volume. After the preset time period, the electronic device 100 cancels the function corresponding to the volume key. After the preset time period, the electronic device 100 in the folded state can receive user input for a certain volume key, and within the preset time period after receiving the input, the pressed volume key can be set to reduce the volume, and another volume key can be set to increase the volume, and so on.

[0101] When the electronic device is in the unfolded state, the electronic device 100 can set the volume key to the default state. In this way, when the electronic device 100 is in the unfolded state, the user can use the volume key as usual. When the electronic device 100 is in the folded state, the user can directly determine the function corresponding to the pressed volume key without paying attention to the position of the volume key.

[0102] Specifically, Figure 4 As shown, the volume adjustment method includes the following steps:

[0103] S401 . The electronic device 100 includes a key 11 and a key 12 , and the electronic device 100 receives an input to the key 11 .

[0104] The input operation on the button 11 may be a pressing input, a single-click input, etc. The buttons 11 and 12 may be used to adjust the volume of the electronic device 100 .

[0105] The electronic device 100 can use the speaker of the electronic device 100 to play audio and video data, that is, the electronic device 100 can be in a scene of playing audio and video files (for example, playing music, playing videos, playing game background music, playing game sound effects, etc.). Alternatively, the electronic device 100 establishes a call connection with a certain electronic device, and the electronic device 100 can be in a call scene. Among them, the button 11 and the button 12 can be used to adjust the volume of the audio played by the electronic device 100.

[0106] In some examples, the electronic device 100 can establish a communication connection (e.g., a Bluetooth connection, a wired connection, etc.) with the electronic device 200, and the electronic device 100 can send audio data to the electronic device 200 through the communication connection, and play the audio through the electronic device 200. Among them, the button 11 and the button 12 can be used to adjust the volume of the audio played by the electronic device 200.

[0107] S402. The electronic device 100 detects whether the electronic device 100 is in a folded state.

[0108] When the electronic device 100 detects that the electronic device 100 is in the folded state, step S404 may be executed. When the electronic device 100 detects that the electronic device 100 is not in the folded state (eg, in the unfolded state), step S403 may be executed.

[0109] Among them, the electronic device 100 can use one or more sensors to detect whether the electronic device 100 is in a folded state. For example, the electronic device 100 can set a gyroscope on each folding part, calculate the angle between adjacent folding parts through the data collected by different gyroscopes, and determine whether the electronic device 100 is in a folded state. For another example, the electronic device 100 can set a sensor (for example, an angle sensor) on the folding edge or folding axis to detect whether the electronic device 100 is in a folded state. In some examples, the electronic device 100 can also determine whether the electronic device is in a folded state through a magnetic sensor (for example, a Hall sensor), and so on. For details, please refer to Figure 3 The illustrated embodiments will not be described in detail here.

[0110] In some examples, the electronic device 100 may record whether the electronic device 100 is in a folded state when the folding state changes. For example, the electronic device 100 may set a folding flag. The electronic device 100 may set the folding flag to a first value when switching from a folded state to an unfolded state. The electronic device 100 may set the folding flag to a second value when switching from an unfolded state to a folded state, and the first value is different from the second value. For example, the first value may be 0, and the second value may be 1. In this way, the electronic device 100 may directly determine the folding state of the electronic device 100 based on the folding flag when detecting that the volume button is pressed, which is more efficient.

[0111] S403. The electronic device 100 executes the default function of the key 11.

[0112] In the unfolded state, the functions of the keys 11 and 12 of the electronic device 100 are default functions. After receiving the input for the key 11, the electronic device 100 determines that the electronic device 100 is not in the folded state, and can execute the default function of the key 11. After receiving the input for the key 12, the electronic device 100 determines that the electronic device 100 is not in the folded state, and can execute the default function of the key 12.

[0113] For example, the default function of button 11 is to increase the volume of the electronic device 100. The default function of button 12 is to reduce the volume of the electronic device 100. Therefore, after receiving the input of the user pressing button 11, the electronic device 100 determines that the electronic device 100 is in the unfolded state, and the volume of the audio played by the electronic device 100 can be directly increased. If the electronic device 100 receives the input operation of the user on button 12 and determines that the electronic device 100 is in the unfolded state, the volume of the audio played by the electronic device 100 can be directly reduced.

[0114] S404. The electronic device 100 detects whether the time since the last time the functions of the buttons 11 and 12 were set exceeds a preset time.

[0115] The preset duration can be used to indicate the effective duration of the volume key setting of the electronic device 100 in the folded state. The value of the preset duration of the electronic device 100 is a preset value, such as 2 minutes. Within the preset duration, the function of the volume key of the electronic device 100 remains unchanged.

[0116] For example, when the electronic device 100 is in the folded state, the electronic device 100 can set the function corresponding to the volume key and set a timer when receiving the user's pressing input for a certain volume key. When the electronic device 100 in the folded state receives the user's pressing input for a certain volume key again, if the duration recorded by the timer is less than the preset duration, the electronic device 100 keeps the function of the volume key unchanged. If the duration recorded by the timer of the electronic device 100 is greater than or equal to the preset duration, the electronic device 100 can reset the function of the volume key.

[0117] In some examples, after the electronic device 100 sets the timer in the folded state, it may not receive the input of the user pressing the volume key for a long time. Therefore, when the duration recorded by the timer of the electronic device 100 is equal to the preset duration, the electronic device 100 can cancel the timer and set the electronic device 100 to exceed the preset duration. In this way, the electronic device 100 does not need to keep timing after exceeding the preset duration, reducing the power consumption required for timing.

[0118] For another example, when the electronic device 100 receives a user's press input for a certain volume key again, it can set the function corresponding to the volume key and record the current time point. When the electronic device 100 in the folded state receives a user's press input for a certain volume key again, if the difference between the time point when the press operation is received and the recorded time point is less than the preset duration, the electronic device 100 keeps the function of the volume key unchanged. If the difference between the time point when the press operation is received and the recorded time point is greater than or equal to the preset duration, the electronic device 100 can reset the function of the volume key. It should be noted that the description of how the electronic device 100 determines whether the preset duration is exceeded provided in the embodiment of the present application is only an example, and the electronic device 100 can also use other methods to determine whether the preset duration is exceeded, and the embodiment of the present application is not limited to this.

[0119] Specifically, when the electronic device 100 detects that the preset time period has been exceeded, step S405 may be executed. When the electronic device 100 detects that the preset time period has not been exceeded, step S406 may be executed.

[0120] It should be noted that it is not limited to setting the time point of the volume key function as the starting time point for judging whether the preset duration has been exceeded. The electronic device 100 may also use the time point as the starting time point for judging whether the preset duration has been exceeded when receiving the input of the user pressing the volume key within the preset duration. For example, when the electronic device 100 sets the function of key 1 to increase the volume of the audio played by the electronic device 100 and sets the function of key 2 to reduce the volume of the audio played by the electronic device 100 in the folded state, and receives the user's input for the volume key again within the preset duration, the electronic device 100 may determine the function of the volume key according to the previous setting, and keep the setting of the volume key within the preset duration after receiving the user's input for the volume key again. In this way, the electronic device 100 can record the time point when the user last pressed the volume key to judge whether the preset duration has been exceeded.

[0121] In some examples, the electronic device 100 may first detect whether a preset time has been exceeded after receiving the user's input for the volume key. When the electronic device 100 detects that the preset time has not been exceeded, step S406 may be executed. When the electronic device 100 detects that the preset time has been exceeded, the electronic device 100 may detect whether the electronic device 100 is in a folded state. When the electronic device 100 detects that the electronic device 100 is in a folded state, the electronic device 100 may execute step S405. When the electronic device 100 detects that the electronic device 100 is not in a folded state, the electronic device 100 may execute step S403.

[0122] Alternatively, the electronic device 100 may simultaneously detect whether the electronic device 100 is in a folded state and whether the preset time has been exceeded. When the electronic device 100 detects that the electronic device 100 is not in a folded state and the preset time has been exceeded, the electronic device 100 may execute step S403. When the electronic device 100 detects that the electronic device 100 is in a folded state and the preset time has been exceeded, the electronic device 100 may execute step S405. When the electronic device 100 detects that the electronic device 100 is in a folded state and the preset time has not been exceeded, the electronic device 100 may execute step S406.

[0123] S405 . The electronic device 100 sets the functions of key 11 and key 12 , and executes the function of key 11 .

[0124] Specifically, the electronic device 100 can set the function of the key 11 to the volume-up function, which can be used to increase the volume of the audio played by the electronic device 100, and set the function of the key 12 to the volume-down function, which can be used to reduce the volume of the audio played by the electronic device 100. Alternatively, the function of the key 11 is set to the volume-down function, and the function of the key 12 is set to the volume-up function. In this way, the user can directly determine the function of the volume key without checking the position of the volume key of the electronic device 100.

[0125] When the electronic device 100 detects that the time from the last setting of the functions of the button 11 and the button 12 exceeds a preset time, the electronic device 100 may reset the function of the volume button.

[0126] In some examples, the electronic device 100 may set the function of the volume key to be pressed to reduce the volume of the audio played by the electronic device 100 by default, and set the function of another volume key to increase the volume of the audio played by the electronic device 100. Alternatively, the electronic device 100 may set the function of the volume key to be pressed to increase the volume of the audio played by the electronic device 100 by default, and set the function of another volume key to reduce the volume of the audio played by the electronic device 100.

[0127] In some examples, the electronic device 100 may provide a setting interface for setting the volume key function in the folded state. The interface may set multiple function options for the volume key function of the electronic device 100, and the multiple function options include a volume plus option and a volume minus option. The function options may be used to set the function of the volume key pressed in the folded state. Among them, the volume plus option is used to instruct the electronic device 100 to set the function of the pressed volume key to the volume increase function. The volume minus option is used to instruct the electronic device 100 to set the function of the pressed volume key to the volume decrease function. In this way, the electronic device 100 can set the function of the volume key of the electronic device 100 in the folded state according to the user's intention.

[0128] In some examples, the electronic device 100 may obtain environmental information and set the function of the volume key based on the environmental information, wherein the environmental information may include but is not limited to the ambient volume, ambient light intensity, and the like.

[0129] Among them, the electronic device 100 can use a microphone to collect nearby sounds (i.e., ambient volume), and then determine the function of the volume key that is triggered based on the intensity of the ambient volume. When the intensity of the nearby sound is strong, the electronic device 100 sets the function of the volume key that is triggered to increase the volume of the audio played by the electronic device 100, and sets the function of another volume key to reduce the volume of the audio played by the electronic device 100. When the intensity of the nearby sound is weak, the electronic device 100 sets the function of the volume key that is triggered to reduce the volume of the audio played by the electronic device 100, and sets the function of another volume key to increase the volume of the audio played by the electronic device 100. For example, when the electronic device 100 detects that the intensity of the ambient volume is higher than the first sound intensity threshold (e.g., 45 decibels), the function of the volume key that is triggered is set to increase the volume of the audio played by the electronic device 100, and the function of another volume key is set to reduce the volume of the audio played by the electronic device 100. When the electronic device 100 detects that the intensity of the ambient volume is lower than the second sound intensity threshold (e.g., 30 decibels), the function of the volume key that is triggered is set to reduce the volume of the audio played by the electronic device 100, and the function of another volume key is set to increase the volume of the audio played by the electronic device 100. In this way, the electronic device 100 can set the function of the volume key pressed according to the sound intensity of the surrounding environment. When the surrounding is noisy, the user is more inclined to increase the volume of the electronic device 100, and when the surrounding is quiet, the user is more inclined to reduce the volume of the electronic device 100.

[0130] Among them, the electronic device 100 can obtain the nearby light intensity (i.e., the ambient light intensity) through a sensor (e.g., an ambient light sensor). The electronic device 100 can determine the function of the volume key that is triggered by the ambient light intensity. For example, when the electronic device 100 detects that the ambient light intensity is greater than the first light intensity threshold, the function of the volume key that is triggered is set to increase the volume of the audio played by the electronic device 100, and the function of another volume key is set to reduce the volume of the audio played by the electronic device 100. When the electronic device 100 detects that the ambient light intensity is less than the first light intensity threshold (e.g., 15lux), the function of the volume key that is triggered is set to reduce the volume of the audio played by the electronic device 100, and the function of another volume key is set to increase the volume of the audio played by the electronic device 100. In this way, the electronic device 100 can set the function of the pressed volume key according to the light intensity of the surrounding environment. When the surrounding is brighter, it is usually noisier, and the user is more inclined to increase the volume of the electronic device 100. When the surrounding is darker, it is usually quieter, and the user is more inclined to reduce the volume of the electronic device 100.

[0131] It should be noted that the electronic device 100 may determine the function of the volume key of the electronic device 100 based on the ambient volume and / or the ambient light intensity. When the electronic device 100 determines the function of the volume key of the electronic device 100 based on the ambient volume and the ambient light intensity, if the function of the volume key to be triggered determined by the electronic device 100 based on the ambient volume is different from the function of the volume key to be triggered determined based on the ambient light intensity, the electronic device 100 may set the function of the volume key only according to the ambient volume or the ambient light intensity.

[0132] In other examples, the electronic device 100 can determine the function of the volume key being pressed based on the location information. For example, when the electronic device 100 determines based on the location information that the electronic device is in a noisy scene such as a station or a main road, the function of the volume key being pressed is set to increase the volume of the audio played by the electronic device 100, and the function of another volume key is set to reduce the volume of the audio played by the electronic device 100. When the electronic device 100 determines based on the location information that the electronic device is in a quiet scene such as a room or a park, the function of the volume key being pressed is set to reduce the volume of the audio played by the electronic device 100, and the function of another volume key is set to increase the volume of the audio played by the electronic device 100.

[0133] In other examples, the electronic device 100 may determine the function of the pressed volume key based on the volume of the audio played by the electronic device 100 after receiving the user's input for the volume key. When the volume of the audio played by the electronic device 100 is high, the electronic device 100 sets the function of the pressed volume key to reduce the volume of the audio played by the electronic device 100, and sets the function of another volume key to increase the volume of the audio played by the electronic device 100. When the volume of the audio played by the electronic device 100 is low, the electronic device 100 sets the function of the pressed volume key to increase the volume of the audio played by the electronic device 100, and sets the function of another volume key to reduce the volume of the audio played by the electronic device 100. For example, when the volume of the audio played by the electronic device 100 is greater than the first volume threshold (e.g., 60%), the function of the pressed volume key is set to reduce the volume of the audio played by the electronic device 100, and the function of another volume key is set to increase the volume of the audio played by the electronic device 100. When the volume of the audio played by the electronic device 100 is less than the second volume threshold (for example, 40%), the function of the pressed volume key is set to increase the volume of the audio played by the electronic device 100, and the function of the other volume key is set to reduce the volume of the audio played by the electronic device 100. In this way, the electronic device 100 can set the function of the pressed volume key according to the volume of the electronic device 100. When the volume of the audio played by the electronic device 100 is loud, the user is more inclined to reduce the volume of the electronic device 100, and when the volume of the audio played by the electronic device 100 is low, the user is more inclined to increase the volume of the electronic device 100.

[0134] In some examples, the first volume threshold may be a user's commonly used volume. When the duration of playing audio data at a certain volume value exceeds a preset duration, the volume value may be set as the user's commonly used volume (i.e., the first volume threshold). Alternatively, the electronic device 100 may use the volume value with the longest playing duration in the most recent period of time (e.g., 24 hours) as the user's commonly used volume.

[0135] In some examples, the electronic device 100 may set the function of the volume key of the electronic device 100 based on one or more factors of the ambient volume, the ambient light intensity, the volume of the electronic device 100 and the first volume threshold, the location information, etc. When the electronic device 100 jointly determines the function of the volume key of the electronic device 100 based on the one or more factors, if the electronic device 100 determines that the function of the volume key to be triggered is different based on the one or more factors, the electronic device 100 may set the function of the volume key according to only one of the factors.

[0136] The electronic device 100 can set the function of the volume key and execute the function of the pressed volume key at the same time. In this way, when the user sets the function of the volume key of the electronic device 100, the function of the volume key is also triggered to adjust the volume of the electronic device 100. It is avoided that after the electronic device 100 receives the user's input for the volume key, the electronic device 100 does not adjust the volume of the electronic device 100, so that the user is not sure whether the volume key is successfully triggered, resulting in a bad user experience. Here, the button 11 of the electronic device 100 is pressed, and after the electronic device 100 sets the function of the button 11, the function of the button 11 can also be executed. It is understandable that if the volume key pressed here is button 12, the electronic device 100 can also set the functions of button 12 and button 11 according to the above description. Optionally, the electronic device 100 can also trigger the function of button 12.

[0137] In some examples, after receiving the user's input on the volume key, the electronic device 100 may only set the functions of the two volume keys without adjusting the volume of the electronic device 100. When the electronic device 100 receives input on a certain volume key again within a preset time after the volume key function is set, the volume of the electronic device 100 is adjusted according to the function corresponding to the volume key. In this way, the user can first press the volume key to set the function of the volume key, and then press the corresponding volume key according to the demand.

[0138] S406. The electronic device 100 executes the function set for the key 11 last time.

[0139] When the electronic device 100 detects that the time from the last setting of the functions of button 11 and button 12 does not exceed the preset time, the volume button of the electronic device 100 is still set with the corresponding function. The electronic device 100 can directly determine the function corresponding to the volume button and trigger the function of the volume button. Here, the electronic device 100 receives input for button 11, and the electronic device 100 executes the function set for button 11 last time. It is understandable that if the electronic device 100 receives input for button 12, the electronic device 100 can execute the function set for button 12 last time.

[0140] Specifically, before the electronic device 100 receives the input of the button 11, if the electronic device 100 is in the folded state, the button 11 is set to the volume increase function, and the button 12 is set to the volume decrease function. Here, the electronic device 100 detects that the preset time has not been exceeded, and the settings of the buttons 11 and 12 remain unchanged, that is, the function of the button 11 is the volume increase function, and the function of the button 12 is the volume decrease function. The electronic device 100 can increase the volume of the audio played by the electronic device 100 when receiving the input for the button 11.

[0141] Similarly, before the electronic device 100 receives the input of button 11, if the electronic device 100 is in the folded state, button 11 is set to the volume reduction function, and button 12 is set to the volume increase function. Here, the electronic device 100 detects that the preset time has not been exceeded, and the settings of button 11 and button 12 remain unchanged, that is, the function of button 11 is the volume reduction function, and the function of button 12 is the volume increase function. The electronic device 100 can reduce the volume of the audio played by the electronic device 100 when receiving the input for button 11.

[0142] In this way, the user does not need to determine the position of the volume key of the electronic device 100 in the folded state, but can directly determine the function corresponding to the volume key, which is convenient for adjusting the volume of the electronic device 100.

[0143] In some examples, the position of the volume key may also change due to a change in the posture of the electronic device 100. Figure 2A-2D As shown, the positions of the volume keys are different in different postures of the electronic device 100. Therefore, when the electronic device 100 in the folded state sets the functions corresponding to the volume keys, the posture of the electronic device 100 changes. Even if it does not exceed the preset time, the electronic device 100 must reset the functions of the volume keys after receiving the user's input for a certain volume key.

[0144] In some examples, after the electronic device 100 cancels the setting of the function corresponding to the volume key, the volume key of the electronic device 100 is not set with the corresponding function, and the electronic device 100 can set the volume key to the default function. Alternatively, the electronic device 100 can retain the setting of the volume key after a preset time.

[0145] It should be noted that the above Figure 4 In the embodiment shown, a folding screen device with horizontal folding is taken as an example to illustrate the volume adjustment method. It is not limited to the folding screen with horizontal folding, and the volume adjustment method can also be applied to the folding screen device with scroll folding. Figure 4 When adjusting the volume as shown, Figure 4 The folded state shown corresponds to the unfolded state of the folding screen device folded by the scroll.

[0146] Next, the software modules of the electronic device 100 provided in the embodiment of the present application are introduced.

[0147] like Figure 5As shown, the electronic device 100 includes one or more software modules. The one or more software modules may include but are not limited to a state detection module 51, an unfolded state volume control module 52, a time detection module 53, a key function determination module 54, and a folded state volume control module 56. The electronic device 100 may also include a folded state volume control function memory area 55.

[0148] Among them, the state detection module 51 can be used to detect whether the electronic device 100 is in a folded state after receiving the user's input for the volume key (for example, button 11, button 12). For example, the state detection module 51 can determine whether the electronic device 100 is in a folded state through one or more sensors (for example, a gyroscope sensor, a magnetic sensor, etc.). When the state detection module 51 detects that the electronic device 100 is in a folded state, it can notify the time detection module 53 to detect whether it exceeds a preset time. When the state detection module 51 detects that the electronic device 100 is in an unfolded state, it can notify the unfolded state volume control module 52 to adjust the volume.

[0149] The expanded state volume control module 52 can be used to adjust the volume when the electronic device 100 is in the expanded state. When the electronic device 100 is in the expanded state, the expanded state volume control module 52 can determine that the function of the key 11 is to increase the volume of the audio played by the electronic device 100, and the function of the key 12 is to reduce the volume of the audio played by the electronic device 100. The expanded state volume control module 52 can increase (raise) the volume when receiving the input of the user pressing the key 11. The expanded state volume control module 52 can also reduce (lower) the volume when receiving the input of the user pressing the key 12.

[0150] The time detection module 53 can be used to detect whether the time since the last setting of the volume key function exceeds the preset time. The time detection module 53 can start timing after the key function judgment module 54 sets the volume key function to detect whether the preset time has been exceeded. For details, please refer to Figure 4 The illustrated embodiment will not be described in detail here. When the time detection module 53 receives the notification from the state detection module 51 and detects that the preset time has not been exceeded, it obtains the function of the volume key from the folded state volume control function memory area 55 and sends the function information of the volume key to the folded state volume control module 56. When the time detection module 53 receives the notification from the state detection module 51 and detects that the preset time has been exceeded, the time detection module 53 notifies the key function judgment module 54 to set the function of the volume key.

[0151] It should be noted that, when the time detection module 53 receives the notification from the state detection module 51 and determines whether the preset time has been exceeded, if the time detection module 53 has not counted the time, it is considered that the preset time has been exceeded.

[0152] The key function judgment module 54 is used to set the function of the volume key of the electronic device 100 in the folded state. The key function judgment module 54 can set the volume key that receives the user's pressing operation to the first function and set the other volume key to the second function. The first function and the second function are different. For example, the first function is to increase the volume of the audio played by the electronic device 100, and the second function is to reduce the volume of the audio played by the electronic device 100. For another example, the first function is to reduce the volume of the audio played by the electronic device 100, and the second function is to increase the volume of the audio played by the electronic device 100. After setting the function of the volume key, the key function judgment module 54 can store the function information of the volume key in the folded state volume control function memory area 55. After setting the function of the volume key, the key function judgment module 54 can also notify the time detection module 53 to start the timing operation, which is used to detect whether it exceeds the preset time length. Optionally, after setting the function of the volume key, the key function judgment module 54 can notify the folded state volume control module 56 to adjust the volume of the electronic device 100 based on the function of the pressed volume key.

[0153] The folded state volume control function memory area 55 is a storage area for storing function information of the volume key allocated by the electronic device 100. The folded state volume control function memory area 55 can be used to store the function information of the volume key sent by the key function determination module 54, and the function information can be used to indicate the function corresponding to the volume key.

[0154] The folded state volume control module 56 can be used to obtain the function information of the volume key from the folded state volume control function memory area 55 and determine the function corresponding to the volume key. The folded state volume control module 56 can also adjust the volume of the electronic device 100 based on the function of the pressed volume key.

[0155] In some examples, the above-mentioned multiple modules may be arranged in a processor of the electronic device 100 (for example, Figure 3 It should be noted that, Figure 5 The illustrated modules do not constitute a specific limitation on the electronic device 100. In other examples of the present application, the electronic device 100 may include more or fewer modules than shown in the figure, or combine some modules, or split some modules, or arrange modules differently, etc., which is not limited in the embodiments of the present application.

[0156] Next, combine Figure 5 The modules shown illustrate the volume adjustment method provided in the embodiment of the present application.

[0157] Exemplarily, the volume adjustment method provided in the embodiment of the present application is applied to an electronic device 100 including a button 11, a button 12 and a folding screen. The state of the electronic device 100 includes a folded state and an unfolded state. When the electronic device 100 is in the unfolded state, the function of the button 11 is to increase the volume, and the function of the button 12 is to decrease the volume. Figure 6 As shown, the volume adjustment method includes the following steps:

[0158] S601. Key 11 receives user input.

[0159] The user input may be a pressing input.

[0160] S602 . The button 11 sends a notification 61 to the status detection module 51 .

[0161] Among them, the notification 61 can be used to notify the state detection module 51 to detect the state of the electronic device 100. The notification 61 may include an identifier of the key 11, and the identifier of the key 11 may be used to indicate that the pressed key is the key 11. It is understandable that when the key 11 receives the user's input (for example, a press input), the driver of the key 11 can detect that the key 11 is triggered by the user, and send the notification 61 to the state detection module 51. It is also understandable that after the electronic device 100 receives the user's input for a certain volume key, it can send the identifier of the volume key to the state detection module 51.

[0162] S603. The state detection module 51 detects whether the electronic device 100 is in a folded state.

[0163] After receiving the notification 61, the state detection module 51 can determine whether the electronic device 100 is in the folded state. The description of the state detection module 51 detecting whether the electronic device 100 is in the folded state can be found in the above embodiment, which will not be repeated here.

[0164] When the state detection module 51 detects that the electronic device 100 is not in the folded state, step S604 may be executed. When the state detection module 51 detects that the electronic device 100 is in the folded state, step S606 may be executed.

[0165] S604 . The state detection module 51 sends a notification 62 to the expanded state volume control module 52 .

[0166] The state detection module 51 detects that the electronic device 100 is not in the folded state, and sends a notification 62 to the unfolded state volume control module 52. The notification 62 can be used to notify the unfolded state volume control module 52 to adjust the volume of the audio played by the electronic device 100.

[0167] S605 . The expanded state volume control module 52 determines the function of the button 11 and triggers the function of the button 11 .

[0168] The expanded state volume control module 52 stores the function information of the button 11 and the button 12 in the expanded state. Here, the function of the button 11 is the volume up function, and the function of the button 12 is the volume down function. After receiving the notification 62 from the state detection module 51, the expanded state volume control module 52 can set the functions of the button 11 and the button 12.

[0169] In some examples, the notification sent by the state detection module 51 to the expanded state volume control module 52 includes the identification of the pressed volume key. Here, the notification 62 includes the identification of the key 11, and the expanded state volume control module 52 can increase the volume of the audio played by the electronic device 100 based on the identification of the key 11.

[0170] In other examples, after receiving the notification 62, the expanded state volume control module 52 can obtain the identification of the pressed volume key from the state detection module 51 and trigger the function of the volume key to change the volume of the electronic device 100. Here, the expanded state volume control module 52 obtains the identification of the key 11 and can trigger the function of the key 11.

[0171] It is understandable that when the electronic device 100 receives an input from a user pressing the button 12 , the expanded state volume control module 52 can obtain the identifier of the button 12 and trigger the function of the button 12 .

[0172] S606 . The state detection module 51 sends a notification 63 to the time detection module 53 .

[0173] The state detection module 51 detects that the electronic device 100 is in the folded state, and sends a notification 63 to the time detection module 53. The notification 63 is used to instruct the time detection module 53 to detect whether the time from the last setting of the volume key function exceeds the preset time.

[0174] S607. The time detection module 53 detects whether the time since the last time the electronic device 100 set the function of the key exceeds a preset time.

[0175] The time detection module 53 may execute step S608 when detecting that the preset time has been exceeded. The time detection module 53 may execute step S612 when detecting that the preset time has not been exceeded. The description of the time detection module 53 detecting whether the preset time has been exceeded can be found in the above embodiment and will not be repeated here.

[0176] S608 . The time detection module 53 sends a notification 64 to the key function determination module 54 .

[0177] When the time detection module 53 detects that the time from the last time the electronic device 100 set a key function exceeds the preset time, a notification 64 can be sent to the key function determination module 54. The notification 64 is used to notify the key function determination module 54 to set a function for the volume key (i.e., key 11 and key 12).

[0178] S609 . The key function determination module 54 sets the function of key 11 to function 1 , sets the function of key 12 to function 2 , and stores the function information of key 11 and key 12 .

[0179] The key function determination module 54 stores information on how to set the function of the pressed volume key. After receiving the notification 64 from the time detection module 53, the key function determination module 54 can set the function of the volume key based on the identification of the pressed volume key and the stored function information.

[0180] In some examples, notification 63 and notification 64 both include the identification of the volume key being pressed. The key function determination module 54 can obtain the identification of the volume key being pressed accordingly. In other examples, the expanded state volume control module 52 can obtain the identification of the volume key being pressed from the driver of the key 11 and the key 12 after receiving the notification 64.

[0181] Here, the key function determination module 54 obtains the identifier of key 11, and can set the function of key 11 to function 1 of the volume plus function and the volume minus function, and set the function of key 12 to function 2 of the volume plus function and the volume minus function. For example, function 1 is to increase the volume of the audio played by the electronic device 100, and function 2 is to decrease the volume of the audio played by the electronic device 100. For another example, function 1 is to decrease the volume of the audio played by the electronic device 100, and function 2 is to increase the volume of the audio played by the electronic device 100. Specifically, the description of how the key function determination module 54 sets the key functions can be found in Figure 4 The illustrated embodiments will not be described in detail here.

[0182] After setting the function of the volume key, the key function determination module 54 may store the function information of the volume key in the folded state volume control function memory area 55. For example, the function information may include the correspondence between key 11 and the function of key 11, and the correspondence between key 12 and the function of key 12. For example, the key function determination module 54 may store the correspondence between the identifier of key 11 and function 1, and the correspondence between the identifier of key 12 and function 2 in the folded state volume control function memory area 55.

[0183] S610. The button function determination module 54 sends a notification 65 to the folded state volume control module 56.

[0184] After the key function determination module 54 sets the function of the volume key, it can send a notification 65 to the folded state volume control module 56. The notification 65 is used to notify the folded state volume control module 56 to adjust the volume of the audio played by the electronic device 100.

[0185] S611. The folded state volume control module 56 executes function 1.

[0186] After receiving the notification 65 sent by the key function determination module 54 , the folded state volume control module 56 can determine that the triggered volume key is key 11 , and execute function 1 of key 11 .

[0187] In some examples, the notification 65 sent by the key function judgment module 54 to the folded state volume control module 56 includes the identifier of the pressed volume key, or the folded state volume control module 56 may obtain the identifier of the pressed volume key from the key function judgment module 54 or the driver of the volume key after receiving the notification 65.

[0188] In some examples, after receiving the notification 65 , the folded state volume control module 56 can obtain the function information of the volume key from the folded state volume control function memory area 55 to determine the function of the volume key.

[0189] The folded state volume control module 56 can trigger the function of the key 11 after receiving the identification of the key 11. It can be understood that the function 1 here is the same as Figure 4 The first function shown corresponds to the function 2. Figure 4 The second function shown corresponds.

[0190] S612 . The time detection module 53 sends a notification 66 to the folded state volume control module 56 .

[0191] When the time detection module 53 detects that the time since the last time the electronic device 100 set the key function does not exceed the preset time, it can send a notification 66 to the folded state volume control module 56. The notification 66 is used to notify the folded state volume control module 56 to adjust the volume of the audio played by the electronic device 100.

[0192] S613. The folded state volume control module 56 determines the functions of key 11 and key 12 based on the function information of key 11 and key 12 stored in the folded state volume control function memory area 55, and executes the function of key 11.

[0193] Within a preset time after the electronic device 100 last set the function of the key, the folded state volume control function memory area 55 stores the information of the function of the key set by the electronic device 100 last time. The folded state volume control module 56 can determine the functions of the key 11 and the key 12 based on the function information stored in the folded state volume control function memory area 55.

[0194] In some examples, the notification 66 includes function information of the volume key. The time detection module 53 can obtain the function information of the volume key from the folded state volume control function memory area 55 after detecting that the time since the last time the electronic device 100 set the function of the key does not exceed the preset time, and send the function information of the volume key to the folded state volume control module 56.

[0195] In other examples, the folded state volume control module 56 may obtain the function information of the volume key from the folded state volume control function memory area 55 after receiving the notification 66 from the time detection module 53 .

[0196] Among them, the notification 63 and the notification 66 include the identification of the pressed volume key, and the folded state volume control module 56 can obtain the identification of the pressed volume key based on the notification 66. Alternatively, after receiving the notification 66, the folded state volume control module 56 can obtain the identification of the pressed volume key from the driver of the volume key.

[0197] The folded state volume control module 56 can determine the function of the volume key based on the function information of the volume key. The folded state volume control module 56 can trigger the function of the volume key corresponding to the identifier based on the identifier of the pressed volume key. Here, the folded state volume control module 56 triggers the function of key 11 based on the identifier of key 11. Similarly, when the electronic device 100 receives input from the user pressing key 12, the folded state volume control module 56 can trigger the function of key 12 based on the identifier of key 12.

[0198] In this way, the electronic device 100 can implement the volume adjustment method provided in the embodiment of the present application through the above modules.

[0199] In some application scenarios, the electronic device 100 and the electronic device 200 establish a communication connection. For example, a Bluetooth communication connection. The electronic device 100 can send audio data to the electronic device 200 through the communication connection, and the electronic device 200 can play audio based on the audio data sent by the electronic device 100. Among them, the electronic device 200 is an electronic device including a speaker, for example, a Bluetooth headset, a headset, smart glasses, a Bluetooth speaker, etc. The electronic device 100 can receive the user's input for the volume key and adjust the volume of the audio played by the electronic device 200. Among them, the electronic device 100 can determine the function of the pressed volume key according to the volume adjustment method provided in the embodiment of the present application, and then adjust the volume of the electronic device 200. In this way, it is not limited to the electronic device 100 adjusting the volume of the electronic device 100. When the electronic device 100 and other electronic devices establish a communication connection, the volume key function of the electronic device 100 can be determined without checking or touching to confirm the function of the volume key of the electronic device 100, and the volume of other electronic devices can be adjusted by pressing the volume key of the electronic device 100.

[0200] For example, Figure 7 As shown, electronic device 100 is a folding screen device, and electronic device 200 is a Bluetooth headset. Electronic device 100 and electronic device 200 have established a communication connection, and the folded electronic device 100 is placed in the user's pocket, and the electronic device 200 is worn on the user's ears. Since the user is walking on the road, when the user wants to adjust the volume of electronic device 200, the user can press the volume button of electronic device 100 in the pocket. When electronic device 100 receives the user's pressing input for the volume button, it can respond to the input according to Figure 4 The embodiment shown determines the function of the volume key and adjusts the volume of the audio played by the electronic device 200. In this way, the user can adjust the playback volume of the electronic device 200 without taking out the electronic device 100, which is not only convenient for the user to adjust the volume, but also because the user does not need to check the position of the volume key of the electronic device 100, it can also avoid road safety problems caused by not looking at the road.

[0201] For example, if the electronic device 100 is configured to set the volume key pressed in the folded state to reduce the volume of the audio played by the electronic device 100. Here, the electronic device 200 is playing the audio sent by the electronic device 100. After the electronic device 100 receives the user's press input for the button 11, the electronic device 100 determines that the electronic device 100 is in the folded state. If the electronic device 100 also determines that the preset time length is exceeded, the electronic device 100 can set the button 11 to reduce the volume of the audio played by the electronic device 100, and set the button 12 to increase the volume of the audio played by the electronic device 100. The electronic device 100 notifies the electronic device 200 to lower the volume of the audio played. After receiving the notification message from the electronic device 100, the electronic device 200 lowers the volume of the audio played by the electronic device 100.

[0202] In one possible implementation, not limited to Figure 1A-Figure 1C The folding screen with a horizontal folding mode shown in the figure, the volume adjustment method provided in the embodiment of the present application can also be applied to the electronic device 100 with a folding screen with a scroll folding. The scroll screen of the electronic device 100 can be pulled out or rolled back in a direction perpendicular to the scroll axis, changing the screen length of the scroll screen perpendicular to the scroll axis direction.

[0203] For example, FIG. 8A to FIG. 8C The product form diagram of an electronic device 100 with a scroll screen provided by an embodiment of the present application is shown. The form of the scroll screen can be divided into an unrolled state, a semi-rolled state, and a fully rolled out state. Fig. 8A 1 is a schematic diagram of the scroll screen in an unfolded state. When the scroll screen is in an unfolded state, a portion of the scroll screen is hidden in the body of the electronic device 100, and the electronic device 100 can display the interface of the application on the other unfolded portion of the screen. At this time, the length of the screen is a first length. The portion of the screen hidden in the body of the scroll screen can be extended in a specified direction (for example, the direction of the arrow shown in the figure). When the scroll screen is not fully unfolded, the scroll screen is in a semi-expanded state, such as Figure 8B When the scroll screen is in a semi-expanded state, the part of the screen hidden in the body of the scroll screen is reduced, and the part of the screen exposed on the surface of the body is increased, until the entire scroll screen is exposed on the surface of the body. When the scroll screen is fully exposed on the surface of the body, the scroll screen is in a fully expanded state, as shown in FIG. Figure 8C As shown, the length of the screen is the second length at this time. The second length is greater than the first length. It is understandable that when the length of the screen is greater than the first length and less than the second length, the scroll screen is in a semi-unfolded state. For example, the electronic device 100 may be provided with a motor and a scroll structure. The electronic device 100 may drive the scroll structure through a motor to unfold or roll up the display screen to change the size of the screen.

[0204] The electronic device 100 includes one or more buttons. The one or more buttons include a button 61 and a button 62. In a fully unfolded state or a semi-expanded state, the button 61 of the electronic device 100 is used to increase the volume, and the button 62 of the electronic device 100 is used to decrease the volume. In an unfolded state, the electronic device 100 can set the functions of the button 61 and the button 62 according to the volume adjustment method provided in the embodiment of the present application.

[0205] Alternatively, the electronic device 100 is provided with a third length. When the electronic device 100 detects that the length of the unfolded display screen is less than the third length, the functions of the buttons 61 and 62 can be set according to the volume adjustment method provided in the embodiment of the present application. When the electronic device 100 detects that the length of the unfolded display screen is greater than or equal to the third length, the button 61 is used to increase the volume, and the button 62 is used to decrease the volume. The third length is greater than or equal to the first length and less than the second length. Specifically, the description of the function of the volume button set by the electronic device 100 can be found in the above embodiment, which will not be repeated here.

[0206] It should be noted that in the embodiment of the present application, the scroll screen can be unfolded along a first direction perpendicular to the scroll axis, from an unexpanded state, through a semi-expanded state, to a fully expanded state. Similarly, the scroll screen can also be retracted along a second direction perpendicular to the scroll axis, from a fully expanded state, through a semi-expanded state, to an unexpanded state. The first direction and the second direction are opposite.

[0207] In a possible implementation, after receiving a first input for any volume key, the electronic device 100 may detect whether the electronic device 100 is in a folded state. When the electronic device 100 determines that the electronic device 100 is not in a folded state, the function of the volume key may be set to a default function. When the electronic device 100 determines that the electronic device 100 is in a folded state, the functions of the first volume key and the second volume key may be set, and the functions of the two volume keys are different. The electronic device 100 may also execute the function of the volume key that receives the first input. Within a preset time after the electronic device 100 sets the two volume keys, the function of the volume key remains unchanged. After receiving a second input for any volume key within the preset time, the electronic device 100 may execute the function of the volume key that receives the second input. After receiving a second input for any volume key outside the preset time, the electronic device 100 may reset the function of the volume key based on whether the electronic device 100 is in a folded state, and execute the function of the volume key that receives the second input. In this way, when the electronic device 100 is in a folded state, the function of each volume key may be set after receiving user input. The user does not need to distinguish the relative positions of the volume keys to determine the function corresponding to the pressed volume key and the function corresponding to another volume key, so the user can adjust the volume of the electronic device 100 more conveniently.

[0208] For example, Fig. 9 As shown, the volume adjustment method includes the following steps:

[0209] S901. The electronic device 100 receives a first input to a first volume key or a second volume key.

[0210] The electronic device 100 includes a folding screen, a first volume key, and a second volume key. The folding method of the folding screen can be a horizontal folding method, a scroll folding method, etc. The description of the folding screen in the horizontal folding method can be referred to Figure 1A-Figure 1C For the description of the folding screen in the scroll folding mode, please refer to Figure 8A-8C The illustrated embodiment will not be described in detail here. The first volume key and the second volume key are used to adjust the volume of the electronic device 100, and the functions of the first volume key and the second volume key of the electronic device 100 in the unfolded state are default functions.

[0211] The first input may be pressing, clicking, sliding, etc.

[0212] S902. The electronic device 100 detects whether the electronic device 100 is in a folded state.

[0213] The electronic device 100 may determine whether the electronic device 100 is in the folded state after receiving the first input to the first volume key or the second volume key. When the electronic device 100 determines that the electronic device 100 is not in the folded state, the electronic device 100 may execute step S903. When the electronic device 100 determines that the electronic device 100 is in the folded state, the electronic device 100 may execute step S904. The description of the electronic device 100 detecting whether the electronic device 100 is in the folded state can be found in Figure 4 The embodiments shown will not be described in detail here.

[0214] S903. The electronic device 100 sets the function of the volume key as a default function, and executes the default function of the volume key that receives the first input.

[0215] When the electronic device 100 detects that the electronic device 100 is not in a folded state, the functions of the first volume key and the second volume key can be set to default functions. After setting the volume key to the default function, the electronic device 100 can execute the default function of the volume key that receives the first input. For example, the default function of the first volume key is to increase the volume, and the default function of the second volume key is to decrease the volume. For another example, the default function of the first volume key is to decrease the volume, and the default function of the second volume key is to increase the volume.

[0216] S904. The electronic device 100 sets the function of the first volume key and the function of the second volume key.

[0217] After determining that the electronic device 100 is in a folded state, the electronic device 100 may set the functions of the first volume key and the second volume key. Among them, the electronic device 100 may set the volume key that receives the first input to increase the volume, and set the other volume key to decrease the volume. Alternatively, the electronic device 100 may set the volume key that receives the first input to decrease the volume, and set the other volume key to increase the volume. Alternatively, after receiving the first input, the electronic device 100 may collect environmental information and set the function of the volume key of the electronic device 100 based on the environmental information. Alternatively, the electronic device 100 may set the function of the volume key of the electronic device 100 based on the volume of the electronic device 100 and the first volume threshold. Alternatively, the electronic device 100 may set the threshold of the electronic device 100 based on the location information of the electronic device 100. Alternatively, the electronic device 100 may jointly determine the function of the volume key based on one or more factors of the environmental information, the volume of the electronic device 100, the first volume threshold, and the location information of the electronic device 100. It should be noted that when the electronic device 100 determines the function of the volume key based on multiple factors, if the functions of the volume keys corresponding to different factors are different, the electronic device 100 may determine the function of the volume key based on one of the factors.

[0218] In some examples, the electronic device 100 may determine whether the electronic device 100 is in a state of playing audio data before executing step S904. When the electronic device 100 determines that it is in a state of playing audio data, step S904 is executed. In this way, it can be prevented that the electronic device 100 performs the operation of setting the volume key function due to receiving the input of the user accidentally touching the volume key.

[0219] S905. The electronic device 100 executes the function of the volume key that receives the first input.

[0220] After setting the functions of the first volume key and the second volume key, the electronic device 100 may execute the function of the volume key that receives the first input. It is understandable that step S905 is an optional step, and the electronic device 100 may not execute step S905 after executing step S904. The electronic device 100 may execute the function of the volume key after receiving the user's input for any volume key again within a preset time after executing step S904.

[0221] S906. The electronic device 100 receives input to the first volume key or the second volume key.

[0222] S907. The electronic device 100 detects whether the time difference between the two most recent inputs to the volume key is greater than a preset time length.

[0223] After receiving the input for the volume key, the electronic device 100 can determine whether the time difference between the time of receiving the input for the volume key and the time of the last time the input for the volume key was received exceeds the preset duration. When the electronic device 100 determines that the time difference between the last two inputs for the volume key is not longer than the preset duration, the electronic device 100 can execute step S908. When the electronic device 100 determines that the time difference between the last two inputs for the volume key is longer than the preset duration, the electronic device 100 can execute step S902. In this way, after setting the function of the volume key, the electronic device 100 can keep the function of the volume key unchanged for a period of time, so that the user can adjust the volume of the electronic device 100. After a period of time, it is convenient for the user to reset the function of the volume key.

[0224] S908. The electronic device 100 executes the function of the volume key that receives the input.

[0225] When the electronic device 100 determines that the time difference between the last two inputs received for the volume key does not exceed the preset time length, the function of the volume key of the electronic device 100 is the same as the function set for the volume key after receiving the last input. For example, the last input of this input is the first input, and the electronic device 100 determines that the time difference between this input and the first input is less than the preset time length, the electronic device 100 can perform the function of the volume key received this time according to the function set for the volume key when the electronic device 100 receives the first input.

[0226] It should be noted that after the electronic device 100 executes step S908, it returns to step S906, and if it receives the user's input on the volume key again, it executes step S906. Fig. 9 The process shown.

[0227] It should also be noted that when the electronic device 100 detects that the electronic device 100 is switched to the unfolded state, the functions of the first volume key and the second volume key can be set to default functions. In this way, the user's function of adjusting the volume of the electronic device 100 in the unfolded state will not be affected.

[0228] In a possible implementation, after receiving a first input for any volume key, the electronic device 100 may detect whether the electronic device 100 is in a folded state. When the electronic device 100 determines that the electronic device 100 is not in a folded state, the default function of the volume key that receives the first input is executed. When the electronic device 100 determines that the electronic device 100 is in a folded state, the functions of the first volume key and the second volume key may be set, and the functions set for the two volume keys are different. The electronic device 100 may also execute the function of the volume key that receives the first input. The electronic device 100 may detect whether an input for the volume key is received again within a first preset time length after executing the function of the volume key. When the electronic device 100 does not receive an input for the volume key within the first preset time length, the electronic device 100 may set the function of the volume key to the default function.

[0229] When the electronic device 100 receives input for the volume key within the first preset duration, the electronic device 100 can determine whether the time difference between the last two inputs received for the volume key exceeds the second preset duration. Among them, the function of the volume key remains unchanged within the second preset duration after the electronic device 100 sets the functions of the two volume keys. The electronic device 100 detects that the time difference between the last two inputs for the volume key is less than the second preset duration, and can execute the function of the volume key that recently received the input. The electronic device 100 detects that the time difference between the last two inputs for the volume key is greater than the second preset duration, and can determine and execute the function of the volume key that receives the input based on whether the electronic device 100 is in a folded state. In this way, when the electronic device 100 is in a folded state, the function of each volume key can be set after receiving the user input. The user does not need to distinguish the relative position of the volume key to determine the function corresponding to the pressed volume key, and determine the function corresponding to another volume key, so that the user can adjust the volume of the electronic device 100 more conveniently. The electronic device 100 may also set the function of the volume key to a default function when no user input to the volume key is detected for a period of time, which will not hinder the user from adjusting the volume of the electronic device 100 when the electronic device 100 is in the unfolded state.

[0230] For example, Fig.10 As shown, the volume adjustment method includes the following steps:

[0231] S1001. The electronic device 100 receives a first input to a first volume key or a second volume key.

[0232] The electronic device 100 includes a folding screen, a first volume key, and a second volume key. The folding method of the folding screen can be a horizontal folding method, a scroll folding method, etc. The description of the folding screen in the horizontal folding method can be referred to Figure 1A-Figure 1CFor the description of the folding screen in the scroll folding mode, please refer to Figure 8A-8C The illustrated embodiment will not be described in detail here. The first volume key and the second volume key are used to adjust the volume of the electronic device 100. The first input may be a press input, a single click input, etc.

[0233] S1002. The electronic device 100 detects whether the electronic device 100 is in a folded state.

[0234] The electronic device 100 may determine whether the electronic device 100 is in the folded state after receiving the first input to the first volume key or the second volume key. When the electronic device 100 determines that the electronic device 100 is not in the folded state, the electronic device 100 may execute step S1003. When the electronic device 100 determines that the electronic device 100 is in the folded state, the electronic device 100 may execute step S1004. The description of the electronic device 100 detecting whether the electronic device 100 is in the folded state can be found in Figure 4 The embodiments shown will not be described in detail here.

[0235] S1003. The electronic device 100 executes the default function of the volume key that receives the first input.

[0236] The electronic device 100 may set the functions of the first volume key and the second volume key as default functions when the electronic device 100 is turned on. After the electronic device 100 determines in step S1002 that the electronic device 100 is not in the folded state, the default function of the first volume key may be executed.

[0237] For example, the default function of the first volume key is to increase the volume, and the default function of the second volume key is to decrease the volume. For another example, the default function of the first volume key is to decrease the volume, and the default function of the second volume key is to increase the volume.

[0238] S1004. The electronic device 100 sets the function of the first volume key and the function of the second volume key.

[0239] After determining that the electronic device 100 is in a folded state, the electronic device 100 may set the functions of the first volume key and the second volume key. Specifically, the electronic device 100 may set the volume key that receives the first input to increase the volume, and set the other volume key to decrease the volume. Alternatively, the electronic device 100 may set the volume key that receives the first input to decrease the volume, and set the other volume key to increase the volume. Alternatively, after receiving the first input, the electronic device 100 may collect environmental information and set the function of the volume key of the electronic device 100 based on the environmental information. Alternatively, the electronic device 100 may set the function of the volume key of the electronic device 100 based on the volume of the electronic device 100 and the first volume threshold. Alternatively, the electronic device 100 may set the threshold of the electronic device 100 based on the location information of the electronic device 100. Alternatively, the electronic device 100 may jointly determine the function of the volume key based on one or more factors of the environmental information, the volume of the electronic device 100, the first volume threshold, and the location information of the electronic device 100. It should be noted that when the electronic device 100 determines the function of the volume key based on multiple factors, if different factors correspond to different functions of the volume key, the electronic device 100 may determine the function of the volume key based on one of the factors. For details, please refer to Figure 4 The illustrated embodiments will not be described in detail here.

[0240] In some examples, the electronic device 100 may determine whether the electronic device 100 is in a state of playing audio data before executing step S1004. When the electronic device 100 determines that it is in a state of playing audio data, step S1004 is executed. In this way, it can be prevented that the electronic device 100 performs the operation of setting the volume key function due to receiving the input of the user accidentally touching the volume key.

[0241] S1005. The electronic device 100 executes the function of the volume key receiving the first input.

[0242] After setting the functions of the first volume key and the second volume key, the electronic device 100 may execute the function of the volume key that receives the first input. It is understandable that step S1005 is an optional step, and the electronic device 100 may not execute step S1005 after executing step S1004. The electronic device 100 may execute the function of the volume key after receiving the user's input for any volume key again within a preset time after executing step S1004.

[0243] S1006. The electronic device 100 detects whether an input to the first volume key or the second volume key is received within a first preset time period.

[0244] When the electronic device 100 does not receive input to the first volume key or the second volume key within the first preset time, the electronic device 100 may execute step S1007. When the electronic device 100 receives input to the first volume key or the second volume key within the first preset time, the electronic device 100 may execute step S1008.

[0245] S1007. The electronic device 100 sets the function of the volume key as the default function.

[0246] In this way, when the user does not trigger the volume button for a long time, the electronic device 100 sets the function of the volume button to the default function, and when the electronic device 100 is switched to the unfolded state, it does not affect the user's use of the volume adjustment function of the electronic device 100.

[0247] S1008. The electronic device 100 detects whether the time difference between the two most recent inputs to the volume key is greater than a second preset time length.

[0248] After receiving the input for the volume key, the electronic device 100 can determine whether the time difference between the time of receiving the input for the volume key and the time of the last time the input for the volume key was received exceeds the second preset duration. When the electronic device 100 determines that the time difference between the last two inputs for the volume key is not longer than the second preset duration, the electronic device 100 can execute step S1009. When the electronic device 100 determines that the time difference between the last two inputs for the volume key is longer than the second preset duration, the electronic device 100 can execute step S1002. In this way, after setting the function of the volume key, the electronic device 100 can keep the function of the volume key unchanged for a period of time, so that the user can adjust the volume of the electronic device 100. After a period of time, it is convenient for the user to reset the function of the volume key.

[0249] S1009. The electronic device 100 executes the function of the volume key that receives the input.

[0250] When the electronic device 100 determines that the time difference between the last two inputs received for the volume key does not exceed the second preset time length, the function of the volume key of the electronic device 100 is the same as the function set for the volume key after receiving the last input. For example, the last input of this input is the first input, and the electronic device 100 determines that the time difference between this input and the first input is less than the second preset time length, the electronic device 100 can perform the function of the volume key received this time according to the function set for the volume key when the electronic device 100 receives the first input.

[0251] It should be noted that when the electronic device 100 detects that the electronic device 100 switches from the folded state to the unfolded state, the functions of the first volume key and the second volume key can be set to default functions. In this way, the user's function of adjusting the volume of the electronic device 100 in the unfolded state will not be affected.

[0252] It should be noted that the first preset time length and the second preset time length may be the same or different, and are set according to actual product design requirements, and are not specifically limited in the embodiments of the present application.

[0253] It should also be noted that Fig. 9 and Fig.10 In the embodiment of the present application, a folding screen device with a horizontal folding function is used as an example to illustrate the volume adjustment method provided by the embodiment of the present application. It is not limited to a folding screen with a horizontal folding function, and a folding screen device with a scroll folding function can also be used. Fig. 9 and / or Fig.10 The volume adjustment method provided. When a folding screen device with a scroll folding function is used Fig. 9 and / or Fig.10 The volume adjustment method provided is Fig. 9 and Fig.10 The folded state in the embodiment is the unfolded state of the folding screen device with scroll folding. As mentioned above, the above embodiments are only used to illustrate the technical solution of the present application, rather than to limit it; although the present application is described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalent; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A volume adjustment method, applied to an electronic device including a folding screen, a first volume key and a second volume key, wherein the state of the electronic device includes an unfolded state and an unfolded state; characterized in that: The method comprises: Receiving a first input from a user on the first volume key; Determining that the electronic device is in the unfolded state; In response to the first input, the first volume key is set to a first function, and the second volume key is set to a second function; wherein the first function and the second function are different.

2. The method according to claim 1, characterized in that Before setting the first volume key to the first function, the method further includes: It is determined that the electronic device is in a state of playing audio data.

3. The method according to claim 1 or 2, characterized in that: In response to the first input, setting the first volume key to a first function and setting the second volume key to a second function, the method further includes: The first function is performed.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the electronic device is in an unfolded state and receives a second input to the first volume key within a preset time period of receiving the first input, the first function is executed; or, If the electronic device is in an unfolded state and receives a second input to the second volume key within a preset time period of receiving the first input, the second function is executed.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the electronic device does not receive a third input to the first volume key or the second volume key within a preset time period of receiving the first input; set the first volume key and the second volume key to default functions.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the electronic device is switched to the unfolded state, the first volume key and the second volume key are set to default functions.

7. The method according to any one of claims 1 to 6, characterized in that: Before setting the first volume key to the first function, the method further includes: Detection of environmental information; The first function is determined according to the environmental information.

8. The method according to claim 7, characterized in that Before setting the first volume key to the first function, the method further includes: detecting the volume of the electronic device; The determining of the first function according to the environmental information is specifically: The first function is determined according to the environmental information and the volume.

9. The method according to claim 8, characterized in that The method further comprises: Get the user's commonly used volume; The determining the first function according to the environmental information and the volume specifically includes: The first function is determined according to the environmental information, the volume, and the user's usual volume.

10. The method according to any one of claims 1 to 6, characterized in that: Before setting the first volume key to the first function, the method further includes: detecting the volume of the electronic device; Get the user's commonly used volume; The first function is determined according to the volume of the electronic device and the common volume of the user.

11. The method according to any one of claims 1 to 6, characterized in that: Before setting the first volume key to the first function, the method further includes: Detecting location information of the electronic device; The first function is determined according to the location information.

12. The method according to any one of claims 1 to 11, characterized in that: The first function is to increase the volume of audio played by the first electronic device, and the second function is to decrease the volume of audio played by the first electronic device; or, the first function is to decrease the volume of audio played by the first electronic device, and the second function is to increase the volume of audio played by the first electronic device.

13. An electronic device, characterized in that: include: One or more processors, one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1-12.

14. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 12.

Citation Information

Cited By

  • Volume adjustment method and related apparatus

    EP4715566A1

  • Volume adjustment method and related apparatus

    WO2025007869A1