CN118260054A - Acquisition method, training method, task processing method and related devices - Google Patents

Acquisition method, training method, task processing method and related devices Download PDF

Info

Publication number
CN118260054A
CN118260054A CN202410693597.6A CN202410693597A CN118260054A CN 118260054 A CN118260054 A CN 118260054A CN 202410693597 A CN202410693597 A CN 202410693597A CN 118260054 A CN118260054 A CN 118260054A
Authority
CN
China
Prior art keywords
decision
task scheduling
operator
task
model
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.)
Granted
Application number
CN202410693597.6A
Other languages
Chinese (zh)
Other versions
CN118260054B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202410693597.6A priority Critical patent/CN118260054B/en
Publication of CN118260054A publication Critical patent/CN118260054A/en
Application granted granted Critical
Publication of CN118260054B publication Critical patent/CN118260054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • General Factory Administration (AREA)

Abstract

The application discloses an acquisition method, a training method, a task processing method and a related device. The acquisition method comprises the following steps: acquiring an operator set and a scheduling decision set corresponding to a currently executed task, wherein the scheduling decision set comprises at least one type of task scheduling decision; acquiring the processing performance change of the operator set after executing task scheduling decisions; selecting a target operator with processing performance change meeting a preset performance condition from the operator set, and taking the running environment data corresponding to the target operator as training data of a task scheduling model. By the aid of the scheme, scheduling performance of the task scheduling model after training can be improved.

Description

Acquisition method, training method, task processing method and related devices
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a training data acquisition method, a task scheduling model training method, a task processing method, a computer device, and a computer readable storage medium.
Background
With the development of the internet and the continuous progress of computer science and technology, various intelligent algorithms with different types can be flexibly combined according to application scenes, problems to be solved and the like, and various tasks can be completed by using different intelligent algorithms under different business scenes.
In the current task scheduling, a plurality of algorithm tasks are scheduled and executed in a sequential execution mode, and because of large difference in time consumption and other performances of different algorithm tasks, if hardware resources are unreasonably used for scheduling and executing the algorithm tasks, the conditions that one or more algorithms have overlong waiting time, a large amount of caches and the like can occur, so that the processing efficiency of the whole task is low, namely the current task scheduling has the problem of low scheduling performance.
Disclosure of Invention
The application mainly solves the technical problem of providing an acquisition method, a training method, a task processing method and a related device, and can improve the scheduling performance of a task scheduling model after training.
In order to solve the above problem, a first aspect of the present application provides a method for acquiring training data, the method comprising: acquiring an operator set and a scheduling decision set corresponding to a currently executed task, wherein the scheduling decision set comprises at least one type of task scheduling decision; acquiring the processing performance change of the operator set after executing task scheduling decisions; selecting a target operator with processing performance change meeting a preset performance condition from the operator set, and taking the running environment data corresponding to the target operator as training data of a task scheduling model.
In order to solve the above problem, a second aspect of the present application provides a training method of a task scheduling model, the method comprising: acquiring training data, wherein the training data is acquired by using the method for acquiring the training data; training the task scheduling model based on the training data to obtain a trained task scheduling model.
In order to solve the above problems, a third aspect of the present application provides a task processing method, including: acquiring environment data to be decided corresponding to a to-be-decided operator of a task to be processed; processing the environmental data to be decided by using the trained task scheduling model to obtain a target task scheduling decision; the task scheduling model is obtained by using the training method of the task scheduling model; and processing the operator to be decided by using the target task scheduling decision.
In order to solve the above-mentioned problems, a fourth aspect of the present application provides a computer device, which includes a memory and a processor coupled to each other, the memory storing program data, the processor being configured to execute the program data to implement any of the steps of any of the methods described above.
In order to solve the above-described problems, a fifth aspect of the present application provides a computer-readable storage medium storing program data executable by a processor for implementing any one of the steps of any one of the methods described above.
According to the scheme, the operator set corresponding to the currently executed task and the scheduling decision set are obtained, the scheduling decision set comprises at least one type of task scheduling decision, the processing performance change of the operator set after the task scheduling decision is executed is obtained, the target operator with the processing performance change meeting the preset performance condition in the operator set is selected, and the processing performance change of the target operator meets the preset performance condition because the processing performance change of the selected target operator meets the preset performance condition, namely after the task scheduling decision is executed on the target operator, the processing performance of the task can be adjusted by executing the task scheduling decision on the target operator, so that the running environment data corresponding to the target operator is used as training data of a task scheduling model, effective training data can be selected to train the task scheduling model, and the scheduling performance of the task scheduling model after training is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings required in the description of the embodiments will be briefly described below, it being obvious that the drawings described below are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flow chart of an embodiment of a training data acquisition method according to the present application;
FIG. 2 is a flowchart illustrating the step S12 of FIG. 1 according to an embodiment of the present application;
FIG. 3 is a flow chart of an embodiment of a training method of the task scheduling model of the present application;
FIG. 4 is a flowchart illustrating the step S22 of FIG. 3 according to an embodiment of the present application;
FIG. 5 is a flow chart of an embodiment of a task processing method according to the present application;
FIG. 6 is a flowchart illustrating the step S32 of FIG. 5 according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an embodiment of a training data acquisition apparatus according to the present application;
FIG. 8 is a schematic diagram of an embodiment of a training apparatus of the task scheduling model of the present application;
FIG. 9 is a schematic diagram of an embodiment of a task processing device according to the present application;
FIG. 10 is a schematic diagram of an embodiment of a computer device of the present application;
FIG. 11 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first" and "second" in the present application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
Through long-term research of the inventor of the application, the service requirements of different scenes are different in the current application fields. In the field of intelligent audio/video processing solutions, different types of intelligent algorithms are often required to be combined in series and parallel, and the intelligent algorithms can be used for solving audio/video services of different scenes through different permutation and combination. Processing of a frame of data is typically performed by all algorithms in the intelligent solution, and when processing the data stream, a sequential execution scheme is typically used to schedule execution of a plurality of algorithmic tasks. However, there are large differences in time consumption of different algorithms and differences in different hardware platforms, and if hardware resources are not reasonably used, a large amount of cache exists in one or more algorithms, so that the processing performance of the solution is poor.
In order to solve the technical problems, the application provides an acquisition method, a training method, a task processing method and related devices, which can improve the scheduling performance of a task scheduling model after training.
The present application provides the following examples, and each example is specifically described below.
It will be appreciated that embodiments of the acquisition method, training method, task processing method, etc. of the present application may be performed by a computer device or a service platform, etc. Such as an image pickup apparatus, a smart phone, a computer, a server, etc., to which the present application is not limited. It should be understood that the above-described method may also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and the implementation environments to which the method is applied are not limited by the present embodiment.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a training data acquisition method according to the present application. The method may comprise the steps of:
S11: and acquiring an operator set and a scheduling decision set corresponding to the current execution task, wherein the scheduling decision set comprises at least one type of task scheduling decision.
The current execution task may be an audio analysis task, an image analysis task, an audio/video analysis task, a text analysis task, etc. under different scenes, which is not limited in this application.
Different execution tasks may correspond to different operator sets, where the operator sets include several operators of several solutions, i.e. the current execution task may include several solutions, each of which may include several operators, which together form the operator set.
For example, taking the currently executed task as an image analysis task as an example, the corresponding operator set may include a target detection operator, a target tracking operator, a target association operator, and the like; taking the current execution task as an audio analysis task as an example, the corresponding operator set can comprise a voice recognition operator, a voice detection operator, a scene judgment operator and the like.
In some implementations, the currently executing task may contain a set of operators for solutions to the currently executing task for different services under different scenarios.
For example, its operator set can be expressed as:
S={p1,p2,...,pm}。
wherein S represents an operator set of a currently executed task, p1, p2 and pm respectively represent operator sets of the 1 st, 2 nd and m th solutions in the set, and m is a positive integer greater than 2.
For each solution operator set, it can be expressed as:
p={a1,a2,...,an}。
where p represents a solution, an represents an nth operator in the solution, and n is a positive integer greater than 2.
Different execution tasks can correspond to different scheduling decision sets, wherein the scheduling decision sets comprise at least one type of task scheduling decision, and the task scheduling decision can be used for scheduling operators in the operator set and can also represent decision for optimizing performance. If at least one type of task scheduling decision is the number of using thread pools, operator binding cases, exclusive thread pool cases, etc., the application is not limited in this respect, and may be set according to a specific execution task.
In some implementations, each task scheduling decision includes a plurality of decision instances. Different types of task scheduling decisions may include different decision instances. Such as task scheduling decisions for the number of usage thread pools, the decision examples may include increasing the number of usage thread pools, decreasing the number of usage thread pools or no processing, etc., or the decision examples may include increasing the number of usage thread pools to a first number, increasing the number of usage thread pools to a second number, etc. The application is not limited in this regard.
In some implementations, the task scheduling decisions include at least decision instances of at least two different processing decisions for the task scheduling decisions and decision instances of no processing decisions. Different decision instances may be represented by different characters in the task scheduling decision.
Illustratively, the task decision set contains the number of used thread pools A1, operator binding core case A2, exclusive thread pool case A3, and so on. The method comprises the following steps:
The number of thread pools used, A1, contains the decision instance: the number in the thread pool is used to increment {1}, decrement { -1}, or do nothing {0}.
The operator binding core case A2 contains a decision instance: a certain operator is subject to binding processing {1}, unbinding processing { -1} or not subject to processing {0}. After the kernel binding processing is performed on a certain operator, the task of the operator is processed by a thread on the kernel of the bound processor (CPU, central Processing Unit); the unbinding process then the operator's task can be bound to thread processing on any processor core.
Exclusive thread pool case A3 contains the decision instance: creating an exclusive thread pool dedicated to servicing {1} for a certain operator, eliminating the exclusive thread pool { -1} or not doing the processing {0}.
In some embodiments, the multiple types of task scheduling decisions in the corresponding scheduling decision set are ordered according to a preset priority. Illustratively, the sorting of the preset priorities, such as sorting according to performance optimization degree, sorting according to importance of task scheduling decisions, and the like, which is not limited by the present application. For example, the preset priority ranking in the task decision set is as follows: the number of thread pools A1, the operator binding core case A2, the exclusive thread pool case A3, etc. are used.
In the mode, the application provides the scheduling decision set for the ladder type optimal scheduling, which can judge whether the number of threads in a thread pool is required to be reduced, perform binding processing and unbinding processing on operators, create an exclusive thread pool for the operators and the like, can avoid excessive optimization, can reduce the optimization strength, gradually optimize algorithm scheduling through the ladder type optimization means, reasonably use hardware resources and improve the arrangement performance.
S12: and acquiring the processing performance change of the operator set after executing the task scheduling decision.
In some implementations, task scheduling decisions may be performed on several operators (or at least some operators) in a set of operators, obtaining a change in processing performance before and after the task scheduling decisions are performed.
In some implementations, the task scheduling decisions performed on the operators may be any one or more of at least one type of task scheduling decisions included in a set of scheduling decisions, as the application is not limited in this regard. For example, in the case of performing a multi-task scheduling decision, the processing performance change may be acquired separately, or one of the plurality of the processing performance changes that is larger may be acquired, and the present application is not limited thereto.
For example, before the operator is adjusted by adopting the task scheduling decision, the processing performance of the device or platform corresponding to the operator needs to be recorded first, after the operator is adjusted by adopting the task scheduling decision, the processing performance of the device or platform corresponding to the operator is recorded again, and the processing performance change after the operator executes the task scheduling decision is obtained according to the processing performance recorded twice.
Wherein processing performance may be evaluated from multiple dimensions, such as any one or combination of environmental throughput, latency of tasks in a task waiting queue, latency, fault tolerance, etc., to obtain task processing performance. Such as combining the integrated environment throughput and the latency of the task to obtain processing performance.
Taking the waiting time of the task in the task waiting queue as an example, if the waiting time of each task in the task waiting queue is longer, the processing performance is lower, and if the waiting time of each task in the task waiting queue is shorter, the processing performance is higher; taking the environment throughput as an example, the lower the environment throughput, the lower the processing performance, and the higher the environment throughput, the higher the processing performance.
In some embodiments, referring to fig. 2, step S12 of the above embodiments may be further extended. The method for obtaining the processing performance change after the operator set executes the task scheduling decision may include the following steps:
s121: selecting candidate operators from the operator set; and acquiring first environment data of the candidate operator.
The operator set comprises a plurality of operators with a plurality of solutions, and candidate operators are selected from the operator set, wherein the candidate operators can be expressed as operators needing task scheduling, such as task queues, cache conditions and the like of the candidate operators for evaluation, so as to select the candidate operators. For example, the selected condition is that the task queue satisfies a preset queue condition, the buffering condition satisfies a preset buffering condition, and the like, and if the preset buffering condition is that the used buffering value is greater than the buffering threshold value and less than the maximum buffering value.
Therefore, the first environmental data corresponding to the candidate operator, such as the running environmental information of the equipment or the platform when the candidate operator, and the like, can be obtained.
In some embodiments, several operators of the operator set may be sequentially operated to obtain current environmental data corresponding to the current operator. By way of example, the current environmental data may contain memory utilization, central processor utilization, graphics processor utilization, neural network processor utilization, etc., and the application is not limited thereto.
For example, the current environmental data may be represented as:
dev={mem,gpu,cpu,npu,...}。
Where dev represents current context data, such as current context data on the current device running the current operator, mem represents memory utilization, GPU represents graphics processor (graphics processing unit, GPU) utilization, CPU represents central processor (Central Processing Unit, CPU) utilization, NPU represents neural network processor (Neural Processing Unit, NPU) utilization.
In some embodiments, prior to this step, a task queue of several operators in the operator set may be obtained. After a plurality of operators of the operator set are operated in sequence, a current task queue corresponding to the current operator can be obtained.
For example, the current task queue may be expressed as:
Qai={task_max,task_T,task_rt}。
Wherein Qai represents a current task queue of an ith algorithm (e.g., a current operator) in a solution of a current execution task, task_max represents a longest length of the current task queue, task_t represents a length threshold of the current task queue, task_rt represents a current length of the current task queue, that is, a real-time use length, and the current length is recorded when the current operator runs.
In some embodiments, the preset queue condition is that the current length of the current task queue is greater than a length threshold and the current length is less than a longest length. I.e. it can be indicated that task_rt is greater than task_t and less than task_max.
Under the condition that the current task queue meets the preset queue condition, the current operator can be used as a candidate operator and the current environment data can be used as first environment data of the candidate operator in response to the fact that the current task queue meets the preset queue condition.
S122: and executing a candidate task scheduling decision on the candidate operator to obtain second environmental data, wherein the candidate task scheduling decision is selected from a scheduling decision set according to a preset mode.
And selecting a candidate task scheduling decision from the scheduling decision set according to a preset mode, wherein the candidate task scheduling decision comprises any one of at least one type of task scheduling decision. Any one of the number of the thread pools A1, the operator binding core case A2 and the exclusive thread pool case A3 can be selected to be used as a candidate task scheduling decision. The preset mode may be a random selection mode, a uniform selection mode, a sequential number decreasing selection mode, etc., which is not limited in the present application.
For example, the random selection manner is to randomly select one of A1, A2, and A3, the uniform selection manner is to sequentially select one of A1, A2, and A3, for example, the sequential decreasing number selection manner is to sequentially decrease the sequential decreasing number of one of A1, A2, and A3 according to the priority order, for example, 3 times sequentially select in A1, 2 times sequentially select in A2, and so on.
And executing the candidate task scheduling decision on the candidate operator to obtain second environment data, namely recording the environment data after executing the candidate task scheduling decision.
In some implementations, each task scheduling decision includes a plurality of decision instances. Any decision instance included in the candidate task scheduling decision can be executed on the candidate operator, so that second environment data is obtained.
S123: and obtaining the processing performance change corresponding to the candidate operator based on the first environment data and the second environment data.
The first environmental data and the second environmental data may represent processing performance of the task, and the processing performance change corresponding to the candidate operator may be obtained based on the change between the first environmental data and the second environmental data.
In some implementations, any of the first environmental data, the second environmental data acquisition environmental throughput, the latency of tasks in the task wait queue, the latency, the fault tolerance, etc. may be utilized to obtain the processing performance change.
In this embodiment, the processing performance change at least includes an environmental throughput change, where the environmental throughput t1 corresponding to the candidate operator may be recorded, and the environmental throughput t2 after the candidate operator performs the candidate task scheduling decision on the candidate operator, and the environmental throughput change may be obtained according to the environmental throughput t1 and the environmental throughput t 2.
S13: selecting a target operator with processing performance change meeting a preset performance condition from the operator set, and taking the running environment data corresponding to the target operator as training data of a task scheduling model.
According to the performance processing changes corresponding to each operator in the operator set, selecting an operator with the processing performance change meeting the preset performance condition as a target operator.
In some embodiments, the performance processing changes of the candidate operators are obtained, and the candidate operators with the processing performance changes meeting the preset performance conditions are selected as target operators.
In some embodiments, the preset performance condition comprises: the process performance variation is manifested as a process performance optimization. Exemplary, the preset performance conditions include at least: the environmental throughput changes the environmental throughput increases, for example, the environmental throughput t2 is greater than the environmental throughput t1, and the processing performance changes corresponding to the candidate operators meet the preset performance condition.
And taking the running environment data corresponding to the target operator as training data of the task scheduling model. The operation environment data corresponding to the target operator at least comprises: and the target operator corresponds to the executed candidate task scheduling decision and the current environment data. That is, at least the current data of the target operator with the processing performance change meeting the preset performance condition is saved as training data, such as the current environment data, the executed candidate task scheduling decision and other information.
For example, the training data may be represented as:
the data represents currently recorded training data, and can be currently valid data. dev represents the current environmental data.
Task_rt represents the number of tasks in the current task queue of the target operator, i.e. the current length of the current task queue. alg_type represents the type of the target operator, solu _type represents the type of the current solution to which the target operator belongs. thrCount denotes the sum of the number of threads used in the current solution. core represents the cpu core number, alg_num represents the total number of all operator numbers in the current solution, and a represents the candidate task scheduling decision to be performed, i.e. the optimization decision to be performed. The candidate task scheduling decision is any one of A1, A2 and A3, and specifically, any decision instance of the candidate task scheduling decision can be represented. a may be represented by a character containing candidate task scheduling decisions, decision instances, e.g., A1, A2, A3 represent candidate task scheduling decisions, {1}, { -1}, and {0} represent decision instances. Illustratively, a is "A1{1}, then this indicates that the number of threads in the thread pool of the target operator is increased.
In some embodiments, the above steps are repeatedly performed, so that training data corresponding to a plurality of target operators can be obtained, and each training data is saved to the training data set s_train.
In some embodiments, after obtaining the training data, the training data may be split according to the type of task scheduling decision to obtain training data corresponding to various types, for example, the training data belonging to the number A1 of the execution use thread pool may be divided into training data s_train_1 of type A1; dividing training data belonging to an operator binding core condition A2 into training data S_train_2 of an A2 type; training data belonging to the exclusive thread pool case A3 is divided into training data s_train_3 of the A3 type.
The training data corresponding to each type can be used for training the task scheduling model respectively so as to obtain the task scheduling model after training of each type.
According to the scheme, the operator set corresponding to the currently executed task and the scheduling decision set are obtained, the scheduling decision set comprises at least one type of task scheduling decision, the processing performance change of the operator set after the task scheduling decision is executed is obtained, the target operator with the processing performance change meeting the preset performance condition in the operator set is selected, and the processing performance change of the target operator meets the preset performance condition because the processing performance change of the selected target operator meets the preset performance condition, namely after the task scheduling decision is executed on the target operator, the processing performance of the task can be adjusted by executing the task scheduling decision on the target operator, so that the running environment data corresponding to the target operator is used as training data of a task scheduling model, effective training data can be selected to train the task scheduling model, and the scheduling performance of the trained task scheduling model is improved.
In some embodiments, after the training data is obtained, the task scheduling model may be trained using the training data to obtain a trained task scheduling model. Reference is made to the following examples for specific implementation.
Referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment of a training method of a task scheduling model according to the present application. The method may comprise the steps of:
s21: training data is acquired, wherein the training data is acquired by the training data acquisition method.
For the implementation of this embodiment, reference may be made to the implementation process of the foregoing embodiment, which is not described herein.
S22: training the task scheduling model based on the training data to obtain a trained task scheduling model.
And training the task scheduling model to be trained by taking the current data of the target operator as a training sample, namely training data, so as to obtain a trained task scheduling model. The task scheduling model can be a decision-making agent, and the trained decision-making agent can be obtained. The specific implementation mode of the task scheduling model can be flexibly set according to the actual application condition, and the application is not limited to the specific implementation mode.
For example, environmental data and processing performance changes before and after the operator performs task scheduling decisions may be collected and saved in real-time to gradually expand the training dataset. Then, the task scheduling model may be trained periodically according to a preset period, for example, after each detection period T, the task scheduling model is trained by using pre-stored training data. For example, whether a training trigger event exists can be detected, if the current task scheduling model is detected to optimize the current execution task, the optimization efficiency is lower, if the processing performance of the task is reduced or the lifting speed of the processing performance of the task is smaller than the preset speed, the training trigger event is judged to exist, and the pre-stored training data is adopted to train the task scheduling model; and if no training trigger event is detected, periodically training the task scheduling model according to a preset period. The application is not limited in this regard.
In some embodiments, since the training data included in the training data set s_train is training data corresponding to each type, such as training data s_train_1 of type A1, training data s_train_2 of type A2, and training data s_train_3 of type A3. The training data of each type can be used as sample training data, and the steps are executed to train the task scheduling models respectively so as to train the task scheduling models model_1, model_2 and model_3 after training of each type.
In some embodiments, the task scheduling model includes at least a first tier agent and a second tier agent. For example, a first layer of agents and a second layer of agents may be built separately, where the first layer of agents is composed of multiple different neural networks, and the specific differences may be mainly in the number of network layers and/or the number of neurons. The second layer of intelligent agent is composed of a neural network, and the number of layers is a plurality of layers.
Optionally, in order to improve accuracy of the first layer agent, when the first layer agent is built, a plurality of first decision neural networks may be built, and a network architecture between each first decision neural network is different, for example, a network layer number and/or a neuron number are different, so that an output result of each first decision neural network may be synthesized, and a more accurate output result may be obtained.
Optionally, in order to improve the stability of the second-layer agent, when the second-layer agent is built, a plurality of layers of second decision neural networks may be built, so as to obtain a more stable and accurate output result.
Alternatively, the task scheduling model may contain multiple agents, such as may contain a first layer of agents, a second layer of agents, a third layer of agents, and so on.
It can be appreciated that the task scheduling model can be built according to a specific application scenario, such as building the hierarchy, the number and the like of the agents, and the application is not limited to this.
In some embodiments, multiple agents (such as a first layer of agents and a second layer of agents) included in the task scheduling model may be trained sequentially or individually, and in the training process, corresponding loss values may be obtained for each agent separately, and each agent may be trained sequentially or individually. If the former agent is trained, the output of the former agent is used as the input of the latter agent, the latter agent is trained, and so on until the last agent is trained. If each agent is trained independently, each agent after training can be combined to obtain a trained task scheduling model.
In some embodiments, multiple agents (such as a first layer of agents and a second layer of agents) included in the task scheduling model may be trained at the same time, in the training process, corresponding loss values may be obtained for each agent, and then the loss values may be integrated to obtain a total loss value, or the loss value of the agent of the last layer may be obtained as the total loss value, so as to train the whole task scheduling model.
The application does not limit the training mode of the task scheduling model and the acquisition mode of the loss value. The present application is described below with an example of training of a task scheduling model.
In some embodiments, referring to fig. 4, step S22 of the above embodiments may be further extended. Training the task scheduling model based on the training data to obtain a trained task scheduling model, and the method can include the following steps:
S221: training the first-layer agent by using training data to obtain the trained first-layer agent.
The task scheduling model comprises at least a first layer of agents and a second layer of agents. And inputting training data into the first-layer intelligent agent to obtain a first-layer prediction result output by the first-layer intelligent agent, and acquiring a first loss value based on the first-layer prediction result, so as to adjust network parameters of the first-layer intelligent agent according to the first loss value to obtain the trained first-layer intelligent agent.
In some embodiments, the loss function for obtaining the first loss value according to the present application may be a binary cross entropy, KL (Kullback Leibler) divergence loss function, or the like, which is not limited by the present application.
Illustratively, the first loss value corresponding to the first layer agent may be expressed as:
Wherein L1 represents a first loss value. L1i represents the loss value of sample i, and N represents the number of samples of training data. M represents the number of categories of training data. c represents a class such as A1, A2 or A3.y ic represents the true class of sample i, 1 is taken when the true class equals c, otherwise 0 is taken. p ic represents the probability that the first layer predictor of sample i belongs to category c. Wherein the sample i may also represent training data i in the training data set.
S222: inputting training data into the trained first-layer intelligent agent to obtain first-layer decision characteristics; and training the second-layer intelligent agent by utilizing the first-layer decision feature to obtain the trained second-layer intelligent agent.
And inputting training data into the trained first-layer agent to obtain first-layer decision characteristics output by the first-layer agent. And inputting the first layer decision feature into a second layer agent, and outputting to obtain a second layer prediction result. And obtaining a second loss value based on the second-layer prediction result, and adjusting network parameters of the second-layer agent according to the second loss value to obtain the trained second-layer agent.
Under the condition that the first-layer agent consists of a plurality of different neural networks, the prediction results, namely the first-layer decision characteristics, given by the neural networks can be output and obtained respectively and used as the input of the second-layer agent.
In some embodiments, the loss function of the present application for obtaining the second loss value may be a binary cross entropy, KL divergence loss function, or the like. The loss functions of the first layer agent and the second layer agent for obtaining the loss value may be the same or different. The application is not limited in this regard.
Illustratively, the second loss value corresponding to the second tier agent may be expressed as:
Wherein L2 represents the second loss value. L2i represents the loss value of sample i and N represents the number of samples of training data. M represents the number of categories of training data. c represents a class such as A1, A2 or A3.y ic represents the true class of sample i, 1 is taken when the true class equals c, otherwise 0 is taken. p ic represents the probability that the second layer predictor of sample i belongs to class c. Wherein the sample i may also represent training data i in the training data set.
S223: and combining the trained first-layer intelligent agent and the trained second-layer intelligent agent to obtain the trained task scheduling model.
And combining the trained first-layer intelligent agent and the trained second-layer intelligent agent to obtain the trained task scheduling model. The trained task scheduling model is a trained task scheduling model corresponding to the type of the training data.
The training data corresponding to each type can be used for training the task scheduling model respectively, and the task scheduling model after each type of training can be obtained through training.
The training data s_train_1 of the A1 type is input into a first layer of agent for training, after the trained first layer of agent is obtained, a sample i in the training data s_train_1 is taken as input of the first layer of agent, and each decision neural network in the first layer of agent gives out a prediction result respectively, so that an output first layer of decision feature is obtained. The first layer decision feature is used as an input of a decision neural network of the second layer agent to train, so as to obtain a trained second layer agent, and the trained first layer agent and the trained second layer agent are combined to obtain a trained task scheduling model, for example, the task scheduling model obtained by training by using training data S_train_1 can be called model_1. Similarly, the above steps are repeated, and training is performed by using the training data s_train_2 and the training data s_train_3 in sequence, so that the task scheduling model model_2 and the model_3 can be obtained.
According to the scheme, the first-layer intelligent body and the second-layer intelligent body are built, the first-layer intelligent body is trained by utilizing training data, the trained first-layer intelligent body is obtained, and the first-layer intelligent body combines the idea of integrated learning, so that the stability of a model is improved; in addition, training data is input into the trained first-layer intelligent agent to obtain first-layer decision characteristics; training the second-layer intelligent agent by utilizing the first-layer decision feature to obtain a trained second-layer intelligent agent, and relearning the decision of the second-layer intelligent agent by using the result of the first-layer intelligent agent, thereby further improving the accuracy of the model; the trained first-layer intelligent agent and the trained second-layer intelligent agent are combined to obtain a trained task scheduling model of the type to which the training data belong, so that the stability and accuracy of the model can be improved as a whole.
In some embodiments, after the trained task scheduling model is obtained, task scheduling may be performed using the task scheduling model. For example, the environment data to be decided corresponding to the decision operator of the currently executed task or the task to be processed can be obtained, the environment data to be decided is processed by utilizing the trained task scheduling model, the target task scheduling decision is obtained, and the decision operator to be decided is processed by utilizing the target task scheduling decision. Specific implementation can be found in the following examples.
Referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment of a task processing method according to the present application. The method may comprise the steps of:
S31: and acquiring the environment data to be decided corresponding to the operator to be decided of the task to be processed.
The task to be processed may be an audio analysis task, an image analysis task, an audio/video analysis task, a text analysis task, etc., which is not limited in the present application.
The environment data to be decided corresponding to the operator to be decided of the task to be processed can be obtained, the environment data to be decided can comprise the current environment data and the current effective data of the equipment running the operator to be decided, for example, the environment data to be decided can be data, and dev data can be included, for example, the memory utilization rate, the gpu utilization rate, the cpu utilization rate, the npu utilization rate and the like; the present application is not limited in this regard, including the current length task_rt of the current task queue, the type of operator alg_type, the type solu _type of the current solution to which the operator belongs, the sum total of the thread numbers used in the current solution thrCount, the cpu core number core, the total number alg_num representing the number of all operators in the current solution, and the like.
In some implementations, the task to be processed may be a currently executing task. For example, the currently running operator in the operator set of several solutions for the currently executing task may be obtained as the operator to be decided. And acquiring environment data in the operation operator process as environment data to be decided.
S32: processing the environmental data to be decided by using the trained task scheduling model to obtain a target task scheduling decision; the task scheduling model is obtained by using the training method of the task scheduling model.
And inputting the environmental data to be decided into a trained task scheduling model, processing the environmental data to be decided by utilizing the first-layer agent and the second-layer agent, outputting to obtain a model decision result, and obtaining a target task scheduling decision according to the model decision result.
In some embodiments, since the task scheduling model includes task scheduling models corresponding to each type, any one or combination of task scheduling models corresponding to each type may be used to process the environmental data to be decided to determine the target task scheduling decision.
In some embodiments, in the case of any of the task scheduling models of various types, the type of the task scheduling model used may be determined according to the environmental data to be decided or a preset priority, etc. For example, if the environment data to be decided indicates that the task processing performance is the first performance, an A1 type task scheduling model is adopted, and if the environment data to be decided indicates that the task processing performance is the second performance, the second performance is better than the first performance, an A2 type task scheduling model is adopted, and the like.
In some embodiments, under the condition that at least two of the task scheduling models of various types are combined, model decision results corresponding to various types can be obtained respectively, and the target task scheduling decision is determined by integrating the model decision results of various types. For example, the target task scheduling decision may be a sum of model decision results of each type, or model decision results of one of the types. For example, the target task scheduling decision may be a model decision result determined for a preset priority by type. The application does not limit the mode of determining the target task scheduling decision, etc.
The trained task scheduling model is obtained by using the training method of the task scheduling model. For the implementation of this embodiment, reference may be made to the implementation process of the foregoing embodiment, which is not described herein.
S33: and processing the operator to be decided by using the target task scheduling decision.
And performing task scheduling on the operator to be determined according to the target task scheduling decision, for example, performing task scheduling adjustment on the operator to be determined by using the number A1 of thread pools, the operator binding core condition A2, the exclusive thread pool condition A3 and the like, so as to improve the task processing performance.
In some embodiments, referring to fig. 6, step S32 of the above embodiments may be further extended. Processing the environmental data to be decided by using the trained task scheduling model to obtain a target task scheduling decision, the embodiment may include the following steps:
S321: and processing the environmental data to be decided by using the task scheduling models trained by the various types to obtain model decision results corresponding to the various types.
The trained task scheduling model includes various types of trained task scheduling models, such as task scheduling models model_1, model_2, and model_3. The environmental data to be decided is respectively input into task scheduling models after training of various types, and model decision results corresponding to various types, such as model decision results result_1, result_2 and result_3, can be respectively obtained correspondingly.
S322: and determining a target task scheduling decision based on model decision results corresponding to the types according to preset priorities of the types.
And sequencing the task scheduling decisions of the multiple types in the scheduling decision set according to a preset priority. The preset priority thereof means the preset priority of each type. The target task scheduling decision can be determined based on model decision results corresponding to various types according to preset priorities of various types.
In some implementations, the task scheduling decisions include at least decision instances of at least two different processing decisions for the task scheduling decisions and decision instances of no processing decisions. The model decision result may represent the decision instance it represents in different characters.
For example, the model decision result result_1 may be "1, -1, or 0", which respectively represent: the number of thread pools is used to increase, decrease, or not process. The model decision result result_2 may be "1, -1, or 0", which respectively represent: and carrying out binding processing, de-binding processing or non-processing on a certain operator. The model decision result result_3 may be "1, -1, or 0", which respectively represent: creating an exclusive thread pool to serve an operator, eliminating the exclusive thread pool, or not doing processing.
In some embodiments, according to preset priorities of the types, a decision instance type of at least two different processing decisions corresponding to a type with a preset priority order is preferentially used to determine a target task scheduling decision to perform task scheduling, so that overall scheduling performance and efficiency of tasks are gradually improved.
In some embodiments, determining the target task scheduling decision based on model decision results corresponding to each type according to the preset priorities of each type includes:
Optionally, in response to the current type of model decision result being any of the decision instances of the at least two different processing decisions, any of the decision instances of the at least two different processing decisions is taken as the target task scheduling decision.
Optionally, in response to the model decision result of the current type being a decision instance that does not make a processing decision, taking a model decision result corresponding to a later type with a preset priority located after the current type as the model decision result of the current type, continuing to execute the step of determining a target task scheduling decision based on the model decision result corresponding to each type according to the preset priority of each type, or in response to the current type being a final type, taking the decision instance that does not make a processing decision as the target task scheduling decision. Wherein the last type is the last of the ordering of the preset priorities.
In some implementations, a decision instance where no processing decision is made may be represented by a preset value. And sequentially judging whether model decision results corresponding to the types are preset values according to the preset priority, and if so, judging that the preset values are 0 values. And if the model decision result is not the preset value, taking the model decision result as a target task scheduling decision. If the model decision result is a preset value, continuing to judge whether the corresponding model decision result of the latter type is the preset value or not until the last type of model decision result is executed, and taking the last type of model decision result as a target task scheduling decision.
For example, the model decision result result_1 is first determined. If the result_1 value is 1, the number in the current thread pool is increased, and the increase threshold may be 1, 2, 3, etc. Or if the result_1 value is-1, the number in the current thread pool is reduced, the reduction threshold may be 1, 2, 3, etc., where the increase threshold or the reduction threshold may be set according to a specific application scenario, which is not limited in the present application. In the case where the result_1 value is 1 or-1, the judgment of the model decision results result_2 and result_3 may not be made.
If the result_1 value is 0, the determination of result_2 is continued.
And if the result_2 value is 1, carrying out binding processing on the operator to be determined. Or if the result_2 value is-1, performing unbinding processing on the operator to be determined. And the model decision result result_3 is not judged.
If the result_2 value is 0, the determination of result_3 is continued.
If result_3 is 1, then an exclusive thread pool is created for the operator to be determined. Or if the result_3 value is-1, removing the exclusive thread pool of the operator to be decided. Or if the result_3 value is 0, no processing is performed.
According to the scheme, the task scheduling models of multiple types are used for analyzing the environmental data to be decided, and model decision results corresponding to various types are obtained. And the task scheduling decisions of various types in the scheduling decision set are ordered according to the preset priority, namely the model decision results of the task scheduling decisions of various types can be ordered according to the preset priority, and if the use sequence of the ordering of the preset priority is as follows: a1, A2 and A3 can preferentially use the effective model decision result of A1 type, ensure the optimization of the whole scheduling of the gradual improvement scheme, reduce the risk of excessive optimization, and can take the conditions under different pressure environments into consideration, and the current scheduling is optimized and adjusted in a self-adaptive manner by combining hardware resources and algorithm time consumption. Therefore, the method and the system can improve the accuracy and stability of scheduling optimization of the algorithm solutions of different processing tasks, can adapt to the scheduling optimization of the processing tasks of different types, scenes and the like, improve the resource utilization rate, reduce the scheduling time consumption and further improve the performance of the whole scheme.
It will be appreciated that in the above-described method of the specific embodiments, the order of composition of the steps is not meant to imply a strict order of execution but rather should be construed as a matter of limitation.
For the above embodiment, the present application further provides a training data acquisition device, configured to implement the above training data acquisition method.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an apparatus for acquiring training data according to an embodiment of the application. The training data acquisition device 40 comprises an acquisition module 41, a performance module 42 and a selection module 43.
The obtaining module 41 is configured to obtain an operator set corresponding to a currently executed task and a scheduling decision set, where the scheduling decision set includes at least one type of task scheduling decision.
The performance module 42 is configured to obtain a processing performance change after the operator set performs a task scheduling decision.
The selection module 43 is configured to select a target operator whose processing performance change in the operator set meets a preset performance condition, and use the running environment data corresponding to the target operator as training data of the task scheduling model.
It should be noted that, the apparatus for acquiring training data provided in the foregoing embodiment and the method for acquiring training data provided in the foregoing embodiment belong to the same concept, and the specific manner in which each module and unit perform the operation has been described in detail in the method embodiment, which is not repeated here. In practical application, the device for acquiring training data provided in the above embodiment may allocate the functions to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited in this application.
For the above embodiment, the present application further provides a training device for a task scheduling model, which is configured to implement the training method for a task scheduling model.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a training apparatus for task scheduling model according to the present application. The training device 50 of the task scheduling model may include: a data module 51 and a training module 52.
The data module 51 is configured to acquire training data, where the training data is acquired by using the above-mentioned method for acquiring training data.
The training module 52 is configured to train the task scheduling model based on the training data, and obtain a trained task scheduling model.
It should be noted that, the training device of the task scheduling model provided by the foregoing embodiment and the training method of the task scheduling model provided by the foregoing embodiment belong to the same concept, and the specific manner in which each module and unit perform the operation has been described in detail in the method embodiment, which is not described herein again. In practical application, the training device of the task scheduling model provided in the above embodiment may distribute the functions to be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited in this application.
For the above embodiment, the present application further provides a task processing device, configured to implement the task processing method described above.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a task processing device according to an embodiment of the application. The task processing device 60 includes: a decision-making module 61, a processing module 62 and a scheduling module 63.
The to-be-decided module 61 is configured to obtain to-be-decided environmental data corresponding to a to-be-decided operator of the to-be-processed task.
The processing module 62 is configured to process the environmental data to be decided by using the trained task scheduling model to obtain a target task scheduling decision; the task scheduling model is obtained by using the training method of the task scheduling model.
The scheduling module 63 is configured to process the decision operator to be decided using the target task scheduling decision.
It should be noted that, the task processing device provided in the foregoing embodiment and the task processing method provided in the foregoing embodiment belong to the same concept, and a specific manner in which each module and unit perform an operation has been described in detail in the method embodiment, which is not described herein again. In practical application, the task processing device provided in the above embodiment may distribute the functions to be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited in this application.
For the foregoing embodiments, the present application provides a computer device, please refer to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of the computer device of the present application. The computer device 70 comprises a memory 71 and a processor 72, wherein the memory 71 and the processor 72 are coupled to each other, the memory 71 having program data stored therein, the processor 72 being adapted to execute the program data to implement the steps of any of the embodiments described above.
In this embodiment, the processor 72 may also be referred to as a CPU (Central Processing Unit ). The processor 72 may be an integrated circuit chip having signal processing capabilities. The processor 72 may also be a general purpose processor, a digital signal processor (DSP, digital Signal Processing), an Application Specific Integrated Circuit (ASIC), a field programmable gate array (FPGA, field Programmable GATE ARRAY) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The general purpose processor may be a microprocessor or the processor 72 may be any conventional processor or the like.
In some embodiments, the present application further provides an information collecting apparatus (not shown), where the information collecting apparatus may include an image capturing device and a computer device 70 (such as a chip), where the image capturing device is coupled to the computer device 70, and the image capturing device is used to collect image data, and the computer device 70 is used to perform task generation on the image data, so as to implement the method of any one of the embodiments described above, such as steps of task scheduling, processing, and so on.
For the method of the above embodiment, which may be implemented in the form of a computer program, the present application proposes a computer readable storage medium, please refer to fig. 11, fig. 11 is a schematic structural diagram of an embodiment of the computer readable storage medium of the present application. The computer readable storage medium 80 has stored therein program data 81 capable of being executed by a processor, the program data 81 being executable by the processor to implement the steps of any of the embodiments of any of the methods described above.
The computer readable storage medium 80 of this embodiment may be a medium such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, which may store the program data 81, or may be a server storing the program data 81, and the server may send the stored program data 81 to another device for running, or may also run the stored program data 81 by itself.
In some embodiments, the functions or modules included in the apparatus provided by the foregoing embodiments of the present application may be used to perform the methods described in the foregoing method embodiments, and specific implementations thereof may refer to the descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium, which is a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method of the various embodiments of the present application.
It will be apparent to those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a computer readable storage medium for execution by computing devices, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only illustrative of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present application.

Claims (10)

1. A method for acquiring training data, comprising:
Acquiring an operator set and a scheduling decision set corresponding to a currently executed task, wherein the scheduling decision set comprises at least one type of task scheduling decision;
acquiring the processing performance change of the operator set after executing the task scheduling decision;
selecting a target operator of which the processing performance change meets a preset performance condition from the operator set, and taking the running environment data corresponding to the target operator as training data of a task scheduling model.
2. The method of claim 1, wherein the obtaining the processing performance change of the operator set after performing the task scheduling decision comprises:
Selecting candidate operators from the operator set; acquiring first environment data of the candidate operator;
Executing a candidate task scheduling decision on the candidate operator to obtain second environmental data, wherein the candidate task scheduling decision is selected from the scheduling decision set according to a preset mode;
and obtaining the processing performance change corresponding to the candidate operator based on the first environment data and the second environment data.
3. The method according to claim 2, wherein the operator set includes operators of a plurality of solutions; selecting candidate operators from the operator set; and obtaining first environmental data of the candidate operator, including:
Sequentially operating the operators of the operator set to obtain current environment data corresponding to the current operator;
Responding to the current task queue meeting a preset queue condition, taking the current operator as the candidate operator, and taking the current environment data as first environment data of the candidate operator;
And/or, each task scheduling decision comprises a plurality of decision examples; the candidate task scheduling decisions include any of the at least one type of task scheduling decisions; and executing a candidate task scheduling decision on the candidate operator to obtain second environment data, wherein the method comprises the following steps of: and executing any decision instance contained in the candidate task scheduling decision on the candidate operator to obtain the second environment data.
4. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The processing performance change includes at least an environmental throughput change; the preset performance condition at least comprises: the environmental throughput changes to an environmental throughput increase; the operation environment data corresponding to the target operator comprises: the target operator performs a candidate task scheduling decision and current environment data correspondingly;
And/or after the operation environment data corresponding to the target operator is used as training data of a task scheduling model, the method further comprises the following steps:
splitting the training data according to the type of the task scheduling decision to obtain training data corresponding to various types, wherein the training data corresponding to various types are used for training to obtain task scheduling models after various types of training.
5. A method for training a task scheduling model, comprising:
acquiring training data, wherein the training data is acquired using the training data acquisition method of any one of claims 1 to 4;
and training the task scheduling model based on the training data to obtain a trained task scheduling model.
6. A method of task processing, comprising:
Acquiring environment data to be decided corresponding to a to-be-decided operator of a task to be processed;
processing the environmental data to be decided by using the trained task scheduling model to obtain a target task scheduling decision; wherein the task scheduling model is obtained by using the training method of the task scheduling model according to claim 5;
And processing the operator to be decided by using the target task scheduling decision.
7. The method of claim 6, wherein the trained task scheduling model comprises various types of trained task scheduling models, and task scheduling decisions corresponding to the various types in the scheduling decision set are ordered according to a preset priority;
The processing the environmental data to be decided by using the trained task scheduling model to obtain a target task scheduling decision comprises the following steps:
processing the environmental data to be decided by using the task scheduling models after training of various types to obtain model decision results corresponding to various types;
And determining the target task scheduling decision based on model decision results corresponding to the types according to preset priorities of the types.
8. The method of claim 7, wherein the task scheduling decisions include at least decision instances of at least two different processing decisions for task scheduling decisions and decision instances of no processing decisions;
The determining the target task scheduling decision based on model decision results corresponding to each type according to preset priorities of each type comprises the following steps:
In response to the current type of model decision result being any of the decision instances of the at least two different processing decisions, taking any of the decision instances of the at least two different processing decisions as the target task scheduling decision; or alternatively
And responding to the model decision result of the current type as the decision instance which does not make a processing decision, taking the model decision result corresponding to the later type with the preset priority positioned behind the current type as the model decision result of the current type, continuously executing the preset priorities according to each type, and determining the target task scheduling decision based on the model decision result corresponding to each type, or responding to the current type as the last type, taking the decision instance which does not make the processing decision as the target task scheduling decision.
9. A computer device comprising a memory and a processor coupled to each other, the memory having stored therein program data, the processor being adapted to execute the program data to implement the steps of the method of any of claims 1 to 8.
10. A computer readable storage medium, characterized in that program data executable by a processor are stored, said program data being for implementing the steps of the method according to any one of claims 1 to 8.
CN202410693597.6A 2024-05-31 2024-05-31 Acquisition method, training method, task processing method and related devices Active CN118260054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410693597.6A CN118260054B (en) 2024-05-31 2024-05-31 Acquisition method, training method, task processing method and related devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410693597.6A CN118260054B (en) 2024-05-31 2024-05-31 Acquisition method, training method, task processing method and related devices

Publications (2)

Publication Number Publication Date
CN118260054A true CN118260054A (en) 2024-06-28
CN118260054B CN118260054B (en) 2024-08-16

Family

ID=91611521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410693597.6A Active CN118260054B (en) 2024-05-31 2024-05-31 Acquisition method, training method, task processing method and related devices

Country Status (1)

Country Link
CN (1) CN118260054B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180136976A1 (en) * 2016-11-14 2018-05-17 King Abdulaziz University Temporal task scheduling in a hybrid system
CN114237869A (en) * 2021-11-17 2022-03-25 中国人民解放军军事科学院国防科技创新研究院 Ray double-layer scheduling method and device based on reinforcement learning and electronic equipment
WO2023015567A1 (en) * 2021-08-13 2023-02-16 华为技术有限公司 Task scheduling architecture and method
CN116820730A (en) * 2023-08-28 2023-09-29 苏州浪潮智能科技有限公司 Task scheduling method, device and storage medium of multi-engine computing system
WO2024060789A1 (en) * 2022-09-21 2024-03-28 之江实验室 Intelligent computing-oriented method, system and apparatus for scheduling distributed training tasks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180136976A1 (en) * 2016-11-14 2018-05-17 King Abdulaziz University Temporal task scheduling in a hybrid system
WO2023015567A1 (en) * 2021-08-13 2023-02-16 华为技术有限公司 Task scheduling architecture and method
CN114237869A (en) * 2021-11-17 2022-03-25 中国人民解放军军事科学院国防科技创新研究院 Ray double-layer scheduling method and device based on reinforcement learning and electronic equipment
WO2024060789A1 (en) * 2022-09-21 2024-03-28 之江实验室 Intelligent computing-oriented method, system and apparatus for scheduling distributed training tasks
CN116820730A (en) * 2023-08-28 2023-09-29 苏州浪潮智能科技有限公司 Task scheduling method, device and storage medium of multi-engine computing system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
邓见光;赵跃龙;袁华强;: "一种多QoS目标约束的云计算任务调度策略", 计算机应用研究, no. 08, 31 August 2016 (2016-08-31) *
黄奕桐: ""面向深度学习的计算调度和内存优化"", 《中国优秀硕士学位论文全文数据库 (电子期刊)》, no. 2024, 15 April 2024 (2024-04-15) *

Also Published As

Publication number Publication date
CN118260054B (en) 2024-08-16

Similar Documents

Publication Publication Date Title
CN111694656B (en) Cluster resource scheduling method and system based on multi-agent deep reinforcement learning
CN108012156B (en) Video processing method and control platform
CN112631415A (en) CPU frequency adjusting method, device, electronic equipment and storage medium
CN110956202A (en) Image training method, system, medium and intelligent device based on distributed learning
US20240153044A1 (en) Circuit for executing stateful neural network
CN115220921B (en) Resource scheduling method, image processor, image pickup device, and medium
CN115016916A (en) Thread pool scheduling method, system, equipment and readable storage medium
CN115437778A (en) Kernel scheduling method and device, electronic equipment and computer readable storage medium
CN117193992B (en) Model training method, task scheduling device and computer storage medium
CN115002126A (en) Service scheduling method and device based on edge server cluster
CN118260054B (en) Acquisition method, training method, task processing method and related devices
Zhang et al. A locally distributed mobile computing framework for DNN based android applications
CN113127173A (en) Heterogeneous sensing cluster scheduling method and device
CN117687774A (en) Task model training method for computing power scheduling and computing power scheduling method and system
CN113064660A (en) Device control method, device, electronic device and storage medium
WO2023284347A1 (en) Task execution method and apparatus
CN112598112B (en) Resource scheduling method based on graph neural network
CN114626501A (en) Data processing method and device, electronic equipment and storage medium
CN114662568A (en) Data classification method, device, equipment and storage medium
CN118377601B (en) Task processing method, device and storage medium
CN115168016B (en) Task scheduling method and related device, chip, device and medium
EP3923208B1 (en) Automated hardware resource optimization
CN116128046B (en) Storage method of multi-input neural network model serial block of embedded equipment
CN118196579B (en) Multimedia content management and control optimization method based on target recognition
CN118138801B (en) Video data processing method and device, electronic equipment and storage 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