Volume adjustment method, device, electronic device and storage medium
By receiving volume adjustment input in electronic devices, obtaining application types and use scenarios, and using enhanced learning technology to obtain volume adjustment strategies, the problem of low efficiency of traditional volume adjustment methods has been solved, and more efficient and user -friendly volume adjustment has been achieved.
Patent Information
- Application Number
- CN202110444178.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-04-23
AI Technical Summary
Traditional volume adjustment methods are inefficient, and users need to continuously press or hold buttons when adjusting volume in a larger range, resulting in poor user experience.
By receiving user volume adjustment input, obtaining the current application type and using scenario information, and using strengthening learning technology to obtain volume adjustment strategies based on this information, thereby achieving efficient volume adjustment.
Improving the volume adjustment efficiency of electronic equipment, reducing the number of user operations, and improving the user experience.
Smart Images

Figure CN113126952B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a volume adjustment method, device, electronic device and storage medium. Background Art
[0002] At present, the traditional volume adjustment method is to increase or decrease the fixed preset amplitude value. In single adjustment, the preset amplitude value is increased or decreased once, and in continuous adjustment, the preset amplitude value is increased or decreased continuously. When the user only makes a small amount of volume adjustment, such as increasing or decreasing one or two grids (the volume adjusted by one grid is a fixed preset amplitude value, for example, 10% of the maximum volume, etc.), this traditional volume adjustment method can be used. However, when the user makes a larger range of volume adjustment, for example, increasing or decreasing more than five grids, or even more than ten grids, the user needs to press the volume adjustment button multiple times in succession, or hold down the volume adjustment button for a long time to obtain the required volume. In this case, the traditional volume adjustment method by increasing or decreasing the fixed preset amplitude is less efficient and the user experience is poor. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a volume adjustment method, device, electronic device and storage medium, which can solve the technical problem of low efficiency of existing volume adjustment methods.
[0004] In a first aspect, an embodiment of the present application provides a volume adjustment method, comprising:
[0005] Receiving a first input from a user to adjust the volume;
[0006] In response to the first input, obtaining application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device;
[0007] Perform reinforcement learning according to the application type information, the usage scenario information, and first user operation information corresponding to the first input to obtain a first volume adjustment strategy;
[0008] The volume is adjusted according to the first volume adjustment strategy.
[0009] In a second aspect, an embodiment of the present application provides a volume adjustment device, comprising:
[0010] A first receiving module, configured to receive a first input from a user for adjusting the volume;
[0011] an acquisition module, configured to acquire, in response to the first input, application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device;
[0012] a reinforcement learning module, configured to perform reinforcement learning according to the application type information, the usage scenario information, and first user operation information corresponding to the first input, so as to obtain a first volume adjustment strategy;
[0013] An adjustment module is used to adjust the volume according to the first volume adjustment strategy.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In an embodiment of the present application, reinforcement learning is performed based on application type information, usage scenario information, and user operation information to obtain a volume adjustment strategy, improve the volume adjustment efficiency of the electronic device, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flow chart of a volume adjustment method provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the structure of a volume adjustment device provided in an embodiment of the present application;
[0020] Figure 3 One of the hardware structure diagrams of the electronic device provided in the embodiment of the present application;
[0021] Figure 4 The second schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0024] The volume adjustment method, device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0025] Figure 1 A flow chart of a volume adjustment method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, an embodiment of the present application provides a volume adjustment method, and the execution subject of the method can be an electronic device, such as a mobile phone. The method includes:
[0026] Step 101: Receive a first input from a user for adjusting the volume.
[0027] Specifically, when the user needs to adjust the volume, the user performs an operation to adjust the volume. The electronic device receives a first input from the user to adjust the volume, where the first input is the user performing the operation to adjust the volume.
[0028] For example, the first input is a user performing an operation of increasing the volume.
[0029] For another example, the first input is a user performing an operation of reducing the volume.
[0030] Step 102: In response to the first input, obtain application type information corresponding to the application currently running on the electronic device and current usage scenario information of the electronic device.
[0031] Specifically, after receiving a first input from a user to adjust the volume, the electronic device obtains application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device in response to the first input.
[0032] Application type information includes phone, camera, various applications (programs) APP, etc.
[0033] Application type information can be represented by a.
[0034] The usage scenario information is obtained based on the current time, geographic location, and ambient lighting information, and the usage scenario information can be represented by b.
[0035] The first user operation information corresponding to the first input can be represented by c.
[0036] Step 103: Perform reinforcement learning according to the application type information, the usage scenario information, and the first user operation information corresponding to the first input to obtain a first volume adjustment strategy.
[0037] Specifically, after the electronic device determines application type information corresponding to an application currently running on the electronic device, current usage scenario information of the electronic device, and first user operation information corresponding to the first input, the electronic device performs reinforcement learning to obtain a first volume adjustment strategy.
[0038] For example, first, the current state of reinforcement learning is determined according to the application type information, the usage scenario information, and the first user operation information.
[0039] The current state of reinforcement learning can be represented by s, s = (a, b, c), where (a, b, c) is a ternary combination.
[0040] Then, the first volume adjustment strategy is determined according to the current state and the Q matrix of reinforcement learning.
[0041] The first volume adjustment strategy is a strategy corresponding to the maximum value in the strategy set corresponding to the current state in the Q matrix.
[0042] The columns of the Q matrix represent the target states, and the rows represent the volume adjustment strategies under the target states.
[0043] The volume adjustment strategy can be represented by y, and the volume adjustment strategy is used to represent the volume adjustment value.
[0044] Step 104: Adjust the volume according to the first volume adjustment strategy.
[0045] Specifically, after determining the first volume adjustment strategy, the electronic device adjusts the volume according to the first volume adjustment strategy.
[0046] For example, if the determined value of the first volume adjustment strategy is 1 (y=1), the volume is increased by one (volume adjustment) unit.
[0047] For another example, if the determined value of the first volume adjustment strategy is -2 (y=-2), the volume is reduced by two units.
[0048] In an embodiment of the present application, reinforcement learning is performed based on application type information, usage scenario information, and user operation information to obtain a volume adjustment strategy, improve the volume adjustment efficiency of the electronic device, and improve the user experience.
[0049] Optionally, the performing reinforcement learning according to the application type information, the usage scenario information, and first user operation information corresponding to the first input to obtain a first volume adjustment strategy includes:
[0050] Determining a current state of reinforcement learning according to the application type information, the usage scenario information, and the first user operation information;
[0051] The first volume adjustment strategy is determined according to the current state and a Q matrix of reinforcement learning; the first volume adjustment strategy is a strategy corresponding to a maximum value in a strategy set corresponding to the current state in the Q matrix; the columns of the Q matrix represent target states, and the rows represent volume adjustment strategies under the target state.
[0052] Specifically, in the embodiment of the present application, the specific steps of performing reinforcement learning are as follows:
[0053] First, the current state of reinforcement learning is determined according to the application type information, the usage scenario information and the first user operation information.
[0054] The current state of reinforcement learning can be represented by s, s = (a, b, c), where (a, b, c) is a ternary combination.
[0055] And determine the payoffs of all strategies in the current state.
[0056] The benefit represents the user experience benefit brought by the current volume adjustment strategy. The less the current adjustment strategy deviates from the user's actual volume demand, the better the user experience and the greater the benefit. If the current volume adjustment strategy just meets the user's volume demand, the benefit is the greatest.
[0057] The returns of all strategies under all states are stored in the Q matrix, where the columns of the Q matrix represent the states, the rows of the Q matrix represent the volume adjustment strategies under the states, and the values of the elements in the Q matrix represent the returns generated by adopting the strategy under the states.
[0058] For each state s = (a, b, c), the corresponding strategy set is Y = [-y max ,-y max +1,...-1,0,1,...,y max -1,y max},y max Indicates the maximum number of volume levels that can be changed in a single adjustment. Using the volume adjustment strategy y=1 means increasing the volume by one level (one level represents one (volume adjustment) unit), using the volume adjustment strategy y=2 means increasing the volume by two levels, using the volume adjustment strategy y=0 means that the volume remains unchanged, using the volume adjustment strategy y=-1 means decreasing the volume by one level, and using the volume adjustment strategy y=-2 means decreasing the volume by two levels.
[0059] For each state s = (a, b, c), find the row corresponding to the state in the Q matrix. The values of all elements in this row represent the state. The strategy set Y = [-y max ,-y max +1,...-1,0,1,...,y max -1,y max The benefits brought by each strategy in state s and the benefits of different strategies y in state s are represented by Q(s,y).
[0060] When the device is initialized, the Q matrix is initialized to Q(s,1)=1 for all states when the volume is increased, and to Q(s,-1)=-1 for all states when the volume is decreased. The rest of the values are initialized to 0.
[0061] Then, the first volume adjustment strategy is determined according to the current state and the Q matrix of reinforcement learning.
[0062] The first volume adjustment strategy is a strategy corresponding to the maximum value in the strategy set corresponding to the current state in the Q matrix.
[0063] The returns of all strategies in all states are stored in the Q matrix, where the columns of the Q matrix represent the states and the rows of the Q matrix represent the volume adjustment strategies in the states. The matrix size is |S|×(2y max +1), |S| is the total number of states, (2y max +1) is the total number of strategies, and the value of the elements in the Q matrix represents the benefits of adopting the strategy in this state. Find the row corresponding to the state s=(a,b,c) in the Q matrix. The elements of this row are represented as {Q(s,-y max ),Q(s,-y max +1),...,Q(s,y max -1),Q(s,y max )}, corresponding to the strategy set Y = [-y max ,-y max +1,...-1,0,1,...,y max -1,y max}, and select the strategy y with the largest profit under state s = (a, b, c). * As the optimal strategy, if there are multiple strategies with the same payoff, a strategy is randomly selected.
[0064] After automatically learning the optimal volume adjustment strategy based on the current application type, usage scenario, and user habits, the benefits corresponding to different strategies in each state are different, and the strategy that meets the volume requirements of the user, or the strategy that is close to the volume requirements of the user will have the greatest benefits. That is, through a single volume adjustment, the strategy that adjusts the volume level just enough to reach the volume required by the user, or the strategy that is close to the volume required by the user after adjustment, will have the greatest benefits. In any state, by selecting the strategy with the maximum benefit as the optimal strategy for the current state, a single volume adjustment can adjust multiple levels of volume, so that the volume required by the user can be reached through one or a small number of adjustments.
[0065] In an embodiment of the present application, the current state of reinforcement learning is determined based on application type information, usage scenario information and user operation information, and the volume adjustment strategy is determined based on the current state of reinforcement learning and the Q matrix, thereby further improving the volume adjustment efficiency of the electronic device.
[0066] Optionally, after adjusting the volume according to the first volume adjustment strategy, the method further includes:
[0067] receiving a second input from the user to adjust the volume again;
[0068] In response to the second input, a Q matrix for reinforcement learning is updated.
[0069] Specifically, in the embodiment of the present application, after the electronic device adjusts the volume according to the volume adjustment strategy, it also includes a Q matrix update step, which is as follows:
[0070] First, a second input from the user to adjust the volume again is received.
[0071] After the first volume adjustment, the volume may be too loud, too soft, or just right to meet the user's needs.
[0072] If the volume is too loud or too soft, the user will perform an operation to adjust the volume again, and the first input is the user performing an operation to adjust the volume again.
[0073] The operation of adjusting the volume again can be to increase the volume or to decrease the volume.
[0074] Then, in response to this second input, the Q matrix of the reinforcement learning is updated.
[0075] If the user does not perform any operation after the volume is adjusted, it means that the current volume operation strategy has achieved the optimal value, and the benefit brought by the current volume operation is set to the maximum value r(s,y * )=v max , where r(s,y * ) indicates that strategy y is adopted in state s *The immediate benefits brought are used to update the value of the Q matrix. When the Q matrix is updated, both immediate benefits and long-term benefits are taken into consideration.
[0076] In the embodiment of the present application, by continuously updating the Q matrix, the determined volume adjustment strategy is made more accurate, thereby further improving the volume adjustment efficiency of the electronic device.
[0077] Optionally, updating the Q matrix of reinforcement learning includes:
[0078] Determining a benefit corresponding to the volume adjustment strategy to be updated according to second user operation information corresponding to the second input;
[0079] The Q matrix is updated according to the benefit corresponding to the volume adjustment strategy to be updated.
[0080] Specifically, in the embodiment of the present application, the specific steps of updating the Q matrix of reinforcement learning are as follows:
[0081] First, the user operation corresponding to the second input may be to increase the volume or to decrease the volume.
[0082] Under different operating conditions, the corresponding benefits of the volume adjustment strategy are also different.
[0083] The benefit corresponding to the volume adjustment strategy to be updated is determined according to the user operation information corresponding to the second input.
[0084] The volume adjustment policy to be updated may include the current volume adjustment policy, may include a volume adjustment policy before the current volume adjustment policy, and may also include a volume adjustment policy after the current volume adjustment policy.
[0085] Then, after determining the benefit corresponding to the volume adjustment strategy to be updated, the Q matrix is updated according to the updated benefit value.
[0086] For the current state s = (a, b, c), the corresponding strategy y * -1,y * ,y * +1, update the benefit values of the three in the Q matrix, the update functions of the three are the same, as shown below:
[0087]
[0088] Among them, α∈[0,1] is the learning rate parameter, γ∈[0,1) is the long-term benefit parameter, and s' is the state after executing the corresponding adjustment strategy. represents the benefit brought by the strategy with the maximum benefit in the adjusted state s'. r(s,y) represents the immediate benefit brought by adopting strategy y in state s. is the long-term benefit brought by adopting strategy y in state s. When updating the Q matrix, both immediate benefit and long-term benefit are considered comprehensively. The ratio of immediate benefit to long-term benefit is controlled by parameter γ.
[0089] In the embodiment of the present application, the Q matrix is updated by comprehensively considering the immediate benefit and the long-term benefit, so that the determined volume adjustment strategy is more accurate, and the volume adjustment efficiency of the electronic device is further improved.
[0090] Optionally, determining the benefit corresponding to the volume adjustment strategy to be updated according to the second user operation information corresponding to the second input includes:
[0091] If the second user operation information is to reduce the volume, the benefit corresponding to the first volume adjustment strategy is reduced by the target value; and the benefit corresponding to the volume adjustment strategy of the previous volume adjustment operation is increased by the target value;
[0092] If the second user operation information is to increase the volume, the benefit corresponding to the first volume adjustment strategy is reduced by the target value; and the benefit corresponding to the volume adjustment strategy of the next volume adjustment operation is increased by the target value.
[0093] Specifically, in the embodiment of the present application, if the user operation information c' after the volume adjustment is to reduce the volume, it means that the volume is adjusted too high, and the benefit brought by the current volume operation is reduced by a fixed value Δv, which is expressed by the formula r(s,y * )=Q(s,y * )-Δv, increase the previous operation benefit of the current volume operation by a fixed value, expressed as r(s,y * -1)=Q(s,y * -1)+Δv, set r(s,y * +1)=Q(s,y * +1). The fixed value can be configured as needed and is a positive value.
[0094] If the user operation information c' after the volume adjustment is to increase the volume, it means that the volume is adjusted too small, and the benefit brought by the current volume operation is reduced by a fixed value, which can be expressed as r(s,y * )=Q(s,y * )-Δv, increase the benefit of the next operation after the current volume operation by a fixed value, expressed as r(s,y * +1)=Q(s,y * +1)+Δv, set r(s,y * -1)=Q(s,y * -1).
[0095] In the embodiment of the present application, the Q matrix is updated by comprehensively considering the immediate benefit and the long-term benefit, so that the determined volume adjustment strategy is more accurate, and the volume adjustment efficiency of the electronic device is further improved.
[0096] In an embodiment of the present application, if the user operation information after the volume adjustment is to reduce the volume, the benefit brought by the current volume operation is reduced by a fixed value; if the user operation information after the volume adjustment is to increase the volume, the benefit brought by the current volume operation is reduced by a fixed value, thereby continuously updating the Q matrix, making the determined volume adjustment strategy more accurate, and further improving the volume adjustment efficiency of the electronic device.
[0097] Optionally, after adjusting the volume according to the first volume adjustment strategy, the method further includes:
[0098] If no user input is received within a preset time period after the volume adjustment is performed, updating the revenue corresponding to the first volume adjustment strategy to a preset maximum value;
[0099] The Q matrix of the reinforcement learning is updated according to the preset maximum value.
[0100] Specifically, in the embodiment of the present application, if no user input is received within a preset time period after volume adjustment, it means that the volume has reached the user's expected volume after one time. At this time, the benefit corresponding to the first volume adjustment strategy is updated to a preset maximum value.
[0101] Then, the Q matrix of reinforcement learning is updated according to the preset maximum value.
[0102] In the embodiment of the present application, by continuously performing reinforcement learning on historical adjustment behaviors, the volume required by the user can be achieved through a single adjustment, further improving the efficiency of volume adjustment.
[0103] It should be noted that the volume adjustment method provided in the embodiment of the present application can be performed by a volume adjustment device or a control module in the volume adjustment device for performing the volume adjustment method. In the embodiment of the present application, the volume adjustment device performing the volume adjustment method is taken as an example to illustrate the volume adjustment device provided in the embodiment of the present application.
[0104] Figure 2 A schematic diagram of the structure of the volume adjustment device provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, the embodiment of the present application provides a volume adjustment device, including a first receiving module 201, an acquisition module 202, a reinforcement learning module 203 and an adjustment module 204, wherein:
[0105] The first receiving module 201 is used to receive a first input from a user for adjusting the volume; the acquisition module 202 is used to obtain application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device in response to the first input; the reinforcement learning module 203 is used to perform reinforcement learning based on the application type information, the usage scenario information and first user operation information corresponding to the first input to obtain a first volume adjustment strategy; the adjustment module 204 is used to adjust the volume according to the first volume adjustment strategy.
[0106] Optionally, the reinforcement learning module includes a first determination unit and a second determination unit;
[0107] The first determining unit is used to determine a current state of reinforcement learning according to the application type information, the usage scenario information and the first user operation information;
[0108] The second determination unit is used to determine the first volume adjustment strategy according to the current state and the Q matrix of reinforcement learning; the first volume adjustment strategy is a strategy corresponding to the maximum value in the strategy set corresponding to the current state in the Q matrix; the columns of the Q matrix represent the target state, and the rows represent the volume adjustment strategy under the target state.
[0109] Optionally, the device further includes a second receiving module and a first updating module;
[0110] The second receiving module is used to receive a second input from the user to adjust the volume again;
[0111] The first updating module is used to update the Q matrix of reinforcement learning in response to the second input.
[0112] Optionally, the first updating module includes a third determining unit and an updating unit;
[0113] The third determining unit is used to determine the benefit corresponding to the volume adjustment strategy to be updated according to the second user operation information corresponding to the second input;
[0114] The updating unit is used to update the Q matrix according to the benefit corresponding to the volume adjustment strategy to be updated.
[0115] Optionally, if the second user operation information is to reduce the volume, the third determination unit is used to reduce the benefit corresponding to the first volume adjustment strategy by a target value; and increase the benefit corresponding to the volume adjustment strategy of the previous volume adjustment operation by the target value;
[0116] If the second user operation information is to increase the volume, the third determining unit is configured to reduce the benefit corresponding to the first volume adjustment strategy by the target value; and increase the benefit corresponding to the volume adjustment strategy of the next volume adjustment operation by the target value.
[0117] Optionally, the device further includes a second updating module and a third updating module:
[0118] If no user input is received within a preset time period after the volume adjustment is performed, the second updating module is used to update the revenue corresponding to the first volume adjustment strategy to a preset maximum value;
[0119] The third updating module is used to update the Q matrix of reinforcement learning according to the preset maximum value.
[0120] The volume adjustment device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0121] The volume adjustment device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0122] The volume adjustment device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0123] Optionally, Figure 3 One of the hardware structure diagrams of the electronic device provided in the embodiment of the present application is as follows: Figure 3As shown, the embodiment of the present application further provides an electronic device 300, including a processor 301, a memory 302, and a program or instruction stored in the memory 302 and executable on the processor 301. When the program or instruction is executed by the processor 301, each process of the above-mentioned volume adjustment method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0124] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0125] Figure 4 The second schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application is as follows: Figure 4 As shown, the electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, and a processor 410 and other components.
[0126] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0127] The user input unit 407 is used to receive a first input from a user for adjusting the volume.
[0128] The processor 410 is configured to obtain, in response to the first input, application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device;
[0129] and performing reinforcement learning according to the application type information, the usage scenario information, and first user operation information corresponding to the first input to obtain a first volume adjustment strategy;
[0130] And the volume is adjusted according to the first volume adjustment strategy.
[0131] In an embodiment of the present application, reinforcement learning is performed based on application type information, usage scenario information, and user operation information to obtain a volume adjustment strategy, improve the volume adjustment efficiency of the electronic device, and improve the user experience.
[0132] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processor (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 409 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.
[0133] The embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned volume adjustment method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0134] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0135] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement each process of the above-mentioned volume adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0136] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0137] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0139] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A volume adjustment method, characterized in that: include: Receiving a first input from a user to adjust the volume; In response to the first input, obtaining application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device; Perform reinforcement learning according to the application type information, the usage scenario information, and first user operation information corresponding to the first input to obtain a first volume adjustment strategy; Performing volume adjustment according to the first volume adjustment strategy; The performing reinforcement learning according to the application type information, the usage scenario information, and the first user operation information corresponding to the first input to obtain a first volume adjustment strategy includes: Determining a current state of reinforcement learning according to the application type information, the usage scenario information, and the first user operation information; The first volume adjustment strategy is determined according to the current state and a Q matrix of reinforcement learning; the first volume adjustment strategy is a strategy corresponding to a maximum value in a strategy set corresponding to the current state in the Q matrix; the columns of the Q matrix represent target states, and the rows represent volume adjustment strategies under the target state.
2. The volume adjustment method according to claim 1, characterized in that: After the volume is adjusted according to the first volume adjustment strategy, the method further includes: receiving a second input from the user to adjust the volume again; In response to the second input, a Q matrix for reinforcement learning is updated.
3. The volume adjustment method according to claim 2, characterized in that: The updating of the Q matrix of the reinforcement learning includes: Determining a benefit corresponding to the volume adjustment strategy to be updated according to second user operation information corresponding to the second input; The Q matrix is updated according to the benefit corresponding to the volume adjustment strategy to be updated.
4. The volume adjustment method according to claim 3, characterized in that: The determining, according to the second user operation information corresponding to the second input, the benefit corresponding to the volume adjustment strategy to be updated includes: If the second user operation information is to reduce the volume, the benefit corresponding to the first volume adjustment strategy is reduced by the target value; and the benefit corresponding to the volume adjustment strategy of the previous volume adjustment operation is increased by the target value; If the second user operation information is to increase the volume, the benefit corresponding to the first volume adjustment strategy is reduced by the target value; and the benefit corresponding to the volume adjustment strategy of the next volume adjustment operation is increased by the target value.
5. The volume adjustment method according to claim 1, characterized in that: After the volume is adjusted according to the first volume adjustment strategy, the method further includes: If no user input is received within a preset time period after the volume adjustment is performed, updating the revenue corresponding to the first volume adjustment strategy to a preset maximum value; The Q matrix of the reinforcement learning is updated according to the preset maximum value.
6. A volume adjustment device, characterized in that: include: A first receiving module, configured to receive a first input from a user for adjusting the volume; an acquisition module, configured to acquire, in response to the first input, application type information corresponding to an application currently running on the electronic device and current usage scenario information of the electronic device; a reinforcement learning module, configured to perform reinforcement learning according to the application type information, the usage scenario information, and first user operation information corresponding to the first input, so as to obtain a first volume adjustment strategy; An adjustment module, configured to adjust the volume according to the first volume adjustment strategy; The reinforcement learning module includes a first determination unit and a second determination unit; The first determining unit is used to determine a current state of reinforcement learning according to the application type information, the usage scenario information and the first user operation information; The second determining unit is used to determine the first volume adjustment strategy according to the current state and the Q matrix of reinforcement learning; The first volume adjustment strategy is a strategy corresponding to the maximum value in the strategy set corresponding to the current state in the Q matrix; The columns of the Q matrix represent target states, and the rows represent volume adjustment strategies under the target states.
7. The volume control device according to claim 6, characterized in that: The device also includes a second receiving module and a first updating module; The second receiving module is used to receive a second input from the user to adjust the volume again; The first updating module is used to update the Q matrix of reinforcement learning in response to the second input.
8. The volume control device according to claim 7, characterized in that: The first updating module includes a third determining unit and an updating unit; The third determining unit is used to determine the benefit corresponding to the volume adjustment strategy to be updated according to the second user operation information corresponding to the second input; The updating unit is used to update the Q matrix according to the benefit corresponding to the volume adjustment strategy to be updated.
9. The volume control device according to claim 8, characterized in that: If the second user operation information is to reduce the volume, the third determining unit is used to reduce the benefit corresponding to the first volume adjustment strategy by the target value; and increase the benefit corresponding to the volume adjustment strategy of the previous volume adjustment operation by the target value; If the second user operation information is to increase the volume, the third determining unit is configured to reduce the benefit corresponding to the first volume adjustment strategy by the target value; and increase the benefit corresponding to the volume adjustment strategy of the next volume adjustment operation by the target value.
10. The volume control device according to claim 6, characterized in that: The device also includes a second update module and a third update module: If no user input is received within a preset time period after the volume adjustment is performed, the second updating module is used to update the revenue corresponding to the first volume adjustment strategy to a preset maximum value; The third updating module is used to update the Q matrix of reinforcement learning according to the preset maximum value.
11. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the volume adjustment method according to any one of claims 1 to 5.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the volume adjustment method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Electronic device volume control system and volume control method thereof
CN104978163A
Data updating method, client and electronic device
CN109145145A