Parameter adjusting method and device and electronic equipment
By using a sub-network system based on a network model in electronic devices, precise adjustment of the operating parameters of multiple functional devices can be achieved, solving the problem of insufficient adjustment accuracy in existing technologies and improving the targeting and accuracy of the adjustment.
Patent Information
- Application Number
- CN202511063574.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-07
AI Technical Summary
Existing technologies lack the accuracy to adjust the parameters of functional components in electronic devices, making it difficult to achieve precise adjustment of operating parameters.
By employing multiple sub-networks based on the first network model, the second input content of each sub-network is determined by the input content, thereby obtaining the target adjustment method of the functional device. The parameters are then adjusted by fusing the output content of the sub-networks, thus achieving precise adjustment of multiple functional devices.
This improves the accuracy of adjusting the operating parameters of functional devices, ensuring that the adjustment method for each device is more targeted, and enhancing the precision and efficiency of adjustment.
Smart Images

Figure CN120909727A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, more particularly, to a parameter adjustment method and device and electronic equipment. BACKGROUND
[0002] In the running process of the electronic equipment, the running parameters of the functional devices in the electronic equipment can be adjusted to adapt to specific situations. For example, the running frequency of the CPU (Central Processing Unit) or GPU (Graphics Processing Unit) in the electronic equipment can be adjusted. However, in the related manner, the accuracy of adjusting the parameters of the functional devices still needs to be improved. SUMMARY
[0003] In view of the above problems, the present application provides a parameter adjustment method, device and electronic equipment to improve the above problems.
[0004] In a first aspect, the present application provides a parameter adjustment method applied to an electronic equipment, comprising: obtaining, based on the functions of a plurality of sub-networks in a first network model, second input content of each of the plurality of sub-networks from first input content, the first input content being input of the first network model, the first input content representing a current running situation of the electronic equipment, the plurality of sub-networks corresponding to a plurality of functional devices in the electronic equipment one by one; obtaining, through the second input content of each of the plurality of sub-networks, first output content of each of the plurality of sub-networks, wherein the first output content of the sub-network represents a target adjustment mode of the functional device corresponding to the sub-network; obtaining, through the first output content of each of the plurality of sub-networks, second output content of the first network model, the second output content representing a target adjustment mode of the plurality of functional devices; and adjusting, through the second output content, running parameters of the plurality of functional devices.
[0005] In a second aspect, the present application provides a parameter adjustment apparatus, which is applied to an electronic device, and includes: a decomposition unit, configured to obtain, based on functions of a plurality of sub-networks in a first network model, second input content of each of the plurality of sub-networks from first input content, the first input content being input of the first network model, the first input content representing a current running state of the electronic device, the plurality of sub-networks corresponding to a plurality of functional devices in the electronic device one by one; a mode determination unit, configured to obtain first output content of each of the plurality of sub-networks through the second input content of each of the plurality of sub-networks, wherein the first output content of a sub-network represents a target adjustment mode of a functional device corresponding to the sub-network; a fusion unit, configured to obtain second output content of the first network model through the first output content of each of the plurality of sub-networks, the second output content representing target adjustment modes of the plurality of functional devices; and a parameter adjustment unit, configured to adjust running parameters of the plurality of functional devices through the second output content.
[0006] In a third aspect, the present application provides an electronic device, which includes at least a processor and a memory, and one or more programs are stored in the memory and configured to be executed by the processor to implement the above method.
[0007] In a fourth aspect, the present application provides a computer readable storage medium, which stores program codes, wherein the program codes are executed by a processor to implement the above method.
[0008] The parameter adjustment method, apparatus and electronic device provided by the present application can obtain, based on functions of a plurality of sub-networks in a first network model, second input content of each of the plurality of sub-networks from first input content input to the first network model, and when first output content of each of the plurality of sub-networks is obtained through the second input content of each of the plurality of sub-networks, second output content of the first network model can be obtained through the first output content of each of the plurality of sub-networks, so as to adjust running parameters of functional devices corresponding to each of the plurality of sub-networks through the second output content. In this way, the corresponding sub-network can be configured for a functional device requiring running parameter adjustment in the first network model, so that the target adjustment mode of each functional device can be determined through the sub-network corresponding to each functional device, and the determination of the target adjustment mode of each functional device is more targeted, thereby improving the accuracy of running parameter adjustment of the functional device. BRIEF DESCRIPTION OF DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0010] Figure 1 A schematic diagram of an application scenario of the parameter adjustment method in the embodiments of the present application is shown. Figure 2 A schematic diagram of another application scenario of the parameter adjustment method in the embodiments of the present application is shown. Figure 3 A flow chart of a parameter adjustment method according to an embodiment of the present application is shown. Figure 4 A schematic diagram of a first input content in the embodiments of the present application is shown. Figure 5 A flow chart of a parameter adjustment method according to another embodiment of the present application is shown. Figure 6 A schematic diagram of a first output content in the embodiments of the present application is shown. Figure 7 A schematic diagram of splicing multiple first output contents in the embodiments of the present application is shown. Figure 8 A schematic diagram of a second output content representing a target adjustment mode of multiple functional devices in the embodiments of the present application is shown. Figure 9 A schematic diagram of a first splicing content and a second splicing content in the embodiments of the present application is shown. Figure 10 A flow chart of a parameter adjustment method according to yet another embodiment of the present application is shown. Figure 11 A schematic diagram of the structure of multiple sub-networks in the embodiments of the present application is shown. Figure 12 A schematic diagram of the structure of a first network model in the embodiments of the present application is shown. Figure 13 A schematic diagram of model training through a PC terminal in the present application is shown. Figure 14 A schematic diagram of model training in an electronic device in the present application is shown. Figure 15 A structure block diagram of a parameter adjustment device according to an embodiment of the present application is shown. Figure 16 A structure block diagram of another electronic device for executing the parameter adjustment method according to the embodiments of the present application is shown. Figure 17 A storage unit for storing or carrying program code implementing the parameter adjustment method according to the embodiments of the present application. DETAILED DESCRIPTION
[0011] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0012] In the running process of an electronic device, adjusting the running parameters of functional devices in the electronic device is a means to optimize performance. For example, the running frequency of a central processing unit (CPU) and a graphics processing unit (GPU) can be adjusted to adapt to the current running situation of the electronic device. However, in related manners, the accuracy of parameter adjustment of functional devices in the electronic device still needs to be improved.
[0013] Therefore, the inventors found the above problems in research and proposed the parameter adjustment method, device and electronic device in the present application, which can improve the above problems. In the method, first, based on the functions of multiple sub-networks in a first network model, second input content of each of the multiple sub-networks can be obtained from first input content input into the first network model. When first output content of each of the multiple sub-networks is obtained through the second input content of each of the multiple sub-networks, second output content of the first network model can be obtained through the first output content of each of the multiple sub-networks, so as to adjust the running parameters of functional devices corresponding to each of the multiple sub-networks through the second output content. Thus, through the above manner, the corresponding sub-network can be configured for the functional device that needs to be adjusted in the first network model, so that the target adjustment manner of each functional device can be determined through the corresponding sub-network of each functional device, so that the determination of the target adjustment manner of each functional device has better pertinence, so as to improve the accuracy of running parameter adjustment of the functional device.
[0014] Before further detailing the embodiments of the present application, an application environment involved in the embodiments of the present application is introduced.
[0015] First, an exemplary application scenario involved in the embodiments of the present application is introduced.
[0016] In the embodiments of the present application, the parameter adjustment method provided can be executed by the electronic device. In this way executed by the electronic device, all steps in the parameter adjustment method provided by the embodiments of the present application can be executed by the electronic device. For example, as shown in Figure 1 , in the case that all steps in the parameter adjustment method provided by the embodiments of the present application are executed by the electronic device, all steps can be executed by the program for parameter adjustment in the electronic device.
[0017] Further, the parameter adjustment method provided by the embodiments of the present application can also be executed by an external device other than the electronic device. In this way executed by the external device, the external device can start to execute the steps in the parameter adjustment method in response to a trigger instruction. The trigger instruction can be sent by the user using the electronic device, or sent automatically by the electronic device, or can also be triggered locally by the external device in response to some automatic events. In this way, as shown in Figure 2 , the electronic device 100 can transmit the first input content representing the current running situation to the external device 200, and the external device 200 can obtain the second output content by executing the method provided by the embodiments of the present application after obtaining the first input content. In this case, the plurality of sub-networks included in the first network model in the external device 200 correspond one-to-one to the plurality of functional devices in the electronic device 100. After the external device 200 obtains the second output content, the second output content can be transmitted to the electronic device 100, so that the electronic device 100 adjusts the running parameters of the plurality of functional devices in the electronic device through the second output content.
[0018] It should be noted that the electronic device 100 can be a smart phone as shown in Figure 1 and Figure 2 , but can also be a tablet computer, a smart watch, a smart voice assistant, etc. The external device 200 can be a server located in the cloud, or the external device 200 can be a local device in the same local area network as the electronic device 100, wherein the category of the external device 200 can be the same as or different from that of the electronic device 100.
[0019] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0020] Please refer to Figure 3 , the parameter adjustment method provided by the embodiments of the present application, the method comprises: S110: obtaining, from the first input content, second input content for each of a plurality of sub-networks in the first network model, the first input content being input to the first network model, the first input content representing a current running condition of the electronic device, the plurality of sub-networks corresponding to a plurality of functional devices in the electronic device one by one.
[0021] In the embodiments of the present application, the first network model can be understood as a model for adjusting parameters of a plurality of functional devices in the electronic device. Wherein, the plurality of functional devices can be understood as two or more functional devices. Wherein, the functional device can be understood as a hardware device in the electronic device that can realize a certain function. For example, the functional device can be CPU, GPU, NPU (Neural Network Processing), memory, camera, positioning module, sensor, etc. In the embodiments of the present application, the plurality of functional devices participating in the running parameter adjustment can be selected by the user according to his own needs, or pre-configured by the developer.
[0022] In the embodiments of the present application, in order to realize the synchronous output of the adjustment mode of the plurality of functional devices, a plurality of sub-networks corresponding to the plurality of functional devices one by one are included in the first network model. That is, for each functional device participating in the running parameter adjustment, there will be a corresponding sub-network in the first network model. For example, if the plurality of functional devices include CPU and GPU, the first network model can include a sub-network corresponding to the CPU and a sub-network corresponding to the GPU. For another example, if the plurality of functional devices include CPU and memory, the first network model can include a sub-network corresponding to the CPU and a sub-network corresponding to the memory.
[0023] In the running process of the first network model, the first input content can be input to the first network model. Wherein, the first input content is content representing the current running condition of the electronic device. Wherein, the current running condition of the electronic device includes the running condition of each functional device corresponding to the plurality of sub-networks, and other running conditions. Wherein, the running condition of the functional device can be configured according to the function of the functional device. For example, in the case of the functional device being CPU and GPU, the running condition corresponding to the CPU can include: the current running frequency, the current real-time utilization rate, the supported maximum running frequency, the supported minimum running frequency. The running condition corresponding to the GPU can include: the current running frequency, the dynamic frequency upper limit, the minimum guarantee frequency. Other running conditions can include one or more of the current temperature, power, memory remaining condition, running task, whether it is touched, etc.
[0024] Exemplarily, in the case that the plurality of functional devices include a CPU and a GPU, the content included in the first input content can be as shown in Figure 4 In the first input content as shown in 4, the content of 26 dimensions is included. Among them, in the case that the CPU includes 4 clusters, the real-time utilization, the current running frequency, the maximum supported running frequency, and the minimum supported running frequency are included for each cluster, thus, in the case that the CPU includes 4 clusters, the content of 16 dimensions in the content of 26 dimensions included in the first input content is the content about the CPU. Among them, the content about the GPU can include the content of 3 dimensions such as the current running frequency of the GPU, the upper limit of the dynamic frequency adjustment of the GPU, and the minimum guarantee frequency of the GPU. Figure 4 The system information and the task information shown in
[0025] As shown in the foregoing content, the first input content can include the content of multiple dimensions (or aspects). However, for the sub-network, it can not be necessary to input all the content in the first input content. For example, for the sub-network corresponding to the CPU, the function thereof is to output the target adjustment mode from the plurality of candidate adjustment modes of the CPU, thus, the content related to the GPU can not be input into the sub-network corresponding to the CPU. Similarly, for the sub-network corresponding to the GPU, the function thereof is to output the target adjustment mode for the GPU, thus, the content related to the CPU can not be input into the sub-network corresponding to the GPU.
[0026] Thus, after obtaining the first input content, the corresponding second input content can be obtained from the first input content based on the function of each sub-network. That is, the second input content can be understood as the input content of the sub-network. Among them, the function of each sub-network is to output the target adjustment mode of the corresponding functional device, thus, the function (role) of each sub-network is determined by the functional device corresponding to the sub-network. Correspondingly, the determination of the second input content is also based on the function of the sub-network. Optionally, the second input content can be part of the content in the first input content, and optionally, the second input content can include all the content in the first input content.
[0027] Exemplarily, please refer to Figure 4 , based on the first input content as shown in Figure 4 , the determination of the second input content for each sub-network can be as follows: the second input content of the sub-network corresponding to the CPU can include the real-time utilization of the CPU, the current running frequency of the CPU, the maximum frequency supported by the CPU, the minimum frequency supported by the CPU, the system information, and the task information. The second input content of the sub-network corresponding to the GPU can include the current running frequency of the GPU, the upper limit of the dynamic frequency adjustment of the GPU, the minimum guarantee frequency of the GPU, the system information, and the task information.
[0028] As a manner, a decomposition layer can be configured in the first network model, and the decomposition layer can be used to perform a function based on a plurality of sub-networks in the first network model to obtain a plurality of second input contents of the plurality of sub-networks from a first input content.
[0029] S120: obtaining a plurality of first output contents of the plurality of sub-networks respectively by the plurality of second input contents of the plurality of sub-networks respectively, wherein the first output content of the sub-network represents a target adjustment mode of a functional device corresponding to the sub-network.
[0030] In the case of obtaining the plurality of second input contents of the plurality of sub-networks respectively, the second input contents can be input into the corresponding sub-networks, so that the plurality of sub-networks can obtain the first output contents according to the second input contents, wherein the first output content of the sub-network represents a target adjustment mode of a functional device corresponding to the sub-network. In the embodiment of the present application, each functional device can correspond to a plurality of candidate adjustment modes, wherein the target adjustment mode can be understood as the adjustment mode finally adopted by the sub-network from the plurality of candidate adjustment modes. Wherein the plurality of candidate adjustment modes of the functional device can be understood as a plurality of adjustment modes supported by the functional device. In the embodiment of the present application, the plurality of adjustment modes supported by each functional device can be determined according to the function or characteristics of the functional device itself.
[0031] For example, taking the functional device as a CPU, the CPU corresponds to N available running frequencies. In this case, each adjustment of the CPU can be to adjust the running frequency of the CPU to one available running frequency, therefore, the CPU supports N adjustment modes, or it can also be understood that the candidate adjustment modes of the CPU are N. For example, taking the functional device as a sensor, the sensor can correspond to M data acquisition frequencies, each adjustment of the sensor can be to adjust the data acquisition frequency of the sensor to one available data acquisition frequency, therefore, in the case that the sensor corresponds to M data acquisition frequencies, it can be understood that M adjustment modes are supported, or it can also be understood that the candidate adjustment modes of the sensor are M. For example, taking the functional device as a camera, the camera can support video recording based on L resolutions, each adjustment of the camera can be to adjust the resolution of the video collected by the camera to one available resolution, therefore, in the case that the camera corresponds to L video recording resolutions, it can be understood that L adjustment modes are supported.
[0032] In addition, in the embodiment of the present application, for each candidate adjustment mode of the functional device, a plurality of running parameters of the functional device can be adjusted synchronously.
[0033] S130: obtaining second output content of the first network model by the first output content of each of the plurality of sub-networks, the second output content representing the target adjustment mode of the plurality of functional devices.
[0034] In the embodiment of the present application, the target adjustment mode of the plurality of functional devices is represented based on the output of the first network model, and therefore, after obtaining the first output content output by each of the plurality of sub-networks, the first output content output by each of the plurality of sub-networks can be fused to obtain the second output content of the first network model. The fusion of the first output content output by each of the plurality of sub-networks can be understood as enabling the second output content obtained finally to carry the information carried by the first output content output by each of the plurality of sub-networks, so that the second output content can represent the target adjustment mode of the plurality of functional devices.
[0035] S140: adjusting the operating parameters of the plurality of functional devices based on the second output content.
[0036] When the second output content can represent the target adjustment mode of the plurality of functional devices, the operating parameters of the plurality of functional devices can be adjusted based on the target adjustment mode represented by the second output content. For example, when the plurality of functional devices include a CPU and a GPU, and the second output content represents increasing the operating frequency of the CPU and decreasing the operating frequency of the GPU, the operating frequency of the CPU can be increased and the operating frequency of the GPU can be decreased.
[0037] The parameter adjustment method provided in the embodiment enables the corresponding sub-network to be configured for the functional device that needs to be adjusted in the first network model, so that the target adjustment mode of each functional device can be determined by the corresponding sub-network of each functional device, and the determination of the target adjustment mode of each functional device is more targeted, thereby improving the accuracy of the adjustment of the operating parameters of the functional device.
[0038] Please refer to Figure 5 The parameter adjustment method provided in the embodiment of the present application comprises: S210: obtaining second input content of each of the plurality of sub-networks from first input content based on the functions of the plurality of sub-networks in the first network model, the first input content being input of the first network model, the first input content representing the current operating condition of the electronic device, and the plurality of sub-networks corresponding to the plurality of functional devices in the electronic device one by one.
[0039] S220: Obtain the first output content of each of the multiple sub-networks through the second input content of each of the multiple sub-networks. The first output content of the sub-network represents the target adjustment mode of the functional device corresponding to the sub-network. Each first output content includes multiple elements, and the multiple elements represent the adoption probability of each of the multiple candidate adjustment modes of the functional device. The target adjustment mode represented by the first output content is the candidate adjustment mode with the highest adoption probability.
[0040] In this embodiment, the first output content may include multiple elements, which represent the adoption probability of various candidate adjustment methods for the functional device. That is, each element represents the adoption probability of a candidate adjustment method. In this case, the number of elements included in the first output content of the sub-network can be the same as the number of candidate adjustment methods of the functional device corresponding to the sub-network.
[0041] For example, such as Figure 6 As shown, if the functional device corresponding to the sub-network supports four adjustment modes, the first output of the sub-network can include four elements: N1, N2, N3, and N4. These four adjustment modes can be adjustment mode T1, T2, T3, and T4. In this case, element N1 represents the probability of using adjustment mode T1, element N2 represents the probability of using adjustment mode T2, element N3 represents the probability of using adjustment mode T3, and element N4 represents the probability of using adjustment mode T4. For example, if the probability of using element N4 is the highest, then the target adjustment mode can be determined to be adjustment mode T4.
[0042] S230: The first output content of each of the plurality of sub-networks is spliced together to obtain the second output content of the first network model, wherein the second output content represents the target adjustment mode of the plurality of functional devices.
[0043] In this embodiment, given the first output content of each of the multiple sub-networks, the second output content of the first network model can be obtained by concatenating the first output content of each of the multiple sub-networks. Concatenating the first output content of the multiple sub-networks can be understood as linking the first output content of each of the multiple sub-networks sequentially end-to-end to obtain the second output content. In this case, the second output content can include all elements from the first output content of each of the multiple sub-networks.
[0044] For example, the first output content of each of the multiple sub-networks can be as follows: Figure 7The first output content of the sub-network Z1 includes the element N1, the element N2, the element N3 and the element N4, and the first output content of the sub-network Z2 includes the element N5, the element N6 and the element N7. After splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2, the second output content obtained includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. It can be found that the second output content can include all elements in the plurality of first output contents participating in splicing, and therefore, the second output content can represent the target adjustment mode represented by each first output content. For example, as shown in FIG. 1B, the second output content obtained by splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2 includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. Figure 8 As shown in FIG. 1B, Figure 8 The first output content of the sub-network Z1 includes the element N1, the element N2, the element N3 and the element N4, and the first output content of the sub-network Z2 includes the element N5, the element N6 and the element N7. After splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2, the second output content obtained includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. It can be found that the second output content can include all elements in the plurality of first output contents participating in splicing, and therefore, the second output content can represent the target adjustment mode represented by each first output content. For example, as shown in FIG. 1B, the second output content obtained by splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2 includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. Figure 7 The first output content of the sub-network Z1 includes the element N1, the element N2, the element N3 and the element N4, and the first output content of the sub-network Z2 includes the element N5, the element N6 and the element N7. After splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2, the second output content obtained includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. It can be found that the second output content can include all elements in the plurality of first output contents participating in splicing, and therefore, the second output content can represent the target adjustment mode represented by each first output content. For example, as shown in FIG. 1B, the second output content obtained by splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2 includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. Figure 7 The first output content of the sub-network Z1 includes the element N1, the element N2, the element N3 and the element N4, and the first output content of the sub-network Z2 includes the element N5, the element N6 and the element N7. After splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2, the second output content obtained includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. It can be found that the second output content can include all elements in the plurality of first output contents participating in splicing, and therefore, the second output content can represent the target adjustment mode represented by each first output content. For example, as shown in FIG. 1B, the second output content obtained by splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2 includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. Figure 8 The first output content of the sub-network Z1 includes the element N1, the element N2, the element N3 and the element N4, and the first output content of the sub-network Z2 includes the element N5, the element N6 and the element N7. After splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2, the second output content obtained includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7. It can be found that the second output content can include all elements in the plurality of first output contents participating in splicing, and therefore, the second output content can represent the target adjustment mode represented by each first output content. For example, as shown in FIG. 1B, the second output content obtained by splicing the first output content of the sub-network Z1 and the first output content of the sub-network Z2 includes the element N1, the element N2, the element N3, the element N4, the element N5, the element N6 and the element N7.
[0045] It should be noted that the first network model is a model obtained through training in advance. Correspondingly, the plurality of sub-networks in the first network model are also obtained through training in advance. Therefore, in order to enable the sub-networks to better adapt to the current running task of the electronic device when determining the target adjustment mode of the corresponding functional device, as a manner, the process of splicing the first output content of each of the plurality of sub-networks to obtain the second output content of the first network model can include: updating the elements in the first output content of each of the plurality of sub-networks through the current running task of the electronic device to obtain updated plurality of first output contents; and splicing the updated plurality of first output contents to obtain the second output content of the first network model. Although the current running task of the electronic device can be included in the first input content, however, the elements in the first output content output by the sub-network are updated through the current running task of the electronic device after obtaining the first output content, which is conducive to making the determined target adjustment mode more matched with the current running task of the electronic device.
[0046] For example, the functional device corresponding to the sub-network is a GPU, and the plurality of candidate adjustment modes corresponding to the GPU can include: increasing the running frequency, keeping the current running frequency (which can also be understood as not adjusting at present), and reducing the running frequency. The first output content originally output by the sub-network can be [0.2, 0.3, 0.5], where 0.2 is the adoption probability of the adjustment mode of increasing the running frequency, 0.3 is the adoption probability of the adjustment mode of keeping the current running frequency, and 0.5 is the adoption probability of the adjustment mode of reducing the running frequency. After the elements in the first output content are updated by the current running task of the electronic device, the updated first output content can be [0.2, 0.5, 0.3], and it can be found that the adoption probability of the adjustment mode of keeping the current running frequency changes from 0.3 to 0.5, and the adoption probability of the adjustment mode of reducing the running frequency changes from 0.5 to 0.3, so that the target adjustment mode represented by the updated first output content is to keep the current running frequency.
[0047] Optionally, the updating of the elements in the first output content of each sub-network by the current running task of the electronic device to obtain the updated plurality of first output contents comprises: determining an update weight of the first output content output by each sub-network by the current running task of the electronic device; updating the elements in the first output content of each sub-network by the update weight to obtain the updated plurality of first output contents. As described above, the elements in the first output content represent the adoption probability of a candidate adjustment mode. Therefore, updating the elements in the first output content of each sub-network by the update weight can be understood as multiplying the adoption probability of the elements in the first output content by the corresponding update weight to obtain the current adoption probability of the elements.
[0048] As a way, the splicing of the first output content of each sub-network to obtain the second output content of the first network model can include: splicing the first output content of each sub-network to obtain first splicing content; normalizing the elements in the first splicing content to obtain second splicing content; and obtaining the second output content of the first network model by the second splicing content.
[0049] In this embodiment, when multiple elements in the first output content of each sub-network are in probabilistic form, the sum of the probabilities represented by each element in the first output content is 1. For example, if the first output content includes elements N1, N2, N3, and N4, then the sum of the adoption probabilities represented by each element N1, N2, N3, and N4 is 1. However, for the first network model, the first output content of each of the multiple sub-networks can be considered as a whole. Therefore, the elements in the first concatenated content can be normalized to obtain the second concatenated content. In this case, the sum of the adoption probabilities represented by all elements in the second concatenated content is 1.
[0050] For example, such as Figure 9 As shown, after concatenating the first output content of subnetwork Z1 and the first output content of subnetwork Z2, the elements in the resulting first concatenated content may include elements N1, N2, N3, N4, N5, N6, and N7. In the first concatenated content, the sum of the adoption probabilities represented by elements N1, N2, N3, and N4 is 1, and the sum of the adoption probabilities represented by elements N5, N6, and N7 is 1. After normalizing the first concatenated content, the elements in the resulting second concatenated content include elements N8, N9, N10, N11, N12, N13, and N14. In this context, element N8 corresponds to element N1, element N9 corresponds to element N2, element N10 corresponds to element N3, element N11 corresponds to element N4, element N12 corresponds to element N5, element N13 corresponds to element N6, and element N14 corresponds to element N7. In the resulting second concatenation elements, the sum of the adoption probabilities represented by elements N8, N9, N10, N11, N12, N13, and N14 is 1.
[0051] S240: Adjust the operating parameters of the plurality of functional devices through the second output content.
[0052] The parameter adjustment method provided in this embodiment can be used to separately configure a corresponding sub-network for a functional device that needs to be adjusted in the first network model, so that the target adjustment mode of each functional device can be determined through the corresponding sub-network of each functional device, and the determination of the target adjustment mode of each functional device is more targeted, thereby improving the accuracy of the adjustment of the functional device. In this embodiment, each first output content includes a plurality of elements, and the plurality of elements represent the adoption probability of each candidate adjustment mode of the functional device. When the first output content represents the determined target adjustment mode by using probability, the first output content output by each sub-network can be spliced to obtain the second output content of the first network model.
[0053] It should be noted that in the related manner, a one-hot encoding manner can be used to represent the target adjustment mode adopted by each functional device. In this case, the dimension of the final output content of the network model is the product of the number of candidate adjustment modes of the plurality of functional devices. However, in this embodiment, the target adjustment mode of the functional device is determined by the probability corresponding to each element in the first output content, so that the first output content of each sub-network can be spliced to obtain the final output second output content. When the second output content is obtained by splicing, the dimension of the second output content can be the sum of the dimensions of the first output content output by each sub-network, thereby facilitating the reduction of the dimension of the second output content.
[0054] For example, the plurality of functional devices can include functional device Q1 supporting 4 adjustment modes and functional device Q2 supporting 3 adjustment modes. In this case, there are 4*3=12 adjustment modes in total when the adjustment of functional device Q1 and functional device Q2 is synchronized. In this case, if the final output content is represented by one-hot encoding, the dimension of the final output content needs to be 12 if the adjustment mode of functional device Q1 and functional device Q2 is represented by one of the 12 adjustment modes. It should be noted that in one-hot encoding, each element in the encoding is 1 and the other elements are 0. The adjustment mode represented by the current encoding can be changed by changing the position of 1. Therefore, in order to represent 12 combinations of adjustment modes, 12 dimensions of one-hot encoding are needed. For example, the 12 dimensions of one-hot encoding can be "100000000000", "010000000000", "001000000000",..., or "000000000001". However, in the method provided in the embodiment, the target adjustment mode can be represented by the probability represented by each element in the first output content. In the case of functional device Q1 supporting 4 adjustment modes and functional device Q2 supporting 3 adjustment modes, the dimension of the first output content output by the subnetwork corresponding to functional device Q1 can be 4 (including 4 elements), and the dimension of the first output content output by the subnetwork corresponding to functional device Q2 can be 3 (including 3 elements). The dimension of the second output content obtained by splicing is 7, which can significantly reduce the dimension of the final output content.
[0055] Referring to Figure 10 The parameter adjustment method provided in the embodiment of the present application comprises the following steps. S310: obtaining, based on the functions of the plurality of subnetworks in the first network model, second input content of each of the plurality of subnetworks from first input content, the first input content being input of the first network model, the first input content representing a current running condition of the electronic device, the plurality of subnetworks corresponding to a plurality of functional devices in the electronic device one by one, and the network structure of the subnetwork being determined by the number of candidate adjustment modes of the functional device corresponding to the subnetwork.
[0056] In the embodiments of the present application, each sub-network is used to output the target adjustment mode of the corresponding functional device, which means that the functions corresponding to different sub-networks are different, and therefore, the network structures of different sub-networks can be different. As a manner, in order to enable the sub-network to more accurately determine the target adjustment mode of the corresponding functional device, the network structure of the sub-network is determined by the number of candidate adjustment modes of the corresponding functional device. It should be noted that in the case that the candidate adjustment modes of the functional device are more, the sub-network corresponding to the functional device needs a more complex reasoning process to more accurately determine the target adjustment mode. Therefore, in the case that the candidate adjustment modes of the functional device are more, the network structure of the corresponding sub-network can be more complex to realize a more complex reasoning process.
[0057] When a functional device has a large number of candidate adjustment modes, the decision-making process for selecting the most suitable, most efficient or safest target adjustment mode for the functional device becomes relatively more complex. This complexity is reflected in multiple aspects: the potential effects of each adjustment mode, the compatibility between them, the impact on the overall state of the system, the possible constraints, and the optimization degree of achieving the expected function, etc. The increase in the number of candidate adjustment modes means that the decision-making space is significantly expanded, and the potential causal relationships, association rules and conditional dependencies involved are more diverse and fine. In order to bear and effectively solve the above complex reasoning challenges, the sub-network responsible for selecting the target adjustment mode for the functional device needs to have a processing capability that matches it.
[0058] For example, in the case of a CPU, when the candidate adjustment modes include increasing the running frequency, reducing the running frequency, or switching to a specified running frequency, the sub-network corresponding to the CPU needs a more complex reasoning process to accurately determine the target adjustment mode. The frequency adjustment of the CPU directly affects its performance (such as computing speed), power consumption (such as heat generation) and stability (such as temperature threshold), and different application scenarios (such as games, video rendering or daily office work) have significant differences in the balance of the three. For example, the game scenario needs high-frequency operation to guarantee the frame rate, but high frequency will cause a sharp increase in power consumption and temperature rise, which may trigger system frequency reduction protection; video rendering may focus more on stability under long-time high load, and needs to dynamically adjust the frequency to avoid overheating; daily office work tends to be low-frequency energy-saving to prolong the endurance.
[0059] As a manner, each sub-network includes a plurality of serially connected fully connected layers, wherein the number of nodes in each fully connected layer is determined by the number of candidate adjustment modes of the functional device corresponding to the sub-network. Optionally, the more the candidate adjustment modes of the functional device, the more the number of nodes in the fully connected layer of the corresponding sub-network. For example, as shown in Figure 11 , in Figure 11The CPU corresponding sub-network Z3 and the GPU corresponding sub-network Z4 are shown in FIG. 3. The number of nodes in each fully connected layer in the CPU corresponding sub-network Z3 is more than that in the GPU corresponding sub-network Z4, because the CPU has more candidate adjustment modes than the GPU.
[0060] In the scenario where the functional device is a CPU, when the candidate adjustment mode includes increasing the running frequency, decreasing the running frequency, and switching to a specified running frequency, the CPU corresponding sub-network needs to implement accurate reasoning through a more complex structure. As mentioned above, the frequency adjustment of the CPU involves the dynamic balance of performance, power consumption, and temperature. Increasing the running frequency can improve the calculation speed but increase the heat, decreasing the running frequency can save energy but may affect the task efficiency, and switching to a specified running frequency needs to consider the current load and system constraints. In the case where the sub-network is composed of multiple serially connected fully connected layers, its complexity can be further improved by increasing the number of nodes in the fully connected layers. For example, the first fully connected layer (e.g., including 64 nodes) can preliminarily extract local features from the second input content, the second fully connected layer (e.g., including 128 nodes) integrates the features through a nonlinear activation function (such as ReLU), and the third fully connected layer (e.g., including 64 nodes) further models the multi-core collaborative relationship. The final output layer selects the optimal solution from the candidate adjustment mode through Softmax classification to output the first output content representing the target adjustment mode.
[0061] S320: Obtain the first output content of each sub-network through the second input content of each sub-network, wherein the first output content of the sub-network represents the target adjustment mode of the functional device corresponding to the sub-network.
[0062] S330: Obtain the second output content of the first network model through the first output content of each sub-network, wherein the second output content represents the target adjustment mode of the plurality of functional devices.
[0063] S340: Adjust the running parameters of the plurality of functional devices through the second output content.
[0064] The parameter adjustment method provided in this embodiment improves the accuracy of running parameter adjustment of the functional device in the above manner. In this embodiment, the network structure of each sub-network is determined by the number of candidate adjustment modes of the functional device corresponding to the sub-network, so that the network structure of the sub-network in the first network model can be adjusted according to the functional device participating in the parameter adjustment, so that the first network model has higher adaptability and further improves the parameter adjustment capability of the first network model.
[0065] The following section will use multiple functional devices, including a CPU and a GPU, and multiple sub-networks, including the sub-network corresponding to the CPU and the sub-network corresponding to the GPU, as an example to introduce a first network model and corresponding processing flow involved in the embodiments of this application.
[0066] like Figure 12 As shown, in Figure 12 The first network model shown includes an input layer, a processing layer, a decomposition layer, a sub-network corresponding to the CPU, a sub-network corresponding to the GPU, an output fusion layer, a normalization layer, and a mapping layer.
[0067] The input layer is used to input the first input content (e.g., the aforementioned 26-dimensional input content). After receiving the first input content, the input layer can transmit it to the processing layer so that the processing layer can preprocess the first input content. This preprocessing may include converting multiple categories of content in the first input content to the same data format. For example, the content of multiple categories in the first input content can be normalized separately.
[0068] The decomposition layer is used to decompose the preprocessed first input content to obtain the second input content for each sub-network. For example, for the sub-network corresponding to the CPU, its second input content is related to determining the target adjustment method of the CPU. For the sub-network corresponding to the GPU, its second input content is related to determining the target adjustment method of the GPU.
[0069] The output of each sub-network is then transmitted to the output fusion layer for fusion. Figure 12 In the example shown, the first output of each sub-network may include multiple elements, each element representing the probability of adopting a candidate adjustment method, and the number of elements included in the first output is the same as the number of candidate adjustment methods of the functional device corresponding to the sub-network.
[0070] The output fusion layer concatenates the first outputs of each sub-network to obtain the first concatenated content. This first concatenated content then undergoes normalization processing to obtain the second concatenated content. This second concatenated content is then input into the mapping layer to obtain the second output content. It should be noted that, as mentioned earlier, when the first output content includes multiple elements, the target adjustment method can be determined by the adoption probability represented by each element. The mapping layer records the element at each position, specifically representing the adoption probability of which candidate adjustment method.
[0071] For example, in the mapping layer, the first four elements can be recorded as elements corresponding to the candidate adjustment modes of the CPU, and the last three elements can be recorded as elements corresponding to the candidate adjustment modes of the GPU. In addition, the first four elements and the specific candidate adjustment modes corresponding to each element can be recorded, and the last three elements and the specific candidate adjustment modes corresponding to each element can also be recorded. Therefore, in the mapping layer, the target adjustment mode of the CPU and the target adjustment mode of the GPU can be determined according to the adoption probability involved in the second splicing content.
[0072] In an embodiment of the present application, as a way, the plurality of sub-networks can be configured in the first network model in a plug-in manner. The configuration manner of the plug-in sub-network in the first network model can significantly improve the flexibility, maintainability and resource efficiency of the system. This way, through modular design, the complex network function is divided into multiple independent sub-networks, each sub-network exists in the form of plug-in and can be dynamically loaded or unloaded. This architecture allows flexible configuration of sub-networks according to actual needs, such as quickly integrating third-party developed plug-ins through standardized interfaces, thereby enriching system functions and adapting to different scenarios. At the same time, the independence of sub-networks reduces the maintenance complexity, and the fault isolation mechanism ensures that a single plug-in problem does not affect the overall system, improving stability. In addition, dynamic resource allocation optimizes hardware utilization, avoids resource waste, and parallel development capability shortens project cycle.
[0073] In an embodiment of the present application, the specific network type or training method of the first network model is not specifically limited, as long as the first network model can output the target adjustment mode of the plurality of functional devices and support further division into a plurality of sub-networks.
[0074] As a way, the first network model can be trained based on a reinforcement learning (RL) method. In this way, the plurality of sub-networks included in the first network model are also trained based on the reinforcement learning method. In the case where the first network model includes a plurality of sub-networks, it can be understood that the first network model is a hierarchical architecture design. In the case where the sub-networks are trained based on the reinforcement learning method, the first network model is a hierarchical architecture design based on reinforcement learning.
[0075] Among them, reinforcement learning is a branch of machine learning, which aims to learn a decision-making policy through the interaction of an agent (for example, the subnetwork involved in the embodiments of the application) with the environment (for example, the running environment included in the electronic device) to maximize the long-term cumulative reward. In reinforcement learning, the agent influences the environment by performing a series of actions, thereby obtaining a feedback signal (reward or punishment). The goal of reinforcement learning is to maximize cumulative rewards by learning a policy that selects the best action in different states. The policy can be deterministic (always output the same action in a given state) or stochastic (output different actions with a certain probability in a given state). For example, in a reinforcement learning-based manner, after the subnetwork (a kind of agent) learns the optimal decision-making policy by interacting with the environment, the subnetwork can be applied to the adjustment of the running frequency of the CPU and / or GPU. The adjustment goal can be to dynamically adjust the running frequency of the CPU and / or GPU according to the current running situation of the electronic device (for example, workload, running state (such as temperature, load, etc.) and user performance demand), so as to reduce energy consumption and heat generation while ensuring performance.
[0076] In a related training manner, as shown in Figure 13 , the second network model to be trained can be trained on the PC (Personal Computer) side to obtain the first network model, and then the first network model is deployed in the electronic device to execute the parameter adjustment method involved in the embodiments of the application. However, in the case of training the second network model to be trained through the PC side, when the PC side and the electronic device transmit data through adb (debug tool) or socket, there will be a large time delay. This time delay makes the model trained by the PC side have a certain error with the actual decision-making environment of the electronic device, making it difficult to reflect the real-time changes of the complex scene in the electronic device. In order to improve this situation, in the embodiments of the application, the electronic device includes a virtual machine for model training, in which case the virtual machine can be deployed with an environment for model training, as shown in Figure 14 , so that the second network model to be trained can be trained in the virtual machine to obtain the first network model, for example, the plurality of subnetworks in the first network model are obtained by training in the virtual machine based on the reinforcement learning manner.
[0077] Compared with the transmission scheme of the debugging tool ADB (Android Debug Bridge) used, the manner of training in the virtual machine of the electronic device can realize a great reduction of data collection delay from the order of 100 milliseconds (80-120 ms) to the order of milliseconds (0.8-1.2 ms), and realizes a performance improvement of nearly 100 times. The memory overhead in the training process is only 1.8% (about 72 MB), the CPU occupancy is controlled at 18.7%, and the power consumption of 60 minutes only increases by 3%, which shows excellent energy efficiency ratio. This achievement can support the electronic device to perform real-time model training and strategy optimization without affecting the user experience, and provides a reliable technical practice for adaptive learning of the electronic device.
[0078] For reference Figure 15 The parameter adjustment device 400 provided by the embodiment of the present application runs in the electronic device, and the device 400 comprises: The decomposition unit 410 is configured to obtain second input content of each of a plurality of sub-networks from first input content based on functions of the plurality of sub-networks in a first network model, the first input content being input of the first network model, the first input content representing a current running condition of the electronic device, and the plurality of sub-networks corresponding to a plurality of functional devices in the electronic device one by one.
[0079] The manner determination unit 420 is configured to obtain first output content of each of the plurality of sub-networks through the second input content of each of the plurality of sub-networks, wherein the first output content of the sub-network represents a target adjustment manner of the functional device corresponding to the sub-network.
[0080] The fusion unit 430 is configured to obtain second output content of the first network model through the first output content of each of the plurality of sub-networks, the second output content representing a target adjustment manner of the plurality of functional devices.
[0081] The parameter adjustment unit 440 is configured to adjust a running parameter of the plurality of functional devices through the second output content.
[0082] As a manner, each of the first output content comprises a plurality of elements, the plurality of elements representing an adoption probability of each of a plurality of candidate adjustment manners of the functional device, wherein the target adjustment manner represented by the first output content is the candidate adjustment manner with the maximum adoption probability. In this case, the fusion unit 430 is specifically configured to splice the first output content of each of the plurality of sub-networks to obtain the second output content of the first network model.
[0083] Optionally, the fusion unit 430 is specifically configured to update elements in the first output content of each of the plurality of sub-networks to obtain updated first output content according to a current running task of the electronic device; and splice the updated first output content to obtain the second output content of the first network model. Optionally, the fusion unit 430 is specifically configured to determine an update weight of the first output content output by each sub-network according to the current running task of the electronic device; and update elements in the first output content of each of the plurality of sub-networks according to the update weight to obtain updated first output content.
[0084] As a manner, the first network model comprises a decomposition layer. In this case, the decomposition unit 410 is specifically configured to obtain the second input content of each of the plurality of sub-networks from the first input content according to the decomposition layer and functions of the plurality of sub-networks in the first network model.
[0085] The parameter adjustment provided in the embodiment can be realized by the above device, so that a corresponding sub-network can be configured for a functional device that needs to be adjusted in the first network model, so that the target adjustment mode of each functional device can be determined by the corresponding sub-network of each functional device, and the determination of the target adjustment mode of each functional device is more targeted, so as to improve the accuracy of the running parameter adjustment of the functional device.
[0086] It should be noted that the device embodiments in the present application correspond to the foregoing method embodiments, and the specific principles of the device embodiments can be referred to the contents of the foregoing method embodiments, which will not be described here.
[0087] The following will be combined with Figure 16 An electronic device provided in the present application will be described.
[0088] Please refer to Figure 16 Based on the above parameter adjustment method and device, the present embodiment further provides another electronic device 100 that can execute the foregoing parameter adjustment method. The electronic device 100 comprises one or more (only one is shown in the figure) processors 102, a memory 104 and a network module 106 which are coupled to each other. The memory 104 stores programs that can execute the contents of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104.
[0089] The processor 102 can include one or more processing cores. The processor 102 connects various parts within the electronic device 100 by various interfaces and lines, performs various functions of the electronic device 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Alternatively, the processor 102 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 102 can integrate a combination of one or several of a central processing unit (CPU), a graphics processor (GPU), and a modem. Among them, the CPU mainly processes an operating system, a user interface, and an application program; the GPU is responsible for rendering and drawing display content; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 102, but be implemented by a separate communication chip.
[0090] The memory 104 can include a random access memory (RAM) and can also include a read-only memory (ROM). The memory 104 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing each of the following method embodiments, etc. The data storage area can also store data created by the terminal 100 in use (such as a phone book, audio and video data, chat record data, etc.).
[0091] The network module 106 is configured to receive and send electromagnetic waves, and to convert the electromagnetic waves and electrical signals to each other, so as to communicate with a communication network or other devices, for example, an audio playing device. The network module 106 can include various existing circuit elements for performing these functions, for example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, and the like. The network module 106 can communicate with various networks such as the Internet, an intranet, a wireless network, or other devices through the wireless network. The wireless network can include a cellular telephone network, a wireless local area network or metropolitan area network. For example, the network module 106 can interact with a base station.
[0092] Reference is made to Figure 17 which shows a structural block diagram of a computer readable storage medium provided by an embodiment of the present application. The computer readable medium 800 stores program codes therein, which can be invoked by a processor to execute the methods described in the above method embodiments.
[0093] The computer readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. Alternatively, the computer readable storage medium 800 includes a non-transitory computer readable medium. The computer readable storage medium 800 has a storage space for program codes 810 for executing any of the method steps in the above methods. These program codes can be read from or written to one or more computer program products. The program codes 810 can be compressed in an appropriate form, for example.
[0094] To sum up, the parameter adjustment method, device and electronic equipment provided in the application, in the method, the second input content of each sub-network can be obtained from the first input content input into the first network model based on the function of the plurality of sub-networks in the first network model, and when the first output content of each sub-network is obtained through the second input content of each sub-network, the second output content of the first network model can be obtained through the first output content of each sub-network, so as to adjust the running parameter of the functional device corresponding to each sub-network through the second output content. Thus, by the above manner, the corresponding sub-network can be configured for the functional device requiring running parameter adjustment in the first network model, so that the target adjustment mode of each functional device can be determined through the sub-network corresponding to each functional device, so that the determination of the target adjustment mode of each functional device has better pertinence, so as to improve the accuracy of running parameter adjustment of the functional device.
[0095] In one way, the method provided by the embodiment of the application can realize the reduction of the dimension of the output content of the network model. Wherein, in the case that the first network model is designed based on a hierarchical architecture, the method provided by the embodiment of the application can perform correlation analysis on the first input content input into the first network model to obtain the second input content of each sub-network in the hierarchical architecture, and for the first output content output by each sub-network, the final second output content of the first network model can be obtained through splicing. Therefore, by the hierarchical network architecture (i.e., dividing a plurality of sub-networks in the first network model), the output dimension can be greatly reduced, so that more decision tasks can be supported under the same network size.
[0096] In one way, the method provided by the embodiment of the application adopts a plug-in network architecture design, and realizes the dual optimization of hardware adaptation and task expansion through the dynamic configuration of sub-networks. The architecture breaks through the traditional frequency adjustment scheduling category, flexibly adjusts the types of sub-networks integrated in the first network model according to different hardware states (such as CPU / GPU), so that the computing resources and task requirements are dynamically matched; at the same time, through the design of standardized interface, the real-time decision modules such as DDR (Double Data Rate) memory scheduling and UFS (Universal Flash Storage) storage control are supported to access the network with extremely low transformation cost. This plug-in mechanism not only maintains the stability of the core network, but also significantly improves the system scalability, allows new functional modules to be quickly integrated, greatly shortens the training time required for network expansion, and finally realizes the dual improvement of hardware adaptation efficiency and task expansion capability.
[0097] In one mode, the method provided by the embodiments of the present application uses a deb technology to build a Debian virtual machine in an electronic device for model training. Compared with the related training mode on a PC, the method can reduce the time delay and greatly improve the training accuracy.
[0098] In the training mode provided by the embodiments of the present application, a lightweight online learning can be used to facilitate incremental training based on local data flow (such as task delay, cache hit rate), and through a small sample gradient compensation (Small-batch Gradient Compensation) technology, the model can complete parameter fine-tuning within <100 ms to adapt to sudden load changes. Alternatively, incremental gradient compression (8-bit quantization + sparse update) and priority experience replay can be used to reduce the training memory of PPO (Proximal Policy Optimization) / DQN (Deep Q-Network) algorithms on the electronic device involved in the embodiments of the present application by 70%, and the policy fine-tuning delay is <50 ms.
[0099] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A parameter adjustment method, characterized by, The method is applied to an electronic device and comprises: obtaining, based on functions of a plurality of sub-networks in a first network model, second input content of each of the plurality of sub-networks from first input content, the first input content being input of the first network model, the first input content representing a current running condition of the electronic device, the plurality of sub-networks corresponding to a plurality of functional devices in the electronic device one by one; obtaining, through the second input content of each of the plurality of sub-networks, first output content of each of the plurality of sub-networks, wherein the first output content of a sub-network represents a target adjustment mode of a functional device corresponding to the sub-network; obtaining, through the first output content of each of the plurality of sub-networks, second output content of the first network model, the second output content representing target adjustment modes of the plurality of functional devices; adjusting, through the second output content, running parameters of the plurality of functional devices.
2. The method of claim 1, wherein, Each of the first output content comprises a plurality of elements representing respective adoption probabilities of a plurality of candidate adjustment modes of a functional device, wherein the target adjustment mode represented by the first output content is a candidate adjustment mode with the largest adoption probability; The obtaining, through the first output content of each of the plurality of sub-networks, of the second output content of the first network model comprises splicing the first output content of each of the plurality of sub-networks to obtain the second output content of the first network model.
3. The method of claim 2, wherein, The splicing the first output content of each of the plurality of sub-networks to obtain the second output content of the first network model comprises: updating, through a current running task of the electronic device, elements in the first output content of each of the plurality of sub-networks to obtain updated first output content; splicing the updated first output content to obtain the second output content of the first network model.
4. The method of claim 3, wherein, The updating, through the current running task of the electronic device, of the elements in the first output content of each of the plurality of sub-networks to obtain the updated first output content comprises: determining, through the current running task of the electronic device, an update weight of the first output content output by each sub-network; updating, through the update weight, the elements in the first output content of each of the plurality of sub-networks to obtain the updated first output content.
5. The method of claim 2, wherein, The splicing the first output content of each of the plurality of sub-networks to obtain the second output content of the first network model comprises: splicing the first output content of each of the plurality of sub-networks to obtain first spliced content; normalizing elements in the first spliced content to obtain second spliced content; obtaining, through the second spliced content, the second output content of the first network model.
6. The method of claim 2, wherein, The number of elements in the first output content output by a sub-network is the same as the number of adjustment modes supported by a functional device corresponding to the sub-network.
7. The method of claim 1, wherein, The first network model comprises a decomposition layer, and the obtaining, based on functions of a plurality of sub-networks in a first network model, of second input content of each of the plurality of sub-networks from first input content comprises: The first input content is obtained by the decomposition layer and functions of the plurality of sub-networks in the first network model.
8. The method according to any one of claims 1 to 7, characterized in that, The number of nodes in each fully connected layer of the sub-network is determined by the number of candidate adjustment modes of the functional device corresponding to the sub-network.
9. The method of claim 8, wherein, Each sub-network includes a plurality of serially connected fully connected layers, wherein the number of nodes in each fully connected layer is determined by the number of candidate adjustment modes of the functional device corresponding to the sub-network.
10. The method according to any one of claims 1 to 7, characterized in that, The electronic device includes a virtual machine for model training, and the plurality of sub-networks are trained in the virtual machine based on a reinforcement learning manner.
11. The method according to any one of claims 1 to 7, characterized in that, The plurality of sub-networks are configured in the first network model in a plug-in manner.
12. A parameter adjustment device, characterized by The apparatus is run on an electronic device, and the apparatus includes: a decomposition unit configured to obtain, based on functions of a plurality of sub-networks in a first network model, second input content of each of the plurality of sub-networks from first input content, the first input content being input of the first network model, the first input content representing a current running condition of the electronic device, the plurality of sub-networks corresponding one-to-one to a plurality of functional devices in the electronic device; a mode determination unit configured to obtain, based on the second input content of each of the plurality of sub-networks, first output content of each of the plurality of sub-networks, wherein the first output content of the sub-network represents a target adjustment mode of the functional device corresponding to the sub-network; a fusion unit configured to obtain, based on the first output content of each of the plurality of sub-networks, second output content of the first network model, the second output content representing target adjustment modes of the plurality of functional devices; a parameter adjustment unit configured to adjust, based on the second output content, running parameters of the plurality of functional devices.
13. An electronic device, comprising: A processor and a memory are included; one or more programs are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-11.
14. A computer program product, characterised in that, A computer program or instructions are included, which are executed by a processor to implement the method of any one of claims 1-11.