System power consumption dynamic prediction and regulation method based on task feature recognition
By identifying the task characteristics in heterogeneous multi-core systems and performing power consumption prediction and scheduling, the problem of unreasonable system power consumption regulation is solved, and more efficient power consumption management is achieved.
Patent Information
- Application Number
- CN202411703100.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the power consumption regulation of heterogeneous multi-core systems is unreasonable, which makes it difficult to effectively manage the system power consumption.
By obtaining the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous multi-core system, and inputting it into the pre-constructed queued task power consumption prediction model and task scheduling model, we can achieve dynamic prediction and regulation of system power consumption.
It improves the accuracy of heterogeneous multi-core system task scheduling, thereby achieving reasonable control of system power consumption and solving the problem of unreasonable power consumption regulation.
Smart Images

Figure CN119557068A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a method, device, electronic device and storage medium for dynamically predicting and regulating system power consumption based on task feature recognition. Background Art
[0002] With the development of chip technology, the scale and computing speed of heterogeneous many-core systems continue to grow, and the system power consumption also increases significantly. The power consumption issue has become a focus of attention.
[0003] Existing power consumption control methods for heterogeneous many-core systems are mainly based on methods such as dynamic voltage and frequency scaling (DVFS) or task suspension.
[0004] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art: the prior art solution has the problem of unreasonable power consumption control of the heterogeneous multi-core system. Summary of the invention
[0005] The present invention provides a method, device, electronic device and storage medium for dynamically predicting and regulating system power consumption based on task feature recognition, so as to improve the accuracy of task scheduling in a heterogeneous many-core system, thereby achieving reasonable control of system power consumption.
[0006] According to one aspect of the present invention, a method for dynamically predicting and regulating system power consumption based on task feature recognition is provided, comprising:
[0007] Obtaining a hardware operation requirement feature vector of each queued task in a queued task queue of a heterogeneous many-core system;
[0008] Inputting the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system;
[0009] The predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system is input into a pre-built task scheduling model to obtain the scheduling and operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0010] According to another aspect of the present invention, there is provided a system power consumption dynamic prediction and control device based on task feature recognition, comprising:
[0011] A task feature vector acquisition module is used to obtain a hardware operation requirement feature vector of each queued task in a queued task queue of a heterogeneous many-core system;
[0012] A queued task power consumption prediction module, used for inputting a hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model, and obtaining predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system;
[0013] The task scheduling operation result determination module is used to input the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor;
[0016] and a memory communicatively coupled to the at least one processor;
[0017] Among them, the memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the system power consumption dynamic prediction and control method based on task feature identification described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for dynamic prediction and control of system power consumption based on task feature identification as described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention obtains the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system; inputs the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system; inputs the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system. The above technical solution improves the accuracy of task scheduling of the heterogeneous many-core system by introducing predicted power consumption data for scheduling queued tasks, thereby realizing reasonable control of system power consumption.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flowchart of a method for dynamic prediction and regulation of system power consumption based on task feature identification provided in accordance with the first embodiment of the present invention;
[0023] Figure 2 is a flowchart of a method for dynamic prediction and control of system power consumption based on task feature identification provided in accordance with Embodiment 2 of the present invention;
[0024] Figure 3 is a flowchart of a method for dynamic prediction and control of system power consumption based on task feature identification provided in accordance with Embodiment 3 of the present invention;
[0025] Figure 4 is a structural schematic diagram of a system power consumption dynamic prediction and control device based on task feature recognition provided according to a fourth embodiment of the present invention;
[0026] Figure 5 It is a structural schematic diagram of an electronic device that implements the method for dynamically predicting and regulating system power consumption based on task feature recognition according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0029] Embodiment 1
[0030] Figure 1 The flowchart of a method for dynamic prediction and control of system power consumption based on task feature recognition provided in the first embodiment of the present invention is applicable to the case of power consumption control of heterogeneous multi-core systems. The method can be executed by a system power consumption dynamic prediction and control device based on task feature recognition. The system power consumption dynamic prediction and control device based on task feature recognition can be implemented in the form of hardware and / or software. The system power consumption dynamic prediction and control device based on task feature recognition can be configured in a terminal and / or server. Figure 1 As shown, the method includes:
[0031] S110 , obtaining a hardware operation requirement feature vector of each queued task in a queued task queue of the heterogeneous many-core system.
[0032] In an embodiment of the present invention, a queued task queue may include multiple queued tasks, and a queued task refers to an executable program or script that is submitted to a heterogeneous many-core system for scheduling and waiting for dispatch, has not yet been selected and allocated to system resources, and does not occupy actual resources. The hardware operation requirement feature vector refers to the result of the hardware operation requirement vectorization of the queued task, and the hardware operation requirement feature vector may include but is not limited to the task number, the user identifier of the task submitter (such as uid, etc.), the task executable file name, the task resource usage method (such as sharing, exclusive, etc.), the task resource type attribute (such as many-core resources, multi-core resources, accelerator resources, etc.), the total number of nodes applied for the task, the number of master cores used by each node, and the number of slave cores used by each master core.
[0033] Exemplarily, the queued tasks may be submitted to the task management control unit of the heterogeneous many-core system in a parameter-specified manner, and the task management control unit obtains the hardware operation requirement feature vector of the queued tasks by parsing each queued task.
[0034] S120, inputting the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system.
[0035] In an embodiment of the present invention, the queued task power consumption prediction model refers to an inference model for predicting the power consumption of queued tasks. In other words, the queued task power consumption prediction model can predict the power consumption of each queued task after it is run, that is, the predicted power consumption data refers to the predicted power consumption of the queued task after it is run.
[0036] Specifically, the queue task power consumption prediction model can be a neural network model trained based on a large amount of sample data, or a mathematical model obtained through iterative training such as vector similarity search and dynamic time warping, which is not specifically limited here.
[0037] S130, inputting the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0038] In the embodiment of the present invention, the task scheduling model refers to an optimized scheduling model for power consumption constraints on multiple queued tasks to achieve reasonable control of power consumption of heterogeneous multi-core systems. The scheduling operation results can be used to schedule each queued task and control the start-up of each queued task.
[0039] Exemplarily, the predicted power consumption data of each queued task can be used as a constraint to solve the optimization scheduling model, so as to obtain the scheduling and operation results of each queued task. For example, the overall scheduling and operation result can be {1,0,1,0,0}, which means that the first queued task and the third queued task are scheduled to run, and the second queued task, the fourth queued task and the fifth queued task are not scheduled to run.
[0040] The technical solution of the embodiment of the present invention obtains the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system; inputs the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system; inputs the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling and operation results of each queued task in the queued task queue of the heterogeneous many-core system. The above technical solution improves the accuracy of task scheduling of the heterogeneous many-core system by introducing predicted power consumption data for scheduling queued tasks, thereby realizing reasonable control of system power consumption.
[0041] Embodiment 2
[0042] Figure 2 A flowchart of a method for dynamic prediction and regulation of system power consumption based on task feature identification provided in the second embodiment of the present invention, the method of this embodiment can be combined with each optional scheme in the method for dynamic prediction and regulation of system power consumption based on task feature identification provided in the above embodiment. The method for dynamic prediction and regulation of system power consumption based on task feature identification provided in this embodiment is further optimized. Optionally, the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous multi-core system is input into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous multi-core system, including: for any queued task in the queued task queue of the heterogeneous multi-core system, based on the hardware operation requirement feature vector of the queued task, determine the similarity between the queued task and multiple candidate tasks respectively; sort the similarity between the queued task and multiple candidate tasks respectively, determine the target similar task corresponding to the queued task based on the sorting result, and use the power consumption data corresponding to the target similar task as the predicted power consumption data of the queued task.
[0043] like Figure 2 As shown, the method includes:
[0044] S210: Obtain a hardware operation requirement feature vector of each queued task in a queued task queue of the heterogeneous many-core system.
[0045] S220 . For any queued task in the queued task queue of the heterogeneous many-core system, determine the similarity between the queued task and a plurality of candidate tasks based on the hardware operation requirement feature vector of the queued task.
[0046] The candidate tasks may be historical tasks, and their hardware operation requirement feature vectors and operation power consumption data may be collected in advance.
[0047] Specifically, for any candidate task, the hardware operation requirement feature vector of the queued task is compared with the hardware operation requirement feature vector of the candidate task to obtain a comparison result of the hardware operation requirement feature vectors; based on the comparison result of the hardware operation requirement feature vectors and the weight corresponding to the hardware operation requirement feature vectors, the similarity between the queued task and the candidate task is determined.
[0048] Exemplarily, the calculation formula of similarity may be:
[0049] Sim=w1*M1+w2*M2+...+w k *M k ;
[0050] Among them, w k represents the weight corresponding to the kth hardware operation requirement feature vector, M k It represents the comparison result of the kth hardware operation requirement feature vector. For example, when the first hardware operation requirement feature vector is the user ID of the submitted task, M1 can indicate whether the user IDs of the submitted task of the queued task and the candidate task are the same. If they are the same, M1=1, if they are not the same, M1=0.
[0051] S230 , sorting the similarities between the queued task and a plurality of candidate tasks respectively, determining a target similar task corresponding to the queued task based on the sorting result, and using power consumption data corresponding to the target similar task as predicted power consumption data of the queued task.
[0052] Exemplarily, the similarities between the queued task and multiple candidate tasks are sorted in reverse order, and the candidate task with the largest similarity value to the queued task is used as the target similar task, and then the power consumption data corresponding to the target similar task is used as the predicted power consumption data of the queued task, thereby realizing the prediction of the power consumption of the queued task.
[0053] S240: Input the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling and operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0054] Optionally, before obtaining the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system, it also includes: obtaining the hardware operation requirement feature vector of the target queued task; performing a similarity search on the hardware operation requirement feature vector of the target queued task in a historical task feature vector library to obtain feature vectors of a preset number of historical tasks; performing dynamic time warping (DTW) on the hardware operation requirement feature vector of the target queued task and the feature vectors of the preset number of historical tasks to obtain distance information between the target queued task and the preset number of historical tasks; determining the weight corresponding to the hardware operation requirement feature vector based on the distance information between the target queued task and the preset number of historical tasks, and constructing a queued task power consumption prediction model based on the weight corresponding to the hardware operation requirement feature vector.
[0055] In the embodiment of the present invention, the target queued task refers to the queued task to be scheduled submitted by the user to the heterogeneous multi-core system. The historical task feature vector library includes hardware operation requirement feature vectors of multiple historical tasks. The distance information refers to the minimum distance between the target queued task and multiple historical tasks.
[0056] Exemplarily, based on the hardware operation requirement feature vector of the target queue task, the vector similarity search technology is used to search for the top K historical tasks with similarity to the target queue task from the historical task feature vector library; further, based on the power consumption data collected during the operation of the historical tasks, the dynamic time warping algorithm is used to find the minimum distance between the target queue task and the top K historical tasks, and the minimum distance between the target queue task and the top K historical tasks is substituted into the following formula to calculate the weight corresponding to the hardware operation requirement feature vector:
[0057]
[0058] Among them, DTW_Lmin(J,C) represents the minimum distance between the target queue task and the Top K historical tasks, J represents the target queue task, C represents the historical task, and W i represents the weight of the i-th hardware operation requirement feature vector, M i represents the comparison result of the i-th hardware operation requirement feature vector, and m represents the number of hardware operation requirement feature vectors. Further, after obtaining the weight corresponding to the hardware operation requirement feature vector, the weight corresponding to the hardware operation requirement feature vector can be substituted into the mathematical model as a known quantity to obtain the queued task power consumption prediction model for subsequent power consumption prediction.
[0059] The technical solution of the embodiment of the present invention completes the selection of the most similar candidate tasks through similarity search and similarity sorting, thereby realizing the prediction of the power consumption of queued tasks.
[0060] Embodiment 3
[0061] Figure 3 A flowchart of a method for dynamic prediction and regulation of system power consumption based on task feature identification provided in embodiment three of the present invention, the method of this embodiment can be combined with each optional scheme in the method for dynamic prediction and regulation of system power consumption based on task feature identification provided in the above embodiments. The method for dynamic prediction and regulation of system power consumption based on task feature identification provided in this embodiment is further optimized. Optionally, the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system is input into a pre-built task scheduling model to obtain the scheduling and operation results of each queued task in the queued task queue of the heterogeneous many-core system, including: inputting the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into the objective function and constraint conditions of the pre-built multi-objective optimization scheduling to solve, and obtaining the scheduling and operation results of each queued task in the queued task queue of the heterogeneous many-core system.
[0062] like Figure 3 As shown, the method includes:
[0063] S310: Obtain a hardware operation requirement feature vector of each queued task in a queued task queue of the heterogeneous many-core system.
[0064] S320, inputting the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system.
[0065] S330, input the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into the pre-built objective function and constraint conditions of the multi-objective optimization scheduling to solve, and obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0066] Optionally, the objective function includes:
[0067] max(f1(x),f2(x));
[0068]
[0069] The constraints include:
[0070]
[0071] Among them, n i Indicates the number of multi-core resources requested by the i-th queued task, s i represents the storage space requested by the i-th queued task, pi represents the predicted power consumption data of the i-th queued task, x i represents the scheduling status of the i-th queued task to be solved, N represents the total number of many-core resources initially configured in the heterogeneous many-core system, and N used represents the number of currently used many-core resources in the heterogeneous many-core system, S represents the total amount of storage space initially configured in the heterogeneous many-core system, and S used Indicates the currently used storage space of the heterogeneous many-core system, P max represents the power consumption threshold of heterogeneous many-core system configuration, P r Indicates the current operating power consumption of the heterogeneous many-core system.
[0072] In an embodiment of the present invention, the objective function and constraints mentioned above can be solved based on a genetic algorithm to obtain a non-inferior solution (Pareto solution set), and then the solution with the highest computing resource utilization rate is selected from the Pareto solution set as the scheduling operation result.
[0073] In some embodiments, task scheduling is performed based on the scheduling operation results, the task operation power consumption is monitored in real time, and the weight of the queued task power consumption prediction model is adjusted based on the task operation power consumption, thereby making the model more adaptable and improving the prediction accuracy of the queued task power consumption prediction model.
[0074] The technical solution of the embodiment of the present invention inputs the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into the pre-built objective function and constraint conditions of the multi-objective optimization scheduling to solve, and obtains the scheduling and operation results of each queued task in the queued task queue of the heterogeneous many-core system. The above technical solution improves the accuracy of task scheduling of the heterogeneous many-core system by introducing predicted power consumption data to schedule queued tasks, thereby realizing reasonable control of system power consumption.
[0075] Embodiment 4
[0076] Figure 4 A schematic diagram of the structure of a system power consumption dynamic prediction and control device based on task feature recognition provided by the fourth embodiment of the present invention. Figure 4 As shown, the device comprises:
[0077] The task feature vector acquisition module 410 is used to acquire the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system;
[0078] The queued task power consumption prediction module 420 is used to input the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system;
[0079] The task scheduling operation result determination module 430 is used to input the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0080] The technical solution of the embodiment of the present invention obtains the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system; inputs the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system; inputs the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system. The above technical solution improves the accuracy of task scheduling of the heterogeneous many-core system by introducing predicted power consumption data for scheduling queued tasks, thereby realizing reasonable control of system power consumption.
[0081] In some optional embodiments, the hardware operation requirement feature vector includes: one or more of: task number, user ID of the user submitting the task, task executable file name, task resource usage method, task resource type attribute, total number of nodes applied for the task, number of master cores used by each node, and number of slave cores used by each master core.
[0082] In some optional implementations, the queued task power consumption prediction module 420 includes:
[0083] A similarity determination unit is used to determine, for any queued task in the queued task queue of the heterogeneous many-core system, the similarity between the queued task and a plurality of candidate tasks based on the hardware operation requirement feature vector of the queued task;
[0084] The predicted power consumption data determining unit is used to sort the similarities between the queued task and multiple candidate tasks respectively, determine the target similar task corresponding to the queued task based on the sorting result, and use the power consumption data corresponding to the target similar task as the predicted power consumption data of the queued task.
[0085] In some optional implementations, the similarity determination unit may be specifically used to:
[0086] For any candidate task, compare the hardware operation requirement feature vector of the queued task with the hardware operation requirement feature vector of the candidate task to obtain a comparison result of the hardware operation requirement feature vectors;
[0087] The similarity between the queued task and the candidate task is determined based on the comparison result of the hardware operation requirement feature vector and the weight corresponding to the hardware operation requirement feature vector.
[0088] In some optional implementations, the task scheduling operation result determination module 430 may be specifically used to:
[0089] The predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system is input into the objective function and constraint conditions of the pre-built multi-objective optimization scheduling to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0090] In some optional implementations, the objective function includes:
[0091] max(f1(x),f2(x));
[0092]
[0093] The constraints include:
[0094]
[0095] Among them, n i Indicates the number of multi-core resources requested by the i-th queued task, s i represents the storage space requested by the i-th queued task, p i represents the predicted power consumption data of the i-th queued task, x i represents the scheduling status of the i-th queued task to be solved, N represents the total number of many-core resources initially configured in the heterogeneous many-core system, and N used represents the number of currently used many-core resources in the heterogeneous many-core system, S represents the total amount of storage space initially configured in the heterogeneous many-core system, and S used Indicates the currently used storage space of the heterogeneous many-core system, P max represents the power consumption threshold of heterogeneous many-core system configuration, P r Indicates the current operating power consumption of the heterogeneous many-core system.
[0096] In some optional implementations, the system power consumption dynamic prediction and control device based on task feature recognition further includes:
[0097] A queue task power consumption prediction model construction module is used to obtain the hardware operation requirement feature vector of the target queue task; perform similarity search on the hardware operation requirement feature vector of the target queue task in the historical task feature vector library to obtain the feature vectors of a preset number of historical tasks; perform dynamic time warping on the hardware operation requirement feature vector of the target queue task and the feature vectors of the preset number of historical tasks to obtain the distance information between the target queue task and the preset number of historical tasks; determine the weight corresponding to the hardware operation requirement feature vector based on the distance information between the target queue task and the preset number of historical tasks, and construct a queue task power consumption prediction model based on the weight corresponding to the hardware operation requirement feature vector.
[0098] The system power consumption dynamic prediction and control device based on task feature identification provided in an embodiment of the present invention can execute the system power consumption dynamic prediction and control method based on task feature identification provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0099] Embodiment 5
[0100] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0101] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The I / O interface 15 is also connected to the bus 14.
[0102] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a system power consumption dynamic prediction and control method based on task feature recognition, the method comprising:
[0104] Obtaining a hardware operation requirement feature vector of each queued task in a queued task queue of a heterogeneous many-core system;
[0105] Inputting the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system;
[0106] The predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system is input into a pre-built task scheduling model to obtain the scheduling and operation result of each queued task in the queued task queue of the heterogeneous many-core system.
[0107] In some embodiments, the method for dynamically predicting and regulating system power consumption based on task feature identification may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for dynamically predicting and regulating system power consumption based on task feature identification described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for dynamically predicting and regulating system power consumption based on task feature identification in any other appropriate manner (e.g., by means of firmware).
[0108] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0109] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0110] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0111] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0112] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0113] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0114] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0115] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for dynamic prediction and control of system power consumption based on task feature recognition, characterized in that: include: Obtaining a hardware operation requirement feature vector of each queued task in a queued task queue of a heterogeneous many-core system; Inputting the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system; The predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system is input into a pre-built task scheduling model to obtain the scheduling and operation result of each queued task in the queued task queue of the heterogeneous many-core system.
2. The method according to claim 1, characterized in that The hardware operation requirement feature vector includes: one or more of the task number, the user ID submitting the task, the task executable file name, the task resource usage mode, the task resource type attribute, the total number of nodes applied for the task, the number of master cores used by each node, and the number of slave cores used by each master core.
3. The method according to claim 1, characterized in that The step of inputting the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model to obtain predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system includes: For any queued task in the queued task queue of the heterogeneous many-core system, determining the similarity between the queued task and a plurality of candidate tasks respectively based on the hardware operation requirement feature vector of the queued task; The similarities between the queued task and a plurality of candidate tasks are sorted respectively, a target similar task corresponding to the queued task is determined based on the sorting result, and power consumption data corresponding to the target similar task is used as predicted power consumption data of the queued task.
4. The method according to claim 3, characterized in that The determining the similarity between the queued task and a plurality of candidate tasks respectively based on the hardware operation requirement feature vector of the queued task includes: For any candidate task, compare the hardware operation requirement feature vector of the queued task with the hardware operation requirement feature vector of the candidate task to obtain a comparison result of the hardware operation requirement feature vectors; The similarity between the queued task and the candidate task is determined based on the comparison result of the hardware operation requirement feature vector and the weight corresponding to the hardware operation requirement feature vector.
5. The method according to claim 1, characterized in that The step of inputting the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system includes: The predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system is input into the objective function and constraint conditions of the pre-built multi-objective optimization scheduling to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
6. The method according to claim 5, characterized in that The objective function includes: max(f1(x),f2(x)); The constraints include: Among them, n i Indicates the number of multi-core resources requested by the i-th queued task, s i represents the storage space requested by the i-th queued task, p i represents the predicted power consumption data of the i-th queued task, x i represents the scheduling status of the i-th queued task to be solved, N represents the total number of many-core resources initially configured in the heterogeneous many-core system, and N used represents the number of currently used many-core resources in the heterogeneous many-core system, S represents the total amount of storage space initially configured in the heterogeneous many-core system, and S used Indicates the currently used storage space of the heterogeneous many-core system, P max represents the power consumption threshold of heterogeneous many-core system configuration, P r Indicates the current operating power consumption of the heterogeneous many-core system.
7. The method according to any one of claims 1 to 6, characterized in that: Before obtaining the hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system, the method further includes: Obtain the hardware operation requirement feature vector of the target queue task; Perform similarity search on the hardware operation requirement feature vector of the target queued task in the historical task feature vector library to obtain feature vectors of a preset number of historical tasks; Performing dynamic time warping on the hardware operation requirement feature vector of the target queued task and the feature vectors of the preset number of historical tasks to obtain distance information between the target queued task and the preset number of historical tasks; The weight corresponding to the hardware operation requirement feature vector is determined based on the distance information between the target queued task and the preset number of historical tasks, and a queued task power consumption prediction model is constructed based on the weight corresponding to the hardware operation requirement feature vector.
8. A system power consumption dynamic prediction and control device based on task feature recognition, characterized in that: include: A task feature vector acquisition module is used to obtain a hardware operation requirement feature vector of each queued task in a queued task queue of a heterogeneous many-core system; A queued task power consumption prediction module, used for inputting a hardware operation requirement feature vector of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built queued task power consumption prediction model, and obtaining predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system; The task scheduling operation result determination module is used to input the predicted power consumption data of each queued task in the queued task queue of the heterogeneous many-core system into a pre-built task scheduling model to obtain the scheduling operation result of each queued task in the queued task queue of the heterogeneous many-core system.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein, the memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the system power consumption dynamic prediction and control method based on task feature identification as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for dynamically predicting and regulating system power consumption based on task feature identification according to any one of claims 1 to 7 when executed.