CN113378498B - Task allocation method and device - Google Patents

Task allocation method and device Download PDF

Info

Publication number
CN113378498B
CN113378498B CN202110922937.4A CN202110922937A CN113378498B CN 113378498 B CN113378498 B CN 113378498B CN 202110922937 A CN202110922937 A CN 202110922937A CN 113378498 B CN113378498 B CN 113378498B
Authority
CN
China
Prior art keywords
task
simulation verification
historical
eda simulation
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110922937.4A
Other languages
Chinese (zh)
Other versions
CN113378498A (en
Inventor
苏天宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Semiconductor Technology Co Ltd
Original Assignee
New H3C Semiconductor Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Semiconductor Technology Co Ltd filed Critical New H3C Semiconductor Technology Co Ltd
Priority to CN202110922937.4A priority Critical patent/CN113378498B/en
Publication of CN113378498A publication Critical patent/CN113378498A/en
Application granted granted Critical
Publication of CN113378498B publication Critical patent/CN113378498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • G06F30/3308Design verification, e.g. functional simulation or model checking using simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/02CAD in a network environment, e.g. collaborative CAD or distributed simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a task allocation method and a task allocation device, which relate to the technical field of data processing, and the method comprises the following steps: first task information of an EDA simulation verification task to be distributed is obtained. And predicting the resource amount required by the EDA simulation verification task to be distributed based on the second task information of the historical EDA simulation verification task, the first actual resource amount used by the historical EDA simulation verification task and the first task information. And determining a target server for processing the EDA simulation verification tasks to be distributed based on the predicted resource amount and the current available resource amount of each server, and distributing the EDA simulation verification tasks to be distributed to the target server. The scheme provided by the embodiment of the invention can accurately distribute the EDA simulation verification task to the server.

Description

Task allocation method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a task allocation method and apparatus.
Background
After the user finishes the Design of the integrated circuit, in order to ensure that the integrated circuit can work normally, EDA (Electronic Design Automation) simulation verification may be performed on the integrated circuit. At present, the EDA simulation verification task for the integrated circuit may be run by the server to perform EDA simulation verification on the integrated circuit, and the server needs to use a certain amount of computing resources, such as memory resources and CPU resources, in the process of running the EDA simulation verification task.
In order to distribute the EDA simulation verification task to the server for EDA simulation verification, a user may pre-configure the resource amount required for running the EDA simulation verification task, and may send a task running request carrying the preset resource amount to the task management system through the user terminal. The task management system can send a request to the server with the idle resource amount larger than the resource amount based on the resource amount carried by the task operation request, so that the server operates the requested EDA simulation verification task, and the process of EDA simulation verification of the integrated circuit is realized.
However, it is difficult for a user to accurately determine the amount of resources required by each EDA simulation verification task, and therefore, the amount of resources configured in advance by the user often has a large difference from the amount of resources required in the actual operation process of the EDA simulation verification task, which results in that it is difficult for the task management system to accurately allocate the EDA simulation verification task to the server based on the configured amount of resources. For example, if the amount of resources configured in advance by the user is greater than the amount of resources actually required by the task, the resource waste in the server may be caused; if the amount of resources configured in advance by the user is smaller than the amount of resources actually required by the task, it may be difficult for the server to smoothly run the task.
Disclosure of Invention
The embodiment of the invention aims to provide a task distribution method and a task distribution device so as to accurately distribute an EDA simulation verification task to a server. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a task allocation method, where the method includes:
acquiring first task information of an EDA simulation verification task to be distributed;
predicting the resource amount required by the EDA simulation verification task to be distributed based on second task information of the historical EDA simulation verification task, a first actual resource amount used by the historical EDA simulation verification task and the first task information;
and determining a target server for processing the EDA simulation verification tasks to be distributed based on the predicted resource amount and the current available resource amount of each server, and distributing the EDA simulation verification tasks to be distributed to the target server.
In a second aspect, an embodiment of the present invention provides a task allocation apparatus, where the apparatus includes:
the first information acquisition module is used for acquiring first task information of the EDA simulation verification task to be distributed;
the resource amount prediction module is used for predicting the resource amount required by the EDA simulation verification task to be distributed based on the second task information of the historical EDA simulation verification task, the first actual resource amount used by the historical EDA simulation verification task and the first task information;
and the task allocation module is used for determining a target server for processing the EDA simulation verification tasks to be allocated based on the predicted resource amount and the current available resource amount of each server, and allocating the EDA simulation verification tasks to be allocated to the target server.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of the first aspect when executing a program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the first aspect.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising instructions, which when run on a computer, cause the computer to perform the method steps of any of the first aspects described above.
The embodiment of the invention has the following beneficial effects:
by applying the task allocation method provided by the embodiment of the invention, after the first task information of the EDA simulation verification task to be allocated is obtained, the resource amount required by the EDA simulation verification task to be allocated is predicted based on the second task information of the historical EDA simulation verification task, the first actual resource amount used by the historical EDA simulation verification task and the first task information. And determining a target server for processing the EDA simulation verification tasks to be distributed based on the predicted resource amount and the current available resource amount of each server, and distributing the EDA simulation verification tasks to be distributed to the target server.
As can be seen from the above, the resource amounts required by different EDA simulation verification tasks can be determined approximately based on the first actual resource amount used by the historical EDA simulation verification task, so that after the EDA simulation verification task to be distributed is obtained, the resource amount required by the EDA simulation verification task to be distributed can be predicted and obtained based on the first actual resource amount of the historical EDA simulation verification task whose corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of the first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic flowchart of a first task allocation method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a task allocation application scenario according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a second task allocation method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a first resource amount prediction model training method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a second resource amount prediction model training method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a task allocation apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a resource amount prediction model training apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
In the prior art, it is difficult to accurately distribute an EDA simulation verification task to a server, and to solve the problem, embodiments of the present invention provide a task distribution method and apparatus.
The embodiment of the invention provides a task allocation method, which comprises the following steps:
acquiring first task information of an EDA simulation verification task to be distributed;
predicting the resource amount required by the EDA simulation verification task to be distributed based on the second task information of the historical EDA simulation verification task, the first actual resource amount used by the historical EDA simulation verification task and the first task information;
and determining a target server for processing the EDA simulation verification tasks to be distributed based on the predicted resource amount and the current available resource amount of each server, and distributing the EDA simulation verification tasks to be distributed to the target server.
As can be seen from the above, the resource amounts required by different EDA simulation verification tasks can be determined approximately based on the first actual resource amount used by the historical EDA simulation verification task, so that after the EDA simulation verification task to be distributed is obtained, the resource amount required by the EDA simulation verification task to be distributed can be predicted and obtained based on the first actual resource amount of the historical EDA simulation verification task whose corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of the first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server.
Referring to fig. 1, a flowchart of a first task allocation method according to an embodiment of the present invention is shown, where the method includes the following steps S101 to S103.
The execution subject of the embodiment of the present invention may be any first terminal having a data processing capability except a server running a task, and since the above-described embodiment is used for managing tasks and distributing tasks to the server, the embodiment running in the above-described first terminal may be referred to as a task management system.
Specifically, the first terminal may be an LSF (Load Sharing Facility).
S101: first task information of an EDA simulation verification task to be distributed is obtained.
Specifically, the first task information may be included in a task allocation request sent by the user terminal to the first terminal, where the task allocation request further includes an instruction indicating that the first terminal predicts an amount of resources required by the EDA simulation verification task to be allocated, and an instruction allocating the EDA simulation verification task to the target server. After receiving the task allocation request, the first terminal may perform feature extraction on data included in the task allocation request, so as to obtain first task information included in the task allocation request.
Wherein, the first task information may include: EDA tool information used by an EDA simulation verification task to be distributed, development verification tool information used by task simulation verification, task queue information, module information of task simulation, sub-module information of task simulation and the like.
Specifically, the module information of the task simulation indicates: modules in the integrated circuit corresponding to the EDA simulation verification task are as follows: the device group is composed of partial devices in the integrated circuit to be verified, and the device group is used for completing a certain preset function. The information of the sub-modules of the task simulation indicates that: the task corresponds to a submodule of the integrated circuit, and the submodule is as follows: and the sub-device group consisting of partial intervals in the module is used for completing partial sub-functions in the functions realized by the module.
For example, for an integrated circuit for audio processing, the integrated circuit may be divided into: the audio signal processing module comprises devices for processing audio signals, the analog-to-digital conversion module comprises devices for converting analog audio signals into digital audio signals, and the digital-to-analog conversion module comprises devices for converting digital audio signals into analog audio signals.
The audio signal processing module may be further divided into: the audio signal amplification submodule is composed of devices for amplifying audio signals, and the audio noise reduction submodule is composed of devices for reducing noise of the audio signals.
S102: and predicting the resource amount required by the EDA simulation verification task to be distributed based on the second task information of the historical EDA simulation verification task, the first actual resource amount used by the historical EDA simulation verification task and the first task information.
Specifically, the resource amount may be a CPU resource amount, a memory resource amount, and the like, and since the server mainly consumes the memory resource for running the task, the CPU resource consumption is small, and the CPU resource has a small influence on the normal running of the task, the predicted resource amount may also be only the memory resource amount. The historical EDA simulation verification task may be an EDA simulation verification task that has been distributed to the server.
In an embodiment of the present invention, a historical EDA simulation verification task similar to the EDA simulation verification task to be allocated may be selected, and theoretically, the first actual resource amount used by the selected historical EDA simulation verification task is similar to the resource amount required by the EDA simulation verification task to be allocated, so the resource amount required by the EDA simulation verification task to be allocated may be predicted based on the first actual resource amount of the selected historical EDA simulation verification task.
Specifically, the similarity between the first task information and the second task information of each historical EDA simulation verification task may be calculated, the historical EDA simulation verification task with the highest similarity and the corresponding similarity greater than the first preset value may be selected, and the first actual resource amount of the selected historical EDA simulation verification task may be used as the predicted resource amount. For example, the first preset value may be 70%, 80%, etc.
Or selecting the historical EDA simulation verification tasks with the corresponding similarity larger than the second preset value, and taking the average value or the weighted average value of the first actual resource quantity of the selected historical EDA simulation verification tasks as the predicted resource quantity. For example, the second preset value may be 70%, 80%, etc.
In another embodiment of the present invention, for the second task information of each historical EDA simulation verification task, various types of sub information in the second task information may be compared with various types of sub information in the first task information, respectively. And determining the number of the items of the same sub information, and dividing the number of the items of the sub information in the first task information by the total number of the items of the sub information in the first task information to obtain the similarity between the second task information and the first task information.
In addition, the number of the historical EDA simulation verification tasks is often large, and if the similarity between the second task information and the first task information of each historical EDA simulation verification task is determined, a large amount of calculation needs to be performed, so that the efficiency of predicting the resource amount is low. Since part of the preset sub-information included in the task information is important for predicting the resource amount, the historical EDA simulation verification tasks with the preset sub-information of the second task information being the same as the preset sub-information of the first task information can be extracted, and then the similarity between the first task information and the extracted second task information of each historical EDA simulation verification task is calculated respectively.
For example, module information in the task information indicates a module corresponding to the task, different modules have different functions, and the resource amount required for performing simulation verification is often different. The submodule information in the task information represents the submodule corresponding to the task, the functions of different submodules are different, and the difference of the required resource amount is large when simulation verification is carried out. Therefore, module information and sub-module information in the task information have a large influence on the predicted resource amount, and the historical EDA simulation verification task, in which the corresponding module information and/or sub-module information is the same as the module information and/or sub-module information in the first task information, has a large reference effect on the resource amount required for predicting the EDA simulation verification task to be distributed. Therefore, the module information and/or the sub-module information can be used as the preset sub-information, only the historical EDA simulation verification task with the module information and/or the sub-module information being the same as the module information and/or the sub-module information in the first task information is extracted, and the resource amount required by the EDA simulation verification task to be distributed is predicted based on the extracted historical EDA simulation verification task.
In another embodiment of the present invention, the step S102 can be implemented by the following step S102A, and will not be described in detail herein.
S103: and determining a target server for processing the EDA simulation verification tasks to be distributed based on the predicted resource amount and the current available resource amount of each server, and distributing the EDA simulation verification tasks to be distributed to the target server.
Specifically, the current available resource amount of each server may be determined, and if the current available resource amount is greater than the predicted resource amount, it indicates that the server can run the EDA simulation verification task to be allocated, and the server may be used as a target server, and the EDA simulation verification task to be allocated is allocated to the target server. If there are multiple servers whose current available resource amount is greater than or equal to the predicted resource amount, the server whose current available resource amount is the largest may be selected as the target server.
In an embodiment of the present invention, the first terminal may send the first task information and the predicted resource amount to the selected server, so that the server allocates resources to the EDA simulation verification task according to the resource amount, and runs the EDA simulation verification task based on the first task information.
As can be seen from the above, the resource amounts required by different EDA simulation verification tasks can be determined approximately based on the first actual resource amount used by the historical EDA simulation verification task, so that after the EDA simulation verification task to be distributed is obtained, the resource amount required by the EDA simulation verification task to be distributed can be predicted and obtained based on the first actual resource amount of the historical EDA simulation verification task whose corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of the first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server.
In another embodiment of the present invention, before the step S102 is executed, the second task information and the first actual resource amount of the historical EDA simulation verification task may be preprocessed through the following steps a to B.
Step A: and determining the same historical tasks with the same second task information in the historical EDA simulation verification tasks.
Specifically, the second task information of each historical EDA simulation verification task is compared respectively, and the historical EDA simulation verification tasks with the same values of various sub-information contained in the second task information are used as the same historical tasks.
And B: and reserving any historical EDA simulation verification task in the same historical task, and taking the average resource quantity of the first actual resource quantity of the same historical task as the first actual resource quantity of the reserved historical EDA simulation verification task.
Specifically, the average resource amount may be an average value of the first actual resource amounts of the respective identical historical tasks, or may be a root mean square of the first actual resource amounts of the respective identical historical tasks.
Specifically, the root mean square of the first actual resource amount may be calculated according to the following formula:
Figure 118069DEST_PATH_IMAGE002
wherein, yrmseFor the above average amount of resources, n is for the same historical taskNumber, i is the number of the same historical task, yiThe first actual amount of resources for the same historical task, numbered i.
As can be seen from the above, the embodiment of the present invention can perform merging and deduplication processing on the same historical tasks in the historical EDA simulation verification tasks, and reduce redundant data in the second task information and the first actual resource amount, so as to reduce the computation resources consumed in the process of predicting the resource amount required by the EDA simulation verification tasks to be allocated based on the second task information and the first actual resource amount.
In another embodiment of the present invention, before the step S102 is executed, the second task information and the first actual resource amount of the historical EDA simulation verification task may be preprocessed through the following steps C to E.
And C: and determining similar historical tasks of which the similarity of the second task information is greater than the preset similarity in the historical EDA simulation verification tasks.
Specifically, a manner of calculating the similarity between the second task information is similar to the aforementioned manner of calculating the similarity between the second task information and the first task information, and details of this embodiment of the present invention are not repeated.
For example, the preset similarity may be 85%, 90%, or the like.
Step D: an average amount of resources is calculated based on the first actual amount of resources for each similar historical task.
Specifically, whether the first actual resource amount of the similar historical tasks is smaller than the preset resource amount or not can be judged, if yes, the difference of the first actual resource amounts actually used by the similar historical tasks is not large, the similar historical tasks can be combined, and the similar historical tasks are represented in the form of a historical EDA simulation verification task. Otherwise, the historical EDA simulation verification task which is more special and actually uses the first practical resource with larger quantity exists in the similar historical tasks, and the historical EDA simulation verification task does not participate in merging.
In an embodiment of the present invention, an average value or a root mean square of the first actual resource amounts of the respective similar historical tasks may be calculated as the average resource amount.
Step E: and reserving any historical EDA simulation verification task in the similar historical tasks, and taking the average resource quantity as a first actual resource quantity of the reserved historical EDA simulation verification task.
Specifically, any one of the historical EDA simulation and verification tasks in the similar historical tasks may be randomly retained, and one of the historical EDA simulation and verification tasks with the largest sub-information included in the second task information may also be retained. Other similar historical tasks are removed from the retained tasks.
As can be seen from the above, the embodiment of the present invention can perform merging and deduplication processing on similar historical tasks in the historical EDA simulation verification tasks, and reduce redundant data in the second task information and the first actual resource amount, so as to reduce the computation resources consumed in the process of predicting the resource amount required by the EDA simulation verification task to be allocated based on the second task information and the first actual resource amount.
In another embodiment of the present invention, before the step S102 is executed, the second task information and the first actual resource amount of the historical EDA simulation verification task may be preprocessed in the following step F.
Step F: and removing second task information which does not contain preset information from the second task information of each historical EDA simulation verification task.
Specifically, the preset information may be sub-information having the largest influence on the process of predicting the resource amount, and if the second task information does not include the preset information, the second task information is incomplete, and the resource amount predicted based on the incomplete second task information is inaccurate. Therefore, the second task information which does not contain the preset information can be removed, that is, the resource quantity required by the EDA simulation verification task to be distributed is predicted without using the historical EDA simulation verification task corresponding to the removed second task information, so that the accuracy of the predicted resource quantity is ensured.
For example, similar to the previous embodiment, the preset information may be module information, sub-module information, and the like.
In another embodiment of the present invention, before step S102 is executed, feature cleaning, data normalization, dummy coding, and the like may be further performed on the second task information of the historical EDA simulation verification task. Specifically, the above feature cleaning, data normalization and dummy coding processing all belong to the prior art, and are not described in detail in the embodiments of the present invention.
In addition, the above steps S101 to S102 are used to predict the amount of resources required by the EDA simulation verification task to be allocated, the above step S103 is used to allocate the EDA simulation verification task to the target server based on the predicted amount of resources, and the above steps S101 to S102 and S103 may be divided into two different flows, which may be respectively referred to as a resource amount prediction subsystem and a task allocation subsystem, and together constitute the task allocation system shown in the foregoing. The resource amount prediction subsystem and the task allocation subsystem may be operated in the first terminal together as described above, or may be operated in two different terminals respectively.
For example, after the second terminal predicts the resource amount by the resource amount prediction subsystem, the second terminal may send the predicted resource amount and the first task information to the third terminal, and the third terminal may select a target server according to the resource amount and the first task information based on the task allocation subsystem and allocate the EDA simulation verification task to the target server.
Referring to fig. 2, a schematic diagram of a task allocation application scenario provided in an embodiment of the present invention is shown.
As can be seen from the figure, the application scenario includes a user terminal 1-a user terminal n and a server 1-a server m, and each user terminal sends first task information of an EDA simulation verification task requested by itself to the resource quantity prediction subsystem. The EDA simulation verification task requested by the user terminal 1 is job1, the EDA simulation verification task requested by the user terminal 2 is job2, and the EDA simulation verification task requested by the user terminal n is jobn.
And the resource quantity prediction subsystem predicts the resource quantity required by the EDA simulation verification task according to the first task information and sends the predicted resource quantity and the first task information to the task allocation subsystem. The task allocation subsystem allocates the EDA simulation verification tasks to the servers based on the amount of resources. The task allocation subsystem allocates job1 to server 2, job n to server 1, and job2 to server m.
Referring to fig. 3, a flowchart of a second task allocation method provided for the embodiment of the present invention is shown, and compared with the foregoing embodiment shown in fig. 1, the step S102 may also be implemented by the following step S102A.
S102A: and inputting the first task information into a resource quantity prediction model to obtain a first output result, and taking the first output result as the predicted resource quantity required by the EDA simulation verification task to be distributed.
Wherein, the resource quantity prediction model is as follows: and training the preset model by using the second task information of the historical EDA simulation verification task and the first actual resource amount actually used by the historical EDA simulation verification task.
Specifically, the preset model may be a regression model, such as a GBDT (Gradient Boosting Decision Tree) regression model, an adaptive enhanced adaBoosting regression model, or a classification model, such as a GBDT classification model, an adaBoosting classification model, an SVM (Support Vector Machines) model, a random forest classification model, a Decision Tree model, or the like.
If the preset model is a classification model, the first actual data volume needs to be discretized before the preset model is trained, and different first actual data volumes are mapped to different classifications.
As can be seen from the above, after the preset model is trained by using the second task information and the first actual resource amount of a large number of historical EDA simulation verification tasks, the resource amount prediction model obtained through training can learn the association relationship between the second task information and the first actual resource amount, so that after new first task information is input into the resource amount prediction model, the resource amount prediction model can analyze and obtain the resource amount corresponding to the first task information based on the learned association relationship. Because the resource quantity prediction model is learned based on a large number of historical EDA simulation verification tasks, new first task information is analyzed on the basis, and the predicted resource quantity is accurate.
Referring to fig. 4, a flowchart of a first resource amount prediction model training method according to an embodiment of the present invention is shown, and specifically, the flowchart includes the following steps S401 to S404.
S401: and acquiring second task information of the historical EDA simulation verification task and the corresponding first actual resource amount.
Specifically, the second task information and the first actual resource amount may be information of the EDA simulation verification task that has been executed and acquired by the first terminal from the server. The second task information and the first actual resource amount may be stored in a database of the first terminal, and when a preset model needs to be trained, the second task information and the first actual resource amount may be obtained from the database.
For example, the database may be MongoDB or the like.
S402: and inputting the second task information into the preset model to obtain a second output result which is used as the predicted resource amount required by the historical EDA simulation verification task corresponding to the second task information.
S403: and calculating the loss of the preset model based on the second output result and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss.
Specifically, the second output result is the predicted amount of resources required by the historical EDA simulation verification task, the first actual amount of resources is the amount of resources actually used by the historical EDA simulation verification task, and the closer the second output result is to the first actual amount of resources, the smaller the loss is, and the more accurate the output result of the preset model is. The loss of the preset model may be calculated based on the second output result and the first actual resource amount, and the model parameter of the preset model is adjusted based on the loss, so that the second output result output by the preset model gradually approaches to the first actual resource amount, that is, the second output result of the preset model gradually approaches to the actually required resource amount.
The loss may be calculated by using a loss calculation method in the prior art, which is not limited in the embodiment of the present invention.
If the preset training termination condition is not met, continuing to execute the step S402, and continuing to train the preset model by using the second task information. Until a preset training termination condition is satisfied, step S404 is executed.
Wherein, the preset training termination condition may be any one of the following conditions: the calculated loss is smaller than the preset loss, the number of times of model training on the preset model reaches the preset number, and second task information of each historical EDA simulation verification task is input into the preset model.
S404: and determining a preset model meeting a preset training termination condition as a resource quantity prediction model.
As can be seen from the above, in the embodiment of the present invention, the preset model is trained by using the second task information and the first actual resource amount of the plurality of historical EDA simulation verification tasks, and the preset model can learn the association relationship between the second task information and the first actual resource amount. And calculating the loss of the model based on the second output result and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss so that the output second output result gradually approaches to the first actual resource amount. That is, the result output by the preset model approaches the resource amount actually used by the EDA simulation verification task. Therefore, after the new first task information is input into the resource amount prediction model, the resource amount prediction model can analyze the resource amount needed by obtaining the more accurate first task information based on the learned association relationship.
Referring to fig. 5, a flowchart of a second resource amount prediction model training method provided in the embodiment of the present invention is shown, and compared with the embodiment shown in fig. 4, the step S402 can be implemented by the following step S402A.
S402A: and respectively inputting the second task information into different types of preset models, obtaining second output results aiming at the different preset models, and respectively using the second output results as the resource quantity required by the historical EDA simulation verification task corresponding to the second task information and predicted by each preset model.
Specifically, the model structures of different types of preset models are different, and the preset model may be any of multiple models among a GBDT regression model, an adaBoosting regression model, a GBDT classification model, an adaBoosting classification model, an SVM model, a random forest classification model, a decision tree model, and the like.
In addition, compared to the aforementioned embodiment shown in fig. 4, the above step S403 may be implemented by the following step S403A, and the step S404 may be implemented by the following steps S404A-S404C.
S403A: and calculating the loss of each preset model based on the second output result of the preset model and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss.
Specifically, for each preset model, the model parameters of the preset model may be adjusted through the embodiment shown in step S403, which is not described in detail in the embodiment of the present invention.
For each preset model, if the training termination condition of the preset model is not met, the step S402A is returned to, and the training of the preset model is continued by using the second task information. Until the training termination conditions of the respective preset models are satisfied, step S404A is executed.
Specifically, the training termination conditions of different preset models may be the same or different.
S404A: and determining a preset model meeting a preset training termination condition as a resource quantity alternative prediction model.
S404B: for each resource amount candidate prediction model, a performance value representing the performance of the resource amount candidate prediction model is calculated.
In an embodiment of the present invention, for different types of preset models, the performance value of the preset model may be calculated in different manners.
Specifically, for the regression model, the inverse number of the root mean square error of the regression model may be calculated as the performance value, and the larger the root mean square error is, the larger the uncertainty of the regression model is, the worse the performance of the regression model is. Therefore, the larger the inverse of the root mean square error, the better the performance of the regression model. The performance value of the regression model may be calculated by using a coefficient-of-determination evaluation model.
The calculation of the root mean square error and the calculation of the performance value by using the decision coefficient evaluation model belong to the prior art, and are not described in detail in the embodiment of the invention.
For the classification model, the accuracy of the classification model may be calculated as the performance value, and the greater the accuracy, the smaller the uncertainty of the classification model, and the better the performance of the classification model. The F1 score F1 score of the classification model may also be calculated as the above performance value, with larger F1 score indicating less uncertainty in the classification model and better performance of the classification model. The AUC (Area enclosed by the coordinate axis Under the ROC Curve) of the classification model can also be calculated, and the larger the AUC is, the smaller the uncertainty of the classification model is, and the better the performance of the classification model is.
Specifically, the calculation accuracy, F1 score, and AUC all belong to the prior art, and are not described again in the embodiments of the present invention.
S404C: and based on the performance value of each resource quantity candidate prediction model, taking the resource quantity candidate prediction model with the highest selective performance value as the resource quantity prediction model.
Specifically, since the resource quantity candidate prediction models are different in type and different in performance value calculation manner, in order to unify the performance values of the resource quantity candidate prediction models, the performance values obtained by calculation may be normalized and then compared, and the resource quantity candidate prediction model with the highest selective value is used as the resource quantity prediction model. The greater the performance value of the resource quantity candidate prediction model is, the better the performance of the resource quantity candidate prediction model is, and the higher the accuracy is, so that the resource quantity candidate prediction model with the largest selective energy value is used as the resource quantity prediction model, and the higher the accuracy of the resource quantity prediction model can be ensured.
As can be seen from the above, in the embodiment of the present invention, the second task information and the first actual resource amount are used to respectively train different preset models, so as to obtain a plurality of trained resource amount candidate prediction models with a certain accuracy. And then, the resource quantity candidate prediction model with the maximum performance value is selected as the resource quantity prediction model, so that the finally obtained resource quantity prediction model has a good effect, and the resource quantity predicted by using the resource quantity prediction model is more accurate.
In another embodiment of the present invention, after the resource amount prediction model is obtained by training, and the resource amount of the EDA simulation verification task to be allocated is predicted by using the resource amount prediction model, and the EDA simulation verification task is allocated, the resource amount prediction model may be updated through the following steps G to K.
Step G: and acquiring third task information of the newly added EDA simulation verification task and a second actual resource amount used by the newly added EDA simulation verification task in a preset time period.
Specifically, the preset time period may be a time period of a preset duration since the resource prediction model was updated in the last execution of steps G to K. The preset time period can be 1 day, 1 week, one month and the like.
Step H: and inputting the third task information of the newly added EDA simulation verification task into the resource quantity prediction model to obtain a third output result.
Step I: and calculating the loss of the resource quantity prediction model based on the third output result and the second actual resource quantity, adjusting the model parameters of the resource quantity prediction model based on the loss, and continuing to execute the step H until the third task information of each newly-added EDA simulation verification task is input into the resource quantity prediction model to obtain the resource quantity prediction model after the model parameters are updated.
Specifically, the resource amount prediction model may be further trained through the embodiments shown in fig. 4 or fig. 5, and model parameters of the resource amount prediction model are adjusted, which is not described in detail herein.
Step J: and respectively calculating a first performance value and a second performance value.
The first performance value is the performance of the resource quantity prediction model before the model parameter is updated, and the second performance value is the performance of the resource quantity prediction model after the model parameter is updated.
Specifically, the manner of calculating the first performance value and the second performance value is similar to the aforementioned step S404B, and the description thereof is omitted here.
Step K: and if the second performance value is higher than the first performance value, taking the resource quantity prediction model with the updated model parameters as a new resource quantity prediction model.
Specifically, if the first performance value is higher than the second performance value, the resource amount prediction model is updated with the model parameters, and the performance of the resource amount prediction model is improved. The accuracy of the predicted resource amount can be improved by adopting a new resource amount prediction model with higher performance.
Corresponding to the task allocation method, the embodiment of the invention also provides a task allocation device.
Referring to fig. 6, a schematic structural diagram of a task allocation apparatus according to an embodiment of the present invention is shown, where the apparatus includes:
the first information acquisition module 601 is configured to acquire first task information of an EDA simulation verification task to be distributed;
the resource amount prediction module 602 is configured to predict, based on second task information of the historical EDA simulation verification task, a first actual resource amount used by the historical EDA simulation verification task, and the first task information, a resource amount required by the EDA simulation verification task to be allocated;
and a task allocation module 603, configured to determine a target server for processing the EDA simulation verification task to be allocated based on the predicted resource amount and the current available resource amount of each server, and allocate the EDA simulation verification task to be allocated to the target server.
As can be seen from the above, the resource amounts required by different EDA simulation verification tasks can be determined approximately based on the first actual resource amount used by the historical EDA simulation verification task, so that after the EDA simulation verification task to be distributed is obtained, the resource amount required by the EDA simulation verification task to be distributed can be predicted and obtained based on the first actual resource amount of the historical EDA simulation verification task whose corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of a first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server
In an embodiment of the present invention, the resource amount prediction module 602 is specifically configured to:
inputting the first task information into a resource quantity prediction model to obtain a first output result, and taking the first output result as the predicted resource quantity required by the EDA simulation verification task to be distributed, wherein the resource quantity prediction model is as follows: and training a preset model by utilizing the second task information of the historical EDA simulation verification task and the first actual resource amount actually used by the historical EDA simulation verification task.
As can be seen from the above, after the preset model is trained by using the second task information and the first actual resource amount of a large number of historical EDA simulation verification tasks, the resource amount prediction model obtained through training can learn the association relationship between the second task information and the first actual resource amount, so that after new first task information is input into the resource amount prediction model, the resource amount prediction model can analyze and obtain the resource amount corresponding to the first task information based on the learned association relationship. Because the resource quantity prediction model is learned based on a large number of historical EDA simulation verification tasks, new first task information is analyzed on the basis, and the predicted resource quantity is accurate.
Referring to fig. 7, for a schematic structural diagram of a resource amount prediction model training device provided in the embodiment of the present invention, specifically, the preset model is trained by using the second task information of the historical EDA simulation verification task and the first actual resource amount actually used by the historical EDA simulation verification task through the following modules, so as to obtain the resource amount prediction model:
a second information obtaining module 701, configured to obtain second task information of the historical EDA simulation verification task and a corresponding first actual resource amount;
a second result obtaining module 702, configured to input the second task information into the preset model, and obtain a second output result, where the second output result is used as the predicted resource amount required by the historical EDA simulation verification task corresponding to the second task information;
a first parameter adjusting module 703, configured to calculate a loss of the preset model based on the second output result and the first actual resource amount, adjust a model parameter of the preset model based on the loss, continue to trigger execution of the second result obtaining module 702 until a preset training termination condition is met, and determine the preset model meeting the preset training termination condition as a resource amount prediction model.
As can be seen from the above, in the embodiment of the present invention, the preset model is trained by using the second task information and the first actual resource amount of the plurality of historical EDA simulation verification tasks, and the preset model can learn the association relationship between the second task information and the first actual resource amount. And calculating the loss of the model based on the second output result and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss so that the output second output result gradually approaches to the first actual resource amount. That is, the result output by the preset model approaches the resource amount actually used by the EDA simulation verification task. Therefore, after the new first task information is input into the resource amount prediction model, the resource amount prediction model can analyze the resource amount needed by obtaining the more accurate first task information based on the learned association relationship.
In an embodiment of the present invention, the second result obtaining module 702 is specifically configured to:
inputting the second task information into different types of preset models respectively, obtaining second output results aiming at the different preset models, and using the second output results as resource quantities required by historical EDA simulation verification tasks corresponding to the second task information and predicted by the preset models respectively;
the first parameter adjusting module 703 is specifically configured to:
calculating the loss of each preset model based on the second output result of the preset model and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss; continuing to trigger and execute the second result obtaining module 702 until the training termination condition of the preset model is met, and determining the preset model meeting the training termination condition as the resource quantity alternative prediction model; calculating a performance value representing the performance of each resource quantity candidate prediction model aiming at each resource quantity candidate prediction model; and based on the performance value of each resource quantity candidate prediction model, taking the resource quantity candidate prediction model with the highest selective performance value as the resource quantity prediction model.
As can be seen from the above, in the embodiment of the present invention, the second task information and the first actual resource amount are used to respectively train different preset models, so as to obtain a plurality of trained resource amount candidate prediction models with a certain accuracy. And then, the resource quantity candidate prediction model with the maximum performance value is selected as the resource quantity prediction model, so that the finally obtained resource quantity prediction model has a good effect, and the resource quantity predicted by using the resource quantity prediction model is more accurate.
In an embodiment of the present invention, the apparatus for training a resource amount prediction model further includes:
the resource amount obtaining module is used for obtaining third task information of the newly added EDA simulation verification task and a second actual resource amount used by the newly added EDA simulation verification task within a preset time period;
a third result obtaining module, configured to input third task information of the newly added EDA simulation verification task into the resource amount prediction model to obtain a third output result;
the second parameter adjusting module is used for calculating the loss of the resource quantity prediction model based on the third output result and the second actual resource quantity, adjusting the model parameters of the resource quantity prediction model based on the loss, and continuing to trigger and execute the third result obtaining module until the third task information of each newly-added EDA simulation verification task is input into the resource quantity prediction model to obtain the resource quantity prediction model after the model parameters are updated;
the performance value calculation module is used for respectively calculating a first performance value and a second performance value, wherein the first performance value is the performance of the resource quantity prediction model before the model parameters are updated, and the second performance value is the performance of the resource quantity prediction model after the model parameters are updated;
and the model updating module is used for taking the resource quantity prediction model after the model parameters are updated as a new resource quantity prediction model if the second performance value is higher than the first performance value.
As described above, if the first performance value is higher than the second performance value, it means that the resource amount prediction model is updated with the model parameters, and the performance of the resource amount prediction model is improved. The accuracy of the predicted resource amount can be improved by adopting a new resource amount prediction model with higher performance.
In an embodiment of the present invention, the task assigning apparatus further includes:
the same task determining module is used for determining the same historical tasks with the same second task information in the historical EDA simulation verification tasks;
and the first task reserving module is used for reserving any one historical EDA simulation verification task in the same historical task and taking the average resource quantity of the first actual resource quantity of the same historical task as the first actual resource quantity of the reserved historical EDA simulation verification task.
As can be seen from the above, the embodiment of the present invention can perform merge deduplication processing on the same historical tasks in the historical EDA simulation verification tasks, reduce redundant data in the second task information and the first actual resource amount, and reduce the computation resource consumed in the process of predicting the resource amount required by the EDA simulation verification task to be allocated based on the second task information and the first actual resource amount
In an embodiment of the present invention, the task assigning apparatus further includes:
the similar task determination module is used for determining a similar historical task of which the similarity of the second task information is greater than the preset similarity in the historical EDA simulation verification tasks;
the average resource amount calculating module is used for calculating the average resource amount based on the first actual resource amount of each similar historical task;
and the second task reservation module is used for reserving any historical EDA simulation verification task in the similar historical tasks and taking the average resource amount as a first actual resource amount of the reserved historical EDA simulation verification task.
As can be seen from the above, the embodiment of the present invention can perform merging and deduplication processing on similar historical tasks in the historical EDA simulation verification tasks, reduce redundant data in the second task information and the first actual resource amount, and reduce the computation resource consumed in the process of predicting the resource amount required by the EDA simulation verification task to be allocated based on the second task information and the first actual resource amount
In an embodiment of the present invention, the task assigning apparatus further includes:
and the information removing module is used for removing second task information which does not contain preset information from the second task information of each historical EDA simulation verification task.
As can be seen from the above, the preset information may be sub-information having the greatest influence on the process of predicting the resource amount, and if the second task information does not include the preset information, it indicates that the second task information is incomplete, and the resource amount predicted based on the incomplete second task information is inaccurate. Therefore, the second task information which does not contain the preset information can be removed, that is, the resource quantity required by the EDA simulation verification task to be distributed is predicted without using the historical EDA simulation verification task corresponding to the removed second task information, so that the accuracy of the predicted resource quantity is ensured.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the method steps of any of the above-described task assignment methods when executing the program stored in the memory 803.
When the electronic equipment provided by the embodiment of the invention is applied to task allocation, the resource amount required by different EDA simulation verification tasks can be determined approximately based on the first actual resource amount used by the historical EDA simulation verification tasks, so that after the EDA simulation verification tasks to be allocated are obtained, the resource amount required by the EDA simulation verification tasks to be allocated can be predicted and obtained based on the first actual resource amount of the historical EDA simulation verification tasks, of which the corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of the first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program realizes the steps of any one of the task allocation methods described above when executed by a processor.
When the computer program stored in the computer-readable storage medium provided by the embodiment of the present invention is executed to perform task allocation, the resource amounts required by different EDA simulation verification tasks can be determined approximately based on the first actual resource amount used by the historical EDA simulation verification task, so that after the EDA simulation verification task to be allocated is obtained, the resource amount required by the EDA simulation verification task to be allocated can be predicted and obtained based on the first actual resource amount of the historical EDA simulation verification task whose corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of the first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the task allocation methods of the above embodiments.
When the computer program provided by the embodiment of the invention is executed to distribute tasks, the resource quantity required by different EDA simulation verification tasks can be approximately determined and obtained based on the first actual resource quantity used by the historical EDA simulation verification tasks, so that after the EDA simulation verification tasks to be distributed are obtained, the resource quantity required by the EDA simulation verification tasks to be distributed can be predicted and obtained based on the first actual resource quantity of the historical EDA simulation verification tasks, of which the corresponding second task information is similar to the first task information. The resource amount is obtained on the basis of the first actual resource amount actually used by the historical EDA simulation verification task, so that the predicted resource amount is considered to be close to the resource amount actually required by the EDA simulation verification task to be distributed, the target server for processing the EDA simulation verification task to be distributed can be accurately determined on the basis of the predicted resource amount, and the EDA simulation verification task to be distributed is distributed to the target server.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the electronic device, the computer-readable storage medium and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to them, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A method of task allocation, the method comprising:
acquiring first task information of an Electronic Design Automation (EDA) simulation verification task to be distributed, wherein the first task information comprises: EDA tool information used by the EDA simulation verification task to be distributed, development verification tool information used by the task simulation verification, task queue information, module information of task simulation and sub-module information of task simulation;
obtaining a historical EDA simulation verification task similar to the EDA simulation verification task to be distributed;
predicting the resource amount required by the EDA simulation verification task to be distributed based on the second task information of the historical EDA simulation verification task, the first actual resource amount used by the historical EDA simulation verification task and the first task information;
determining a target server for processing the EDA simulation verification tasks to be distributed based on the predicted resource quantity and the current available resource quantity of each server, and distributing the EDA simulation verification tasks to be distributed to the target server;
the obtaining of the historical EDA simulation verification task similar to the EDA simulation verification task to be distributed includes: extracting historical EDA simulation verification tasks of which preset sub information of the second task information is the same as that of the first task information, calculating the similarity between the first task information and the second task information of each extracted historical EDA simulation verification task, and selecting the historical EDA simulation verification tasks of which the corresponding similarity is greater than the first preset value as the historical EDA simulation verification tasks similar to the EDA simulation verification tasks to be distributed, wherein the preset sub information is sub information which is contained in the task information and is important for predicting the resource quantity.
2. The method of claim 1, wherein predicting the amount of resources required by the EDA simulation verification task to be allocated based on the second task information of the historical EDA simulation verification task, the first actual amount of resources used by the historical EDA simulation verification task, and the first task information comprises:
inputting the first task information into a resource quantity prediction model to obtain a first output result, and taking the first output result as the predicted resource quantity required by the EDA simulation verification task to be distributed, wherein the resource quantity prediction model is as follows: and training a preset model by utilizing the second task information of the historical EDA simulation verification task and the first actual resource amount actually used by the historical EDA simulation verification task.
3. The method of claim 2, wherein the preset model is trained by using the second task information of the historical EDA simulation verification task and the first actual resource amount actually used by the historical EDA simulation verification task in the following manner to obtain the resource amount prediction model:
acquiring second task information of a historical EDA simulation verification task and a corresponding first actual resource amount;
inputting the second task information into the preset model to obtain a second output result, wherein the second output result is used as the predicted resource amount required by the historical EDA simulation verification task corresponding to the second task information;
and calculating the loss of the preset model based on the second output result and the first actual resource amount, adjusting the model parameters of the preset model based on the loss, continuously executing the step of inputting the second task information into the preset model to obtain a second output result until a preset training termination condition is met, and determining the preset model meeting the preset training termination condition as a resource amount prediction model.
4. The method according to claim 3, wherein the inputting the second task information into the preset model to obtain a second output result as the predicted resource amount required by the historical EDA simulation verification task corresponding to the second task information comprises:
inputting the second task information into different types of preset models respectively, obtaining second output results aiming at the different preset models, and using the second output results as resource quantities required by historical EDA simulation verification tasks corresponding to the second task information and predicted by the preset models respectively;
the calculating a loss of the preset model based on the second output result and the first actual resource amount, and adjusting a model parameter of the preset model based on the loss includes:
calculating the loss of each preset model based on the second output result of the preset model and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss;
the step of continuing to execute the step of inputting the second task information into the preset model to obtain a second output result until a preset training termination condition is met, and the step of determining the preset model meeting the preset training termination condition as a resource amount prediction model includes:
continuing to execute the step of inputting the second task information into different types of preset models respectively to obtain second output results aiming at the different preset models until the training termination condition of the preset models is met, and determining the preset models meeting the preset training termination condition as resource quantity alternative prediction models; calculating a performance value representing the performance of each resource quantity candidate prediction model aiming at each resource quantity candidate prediction model; and based on the performance value of each resource quantity candidate prediction model, taking the resource quantity candidate prediction model with the highest selective performance value as the resource quantity prediction model.
5. The method of claim 2, wherein after said assigning said EDA simulation verification task to be assigned to said target server, said method further comprises:
acquiring third task information of the newly added EDA simulation verification task and a second actual resource amount used by the newly added EDA simulation verification task within a preset time period;
inputting third task information of the newly added EDA simulation verification task into the resource quantity prediction model to obtain a third output result;
calculating the loss of the resource quantity prediction model based on the third output result and the second actual resource quantity, adjusting the model parameters of the resource quantity prediction model based on the loss, and continuing to execute the step of inputting the third task information of the newly added EDA simulation verification tasks into the resource quantity prediction model to obtain a third output result until the third task information of each newly added EDA simulation verification task is input into the resource quantity prediction model to obtain a resource quantity prediction model after the model parameters are updated;
respectively calculating a first performance value and a second performance value, wherein the first performance value is the performance of the resource quantity prediction model before the model parameters are updated, and the second performance value is the performance of the resource quantity prediction model after the model parameters are updated;
and if the second performance value is higher than the first performance value, taking the resource quantity prediction model with updated model parameters as a new resource quantity prediction model.
6. The method according to any of claims 1-5, wherein before predicting the amount of resources required by the EDA simulation verification task to be allocated based on the second task information of the historical EDA simulation verification task, the first actual amount of resources used by the historical EDA simulation verification task and the first task information, further comprising:
determining the same historical tasks with the same second task information in the historical EDA simulation verification tasks;
and reserving any historical EDA simulation verification task in the same historical task, and taking the average resource quantity of the first actual resource quantity of the same historical task as the first actual resource quantity of the reserved historical EDA simulation verification task.
7. The method according to any of claims 1-5, wherein before predicting the amount of resources required by the EDA simulation verification task to be allocated based on the second task information of the historical EDA simulation verification task, the first actual amount of resources used by the historical EDA simulation verification task and the first task information, further comprising:
determining similar historical tasks of which the similarity of the second task information is greater than the preset similarity in the historical EDA simulation verification tasks;
calculating an average resource amount based on the first actual resource amounts of the similar historical tasks;
and reserving any one historical EDA simulation verification task in the similar historical tasks, and taking the average resource amount as a first actual resource amount of the reserved historical EDA simulation verification task.
8. The method according to any of claims 1-5, wherein before predicting the amount of resources required by the EDA simulation verification task to be allocated based on the second task information of the historical EDA simulation verification task, the first actual amount of resources used by the historical EDA simulation verification task and the first task information, further comprising:
and removing second task information which does not contain preset information from the second task information of each historical EDA simulation verification task.
9. A task assigning apparatus, characterized in that the apparatus comprises:
the first information acquisition module is used for acquiring first task information of an EDA simulation verification task to be distributed, wherein the first task information comprises: EDA tool information used by the EDA simulation verification task to be distributed, development verification tool information used by the task simulation verification, task queue information, module information of task simulation and sub-module information of task simulation;
the resource amount prediction module is used for acquiring a historical EDA simulation verification task similar to the EDA simulation verification task to be distributed, and predicting the resource amount required by the EDA simulation verification task to be distributed based on second task information of the historical EDA simulation verification task, a first actual resource amount used by the historical EDA simulation verification task and the first task information;
the task allocation module is used for determining a target server for processing the EDA simulation verification tasks to be allocated based on the predicted resource amount and the current available resource amount of each server, and allocating the EDA simulation verification tasks to be allocated to the target server;
the obtaining of the historical EDA simulation verification task similar to the EDA simulation verification task to be distributed includes: extracting historical EDA simulation verification tasks of which preset sub information of the second task information is the same as that of the first task information, calculating the similarity between the first task information and the second task information of each extracted historical EDA simulation verification task, and selecting the historical EDA simulation verification tasks of which the corresponding similarity is greater than the first preset value as the historical EDA simulation verification tasks similar to the EDA simulation verification tasks to be distributed, wherein the preset sub information is sub information which is contained in the task information and is important for predicting the resource quantity.
10. The apparatus of claim 9, wherein the resource amount prediction module is specifically configured to:
inputting the first task information into a resource quantity prediction model to obtain a first output result, and taking the first output result as the predicted resource quantity required by the EDA simulation verification task to be distributed, wherein the resource quantity prediction model is as follows: and training a preset model by utilizing the second task information of the historical EDA simulation verification task and the first actual resource amount actually used by the historical EDA simulation verification task.
11. The apparatus of claim 10, wherein the resource amount prediction model is obtained by training the preset model with second task information of a historical EDA simulation verification task and a first actual resource amount actually used by the historical EDA simulation verification task by:
the second information acquisition module is used for acquiring second task information of the historical EDA simulation verification task and the corresponding first actual resource amount;
a second result obtaining module, configured to input the second task information into the preset model, obtain a second output result, where the second output result is used as the predicted resource amount required by the historical EDA simulation verification task corresponding to the second task information;
and the first parameter adjusting module is used for calculating the loss of the preset model based on the second output result and the first actual resource amount, adjusting the model parameters of the preset model based on the loss, continuously triggering and executing the second result obtaining module until a preset training termination condition is met, and determining the preset model meeting the preset training termination condition as the resource amount prediction model.
12. The apparatus of claim 11, wherein the second result obtaining module is specifically configured to:
inputting the second task information into different types of preset models respectively, obtaining second output results aiming at the different preset models, and using the second output results as resource quantities required by historical EDA simulation verification tasks corresponding to the second task information and predicted by the preset models respectively;
the first parameter adjusting module is specifically configured to:
calculating the loss of each preset model based on the second output result of the preset model and the first actual resource amount, and adjusting the model parameters of the preset model based on the loss; continuing to trigger and execute the second result obtaining module until the training termination condition of the preset model is met, and determining the preset model meeting the training termination condition as a resource quantity alternative prediction model; calculating a performance value representing the performance of each resource quantity candidate prediction model aiming at each resource quantity candidate prediction model; and based on the performance value of each resource quantity candidate prediction model, taking the resource quantity candidate prediction model with the highest selective performance value as the resource quantity prediction model.
13. The apparatus of claim 10, further comprising:
the resource amount obtaining module is used for obtaining third task information of the newly added EDA simulation verification task and a second actual resource amount used by the newly added EDA simulation verification task within a preset time period;
a third result obtaining module, configured to input third task information of the newly added EDA simulation verification task into the resource amount prediction model to obtain a third output result;
the second parameter adjusting module is used for calculating the loss of the resource quantity prediction model based on the third output result and the second actual resource quantity, adjusting the model parameters of the resource quantity prediction model based on the loss, and continuing to trigger and execute the third result obtaining module until the third task information of each newly-added EDA simulation verification task is input into the resource quantity prediction model to obtain the resource quantity prediction model after the model parameters are updated;
the performance value calculation module is used for respectively calculating a first performance value and a second performance value, wherein the first performance value is the performance of the resource quantity prediction model before the model parameters are updated, and the second performance value is the performance of the resource quantity prediction model after the model parameters are updated;
and the model updating module is used for taking the resource quantity prediction model after the model parameters are updated as a new resource quantity prediction model if the second performance value is higher than the first performance value.
14. The apparatus according to any one of claims 9-13, further comprising:
the same task determining module is used for determining the same historical tasks with the same second task information in the historical EDA simulation verification tasks;
and the first task reserving module is used for reserving any one historical EDA simulation verification task in the same historical task and taking the average resource quantity of the first actual resource quantity of the same historical task as the first actual resource quantity of the reserved historical EDA simulation verification task.
15. The apparatus according to any one of claims 9-13, further comprising:
the similar task determination module is used for determining a similar historical task of which the similarity of the second task information is greater than the preset similarity in the historical EDA simulation verification tasks;
the average resource amount calculating module is used for calculating the average resource amount based on the first actual resource amount of each similar historical task;
and the second task reservation module is used for reserving any historical EDA simulation verification task in the similar historical tasks and taking the average resource amount as a first actual resource amount of the reserved historical EDA simulation verification task.
16. The apparatus according to any one of claims 9-13, further comprising:
and the information removing module is used for removing second task information which does not contain preset information from the second task information of each historical EDA simulation verification task.
CN202110922937.4A 2021-08-12 2021-08-12 Task allocation method and device Active CN113378498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110922937.4A CN113378498B (en) 2021-08-12 2021-08-12 Task allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110922937.4A CN113378498B (en) 2021-08-12 2021-08-12 Task allocation method and device

Publications (2)

Publication Number Publication Date
CN113378498A CN113378498A (en) 2021-09-10
CN113378498B true CN113378498B (en) 2021-11-26

Family

ID=77576937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110922937.4A Active CN113378498B (en) 2021-08-12 2021-08-12 Task allocation method and device

Country Status (1)

Country Link
CN (1) CN113378498B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327861B (en) * 2021-11-17 2022-12-02 芯华章科技股份有限公司 Method, device, system and storage medium for executing EDA task
CN116932174B (en) * 2023-09-19 2023-12-08 浙江大学 Dynamic resource scheduling method, device, terminal and medium for EDA simulation task

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160179581A1 (en) * 2014-12-19 2016-06-23 Netapp, Inc. Content-aware task assignment in distributed computing systems using de-duplicating cache
CN107343164B (en) * 2016-04-29 2020-02-14 中国电信股份有限公司 Video monitoring task allocation method and device
CN110046034B (en) * 2018-01-15 2021-04-23 北京国双科技有限公司 Task obtaining method and device
CN111224806A (en) * 2018-11-27 2020-06-02 华为技术有限公司 Resource allocation method and server
CN112789599B (en) * 2018-11-30 2024-07-09 北京比特大陆科技有限公司 Information recommendation method, device, equipment and readable storage medium
CN111381970B (en) * 2020-03-16 2023-07-25 第四范式(北京)技术有限公司 Cluster task resource allocation method and device, computer device and storage medium
CN112148427A (en) * 2020-09-04 2020-12-29 北京浪潮数据技术有限公司 Cloud platform resource allocation method and device and computer readable storage medium
CN112463361A (en) * 2020-10-29 2021-03-09 苏州浪潮智能科技有限公司 Method and equipment for distributing elastic resources of distributed computation
CN112667376A (en) * 2020-12-23 2021-04-16 数字广东网络建设有限公司 Task scheduling processing method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Semantic Resource Allocation with Historical Data Based Predictions;Jorge Ejarque 等;《Cloud Computing 2010: The First International Conference on Cloud Computing, GRIDs, and Virtualization》;20101121;第104-109页 *

Also Published As

Publication number Publication date
CN113378498A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN111444009B (en) Resource allocation method and device based on deep reinforcement learning
US10235625B1 (en) Automatically scaling neural networks based on load
CN110766269A (en) Task allocation method and device, readable storage medium and terminal equipment
CN113378498B (en) Task allocation method and device
CN108173905B (en) Resource allocation method and device and electronic equipment
US8458334B2 (en) Optimized capacity planning
CN104123189A (en) Web multilayer application dynamic resource adjustment method based on IaaS layer application perception
US20190236439A1 (en) Resource allocation based on decomposed utilization data
CN108205469B (en) MapReduce-based resource allocation method and server
CN113515382B (en) Cloud resource allocation method and device, electronic equipment and storage medium
CN105580001A (en) Processing a hybrid flow associated with a service class
Kang et al. Robust resource scaling of containerized microservices with probabilistic machine learning
Liu et al. CORP: Cooperative opportunistic resource provisioning for short-lived jobs in cloud systems
CN112148468A (en) Resource scheduling method and device, electronic equipment and storage medium
CN111381970A (en) Cluster task resource allocation method and device, computer device and storage medium
CN111752706A (en) Resource allocation method, device and storage medium
CN115033340A (en) Host selection method and related device
CN118260053B (en) Memory scheduling method of heterogeneous computing system, heterogeneous computing system and device
CN111813524A (en) Task execution method and device, electronic equipment and storage medium
CN111835536B (en) Flow prediction method and device
CN109992408B (en) Resource allocation method, device, electronic equipment and storage medium
CN116962532A (en) Cluster task scheduling method and device, computer equipment and storage medium
CN114816955A (en) Database performance prediction method and device
CN114296872A (en) Scheduling method and device for container cluster management system
CN115545248A (en) Target object prediction method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant