Task processing method, device and equipment and computer readable storage medium

By determining the processor's performance through schedulers and performance tests, and employing flexible scheduling strategies to handle tasks, the problem of inflexible processor task processing was solved, achieving efficient and flexible task processing.

CN120909710APending Publication Date: 2025-11-07HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410552133.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In existing technologies, the task processing of processors is not flexible enough, resulting in low processing efficiency and difficulty in meeting the actual needs of different tasks.

Method used

The scheduler acquires tasks and determines the processor's performance support based on performance test results. It then employs different scheduling strategies (first sub-scheduling strategy and second sub-scheduling strategy) to process tasks, dynamically allocates computing resources, selects appropriate processing units for different types of tasks, and adjusts the scheduling strategy in a timely manner to optimize resource utilization.

Benefits of technology

It improves the flexibility and efficiency of task processing, ensures that tasks are completed within the specified time, saves computing resources, and adapts to the processing needs of different task types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909710A_ABST
    Figure CN120909710A_ABST
Patent Text Reader

Abstract

The invention discloses a task processing method, device and equipment and a computer readable storage medium, and belongs to the technical field of computers. The processing system comprises a scheduler and a first processor, and the method is applied to the scheduler. In the method, a scheduler obtains a first task, and the first task is one of a plurality of second tasks. And under the condition that the performance of the first processor is determined to support processing of the first task according to the performance test result, the scheduler processes the first task through the first processor. Wherein the performance test result is obtained by testing the performance of the first processor by using a plurality of second tasks. Whether the performance of the first processor supports processing of the first task is determined according to the performance test result. And under the condition that the performance of the first processor supports processing of the first task, the first task is processed through the first processor. The mode is flexible, it is guaranteed that the first task can be normally processed by the first processor, and the processing efficiency of the first task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a method and device for processing task, equipment and computer readable storage medium. BACKGROUND

[0002] In the field of computer technology, a processor is needed to process a task. How to make the processing more flexible becomes a problem worth paying attention to. SUMMARY

[0003] The present application provides a method and device for processing task, equipment and computer readable storage medium, to realize the task processing flexibly. The technical solution provided by the present application includes the following aspects.

[0004] In a first aspect, a method for processing a task is provided. The processing system includes a scheduler and a first processor, and the method is applied to the scheduler. In the method, the scheduler acquires a first task, which is one of a plurality of second tasks. If the performance of the first processor supports processing the first task according to a performance test result, the scheduler processes the first task through the first processor. The performance test result is obtained by testing the performance of the first processor using the plurality of second tasks.

[0005] In the present application, the plurality of second tasks are all tasks that the first processor may need to process, and the performance of the first processor is tested using the plurality of second tasks to obtain the performance test result. Thus, when the first task in the plurality of second tasks actually needs to be processed by the first processor, it can be determined whether the performance of the first processor supports processing the first task according to the performance test result. In the case where the performance of the first processor supports processing the first task, the first task is processed by the first processor again. This method is not only flexible, but also ensures that the first task can be normally processed by the first processor, thereby improving the processing efficiency of the first task.

[0006] In a possible implementation, the performance test result includes a task combination supported by the performance of the first processor, and the task combination includes at least two second tasks in the plurality of second tasks. According to the performance test result, it is determined that the performance of the first processor supports processing the first task, including that the first task and a third task being processed by the first processor belong to the task combination, and the third task is at least one of the plurality of second tasks.

[0007] In the case where the performance test result includes the task combination, it can be determined simply and quickly whether the performance of the first processor supports processing the first task according to the task combination, which is feasible and helps to improve the processing efficiency of the first task.

[0008] In a possible implementation, the first processor comprises a plurality of first processing units, and the first processor processes the first task by using the first processor, comprising: the first processor processes the first task according to a first scheduling strategy, the first scheduling strategy being a first sub-scheduling strategy or a second sub-scheduling strategy, the first sub-scheduling strategy being used to indicate that the first task is processed by the first processor, and the second sub-scheduling strategy being used to indicate that the first task is processed by at least one of the plurality of first processing units.

[0009] The present application provides two different scheduling strategies, namely the first sub-scheduling strategy and the second sub-scheduling strategy. The first sub-scheduling strategy regards the first processor as a whole, and the first task can be preempted and migrated among the first processing units within the first processor, so that the computing resources provided by the first processing units can be fully utilized, the dynamic allocation of computing resources is realized, and the utilization of computing resources is improved. The second sub-scheduling strategy splits the first processor into different first processing units, and the first task can be preempted on the first processing units, avoiding the additional consumption of computing resources caused by migration on the first processing units, which is conducive to saving computing resources.

[0010] In a possible implementation, the first scheduling strategy is the first sub-scheduling strategy. The first processor processes the first task according to the first scheduling strategy, comprising: sending a first processing instruction to the first processor, the first processing instruction being used to process the first task by the first processor.

[0011] In this implementation, the scheduler does not specify the first processing unit, so that the first task is processed by the first processor as a whole, which facilitates the first task to preempt and migrate among the first processing units within the first processor.

[0012] In a possible implementation, the first scheduling strategy is the second sub-scheduling strategy. The first processor processes the first task according to the first scheduling strategy, comprising: sending a second processing instruction to the first processor, the second processing instruction comprising a processing unit identifier, the processing unit identifier being used to indicate at least one first processing unit, and the second processing instruction being used to process the first task by the at least one first processing unit.

[0013] In this implementation, the scheduler more explicitly specifies the first processing unit, that is, the at least one first processing unit indicated by the processing unit identifier, so that the first task can be preempted on the specified first processing unit, avoiding the migration of the first task among different first processing units.

[0014] In a possible implementation, the at least one first processing unit is determined according to a task type of the first task, the task type being a periodic task or a non-periodic task.

[0015] In the present application, different ways are adopted to determine the first processing unit for processing the first task according to different types of the first task, and such an implementation manner has strong pertinence and facilitates to improve the processing efficiency of different types of the first task.

[0016] In a possible implementation manner, the method further includes: in a case where the task type is a periodic task, obtaining utilization values respectively corresponding to the plurality of first processing units, the utilization value being used to indicate the utilization of the corresponding first processing unit; and determining at least one first processing unit from the plurality of first processing units according to the utilization values respectively corresponding to the plurality of first processing units.

[0017] Such an implementation manner considers the utilization values respectively corresponding to the first processing units, and is beneficial to balance the utilization of different first processing units.

[0018] In a possible implementation manner, the method further includes: in a case where the task type is a non-periodic task, obtaining task queues respectively corresponding to the plurality of first processing units, the task queue being used to store tasks to be processed by the corresponding first processing unit; and determining at least one first processing unit from the plurality of first processing units according to the task queues respectively corresponding to the plurality of first processing units.

[0019] Such an implementation manner considers the number of tasks to be processed respectively corresponding to the first processing units, and is beneficial to balance the task load of different first processing units.

[0020] In a possible implementation manner, the method further includes: obtaining a health degree value, the health degree value being used to indicate the health degree corresponding to the first scheduling strategy; determining a second scheduling strategy according to the health degree value; and processing, by the first processor, a fourth task according to the second scheduling strategy, the fourth task being at least one of the plurality of second tasks.

[0021] In the present application, the health degree value when the first scheduling strategy is used is taken as an index to timely determine the second scheduling strategy, so as to determine whether the first scheduling strategy needs to be adjusted, so that the scheduling strategy used by the processing system is more in line with the actual demand, and it is beneficial to improve the task processing efficiency of the processing system and the utilization of the computing resources of the processing system.

[0022] In a possible implementation manner, in a case where the health degree indicated by the health degree value is between a first threshold value and a second threshold value, the second scheduling strategy is the first scheduling strategy, the first threshold value being greater than the second threshold value; or, in a case where the health degree indicated by the health degree value is greater than the first threshold value and the first scheduling strategy is a first sub-scheduling strategy, the second scheduling strategy is a second sub-scheduling strategy; or, in a case where the health degree indicated by the health degree value is less than the second threshold value and the first scheduling strategy is the second sub-scheduling strategy, the second scheduling strategy is the first sub-scheduling strategy.

[0023] The application can quickly adjust to the first sub-scheduling strategy in the case of low health degree. Since the first sub-scheduling strategy allows task preemption and migration, the processing efficiency of the task can be improved, and the processing of the task within the specified completion time can be ensured. The application can also quickly adjust to the second sub-scheduling strategy in the case of high health degree. Since the second sub-scheduling strategy allows task preemption, the additional consumption of computing resources caused by task migration is avoided, and the computing resources of the processing system are saved.

[0024] In a possible implementation, the health degree value is obtained by: obtaining computing resource information, the computing resource information including the remaining computing resources of the first processor and the computing resources occupied by the first task on the first processor; and obtaining the health degree value according to the computing resource information.

[0025] The health degree value can be accurately and efficiently obtained through the computing resource information, without pre-deployment, thereby saving the overhead.

[0026] In a possible implementation, the processing system further includes a second processor, and the computing resource information further includes the remaining computing resources of the second processor and the computing resources occupied by the first task on the second processor.

[0027] In this implementation, the computing resource information includes more information content, and the accuracy of the obtained health degree value is improved.

[0028] In a possible implementation, the health degree value is obtained by: obtaining feature information of the first task; inputting the feature information of the first task into a prediction model to obtain a prediction result output by the prediction model; and obtaining the health degree value according to the prediction result.

[0029] The prediction model comprehensively utilizes the feature information of the first task to intelligently obtain the prediction result. The health degree value obtained according to the prediction result has a certain foresight, which is beneficial to adjust the scheduling strategy in advance and ensure smooth and efficient processing of the task by the processing system.

[0030] In a possible implementation, the first task includes a first part and a second part, and the first processor is configured to process the first part. The method further includes: processing the second part by a second processor in the processing system.

[0031] That is, the first processor and the second processor cooperate with each other to process the first task, which is beneficial to improve the processing efficiency of the first task. The first processor and the second processor can be heterogeneous or homogeneous.

[0032] In a possible implementation, the second processor includes a plurality of second processing units, and the first task has a corresponding second processing unit in the plurality of second processing units. Processing the second part by the second processor in the processing system includes processing the second part by the corresponding second processing unit of the first task.

[0033] In this implementation, the second part is processed by the corresponding second processing unit of the first task, so that the processing of the second part is not disturbed by other tasks than the first task. The second part can fully utilize the computing resources provided by the corresponding second processing unit of the first task, improve the processing efficiency of the second part, and further improve the processing efficiency of the first task.

[0034] In a second aspect, a device for processing a task is provided, and the device includes:

[0035] The obtaining module is configured to obtain a first task, the first task being one of a plurality of second tasks.

[0036] The processing module is configured to process the first task by the first processor if it is determined that the performance of the first processor supports processing the first task according to a performance test result, the performance test result being obtained by testing the performance of the first processor using the plurality of second tasks.

[0037] In a possible implementation, the performance test result includes a task combination supported by the performance of the first processor, the task combination including at least two second tasks in the plurality of second tasks. It is determined that the performance of the first processor supports processing the first task according to the performance test result, including that the first task and a third task being processed by the first processor belong to the task combination, the third task being at least one of the plurality of second tasks.

[0038] In a possible implementation, the first processor includes a plurality of first processing units. The processing module is configured to process the first task by the first processor according to a first scheduling strategy, the first scheduling strategy being a first sub-scheduling strategy or a second sub-scheduling strategy, the first sub-scheduling strategy being used to instruct the first processor to process the first task, and the second sub-scheduling strategy being used to instruct at least one of the plurality of first processing units to process the first task.

[0039] In a possible implementation, the first scheduling strategy is the first sub-scheduling strategy. The processing module is configured to send a first processing instruction to the first processor, the first processing instruction being used for the first processor to process the first task.

[0040] In a possible implementation, the first scheduling strategy is a second sub-scheduling strategy. The processing module is configured to send, to the first processor, a second processing instruction, the second processing instruction comprising a processing unit identifier, the processing unit identifier being used to indicate at least one first processing unit, and the second processing instruction being used for the at least one first processing unit to process the first task.

[0041] In a possible implementation, the at least one first processing unit is determined according to a task type of the first task, the task type being a periodic task or a non-periodic task.

[0042] In a possible implementation, the obtaining module is further configured to, in a case where the task type is the periodic task, obtain utilization values respectively corresponding to the plurality of first processing units, the utilization values being used to indicate utilization of the corresponding first processing units; and determine the at least one first processing unit from the plurality of first processing units according to the utilization values respectively corresponding to the plurality of first processing units.

[0043] In a possible implementation, the obtaining module is further configured to, in a case where the task type is the non-periodic task, obtain task queues respectively corresponding to the plurality of first processing units, the task queues being used to store tasks to be processed by the corresponding first processing units; and determine the at least one first processing unit from the plurality of first processing units according to the task queues respectively corresponding to the plurality of first processing units.

[0044] In a possible implementation, the obtaining module is further configured to obtain a health degree value, the health degree value being used to indicate a health degree corresponding to the first scheduling strategy; and determine the second scheduling strategy according to the health degree value. The processing module is further configured to process, by the first processor, a fourth task according to the second scheduling strategy, the fourth task being at least one of the plurality of second tasks.

[0045] In a possible implementation, in a case where the health degree indicated by the health degree value is between a first threshold value and a second threshold value, the second scheduling strategy is the first scheduling strategy, the first threshold value being greater than the second threshold value; or, in a case where the health degree indicated by the health degree value is greater than the first threshold value and the first scheduling strategy is the first sub-scheduling strategy, the second scheduling strategy is the second sub-scheduling strategy; or, in a case where the health degree indicated by the health degree value is less than the second threshold value and the first scheduling strategy is the second sub-scheduling strategy, the second scheduling strategy is the first sub-scheduling strategy.

[0046] In a possible implementation, the obtaining module is configured to obtain computing resource information, the computing resource information comprising a remaining computing resource of the first processor and a computing resource occupied by the first task on the first processor; and obtain the health degree value according to the computing resource information.

[0047] In a possible implementation, the processing system further includes a second processor, and the computing resource information further includes computing resources remaining in the second processor and computing resources occupied by the first task on the second processor.

[0048] In a possible implementation, the obtaining module is configured to obtain feature information of the first task; the prediction model is called, and the feature information of the first task is input into the prediction model to obtain a prediction result output by the prediction model; and the health degree value is obtained according to the prediction result.

[0049] In a possible implementation, the first task includes a first part and a second part, and the first processor is configured to process the first part. The processing module is further configured to process the second part by a second processor in the processing system.

[0050] In a possible implementation, the second processor includes a plurality of second processing units, and the first task has a corresponding second processing unit in the plurality of second processing units. The processing module is configured to process the second part by the corresponding second processing unit of the first task.

[0051] In a third aspect, a device for processing a task is provided, and the device includes a memory and a processor. The memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor, so that the device for processing a task implements the method for processing a task provided in the first aspect or any possible implementation of the first aspect.

[0052] Optionally, the processor is one or more, and the memory is one or more.

[0053] Optionally, the memory can be integrated with the processor, or the memory is arranged separately from the processor.

[0054] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer instructions. When the computer instructions are run on a computer, the method for processing a task provided in the first aspect or any possible implementation of the first aspect is executed by the computer.

[0055] In a fifth aspect, a computer program or a computer program product is provided, and the computer program or the computer program product includes computer instructions. When the computer instructions are run on a computer, the computer is caused to execute the method for processing a task provided in the first aspect or any possible implementation of the first aspect.

[0056] In a sixth aspect, a chip is provided, and the chip includes a processor configured to call and run instructions stored in a memory, so that a computer installed with the chip executes the method for processing a task provided in the first aspect or any possible implementation of the first aspect.

[0057] In a seventh aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, the input interface, the output interface, the processor and the memory being connected through internal connection paths, the processor being configured to execute code in the memory, when the code is executed, a computer installed with the chip executes the method for processing a task provided in the first aspect or any possible implementation manner of the first aspect.

[0058] It should be understood that the technical effects achieved by the technical solutions provided in the second aspect to the seventh aspect and the corresponding possible implementation manners of the present application can be referred to the description of the technical effects achieved by the technical solutions provided in the first aspect and the corresponding possible implementation manners, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 A structural schematic diagram of a processing system provided by an embodiment of the present application is shown in FIG. 1;

[0060] Figure 2 A structural schematic diagram of another processing system provided by an embodiment of the present application is shown in FIG. 2;

[0061] Figure 3 A structural schematic diagram of still another processing system provided by an embodiment of the present application is shown in FIG. 3;

[0062] Figure 4 A flowchart of a method for processing a task provided by an embodiment of the present application is shown in FIG. 4;

[0063] Figure 5 A structural schematic diagram of still another processing system provided by an embodiment of the present application is shown in FIG. 5;

[0064] Figure 6 A flowchart of another method for processing a task provided by an embodiment of the present application is shown in FIG. 6;

[0065] Figure 7 A flowchart of still another method for processing a task provided by an embodiment of the present application is shown in FIG. 7;

[0066] Figure 8 A structural schematic diagram of an apparatus for processing a task provided by an embodiment of the present application is shown in FIG. 8;

[0067] Figure 9 A structural schematic diagram of an apparatus for processing a task provided by an embodiment of the present application is shown in FIG. 8; DETAILED DESCRIPTION

[0068] The terms used in the embodiment part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0069] The embodiments of the present application provide a processing system, as shown in FIG. 1; Figure 1As shown, the processing system comprises a scheduler 11 and a first processor 12. The scheduler 11 is configured to schedule the first processor 12, and the first processor 12 is configured to process a task to be processed according to the scheduling of the scheduler 11.

[0070] For example, referring to Figure 2 The processing system further comprises a bus 13 and an input / output (IO) center 14, and the IO center 14 can comprise at least one IO interface (not shown in the figure). Figure 2 The scheduler 11, the first processor 12 and the IO center 14 are connected to the bus 13 respectively. Thus, a task stream can be input into the processing system from the IO center 14, and the task stream comprises at least one task to be processed. The scheduler 11 can obtain the task to be processed from the IO center 14 through the bus 13, and schedule the first processor 12 through the bus 13 based on the task. The first processor 12 can obtain the task to be processed from the IO center 14 through the bus 13, and accept the scheduling of the scheduler 11 through the bus 13, so as to process the task according to the scheduling of the scheduler 11.

[0071] Optionally, continuing to refer to Figure 2 The processing system further comprises a second processor 15, and the second processor 15 is also configured to process the task according to the scheduling of the scheduler 11, so that the second processor 15 and the first processor 12 can jointly process the task. For example, the first processor 12 is configured to process a part of the task, and the second processor 15 is configured to process another part of the task. For example, the first processor 12 is a master processor, and the second processor 15 is a slave processor.

[0072] In the embodiments of the present application, the types of the first processor 12 and the second processor 15 are not limited. For example, the first processor 12 and the second processor 15 can be different types of processors. For example, the first processor 12 is a central processing unit (CPU), and the second processor 15 is a graphics processing unit (GPU), a field programmable gate array (FPGA), a tensor processing unit (TPU), an accelerator, or the like. In this case, the processing system is a heterogeneous system, and the scheduler 11 in the processing system is used to implement heterogeneous architecture scheduling (HAS). The heterogeneous system not only has a lower energy consumption requirement, but also has higher performance, and can be widely applied to embedded computing, high-performance computing, and the like. In the process of processing tasks (which can also be considered as IO requests received through an IO interface) in the heterogeneous system, the CPU can be used to process serial computing, and the GPU, the FPGA, the TPU, or the accelerator can be used to process parallel computing. Alternatively, the first processor 12 and the second processor 15 can be the same type of processor, and in this case, the processing system is a homogeneous system. In the case where the first processor 12 and the second processor 15 are of the same type, the specifications of the first processor 12 and the second processor 15 can be the same or different.

[0073] For example, referring to FIG. 1, Figure 3 The first processor 12 includes a plurality of first processing units, and the second processor 15 includes a plurality of second processing units. For example, in the case where the first processor 12 is a CPU, the plurality of first processing units include cores 1 to M (M is a positive integer greater than or equal to 2). For another example, in the case where the second processor 15 is a GPU, an FPGA, a TPU, or an accelerator, the plurality of second processing units include parallel processing elements (PEs) 1 to N (N is a positive integer greater than or equal to 2, and the value of N can be the same as or different from the value of M). Each PE has the ability to execute multiple tasks at the same time, and each PE can include an independent memory. The PE is a core component of the second processor 15. In some cases, the PE is also referred to as a streaming multiprocessor (SM).

[0074] The embodiments of the present application provide a method for processing tasks, which can be applied to Figures 1 to 3 The processing system shown in FIG. 1 includes a scheduler. As Figure 4As shown, the method comprises steps 401 and 402.

[0075] In step 401, a first task is acquired, the first task being one of a plurality of second tasks.

[0076] In step 401, a first task is acquired, the first task being one of a plurality of second tasks. Figure 5 The task flow can be input from the IO center to the processing system, and the task flow comprises at least one task, the first task being any one of the at least one task. Accordingly, the scheduler acquires the first task by acquiring the first task from the IO center through the bus.

[0077] In the embodiments of the present application, each task included in the task flow is one of a plurality of second tasks, the plurality of second tasks being all tasks that can be processed in the running process of the processing system. Alternatively, the processing system has the capability of processing the plurality of second tasks, and in the running process of the processing system, at least one task can be selected from the plurality of second tasks to form a task flow according to actual needs, each second task can be selected once or multiple times, and the task included in the task flow is the task that needs to be processed by the processing system. Since the first task is the task included in the task flow, the first task is also one of the plurality of second tasks. For example, the plurality of second tasks comprises tasks 1 to 10, the task flow comprises tasks 1 to 5, and the first task is one of tasks 1 to 5.

[0078] For example, each second task corresponds to a task identifier, the task identifier being used to uniquely identify the corresponding second task, and the scheduler stores the task identifier corresponding to each second task. Since the first task is one of the plurality of second tasks, the first task also corresponds to a task identifier. Accordingly, after the scheduler acquires the first task, the scheduler queries the stored task identifiers according to the task identifier corresponding to the first task, and hits a task identifier, the first task being the second task indicated by the hit task identifier. Thus, the scheduler can determine that the first task is one of the plurality of second tasks, thereby determining that the first task is a task that needs to be processed, and further triggering subsequent processing of the first task.

[0079] In step 402, the first task is processed by the first processor in the case where it is determined according to the performance test result that the performance of the first processor supports processing the first task, the performance test result being obtained by testing the performance of the first processor using the plurality of second tasks.

[0080] The performance test result is used to indicate the performance of the first processor, and thus whether the performance of the first processor supports processing the first task can be determined according to the performance test result. In the embodiment of the present application, in the case where it is determined that the performance of the first processor supports processing the first task, the first processor is used to process the first task, which ensures that the first processor has the capability to process the first task and avoids the case where the first processor cannot process the first task, and this processing manner is more flexible.

[0081] For example, each first task corresponds to a specified completion time length. The performance of the first processor supporting processing the first task can include that the performance of the first processor supports completing the first task within the specified completion time length corresponding to the first task. The performance of the first processor not supporting processing the first task can include that the performance of the first processor does not support completing the first task within the specified completion time length corresponding to the first task. Optionally, the specified completion time length corresponding to the first task is determined based on the ideal completion time length corresponding to the first task.

[0082] For example, in the case where the task priority of the first task is high, and completing the first task within the corresponding ideal completion time length will cause a more serious consequence, etc., the specified completion time length can be less than or equal to the ideal completion time length. For example, the first task is used to determine a flight control parameter, and the flight control parameter is used to control the flight of an aircraft, and thus completing the first task within the corresponding ideal completion time length will cause a more serious consequence and affect the safety of the aircraft, and thus it is necessary to make the specified completion time length less than or equal to the ideal completion time length to ensure that the flight control parameter is determined in time. For another example, the first task is used to determine an unmanned driving parameter, and the unmanned driving parameter is used to control an unmanned driving vehicle in real time, and thus completing the first task within the corresponding ideal completion time length will cause a more serious consequence and affect the safety of the unmanned driving vehicle. Therefore, it is necessary to make the specified completion time length less than or equal to the ideal completion time length to ensure that the unmanned driving parameter is determined in time.

[0083] For another example, in the case where the task priority of the first task is low, and even if the first task is not completed within the ideal specified completion time length, it will not cause a more serious consequence, etc., the specified completion time length can be greater than or equal to the ideal completion time length, so as to reduce the task processing pressure of the first processor. For example, the first task is used to determine a video and audio playing parameter, and the video and audio playing parameter is used to control the playing of a video or music, and thus completing the first task within the ideal completion time length will not cause a more serious consequence. Therefore, the specified completion time length can be greater than or equal to the ideal completion time length. For another example, the first task is used to determine a mobile phone operating system control parameter, and thus completing the first task within the ideal completion time length will not cause a more serious consequence. Therefore, the specified completion time length can be greater than or equal to the ideal completion time length.

[0084] As mentioned above, the performance test result is used to indicate the performance of the first processor. The performance test result is obtained by testing the performance of the first processor using a plurality of second tasks. Exemplarily, the testing process can be completed offline in advance, which can mean that the testing process is completed offline in advance before the scheduler obtains the first task, and the performance test result is obtained. See Figure 5 The testing process can be completed by an offline calculation module in the scheduler, which can be implemented by software, and the implementation form of the offline calculation module is not limited in the embodiments of the present application. Accordingly, after obtaining the first task, the performance test result can be directly used by an execution module in the scheduler to process the first task by the first processor, which improves the processing efficiency of the first task. Exemplarily, the testing process includes a task benchmarking sub-process and a calculation performance test sub-process of the first processor, which will be described respectively as follows.

[0085] In the task benchmarking sub-process, the task length and the task period corresponding to each of the plurality of second tasks are obtained. The task length corresponding to a second task refers to the time required for the first processor to complete the second task without interference from other second tasks. For example, the time required for a first processing unit in the first processor to complete the second task. Wherein, a second task includes at least one operation, the longer the task length corresponding to the second task, the more the number of operations included in the second task, and the longer the time required to complete the second task. Therefore, the time required to complete the second task can be used as the task length corresponding to the second task in the embodiments of the present application. The task period corresponding to a second task refers to how long the second task needs to be processed. In the case of a periodic task, the second task itself has a corresponding task period, i.e., the second task needs to be processed every certain time interval, and the certain time interval is the task period corresponding to the second task. For example, the second task needs to be processed every 10 milliseconds (ms), and the task period corresponding to the second task is 10 ms. In the case of a non-periodic task, the second task itself does not have a corresponding task period, i.e., the processing of the second task is accidental, and the number of times the second task needs to be processed in a period of time can be counted, and the ratio of the length of the period of time to the number of times is used as the task period corresponding to the second task.

[0086] In the performance test sub-process, the performance of the first processor is tested according to the task length and the task period of each of the second tasks, and a performance test result is obtained. Exemplarily, the performance test result includes a task combination supported by the performance of the first processor, and the task combination includes at least two of the second tasks. Accordingly, determining that the performance of the first processor supports processing the first task according to the performance test result includes that the first task and a third task being processed by the first processor belong to the task combination, and the third task is at least one of the second tasks.

[0087] In some embodiments, the second tasks are processed independently by the first processor, and the task length and the task period of each of the second tasks can be directly used in the test process. Exemplarily, the performance of the first processor supports processing the task combination, including that for each of the second tasks included in the task combination, the performance of the first processor supports completing the second task within the specified completion time length corresponding to the second task. For example, based on the task period corresponding to the second task, the second task can be completed within the specified completion time length corresponding to the second task each time the second task needs to be processed.

[0088] Exemplarily, the embodiments of the present application can test the computing performance of the first processor in an iterative manner. Taking the second tasks including task 1 to task 10 as an example, the performance of the first processor is first tested by task 1, and if the performance of the first processor supports completing task 1 within the specified completion time length corresponding to task 1, the performance of the first processor is then tested by task 1 and task 2. If the performance of the first processor supports completing task 1 within the specified completion time length corresponding to task 1 and completing task 2 within the specified completion time length corresponding to task 2, the performance of the first processor can be tested by task 1, task 2 and task 3. Alternatively, if the performance of the first processor does not support completing task 1 within the specified completion time length corresponding to task 1, or does not support completing task 2 within the specified completion time length corresponding to task 2, the performance of the first processor can be tested by task 1 and task 3. In this way, at least one task combination supported by the performance of the first processor is determined, for example, all task combinations supported by the performance of the first processor are determined, and the obtained task combination is the performance test result.

[0089] Based on the performance test result, after obtaining the first task, the scheduler can first determine a third task being processed by the first processor, query the performance test result according to the third task, that is, query at least one task combination according to the third task, to obtain a task combination including the third task. If the task combination obtained by the query includes the first task, it is determined that the first task and the third task belong to the task combination, and the performance of the first processor supports processing the first task additionally based on processing the third task, so as to realize determining whether the performance of the first processor supports processing the first task according to the performance test result. If the task combination obtained by the query does not include the first task, it is determined that the first task and the third task do not belong to the task combination, and the performance of the first processor does not support processing the first task additionally based on processing the third task, so as to realize determining whether the performance of the first processor supports processing the first task according to the performance test result. Of course, in the case that the first processor is currently not processing the third task, the scheduler can directly query the performance test result according to the first task, that is, query at least one task combination according to the first task. If a task combination including the first task is obtained, it can be determined that the performance of the first processor supports processing the first task.

[0090] In some other embodiments, the second task is processed by the first processor and the second processor jointly. For example, the second task includes a first part and a second part, the first processor is configured to process the first part, and the second processor is configured to process the second part. In this case, a plurality of first parts each correspond to a respective task length and a respective task period can be used in the test process. The task length corresponding to each first part is determined based on the task length corresponding to the second task to which the first part belongs. For example, if the number of operations included in a first part is half of the number of operations included in the second task to which the first part belongs, the task length corresponding to the first part is half of the task length corresponding to the second task to which the first part belongs. In addition, the task period corresponding to each first part is the same as the task period corresponding to the second task to which the first part belongs. In this case, the performance of the first processor supports processing the task combination, including: for each second task included in the task combination, the performance of the first processor supports completing the first part of the second task within the specified completion time length corresponding to the first part. For example, based on the task period corresponding to the first part, the first part can be completed within the specified completion time length corresponding to the first part each time the first part needs to be processed.

[0091] Exemplarily, the embodiment of the present application can test the computing performance of the first processor in an iterative manner. Still taking the example that the plurality of second tasks include task 1 to task 10, the performance of the first processor is first tested by the first part of task 1, and if the performance of the first processor supports completing the first part of task 1 within the specified completion time length corresponding to the first part of task 1, the performance of the first processor is then tested by the first part of task 1 and the first part of task 2. In this way, until it is determined that the performance of the first processor supports processing at least one task combination, for example, it is determined that the performance of the first processor supports processing all task combinations, the obtained task combination is the performance test result.

[0092] Based on the performance test result, after obtaining the first task, the scheduler determines a third task being processed by the first processor, and queries the performance test result according to the third task, that is, queries at least one task combination according to the third task, to obtain a task combination including the third task. If the obtained task combination includes the first task, it is determined that the first task and the third task belong to the task combination, which means that the performance of the first processor supports processing the first part of the first task additionally on the basis of processing the first part of the third task, thereby realizing determining that the performance of the first processor supports processing the first task according to the performance test result. If the obtained task combination does not include the first task, it is determined that the first task and the third task do not belong to the task combination, which means that the performance of the first processor does not support processing the first part of the first task additionally on the basis of processing the first part of the third task, thereby realizing determining that the performance of the first processor does not support processing the first task according to the performance test result. Of course, in the case that the first processor is currently not processing the third task, the scheduler can directly query the performance test result according to the first task, that is, query at least one task combination, and if a task combination including the first task is obtained, it can be determined that the performance of the first processor supports processing the first task.

[0093] It should be understood that the performance test result is only an example of the above-mentioned task combination, and the embodiment of the present application does not limit the form of the performance test result. For example, the embodiment of the present application can also take the task length and the task period corresponding to each of the plurality of second tasks as training samples, train to obtain an identification model, the identification model is used to judge whether the performance of the first processor supports processing at least one second task (or the first part of at least one second task), and outputs an identification result of yes or no, which is the performance test result. After obtaining the first task, the scheduler can input the first task into the identification model to obtain the identification result output by the identification model. If the identification result is yes, it means that the performance of the first processor supports processing the first task (or the first part of the first task), and if the identification result is no, it means that the performance of the first processor does not support processing the first task (or the first part of the first task).

[0094] In some embodiments, the first task is processed by the first processor alone, and processing the first task by the first processor includes processing all of the first task by the first processor. In other embodiments, the first task is processed by the first processor and the second processor together. For example, the first task includes a first part and a second part, and the first processor is configured to process the first part. In this case, processing the first task by the first processor includes processing the first part by the first processor. The method provided by the embodiments of the present application further includes processing the second part by the second processor in the processing system. In the embodiments of the present application, the first part and the second part are not limited, and can be divided according to actual requirements.

[0095] The embodiments of the present application do not limit the way of processing the second part by the second processor. For example, the second processor includes a plurality of second processing units, and the second part can be processed by a second processing unit in the second processor that is currently in an idle state, which means that the second processing unit does not process any task. Alternatively, the first task has a corresponding second processing unit in the plurality of second processing units, and processing the second part by the second processor in the processing system includes processing the second part by the corresponding second processing unit of the first task. For example, referring to FIG. 1, the first task has the corresponding second processing units PE 1 to PE 4 in the plurality of second processing units PE 1 to PE 6, and the second part can be processed by the corresponding second processing units PE 1 to PE 4. Figure 5

[0096] Since the second part is processed by the corresponding second processing unit of the first task, the second part is not disturbed by other tasks during the processing of the second part, and the second part can fully utilize the computing resources provided by the corresponding second processing unit of the first task to improve the processing efficiency of the second part.

[0097] ​Exemplarily, since the task length corresponding to the first part is applied in the process of determining the performance test result above, the task length corresponding to the first task can be reduced by the task length corresponding to the first part to obtain the task length corresponding to the second part. In addition, the task period corresponding to the first task is taken as the task period corresponding to the second part, thereby obtaining the task length and the task period corresponding to the second part. Subsequently, according to the task length and the task period corresponding to the second part, the second processing unit corresponding to the first task is determined from the plurality of second processing units, so that the second processing unit corresponding to the first task can complete the second part within the specified completion time length corresponding to the second part each time the second part needs to be processed. The longer the task length corresponding to the second part is and the shorter the task period corresponding to the second part is, the more the number of the second processing unit corresponding to the first task is.

[0098] In the embodiment of the present application, the second processing unit corresponding to each of the plurality of second tasks can be determined offline in advance, so that after the first task of one of the plurality of second tasks is obtained, the second part can be directly processed by the second processing unit corresponding to the first task, thereby improving the processing efficiency of the second part. Referring to Figure 5 The process of offline determination can be completed by an offline calculation module in the scheduler. Exemplarily, the embodiment of the present application can determine the second processing unit corresponding to each of the plurality of second tasks based on a multi-process service (MPS) or a multi-instance GPU (MIG) under the premise that each second part can be completed within the corresponding specified completion time length, thereby improving the adaptability and performance of the processing system under the heterogeneous architecture and providing a simple and efficient task processing mode for the processing system under the heterogeneous architecture.

[0099] According to the above description, processing the first task by the first processor can mean processing all the first tasks by the first processor, or processing the first part by the first processor. Regardless of which case, the embodiment of the present application can process the first task by the first processor according to a certain scheduling strategy. Therefore, in the exemplary embodiment, processing the first task by the first processor includes processing the first task by the first processor according to a first scheduling strategy. The first scheduling strategy is a first sub-scheduling strategy or a second sub-scheduling strategy. The first sub-scheduling strategy is used to indicate that the first task is processed by the first processor, and the second sub-scheduling strategy is used to indicate that the first task is processed by at least one of the plurality of first processing units included in the first processor. Next, the two cases of the first scheduling strategy are described respectively.

[0100] In the first case, the first scheduling strategy is a first sub-scheduling strategy. The first processor processes the first task according to the first scheduling strategy, including: sending a first processing instruction to the first processor, the first processing instruction being used for the first processor to process the first task.

[0101] In the first case, the scheduler does not need to distinguish each first processing unit included in the first processor, but takes the first processor as a whole, or constructs each first processing unit as a computing resource pool (i.e., the first processor), so as to process the first task through the computing resource pool. See Figure 5 The embodiment of the present application can construct the computing resource pool through an offline computing module in the scheduler, so as to enable an execution module in the scheduler to directly use the computing resource pool when the execution module needs to process the first task according to the first sub-scheduling strategy through the first processor. Thus, the scheduler does not need to determine which first processing unit of the first processor processes the first task, but directly sends the first processing instruction to the first processor. For the scheduler, the way of processing the first task is more convenient and efficient.

[0102] Exemplarily, the first processing instruction sent by the scheduler to the first processor includes a task identifier corresponding to the first task, the task identifier being used for uniquely identifying the first task. After receiving the first processing instruction, the first processor parses the first processing instruction to obtain the task identifier corresponding to the first task, so as to be able to process the first task uniquely identified by the task identifier. Optionally, the first task can be sent by the scheduler to the first processor, or the first processor can obtain the first task from the IO center through the bus, and the embodiment of the present application does not limit this.

[0103] In the process of processing the first task by the first processor, the first task can at least one of the preemption or migration of the first processing unit inside the first processor. The preemption refers to: in the case that the priority of the first task is higher than the priority of other tasks being processed by a first processing unit, temporarily interrupting the processing of the other tasks, and processing the first task, and after completing the first task, continuing the processing of the other tasks. That is, the preemption is the preemption of different tasks (such as the first task and the other tasks) to the same first processing unit. For example, referring to Figure 5 The migration refers to: the first task is processed on one first processing unit first, and then is migrated to another first processing unit to be processed, and the first task is completed through at least two first processing units. That is, the migration is the migration of the same task between different first processing units. For example, continuing to refer to Figure 5The first task can be migrated before the first processing unit of the first core and the first processing unit of the second core. The migration is caused by, but not limited to, insufficient computing resources of the first processing unit before the migration, excessively high temperature of the first processing unit before the migration, and the like, which are not limited in the embodiments of the present application.

[0104] In the first case, the first processing instruction sent by the scheduler is used for the first processor to process the first task, i.e., the first task is processed by the constructed computing resource pool, so that the preemption of the first processing unit can be implemented in the first processor, and the migration of the first processing unit can also be implemented in the first processor. Thus, the computing resources provided by the first processing units of the first processor are fully utilized, or the dynamic allocation of the computing resources is implemented, the allocation mode is more flexible, the utilization of the computing resources provided by the first processing units is improved, the utilization of all computing resources provided by the processing system is improved, the processing efficiency of the first task is improved, and the scheduling performance of the scheduler is improved. Therefore, the processing of the first task is quickly completed, the real-time performance (also referred to as schedulability) of the processing system is ensured, the processing system is more suitable for processing the first task with strict deadline, or the support of the processing system for the first task is improved. The real-time performance refers to that the deadline of the task entering the processing system is strictly limited, and the task needs to meet the real-time requirement to avoid missing the deadline and causing serious consequences. The first sub-scheduling strategy is also referred to as a hard real-time (HRT) scheduling strategy. When the scheduler adopts the first sub-scheduling strategy, the scheduler is a hard real-time scheduler, and the processing system is a hard real-time system.

[0105] In the second case, the first scheduling strategy is a second sub-scheduling strategy. The first processor processes the first task according to the first scheduling strategy, including: sending a second processing instruction to the first processor, the second processing instruction including a processing unit identifier, the processing unit identifier being used to indicate at least one first processing unit, and the second processing instruction being used for the at least one first processing unit to process the first task.

[0106] In the second case, the scheduler needs to distinguish the first processing units included in the first processor. Therefore, the scheduler needs to determine at least one first processing unit from the plurality of first processing units included in the first processor, indicate the determined at least one first processing unit by a processing unit identifier, and send a second processing instruction including the processing unit identifier to the first processor. Exemplarily, the second processing instruction can further include a task identifier corresponding to the first task. After receiving the second processing instruction, the first processor parses the second processing instruction to obtain the processing unit identifier and the task identifier corresponding to the first task, so as to complete the first task uniquely identified by the task identifier through the at least one first processing unit indicated by the processing unit identifier. The manner in which the at least one first processing unit obtains the first task can be referred to the description in the first case, which will not be repeated here.

[0107] Since the scheduler has indicated the at least one first processing unit by the processing unit identifier, in the process of processing the first task by the first processor, the processing of the first task can be completed through the at least one first processing unit. For example, in the case where the processing unit identifier indicates only one first processing unit, the processing of the first task is completed only through the first processing unit. For another example, in the case where the processing unit identifier indicates at least two first processing units, each of the at least two first processing units can be allocated a part to be processed, and each first processing unit completes the processing of the allocated part. The first task can preempt the at least one first processing unit indicated by the processing unit identifier, which will not be repeated here, and can be referred to the description in the first case.

[0108] In the second case, since the second processing instruction sent by the scheduler is used to instruct the at least one first processing unit to process the first task, the first task can be processed in the process of processing the first task by the first processor, and the preemption of the first processing unit can be implemented within the first processor, but the migration between different first processing units will not occur. Therefore, the indication performed by the scheduler is more explicit, avoids the additional consumption of computing resources caused by the migration, and is beneficial to save the computing resources, so that the processing system is more suitable for processing the first task with a relatively loose requirement on the completion deadline, because even if the completion deadline of the first task is exceeded, there will be no serious consequences, or the support of the processing system for the first task is improved. The second sub-scheduling strategy is also called a soft real-time (SRT) scheduling strategy. When the scheduler adopts the second sub-scheduling strategy, the scheduler is a soft real-time scheduler, and the processing system is a soft real-time system.

[0109] According to the description corresponding to the second case, the scheduler needs to determine at least one first processing unit from the plurality of first processing units included in the first processor for processing the first task. Exemplarily, the at least one first processing unit is determined according to the task type of the first task, and the task type is a periodic task or a non-periodic task. For example, the scheduler can store at least one first processing unit corresponding to a periodic task and at least one first processing unit corresponding to a non-periodic task. In the case where the task type of the first task is a periodic task, the at least one first processing unit is selected from the at least one first processing unit corresponding to the periodic task. In the case where the task type of the first task is a non-periodic task, the at least one first processing unit is selected from the at least one first processing unit corresponding to the non-periodic task. The selection can be random selection or round-robin selection, which is not limited in the embodiments of the present application. For another example, the scheduler can determine the at least one first processing unit in any of the following manners.

[0110] In the first manner, the method provided by the embodiments of the present application further includes: in the case where the task type is a periodic task, obtaining a utilization value corresponding to each of the plurality of first processing units, the utilization value being used to indicate the utilization of the corresponding first processing unit, and determining the at least one first processing unit from the plurality of first processing units according to the utilization value corresponding to each of the plurality of first processing units.

[0111] Exemplarily, the utilization value corresponding to one first processing unit is determined according to a reference value corresponding to all the tasks being processed by the first processing unit, and the reference value corresponding to one task is equal to the ratio between the task length corresponding to the task and the task period corresponding to the task.

[0112] For example, the number of tasks being processed by the first processing unit is one, and the utilization value corresponding to the first processing unit is equal to the reference value corresponding to the task. For example, the first processing unit is processing task 1, the task length of task 1 is 10 ms, and the task period is 20 ms, so the reference value corresponding to task 1 is equal to 0.5, and the utilization value corresponding to the first processing unit is also equal to 0.5.

[0113] For example, the first processing unit is processing a plurality of tasks, and the plurality of tasks correspond to the same task period. In this case, the utilization value corresponding to the first processing unit is equal to the sum of the reference values corresponding to all the tasks. Alternatively, the first processing unit is processing a plurality of tasks, but the plurality of tasks correspond to different task periods. In this case, the greatest common divisor of the different task periods is determined, the reference values corresponding to the tasks are updated according to the greatest common divisor to obtain updated reference values, and the utilization value corresponding to the first processing unit is equal to the sum of the updated reference values corresponding to all the tasks. For example, based on the example in the preceding paragraph, i.e., the first processing unit is processing task 1, and the first processing unit is also processing task 2, the task length of task 2 is 2 ms, and the task period of task 2 is 10 ms. In this case, the reference value corresponding to task 2 is equal to 0.2. Since the greatest common divisor of the task period 20 ms and the task period 10 ms is 20 ms, and the reference value corresponding to task 2 is determined according to the task period 10 ms, the reference value corresponding to task 2 needs to be updated according to the task period 20 ms, and the updated reference value corresponding to task 2 is 0.4. Therefore, the utilization value corresponding to the first processing unit is the sum of 0.5 and 0.4, i.e., 0.9.

[0114] After obtaining the utilization values corresponding to the plurality of first processing units, at least one first processing unit can be determined from the plurality of first processing units. For example, the first processing unit with the lowest utilization value in the plurality of first processing units is determined as the first processing unit for processing the first task.

[0115] In the second mode, the method provided by the embodiment of the present application further includes: in the case where the task type is a non-periodic task, obtaining a task queue corresponding to each of the plurality of first processing units, and determining at least one first processing unit from the plurality of first processing units according to the task queue corresponding to each of the plurality of first processing units.

[0116] The task queue is used to store the tasks to be processed by the corresponding first processing unit. Therefore, the embodiment of the present application can determine at least one first processing unit from the plurality of first processing units according to the number of tasks stored in the task queue. For example, the first processing unit with the least number of tasks stored in the task queue in the plurality of first processing units is determined as the first processing unit for processing the first task.

[0117] Exemplarily, the embodiment of the present application can also update the tasks stored in different task queues based on the tasks stored in the task queues corresponding to the plurality of first processing units respectively and in combination with the current first task, so as to further balance the task load. For example, the task queue corresponding to the first processing unit 1 stores task 1 to task 3, the task queue corresponding to the first processing unit 2 stores task 4 to task 8, and task 8 is the first task. After updating the tasks stored in different task queues, the task queue corresponding to the first processing unit 1 can store task 1 to task 3 and task 8, and the task queue corresponding to the first processing unit 2 can store task 4 to task 7, so as to balance the task load and improve the utilization of each first processing unit. It should be understood that the task 8 is updated from the task queue corresponding to the first processing unit 2 to the task queue corresponding to the first processing unit 1, which is not the migration of the task 8, because the task 8 will be processed by the first processing unit 1 after reaching the task queue corresponding to the first processing unit 1, and the task 8 is not processed by the first processing unit 2 first and then by the first processing unit 1, so the balancing of the task load is not the migration of the task 8. Exemplarily, in addition to the balancing of the task load as exemplified herein, the task load can also be balanced by work stealing and work shedding, and the present application does not limit this.

[0118] According to the first mode and the second mode, the first processing unit used for processing the first task is determined in different modes according to different types of first tasks in the embodiment of the present application, and the mode of determining the first processing unit is more flexible and more targeted. In the first mode, the utilization rate values corresponding to each first processing unit are considered, which is beneficial to balance the utilization rates of different first processing units. In the second mode, the number of tasks to be processed corresponding to each first processing unit is considered, which balances the task load of different first processing units. Whether it is the first mode or the second mode, the supportability of the processing system for the first task whose deadline requirement is more relaxed in the second case can be further improved.

[0119] In addition to the above, the embodiments of the present application can update the first scheduling strategy according to actual needs, so that the scheduling strategy adopted by the scheduler is more in line with actual needs. Therefore, in the exemplary embodiments, the method provided by the embodiments of the present application further comprises: obtaining a health value, the health value being used to indicate the health of the first scheduling strategy; determining a second scheduling strategy according to the health value; and processing a fourth task by the first processor according to the second scheduling strategy, the fourth task being at least one of the plurality of second tasks. For example, the fourth task is another task obtained after the first task, and the embodiments of the present application do not limit the fourth task. Referring to Figure 5 In the embodiments of the present application, the online scheduling module in the scheduler can be used to obtain the health value and determine the second scheduling strategy. In the case where the second scheduling strategy is different from the first scheduling strategy, the switching of the scheduling strategy is realized, and the scheduler can process the fourth task by the first processor according to the second scheduling strategy. For example, the process of obtaining the health value and determining the second scheduling strategy can be periodically executed, and the execution period can be obtained by configuration, for example, by the offline calculation module shown in Figure 5 .

[0120] The health of the first scheduling strategy is a comprehensive evaluation of the state and performance of the task processing according to the first scheduling strategy, which can reflect the processing progress of the task, the utilization of the computing resources provided by the processing system, whether the task can be completed within the specified time limit, and the like, and is also called the health of the task. The health is a comprehensive evaluation index, which is beneficial to the intelligent adjustment of the first scheduling strategy and also beneficial to ensuring the effective execution of the task under the real-time requirement.

[0121] In the embodiments of the present application, the health value is used to pay attention to the health of the task while effectively ensuring the efficient processing of the task by the processing system and guaranteeing the schedulability, so that the adjustment of the scheduling strategy can be realized according to the health value, such as switching between the hard real-time scheduling strategy and the soft real-time scheduling strategy, thereby guiding the selection and use of different scheduling strategies, or in other words, providing a reference basis for the selection and use of different scheduling strategies by the health value. Therefore, the provision of different scheduling strategies and the selection and use of different scheduling strategies play a synergistic role, which guarantees the flexible application of the processing system in various situations and also guarantees the scheduling performance and adaptability of the processing system. Therefore, the processing system can realize the dynamic allocation of the computing resources provided by the processing system by adjusting the scheduling strategy without sacrificing the scheduling performance, thereby realizing more accurate and efficient utilization of the computing resources and improving the utilization rate of the computing resources.

[0122] Exemplarily, the manner of acquiring the health degree value includes but is not limited to the following first acquiring manner and second acquiring manner.

[0123] The first acquiring manner of acquiring the health degree value includes: acquiring the computing resource information, the computing resource information including the remaining computing resource of the first processor and the computing resource occupied by the first task on the first processor; and acquiring the health degree value according to the computing resource information. The computing resource information is the information actually generated by the processing system, and belongs to the real historical information. The utilization of the computing resource information can more comprehensively, intelligently and accurately acquire the health degree value.

[0124] The remaining computing resource of the first processor includes: the total computing resource that can be provided by the first processor, minus the computing resource occupied by the task (such as the first task) currently processed by the first processor, and the remaining computing resource, which is denoted as X. In addition, the computing resource occupied by the first task on the first processor includes: the computing resource required by the part of the first task that has not been processed on the first processor, or in other words, the computing resource still required by the first processor for processing the part of the first task that has not been processed. The computing resource occupied by the first task on the first processor is denoted as Y. For example, the total computing resource required by the first task on the first processor is Y1, the computing resource occupied by the part of the first task that has been processed on the first processor is Y2, and the computing resource required by the part of the first task that has not been processed on the first processor is Y=(Y1-Y2).

[0125] Exemplarily, the health degree value can be determined based on the ratio of Y to X, that is, based on Y / X, and the health degree value is approximately the time required for the first processor to complete the part of the first task that has not been processed. The larger the health degree value is, the lower the health degree corresponding to the first scheduling strategy is, that is, the health degree value is negatively correlated with the health degree. Of course, the embodiments of the present application can also make the health degree value positively correlated with the health degree, such as determining the health degree value based on (1-Y / X), which is not limited by the embodiments of the present application.

[0126] In the exemplary embodiments, in the case that the first processor is currently processing multiple tasks (such as the first task and the third task), the embodiments of the present application can also determine the computing resource Y' required by the part of the third task that has not been processed on the first processor, and the total computing resource required by the part of the tasks currently processed by the first processor that has not been processed on the first processor is (Y+Y'). Thus, the health degree value can also be determined based on [(Y+Y') / X] or [1-(Y+Y') / X].

[0127] Optionally, the embodiment of the present application selects a value from Y / X, (1-Y / X), [(Y+Y') / X] or [1-(Y+Y') / X], and directly determines the value as the health degree value. Alternatively, the embodiment of the present application determines the product of the value and a correction coefficient as the health degree value. Illustratively, in the case where the first scheduling strategy is the first sub-scheduling strategy (hard real-time scheduling strategy), the correction coefficient is a first value, and the first value is used to correct the additional computing resource occupation introduced by preemption and migration of the plurality of tasks currently processed by the first processor. In the case where the first scheduling strategy is the second sub-scheduling strategy (soft real-time scheduling strategy), the correction coefficient is a second value, and the second value can be different from the first value, and the second value is used to correct the additional computing resource occupation introduced by preemption of the plurality of tasks currently processed by the first processor.

[0128] Illustratively, in the case where the processing system comprises a second processor, the computing resource information further comprises the computing resource remaining in the second processor and the computing resource occupied by the first task on the second processor. In this case, the computing resource information comprises more information content, which is beneficial to guarantee the accuracy of the determined health degree value. According to the foregoing description, the first task has a corresponding second processing unit in the second processor, and for one first task, the computing resource remaining in the second processor can refer to the total computing resource that can be provided by the second processing unit corresponding to the first task, and the remaining computing resource after subtracting the computing resource occupied by the first task on the corresponding second processing unit. The computing resource remaining in the second processor is denoted as M. In addition, the computing resource occupied by the first task on the second processor comprises the computing resource required by the part of the first task that has not been processed on the corresponding second processing unit. The computing resource occupied by the first task on the second processor is denoted as N.

[0129] On this basis, the embodiment of the present application can determine the health degree value based on the selected value, M and N. Illustratively, taking the selected value Y / X as an example, the embodiment of the present application can perform weighted summation on Y / X and N / M to obtain a calculation result, and determine the health degree value based on the calculation result. Alternatively, the embodiment of the present application can take [(Y+N) / (X+M)] as the calculation result, and determine the health degree value based on the calculation result. Optionally, the embodiment of the present application can directly take the calculation result as the health degree value, or determine the product of the calculation result and a correction coefficient as the health degree value, and the embodiment of the present application does not make any limitation in this regard.

[0130] In the first acquisition manner, the health degree value is acquired according to the computing resource information, and the second scheduling strategy is determined. Since the nature of the computing resource information is a value, the first acquisition manner belongs to a value analysis process. The value analysis process is relatively efficient and accurate, and can complete the data analysis process in real time without pre-deployment, thereby reducing the time overhead during the running process of the processing system. For the value analysis process, an asynchronous deployment manner can be used, such as calling other computing function modules outside the processing system to execute the value analysis process, thereby further reducing the influence of the value analysis process on the performance of the processing system, and realizing the reduction of the computing overhead of the value analysis process itself under the premise of ensuring the efficiency of task scheduling.

[0131] In the second acquisition manner, the health degree value is acquired, including: acquiring the characteristic information of the first task; calling a prediction model, inputting the characteristic information of the first task into the prediction model to obtain a prediction result output by the prediction model; and acquiring the health degree value according to the prediction result. The prediction result is obtained through real-time prediction. Through the real-time prediction manner, the health degree value can be acquired in a certain foresight manner, thereby realizing comprehensive and intelligent evaluation of the health degree.

[0132] The characteristic information of the first task can be the task length and the task period corresponding to the first task, and the task length and the task period corresponding to the first task are described in detail above, and will not be repeated here. After the characteristic information of the first task is input into the prediction model, the prediction model outputs a prediction result. The prediction result can be at least one of a task execution state of the first task or a system state of the processing system. Then, the health degree value can be acquired according to the prediction result. The task execution state is the completion degree of the first task. The higher the completion degree, the better the health degree indicated by the health degree value. The system state is the remaining computing resource of the processing system. The more the remaining computing resource, the better the health degree indicated by the health degree value. Thus, the adjustment of the scheduling strategy can be realized based on the health degree value acquired according to the prediction result. This manner is relatively intelligent, which is not only beneficial to improve the processing efficiency of the task, but also beneficial to improve the utilization rate of the computing resource of the processing system.

[0133] In the embodiments of the present application, the prediction model can be obtained by training the training samples. The training samples include feature information labeled with at least one state, and the at least one state is at least one of a task execution state of a task or a system state of a processing system. The feature information is the feature information of the task. In the embodiments of the present application, the training samples can be obtained by using efficient data collection and processing technology, so as to ensure the quantity, quality and consistency of the training samples, and provide reliable and detailed data basis for the subsequent process of training the prediction model, and the utilization of data is more comprehensive. Therefore, the prediction model not only has the ability to determine the at least one state of the task according to the feature information of the task, but also makes the prediction model more intelligent, and the at least one state determined by the prediction model is more accurate, that is, the prediction result output by the prediction model is more accurate, which is beneficial to balance the accuracy and real-time performance. Moreover, the training samples can be continuously supplemented in the embodiments of the present application, so as to update the prediction model and continuously improve the accuracy of the prediction result output by the prediction model.

[0134] Exemplarily, the algorithm used in the training process includes but is not limited to reinforcement learning, evolutionary algorithm, fuzzy logic control and the like, and the embodiments of the present application do not limit this. Alternatively, a more complex deep learning model can be introduced according to actual needs, so as to better learn the feature information of the task, the complex relationship between the task execution state or the system state, and further improve the accuracy of the prediction by the prediction model. The embodiments of the present application can select the algorithm according to the number of tasks that need to be processed, or select the algorithm according to other indicators, which are not limited herein. In the embodiments of the present application, the training mode can be flexibly selected according to actual needs. This diversity makes the prediction model better adapt to different task scenarios and different feature information of tasks, improves the adaptability of the prediction model, and provides more flexible prediction capability.

[0135] Exemplarily, no matter how the health degree value is obtained by the above-mentioned ways, the second scheduling strategy is determined according to the health degree value, which includes but is not limited to the following three cases.

[0136] The first case is that when the health degree indicated by the health degree value is between the first threshold value and the second threshold value, the second scheduling strategy is the first scheduling strategy, and the first threshold value is greater than the second threshold value.

[0137] When the health degree indicated by the health degree value is between the first threshold value and the second threshold value, it means that the health degree is at a normal level, and thus there is no need to adjust the scheduling strategy, so that the second scheduling strategy is the same as the first scheduling strategy. For example, the first scheduling strategy and the second scheduling strategy are both the first sub-scheduling strategy. For another example, the first scheduling strategy and the second scheduling strategy are both the second sub-scheduling strategy.

[0138] Exemplarily, at least one of the first threshold or the second threshold can be set according to experience. Alternatively, at least one of the first threshold or the second threshold is a historical health degree value. That is, the embodiment of the present application can determine the health degree value corresponding to different time according to the method described above for multiple times during the running of the processing system, and the health degree value corresponding to the previous time can be used as the historical health degree value of the health degree value corresponding to the later time. For example, T1 is earlier than T2, and the health degree indicated by the health degree value corresponding to T1 can be used as the first threshold or the second threshold, and the health degree indicated by the health degree value corresponding to T2 can be compared with the health degree indicated by the health degree value corresponding to T1.

[0139] In the second case, when the health degree indicated by the health degree value is greater than the first threshold and the first scheduling strategy is the first sub-scheduling strategy, the second scheduling strategy is determined to be the second sub-scheduling strategy.

[0140] When the health degree indicated by the health degree value is greater than the first threshold, it means that the health degree is good. If the first scheduling strategy is the first sub-scheduling strategy (i.e., the hard real-time scheduling strategy), the tasks will be preempted and migrated within the first processor, resulting in more consumed computing resources. Therefore, the second scheduling strategy can be determined to be the second sub-scheduling strategy (the soft real-time scheduling strategy), that is, the first sub-scheduling strategy is adjusted to the second sub-scheduling strategy which is more moderate, thereby avoiding the migration of tasks within the first processor and saving computing resources.

[0141] In the third case, when the health degree indicated by the health degree value is less than the second threshold and the first scheduling strategy is the second sub-scheduling strategy, the second scheduling strategy is determined to be the first sub-scheduling strategy.

[0142] When the health degree indicated by the health degree value is less than the second threshold, it means that the health degree is poor. If the first scheduling strategy is the second sub-scheduling strategy (the soft real-time scheduling strategy), the second scheduling strategy can be determined to be the first sub-scheduling strategy (the hard real-time scheduling strategy), that is, the second sub-scheduling strategy is adjusted to the first sub-scheduling strategy which is more aggressive, thereby improving the health degree and ensuring the real-time performance of the processing system.

[0143] As can be seen, the embodiment of the present application can quickly adjust to the hard real-time scheduling strategy in the case of low health degree, and ensure the completion of tasks within the specified completion time through a more aggressive way, and improve the scheduling performance of the processing system. Of course, the embodiment of the present application can also quickly adjust to the soft real-time scheduling strategy in the case of high health degree, and save the computing resources of the processing system through a more moderate way. Through such a flexible adjustment mode of the scheduling strategy, various dynamic needs in the running process of the processing system are met, and the utilization rate of the computing resources can be improved without affecting the processing performance of the processing system on the tasks.

[0144] The above describes the method for processing tasks provided by the embodiments of the present application in general. Next, the method for processing tasks is described in detail with reference to the accompanying drawings. Figure 6 and Figure 7 The method for processing tasks is described in detail.

[0145] As shown in Figure 6 , the offline computing module, the execution module and the online scheduling module in the processing system form a scheduler. The embodiments of the present application improve the function of the scheduler, so that the scheduler can flexibly and efficiently schedule the processors in the processing system, and improve the efficiency of processing tasks. This functional improvement is compatible with the function of the processor, or in other words, the embodiments of the present application do not need to modify the hardware of the processor at the cost of improving the function, so that the improved scheduler has the ability to schedule the processor. Such a scheduler can be widely deployed in homogeneous or heterogeneous processing systems, and is also applicable to various general-purpose computer devices.

[0146] Referring to Figure 6 and Figure 7 , steps 701 to 704, the offline computing module can perform task benchmarking to determine the task length and task period of each of the plurality of second tasks for subsequent use. The offline computing module can also perform a computing performance test of the first processor according to the task length and task period of each of the plurality of second tasks. The offline computing module can also construct a computing resource pool and complete the PE partition included in the second processor, the PE partition being used to enable each second task to correspond to at least one PE. In addition, the offline computing module can also perform other configurations, such as configuring an algorithm used to subsequently obtain a health value, adjusting a reference period of a scheduling strategy according to the health value, and the like.

[0147] Referring to Figure 6 and Figure 7 , step 705, the execution module processes the first task according to a scheduling strategy, the first task being one of the plurality of second tasks. For example, the first part of the first task is processed by the first processor, and the second part of the first task is processed by the PE corresponding to the first task. Moreover, the scheduling strategy is a hard real-time scheduling strategy or a soft real-time scheduling strategy. If the scheduling strategy is a hard real-time scheduling strategy, the first part is processed by the first processor using the computing resource pool constructed by the offline computing module, so that the first part can be preempted and migrated by the first processing unit within the first processor. If the scheduling strategy is a soft real-time scheduling strategy, the first part is processed by the first processor by specifying at least one first processing unit of the first processor through the processing unit identifier, so that the first part can be preempted by the specified first processing unit within the first processor.

[0148] Referring toFigure 6 and Figure 7 If the first task is completed, the result obtained by processing the first task can be outputted in step 706 in

[0149] Referring to step 707 in Figure 6 and Figure 7 If the first task is not completed, the health degree evaluation and the adjustment of the scheduling strategy can be performed by an online computing module. In the process of evaluation and adjustment performed by the online computing module, the algorithm configured by the offline computing module and the reference period can be used. In the process of evaluation and adjustment performed by the online computing module, the health degree value can be obtained by processing the computing resource information of the processing system, or the health degree value can be obtained by using the prediction model. According to the above description, it can be known that the computing resource information can include various information, and the training sample of the prediction model also involves various information. Therefore, no matter how the online computing module obtains the health degree value, the health degree value is determined based on various information, which is equivalent to quantifying various information by using the health degree value. Therefore, the adjustment of the scheduling strategy according to the health degree value is an adjustment after comprehensively considering various information, or in other words, the scheduling strategy is a strategy obtained based on multi-factor decision.

[0150] Referring to step 708 in Figure 6 and Figure 7 If the health degree indicated by the health degree value is relatively high or relatively low, the online scheduling module determines that the switching of the scheduling strategy is needed, for example, switching from the hard real-time scheduling strategy to the soft real-time scheduling strategy (for the case that the health degree is relatively high), or switching from the soft real-time scheduling strategy to the hard real-time scheduling strategy (for the case that the health degree is relatively low). If the health degree indicated by the health degree value is relatively normal, the online scheduling module determines that the scheduling strategy can be kept unchanged. Thus, the mixed real-time scheduling based on different scheduling strategies is realized, and the balance between the real-time performance and the utilization rate of the computing resource is realized, which is beneficial to completing the task within the specified completion time and ensures that the utilization rate of the computing resource is relatively high, so that the task processing can be flexibly and efficiently realized.

[0151] The method for processing a task provided by the embodiments of the present application can be applied to various scenes, and the following five examples of the scenes are described in detail.

[0152] The first scene is a computing scene. For example, the first task is used for performing tensor calculation.

[0153] The second scene is a driving control scene. For example, the first task is used for determining the vehicle control parameter.

[0154] The third scenario is intelligent transportation. For example, the first task is to determine traffic light control parameters, which allow for the control of traffic lights. Furthermore, based on these control parameters, road vehicle information and traffic condition information are used to obtain a health status value, which is then used to rationally adjust the method of determining the traffic light control parameters, thereby optimizing road flow and improving traffic management efficiency.

[0155] The fourth scenario is the medical scenario. For example, the first task is to determine the allocation mode, which allows medical resources to be allocated to users. Furthermore, based on the user's physiological parameters under this allocation mode, a health score is obtained. This health score reflects the user's physical health and disease progression trends, allowing for a reasonable adjustment of the medical resource allocation mode based on the health score, improving the efficiency of medical services and achieving personalized medical management.

[0156] The fifth scenario is the manufacturing scenario. For example, the first task is to determine the scheduling mode, which allows for the scheduling and management of the production line. Furthermore, based on the equipment status and production efficiency information of the production equipment under this scheduling mode, a health value is obtained. This health value reflects the failure trend of the production equipment, allowing for adjustments to the production line scheduling mode based on the health value. This facilitates the rational use and maintenance of production equipment on the production line, intelligently adjusting production plans, and improving production efficiency.

[0157] For example, regardless of the application scenario, the embodiments of this application can use blockchain technology to store various information involved in the task processing process to ensure the security and traceability of the information, that is, to further enhance the credibility of the processing system by integrating blockchain.

[0158] The above describes a method for processing tasks provided in the embodiments of this application. Corresponding to the above method, the embodiments of this application also provide an apparatus for processing tasks. This apparatus is applied to a scheduler. The apparatus is used to... Figure 8 The modules shown are executed by the scheduler. Figure 4 The method for processing tasks is shown. For example... Figure 8 As shown in the embodiments of this application, the apparatus for processing tasks includes the following modules.

[0159] Module 801 is used to acquire the first task, which is one of multiple second tasks;

[0160] The processing module 802 is used to process the first task by the first processor when it is determined from the performance test results that the performance of the first processor supports processing the first task. The performance test results are obtained by testing the performance of the first processor using multiple second tasks.

[0161] The performance test result includes a combination of tasks supported by the performance of the first processor, and the combination of tasks includes at least two second tasks in the plurality of second tasks. The performance of the first processor in supporting processing of the first task is determined according to the performance test result, including that the first task and a third task being processed by the first processor belong to the combination of tasks, and the third task is at least one of the plurality of second tasks.

[0162] In an example embodiment, the first processor includes a plurality of first processing units. The processing module 802 is configured to process the first task by the first processor according to a first scheduling strategy, and the first scheduling strategy is a first sub-scheduling strategy or a second sub-scheduling strategy. The first sub-scheduling strategy is used to instruct the first processor to process the first task, and the second sub-scheduling strategy is used to instruct at least one of the plurality of first processing units to process the first task.

[0163] In an example embodiment, the first scheduling strategy is the first sub-scheduling strategy. The processing module 802 is configured to send a first processing instruction to the first processor, and the first processing instruction is used for the first processor to process the first task.

[0164] In an example embodiment, the first scheduling strategy is the second sub-scheduling strategy. The processing module 802 is configured to send a second processing instruction to the first processor, and the second processing instruction includes a processing unit identifier, the processing unit identifier is used to indicate the at least one first processing unit, and the second processing instruction is used for the at least one first processing unit to process the first task.

[0165] In an example embodiment, the at least one first processing unit is determined according to a task type of the first task, and the task type is a periodic task or a non-periodic task.

[0166] In an example embodiment, the obtaining module 801 is further configured to, in a case where the task type is the periodic task, obtain a plurality of utilization values respectively corresponding to the plurality of first processing units, the utilization value is used to indicate a utilization of the corresponding first processing unit, and determine the at least one first processing unit from the plurality of first processing units according to the plurality of utilization values respectively corresponding to the plurality of first processing units.

[0167] In an example embodiment, the obtaining module 801 is further configured to, in a case where the task type is the non-periodic task, obtain a plurality of task queues respectively corresponding to the plurality of first processing units, the task queue is used to store a task to be processed by the corresponding first processing unit, and determine the at least one first processing unit from the plurality of first processing units according to the plurality of task queues respectively corresponding to the plurality of first processing units.

[0168] For example, the acquisition module 801 is further configured to acquire a health value, which is used to indicate the health value corresponding to the first scheduling strategy; and determine a second scheduling strategy based on the health value; the processing module 802 is further configured to process a fourth task according to the second scheduling strategy through the first processor, wherein the fourth task is at least one of a plurality of second tasks.

[0169] In an exemplary embodiment, if the health level indicated by the health level value is between a first threshold and a second threshold, the second scheduling strategy is the first scheduling strategy, and the first threshold is greater than the second threshold; or, if the health level indicated by the health level value is greater than the first threshold and the first scheduling strategy is a first sub-scheduling strategy, the second scheduling strategy is a second sub-scheduling strategy; or, if the health level indicated by the health level value is less than the second threshold and the first scheduling strategy is a second sub-scheduling strategy, the second scheduling strategy is a first sub-scheduling strategy.

[0170] For example, the acquisition module 801 is used to acquire computing resource information, which includes the remaining computing resources of the first processor and the computing resources occupied by the first task on the first processor; and to acquire a health value based on the computing resource information.

[0171] For example, the processing system further includes a second processor, and the computing resource information also includes the remaining computing resources of the second processor and the computing resources occupied by the first task on the second processor.

[0172] For example, the acquisition module 801 is used to acquire feature information of the first task; call the prediction model, input the feature information of the first task into the prediction model, and obtain the prediction result output by the prediction model; and obtain the health value based on the prediction result.

[0173] In an exemplary embodiment, the first task includes a first part and a second part, and a first processor is used to process the first part. The processing module 802 is also used to process the second part via a second processor in the processing system.

[0174] In an exemplary embodiment, the second processor includes a plurality of second processing units, and the first task has a corresponding second processing unit among the plurality of second processing units. Processing module 802 is configured to process the second part through the second processing unit corresponding to the first task.

[0175] It should be understood that the above Figure 8 The device shown, in performing its function, possesses beneficial effects and Figure 4 The illustrated method embodiments have the same beneficial effects. Figure 8The device illustrated here is only an example of the division of the above-described functional modules to demonstrate its functions. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above examples belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0176] This application embodiment also provides a task processing device, which includes a memory and a processor; the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to enable the task processing device to perform the above-described task. Figure 4 The method for processing tasks is shown.

[0177] See Figure 9 , Figure 9 A schematic diagram of the structure of an exemplary processing system device 900 of this application is shown. The processing device 900 includes at least one processor 901, a memory 903, and at least one network interface 904.

[0178] The processor 901 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processer (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits or application-specific integrated circuits (ASICs) for implementing the schemes of the present application, programmable logic devices (PLDs), other general-purpose processors, or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor can be a processor supporting an advanced RISC machine (ARM) architecture. It can implement or execute various logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processor can also be a combination implementing a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0179] Optionally, the device 900 for processing tasks further includes a bus 902. The bus 902 is used to transmit information between the components of the device 900 for processing tasks. The bus 902 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 902 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 Only one line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0180] The memory 903 may be, for example, volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache.

[0181] By way of example, but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0182] The memory 903 can also be other types of storage devices capable of storing static information and instructions. Alternatively, it can be other types of dynamic storage devices capable of storing information and instructions. It can also be other optical disc storage, optical disk storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. The memory 903 may exist independently, for example, and be connected to the processor 901 via bus 902. The memory 903 may also be integrated with the processor 901.

[0183] The network interface 904 uses any transceiver-type device to communicate with other devices or communication networks, which can be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The network interface 904 can include a wired network interface and can also include a wireless network interface. Specifically, the network interface 904 can be an Ethernet interface, such as a fast Ethernet (FE) interface, a gigabit Ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a WLAN interface, a cellular network interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In some embodiments of the present application, the network interface 904 can be used for the processing task device 900 to communicate with other devices.

[0184] In a specific implementation, as some embodiments, the processor 901 can include one or more CPUs, such as the CPU0 and the CPU1 shown in FIG. 9. Each of these processors can be a single-core processor or a multi-core processor. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions). Figure 9

[0185] In a specific implementation, as some embodiments, the processing task device 900 can include multiple processors, such as the processor 901 and the processor 905 shown in FIG. 9. Each of these processors can be a single-core processor or a multi-core processor. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions). Figure 9

[0186] In some embodiments, the memory 903 is used to store program instructions 910 for implementing the solutions of the present application, and the processor 901 can execute the program instructions 910 stored in the memory 903. That is, the processing task device 900 can implement the method provided by the method embodiments through the processor 901 and the program instructions 910 in the memory 903, i.e., the method shown in FIG. 9. The program instructions 910 can include one or more software modules. Alternatively, the processor 901 itself can also store program instructions for implementing the solutions of the present application. Figure 4

[0187] In the implementation process, the processing task device 900 of the present application can correspond to the device for executing the above-mentioned Figure 4 ​​​The processor 901 in the device 900 for processing tasks reads instructions in the memory 903, and the processor 901 executes the instructions to implement the method. Figure 9 The device 900 for processing tasks can implement all or part of the steps in the method embodiment.

[0188] The device 900 for processing tasks can also correspond to the above Figure 8 The device, Figure 8 Each functional module in the device is implemented by software of the device 900 for processing tasks. In other words, Figure 8 The functional modules in the device are generated by the processor 901 of the device 900 for processing tasks reading program instructions 910 stored in the memory 903.

[0189] The processor 901 in the device 900 for processing tasks reads instructions in the memory 903, and the processor 901 executes the instructions to implement the method. Figure 4 The steps of the method are completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The steps of the method embodiment disclosed in the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads information in the memory and combines the hardware to complete the steps of the above method embodiment. To avoid repetition, it will not be described in detail here.

[0190] In an exemplary embodiment, the present embodiment provides a processing system, which comprises a scheduler and a first processor, the scheduler is used to execute Figure 4 The method for processing tasks. Exemplarily, the processing system can further comprise a second processor.

[0191] In an exemplary embodiment, a computer readable storage medium is provided, which stores a program or instructions, when the program or instructions are run on a computer, the computer executes Figure 4 The method for processing tasks.

[0192] Exemplarily, the present embodiment provides a computer program or computer program product, which comprises computer program code, when the computer program code is run on a computer, the computer executes Figure 4 The method for processing tasks.

[0193] In an exemplary embodiment, the present embodiment provides a chip, which comprises a processor, used to call and run instructions stored in a memory, so that a computer installed with the chip executes Figure 4 The method for processing tasks.

[0194] In an example embodiment, the application also provides another chip, comprising: an input interface, an output interface, a processor and a memory, the input interface, the output interface, the processor and the memory are connected through internal connection paths, the processor is configured to execute the code in the memory, when the code is executed, the computer installed with the chip executes Figure 4 the method shown in the processing task.

[0195] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. 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, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk) and the like.

[0196] In the application, the terms "first", "second" and the like are used to distinguish between elements or similar items with basically the same function, and it should be understood that there is no logical or time sequence between "first", "second" and "nth", and the number and execution order are not limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.

[0197] It should also be understood that in various embodiments of the application, the size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the application.

[0198] The term "at least one", as used herein, means one or more, the term "multiple", as used herein, means two or more, for example, a multiple of second tasks means two or more second tasks. The terms "system" and "network" are often used interchangeably herein.

[0199] It should be understood that the terms used in the description of various described examples herein are for the purpose of describing particular embodiments only and are not intended to be limiting. As used in the description of various described examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0200] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or", is a description of associating relationship between associated objects, means there can be three kinds of relationships, for example, A and / or B, can represent: A exists alone, A and B exist at the same time, B exists alone, these three cases. In addition, the character " / " in the present application generally represents that the front and rear associated objects are a kind of "or" relationship.

[0201] It should also be understood that the terms "if' and "when" can be construed to mean "when" or "upon" or "in response to a determination" or "in response to detecting", respectively. Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be construed to mean "upon determining" or "in response to determining" or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]", depending on the context.

[0202] The above description is only an embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method of processing a task, characterized by, The method is applied to a scheduler included in a processing system, the processing system further including a first processor, and the method includes: obtaining a first task, the first task being one of a plurality of second tasks; in a case where it is determined according to a performance test result that a performance of the first processor supports processing of the first task, processing the first task by the first processor, the performance test result being obtained by testing the performance of the first processor using the plurality of second tasks.

2. The method of claim 1, wherein, The performance test result includes a task combination supported by the performance of the first processor, the task combination including at least two second tasks of the plurality of second tasks; The determination according to the performance test result that the performance of the first processor supports processing of the first task includes that the first task and a third task being processed by the first processor belong to the task combination, the third task being at least one of the plurality of second tasks.

3. The method according to claim 1 or 2, characterized in that, The first processor includes a plurality of first processing units, and the processing of the first task by the first processor includes: processing the first task by the first processor according to a first scheduling strategy, the first scheduling strategy being a first sub-scheduling strategy or a second sub-scheduling strategy, the first sub-scheduling strategy being used to indicate that the first task is processed by the first processor, and the second sub-scheduling strategy being used to indicate that the first task is processed by at least one of the plurality of first processing units.

4. The method of claim 3, wherein, The first scheduling strategy is the first sub-scheduling strategy; The processing of the first task by the first processor according to the first scheduling strategy includes: sending a first processing instruction to the first processor, the first processing instruction being used for the first processor to process the first task.

5. The method of claim 3, wherein, The first scheduling strategy is the second sub-scheduling strategy; The processing of the first task by the first processor according to the first scheduling strategy includes: sending a second processing instruction to the first processor, the second processing instruction including a processing unit identifier, the processing unit identifier being used to indicate at least one first processing unit, and the second processing instruction being used for the at least one first processing unit to process the first task.

6. The method of claim 5, wherein, The at least one first processing unit is determined according to a task type of the first task, the task type being a periodic task or an aperiodic task.

7. The method of claim 6, wherein, The method further includes: in a case where the task type is the periodic task, obtaining a utilization value corresponding to each of the plurality of first processing units, the utilization value being used to indicate a utilization of the corresponding first processing unit; determining the at least one first processing unit from the plurality of first processing units according to the utilization value corresponding to each of the plurality of first processing units.

8. The method of claim 6, wherein, The method further includes: in a case where the task type is the aperiodic task, obtaining a task queue corresponding to each of the plurality of first processing units, the task queue being used to store a task to be processed by the corresponding first processing unit; determining the at least one first processing unit from the plurality of first processing units according to the task queue corresponding to each of the plurality of first processing units.

9. The method according to any of claims 3-8, characterized by, The method further includes: obtain a health degree value, the health degree value being used to indicate a health degree corresponding to the first scheduling strategy; determine a second scheduling strategy according to the health degree value; process a fourth task according to the second scheduling strategy by the first processor, the fourth task being at least one of the plurality of second tasks.

10. The method of claim 9, wherein, in a case where the health degree indicated by the health degree value is between a first threshold value and a second threshold value, the second scheduling strategy is the first scheduling strategy, the first threshold value being greater than the second threshold value; or, in a case where the health degree indicated by the health degree value is greater than the first threshold value and the first scheduling strategy is the first sub-scheduling strategy, the second scheduling strategy is the second sub-scheduling strategy; or, in a case where the health degree indicated by the health degree value is less than the second threshold value and the first scheduling strategy is the second sub-scheduling strategy, the second scheduling strategy is the first sub-scheduling strategy.

11. The method according to claim 9 or 10, characterized in that, The obtaining of the health degree value comprises: obtaining computing resource information, the computing resource information comprising a remaining computing resource of the first processor and a computing resource occupied by the first task on the first processor; obtaining the health degree value according to the computing resource information.

12. The method of claim 11, wherein, The processing system further comprises a second processor, and the computing resource information further comprises a remaining computing resource of the second processor and a computing resource occupied by the first task on the second processor.

13. The method of claim 9 or 10, wherein, The obtaining of the health degree value comprises: obtaining feature information of the first task; calling a prediction model, inputting the feature information of the first task into the prediction model to obtain a prediction result output by the prediction model; obtaining the health degree value according to the prediction result.

14. The method of any one of claims 1-13, wherein, The first task comprises a first part and a second part, and the first processor is used to process the first part. The method further comprises: processing the second part by a second processor in the processing system.

15. The method of claim 14, wherein, The second processor comprises a plurality of second processing units, and the first task has a corresponding second processing unit in the plurality of second processing units. The processing of the second part by the second processor in the processing system comprises: processing the second part by the corresponding second processing unit of the first task.

16. An apparatus for processing a task, the apparatus comprising: The apparatus comprises: an obtaining module, configured to obtain a first task, the first task being one of a plurality of second tasks; a processing module, configured to process the first task by the first processor in a case where a performance of the first processor supports processing of the first task according to a performance test result, the performance test result being obtained by testing the performance of the first processor by using the plurality of second tasks.

17. The apparatus of claim 16, wherein, The performance test result comprises a task combination supported by the performance of the first processor, and the task combination comprises at least two second tasks in the plurality of second tasks. The performance support processing the first task according to the performance test result comprises that the first task and a third task being processed by the first processor belong to the task combination, and the third task is at least one of the plurality of second tasks.

18. The apparatus of claim 16 or 17, wherein, The first processor comprises a plurality of first processing units. The processing module is configured to process the first task by the first processor according to a first scheduling strategy, the first scheduling strategy being a first sub-scheduling strategy or a second sub-scheduling strategy, the first sub-scheduling strategy being used to instruct the first processor to process the first task, and the second sub-scheduling strategy being used to instruct at least one of the plurality of first processing units to process the first task.

19. The apparatus of claim 18, wherein, The first scheduling strategy is the first sub-scheduling strategy. The processing module is configured to send a first processing instruction to the first processor, the first processing instruction being used to process the first task by the first processor.

20. The apparatus of claim 18, wherein, The first scheduling strategy is the second sub-scheduling strategy. The processing module is configured to send a second processing instruction to the first processor, the second processing instruction comprising a processing unit identifier, the processing unit identifier being used to instruct the at least one first processing unit, and the second processing instruction being used to process the first task by the at least one first processing unit.

21. The apparatus of claim 20, wherein, The at least one first processing unit is determined according to a task type of the first task, the task type being a periodic task or a non-periodic task.

22. The apparatus of claim 21, wherein, The acquisition module is further configured to, in a case where the task type is the periodic task, acquire a plurality of utilization rate values respectively corresponding to the plurality of first processing units, the utilization rate value being used to indicate a utilization rate of the corresponding first processing unit. The at least one first processing unit is determined from the plurality of first processing units according to the utilization rate values respectively corresponding to the plurality of first processing units.

23. The apparatus of claim 21, wherein, The acquisition module is further configured to, in a case where the task type is the non-periodic task, acquire a plurality of task queues respectively corresponding to the plurality of first processing units, the task queue being used to store a task to be processed by the corresponding first processing unit; and determine the at least one first processing unit from the plurality of first processing units according to the task queues respectively corresponding to the plurality of first processing units.

24. The apparatus of any of claims 18-23, wherein The acquisition module is further configured to acquire a health degree value, the health degree value being used to indicate a health degree corresponding to the first scheduling strategy; and determine a second scheduling strategy according to the health degree value. The processing module is further configured to process a fourth task by the first processor according to the second scheduling strategy, the fourth task being at least one of the plurality of second tasks.

25. The apparatus of claim 24, wherein, In a case where the health degree value indicates a health degree between a first threshold value and a second threshold value, the second scheduling strategy is the first scheduling strategy, the first threshold value being greater than the second threshold value; or in a case where the health degree value indicates a health degree greater than the first threshold value and the first scheduling strategy is the first sub-scheduling strategy, the second scheduling strategy is the second sub-scheduling strategy; or in a case where the health degree value indicates a health degree less than the second threshold value and the first scheduling strategy is the second sub-scheduling strategy, the second scheduling strategy is the first sub-scheduling strategy.

26. The apparatus of claim 24 or 25, wherein, The obtaining module is configured to obtain computing resource information, the computing resource information including remaining computing resources of the first processor and computing resources occupied by the first task on the first processor. The health degree value is obtained according to the computing resource information.

27. The apparatus of claim 26, wherein, The processing system further includes a second processor, and the computing resource information further includes remaining computing resources of the second processor and computing resources occupied by the first task on the second processor.

28. The apparatus of claim 24 or 25, wherein, The obtaining module is configured to obtain feature information of the first task, input the feature information of the first task into a prediction model to obtain a prediction result output by the prediction model, and obtain the health degree value according to the prediction result.

29. The apparatus of any of claims 16-28, wherein, The first task includes a first part and a second part, and the first processor is configured to process the first part. The processing module is further configured to process the second part by a second processor in the processing system.

30. The apparatus of claim 29, wherein, The second processor includes a plurality of second processing units, and the first task has a corresponding second processing unit in the plurality of second processing units. The processing module is configured to process the second part by the corresponding second processing unit of the first task.

31. An apparatus for processing a task, the apparatus comprising: The device includes a memory and a processor. The memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to enable the device for processing tasks to implement the method for processing tasks according to any one of claims 1-15.

32. A computer-readable storage medium, comprising: The computer readable storage medium stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to enable the computer to implement the method for processing tasks according to any one of claims 1-15.

33. A computer program product, characterised in that, The computer program product includes computer instructions executed by the processor to enable the computer to implement the method for processing tasks according to any one of claims 1-15.