Task scheduling method, device, equipment, storage medium and chip
By obtaining and utilizing the prior configuration information of the target node for resource scheduling, the problem of resource allocation deviation and scheduling delay caused by fluctuations in the node operation time in the automatic driving real-time scheduling system is solved, and a safer and more efficient autonomous driving system is achieved.
Patent Information
- Application Number
- CN202411506325.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In the real-time scheduling system of autonomous driving, fluctuations in the operating time of nodes cause resource allocation to deviate from the optimal solution, increasing the scheduling delay, and affecting the safety of autonomous driving.
Resource scheduling and execution are performed by obtaining the prior configuration information of the target node, including scheduling mode, available resources and priorities. The specific method includes adding the ready frame task to the target queue corresponding to the global mode in global mode, or adding the ready frame task to the respective corresponding target queue in partition mode, and discarding tasks in other queues if executed.
It effectively reduces the scheduling delay of ready frame tasks, avoids the impact of fluctuations in running time between different ready frame tasks, and solves problems such as increasing scheduling delay and affecting the safety of autonomous driving.
Smart Images

Figure CN119025248B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a task scheduling method, device, equipment, storage medium and chip. Background Art
[0002] Task scheduling technology is one of the key technologies in real-time systems. The purpose of real-time task scheduling is to ensure that each task meets its time constraints as much as possible and respond to external requests in a timely manner. For example, in the real-time scheduling system of autonomous driving, in order to achieve real-time scheduling of autonomous driving tasks, there are usually the following problems: when a node has multiple candidate available resources, it is necessary to collect historical data such as the running time of the node to realize resource allocation. When the running time of the node fluctuates, this resource allocation method is very likely to deviate from the optimal solution, resulting in an increase in the scheduling delay of the node, thereby affecting the safety of autonomous driving. Summary of the invention
[0003] In order to overcome the problems existing in the related technologies, the present disclosure provides a task scheduling method, device, equipment, storage medium and chip to solve the technical problems existing in the above-mentioned related technologies such as increased scheduling delay and impact on the safety of autonomous driving.
[0004] According to the first aspect of an embodiment of the present disclosure, a task scheduling method is provided, comprising: obtaining a priori configuration information and a ready frame task of a target node, the a priori configuration information comprising at least one of a scheduling mode, available resources and a priority, the ready frame task being a frame task currently waiting to be executed in the target node; and performing resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node.
[0005] In some embodiments, the a priori configuration information includes a scheduling mode, the target node supports the use of m available resources, m is a positive integer, and the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node includes: when the scheduling mode includes a global mode, the ready frame task of the target node is added to the target queue corresponding to the global mode, and the corresponding thread is called to allocate the ready frame task in the target queue to the first available resource for execution; or, when the scheduling mode includes a partition mode, the ready frame task of the target node is added to the target queue corresponding to each of the m available resources, and if the ready frame task has been executed in any available resource, the ready frame task in the target queue corresponding to the other available resources is discarded; wherein, the first available resource is a resource among the m available resources, and the other available resources are resources among the m available resources except any available resource.
[0006] In some embodiments, the a priori configuration information includes available resources, and there are m available resources, where m is a positive integer. The resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node include: when m is 1, adding the ready frame task of the target node to the target queue corresponding to the available resources, waiting for calling the corresponding thread to execute the ready frame task in the target queue in the available resources; or, when m is a positive integer greater than 1, adding the ready frame task of the target node to the target queues corresponding to the m available resources respectively, and if the ready frame task has been executed in any available resource, discarding the ready frame task in the target queue corresponding to other available resources; wherein the other available resources are resources among the m available resources except any one of the available resources.
[0007] In some embodiments, the a priori configuration information includes a priority, the target node supports the use of m available resources, m is a positive integer, and the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node includes: adding the ready frame task of the target node to the corresponding target queue based on the priority of the target node, waiting for calling the corresponding thread to allocate the ready frame task in the corresponding target queue to the second available resource for execution; wherein, the second available resource is a resource among the m available resources.
[0008] In some embodiments, the a priori configuration information includes a scheduling mode, available resources and a priority, there are m available resources, m is a positive integer, and if the scheduling mode includes a global mode, then the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node includes: adding the ready frame task of the target node to the target queue corresponding to the global mode based on the priority of the target node, and waiting for calling the corresponding thread to allocate the ready frame task in the target queue to a third available resource for execution; wherein, the third available resource is a resource among the m available resources.
[0009] In some embodiments, the a priori configuration information includes a scheduling mode, available resources and a priority. There are m available resources, where m is a positive integer. If the scheduling mode is a partition mode, then the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node include: when m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resource based on the priority of the target node, and waiting for the corresponding thread to be called to execute the ready frame task in the target queue in the available resource; or, when m is a positive integer greater than 1, the ready frame task of the target node is added to the target queues corresponding to the m available resources respectively based on the priority of the target node, and if the ready frame task has been executed in any available resource, the ready frame task in the target queue corresponding to the other available resources is discarded; wherein the other available resources are the resources among the m available resources except any one of the available resources.
[0010] In some embodiments, if the ready frame task has been executed in any available resource, discarding the ready frame task in the target queue corresponding to other available resources includes: after the ready frame task in the target queue corresponding to any available resource is executed, detecting whether the ready frame task in the target queue corresponding to other available resources is extracted to wait for execution; when it is detected that the ready frame task in the target queue corresponding to other available resources is extracted, discarding the ready frame task in the target queue corresponding to the other available resources.
[0011] In some embodiments, the ready frame task supports migration between available resources of the target node in the global mode.
[0012] In some embodiments, the priority includes an application layer priority and / or an operating system layer priority.
[0013] According to the second aspect of an embodiment of the present disclosure, a task scheduling device is provided, comprising: an acquisition module, configured to acquire a priori configuration information and a ready frame task of a target node, wherein the a priori configuration information includes at least one of a scheduling mode, available resources and a priority, and the ready frame task is a frame task currently waiting to be executed in the target node; and a processing module, configured to perform resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node.
[0014] For the contents not introduced or described in the embodiments of the present disclosure, please refer to the relevant introduction in the aforementioned method embodiments, and the embodiments of the present disclosure are not limited thereto.
[0015] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the above-mentioned task scheduling method.
[0016] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the task scheduling method provided in the first aspect of the present disclosure are implemented.
[0017] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, including: a processor and an interface; the processor is used to read instructions to execute the steps of the above-mentioned task scheduling method.
[0018] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the electronic device obtains the a priori configuration information and ready frame task of the target node, the a priori configuration information includes at least one of the scheduling mode, available resources and priority, and the ready frame task is the frame task currently waiting to be executed in the target node; based on the a priori configuration information of the target node, the ready frame task of the target node is resource scheduled and executed. In this way, the present disclosure can schedule the ready frame task of the target node to run and execute on the appropriate available resources (such as computing units) based on the a priori configuration information of the target node, which can effectively reduce the scheduling delay of the ready frame task and avoid the impact caused by fluctuations in the running / computing time between different ready frame tasks on the same node. It can also solve technical problems such as increased scheduling delay and impact on the safety of autonomous driving that exist in related technologies.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0021] Figure 1 It is a flowchart of a task scheduling method according to an exemplary embodiment.
[0022] Figure 2 The present invention is a schematic diagram of a resource scheduling and execution process according to an exemplary embodiment.
[0023] Figure 3 The diagram is a flowchart of another resource scheduling and execution according to an exemplary embodiment.
[0024] Figure 4The diagram is a flowchart of another resource scheduling and execution according to an exemplary embodiment.
[0025] Figure 5 The diagram is a flowchart of another resource scheduling and execution according to an exemplary embodiment.
[0026] Figure 6 It is a structural diagram of a task scheduling device according to an exemplary embodiment.
[0027] Figure 7 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment.
[0028] Figure 8 It is a schematic structural diagram of a vehicle according to an exemplary embodiment.
[0029] Fig. 9 The figure is a schematic diagram showing the structure of a chip according to an exemplary embodiment. DETAILED DESCRIPTION
[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0031] It should be noted that all actions of acquiring signals, information or data in the present disclosure are performed with the authorization given by the owner of the corresponding device.
[0032] In real-time scheduling, such as in the real-time scheduling system of autonomous driving. The autonomous driving system can be modeled as a directed graph (DG) consisting of multiple nodes and the data dependencies between them. Among them, the node represents the autonomous driving task, and the directed edge represents the data flow between the nodes. For example, the sensor node can transmit the collected data to the path planning node, and the path planning node sends the control signal to the control node. Generally speaking, the triggering methods of the node include time triggering and message triggering. Among them, time triggering means that when the set trigger period is reached, the node can be triggered to generate a frame task and wait for execution. Message triggering means that the node needs to wait for the message received from the predecessor node before it triggers the node to generate a frame task and wait for execution; that is, the message-triggered node needs to wait until the message of the predecessor node arrives before it changes to the ready state, and its frame task can be changed to the ready frame task. Any two frame tasks of the same node do not overlap / intersect in time. In actual operation, these nodes are assigned to different hardware computing units, and finally cooperate to complete the processing of sensor data within a time interval and generate a vehicle control instruction. The traditional real-time scheduling system for autonomous driving has the following series of problems, all of which reduce the real-time performance of the system, making it impossible for the autonomous driving system to make timely decisions based on environmental changes, thus leading to safety hazards. The first problem is that it is impossible to simultaneously take into account the requirements of node-level resource isolation and maintaining high resource utilization. The second problem is that when a node has multiple candidate computing units (i.e., available resources), it is necessary to collect historical data such as the running time of the node to implement resource allocation. When the running time of the node fluctuates, this resource allocation method can easily deviate from the optimal solution, resulting in an increase in the scheduling delay of the node, thereby affecting the safety of autonomous driving. To solve the above problems, the present disclosure provides a task scheduling method, apparatus, device, storage medium and chip. Please refer to Figure 1 FIG. 1 is a flow chart of a task scheduling method provided by an embodiment of the present disclosure. Figure 1 The method shown can be applied to an electronic device, and the method may include the following implementation steps:
[0033] S101. Acquire a priori configuration information and ready frame tasks of a target node, wherein the a priori configuration information includes at least one of a scheduling mode, available resources, and a priority, and the ready frame task is a frame task currently waiting to be executed in the target node.
[0034] In the present disclosure, the above-mentioned target node may refer to any node in the task directed graph in the real-time scheduling system. Among them, the nodes in the task directed graph represent real-time tasks to be scheduled, such as autonomous driving tasks; directed edges represent the data flow between nodes. The number of the above-mentioned target nodes is not limited, and may be one or more, which can be determined according to actual conditions. For the convenience of describing the present disclosure, the following description takes one target node as an example to explain the relevant content, but it does not constitute a limitation. When there are multiple target nodes above, multiple target nodes can be executed according to the implementation principle of one target node, and the present disclosure does not make too many restrictions and details.
[0035] The above-mentioned prior configuration information may be the prior information pre-configured by the system for the target node, which may include but is not limited to any one or more of the following combinations: scheduling mode, available resources, priority or other customized information used to affect node resource allocation / scheduling, etc. Among them, the above-mentioned scheduling mode may refer to the mode in which the target node supports resource scheduling, which may include but is not limited to, for example, global (scheduling) mode, partition (scheduling) mode, etc., which are specifically described in detail below in this disclosure. The above-mentioned available resources may refer to the resources or computing units supported by the target node, for example, they may include but are not limited to central processing units (CPU), graphics processing units (GPU), intelligent processing units (IPU), neural network processors NPU (NPU), microprocessor units (MCU) or other resources, etc.
[0036] For example, the present disclosure may configure the following prior information for the target node according to actual conditions, such as: the trigger information of the node, the scheduling mode of the node, the available resources of the node and the priority of the node. For the trigger information of the node, specifically for the time-triggered node, its trigger information may include but is not limited to, for example, the trigger period, initial phase or other custom information of the node. For the message-triggered node, its trigger information may include but is not limited to information such as the trigger channel. For the scheduling mode of the node, it may include a global mode and a partition mode. For the available resources, it may include but is not limited to, for example, the GPU or CPU supported by the node. For the priority of the node, it may include but is not limited to, for example, the priority of the application layer and / or the priority of the operating system layer. Among them, the priority of the application layer mainly refers to the execution order of managing and allocating frame tasks within the application; the priority of the operating system layer mainly refers to the execution order of managing and allocating frame tasks at the operating system level, and the present disclosure does not make too many restrictions and details on this.
[0037] The above-mentioned ready frame task may refer to the task currently waiting to be executed in the target node. When the triggering mode of the above-mentioned target node is time triggering, the above-mentioned ready frame task may refer to waiting until the preset trigger time, and changing the state of the current frame task of the above-mentioned target node to the ready state, that is, converting the current frame task of the listed target node into a ready frame task. It can be understood that when the number of the above-mentioned target nodes is multiple, the above-mentioned ready frame tasks can also be multiple, which can become a ready frame task set. In practical applications, after completing the configuration of the above-mentioned prior configuration information, the real-time scheduling system can generate / acquire the above-mentioned ready frame task when it is running. After completing the acquisition / generation of the ready frame task, you can wait for the next step to allocate the ready frame task to the corresponding available resources for execution.
[0038] The present disclosure does not limit the respective acquisition implementation methods of the above-mentioned prior configuration information and the above-mentioned ready frame tasks. For example, they can be directly obtained from the system local database, or from other devices (such as servers or terminal devices).
[0039] S102: Based on the prior configuration information of the target node, resource scheduling and execution are performed on the ready frame task of the target node.
[0040] The present disclosure can schedule / allocate the ready frame tasks of the above-mentioned target nodes to run and execute on suitable available resources based on the prior configuration information of the above-mentioned target nodes. The electronic devices involved in the present disclosure can also be referred to as terminal devices (terminal), user equipment (UE), mobile stations (MS), mobile terminal devices (MT), etc. The above-mentioned electronic devices can be cars with communication functions, smart cars, drones, robots, mobile phones (Mobile Phones), wearable devices, tablet computers (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminal devices in industrial control (Industrial Control), wireless terminal devices in self-driving (Self-Driving), wireless terminal devices in remote medical surgery (Remote Medical Surgery), wireless terminal devices in smart grids (Smart Grid), wireless terminal devices in transportation safety (Transportation Safety), wireless terminal devices in smart cities (SmartCity), wireless terminal devices in smart homes (Smart Home), etc. The embodiments of the present disclosure do not limit the specific technology and specific device form adopted by the electronic device.
[0041] The real-time scheduling system involved in the present disclosure can be applied to real-time scheduling in any field, such as real-time scheduling of autonomous driving, real-time scheduling of robots, real-time scheduling of drones, or other application fields or application scenarios that support real-time scheduling, etc., and the present disclosure does not make too many limitations or details on this.
[0042] By implementing the embodiments of the present disclosure, the electronic device obtains the a priori configuration information and ready frame task of the target node, the a priori configuration information includes at least one of the scheduling mode, available resources and priority, and the ready frame task is the frame task currently waiting to be executed in the target node; based on the a priori configuration information of the target node, the ready frame task of the target node is resource scheduled and executed. In this way, the present disclosure can schedule the ready frame task of the target node to run and execute on the appropriate available resources (such as computing units) based on the a priori configuration information of the target node, which can effectively reduce the scheduling delay of the ready frame task and avoid the impact caused by fluctuations in the running / computing time between different ready frame tasks on the same node. It can also solve technical problems such as increased scheduling delay and impact on the safety of autonomous driving that exist in related technologies.
[0043] The present disclosure does not limit the specific implementation of the above step S102. For example, it may include but is not limited to any one or more combinations of the following implementations according to actual conditions:
[0044] In one embodiment, the a priori configuration information includes a scheduling mode, and the target node supports the use of m available resources, where m is a positive integer. It is understandable that when configuring the a priori configuration information, the present disclosure only configures the scheduling mode, and does not configure the available resources supported by the target node. When it comes to the use of available resources in the target node, the present disclosure may first determine the m available resources supported by the target node, and optionally the m available resources may be the default; and then perform other subsequent operations, which the present disclosure does not make too many limitations and descriptions. Please refer to Figure 2 FIG. 1 is a schematic diagram of a resource scheduling and execution process according to an exemplary embodiment. Figure 2 The flowchart shown may include the following implementation steps:
[0045] S201. When the scheduling mode includes a global mode, the ready frame task of the target node is added to the target queue corresponding to the global mode, and the corresponding thread is called to allocate the ready frame task in the target queue to the first available resource for execution, where the first available resource is a resource among the m available resources.
[0046] In the global (scheduling) mode, the present disclosure can first detect whether there is a target queue corresponding to the above-mentioned global mode in the system. If it exists, the ready frame task of the above-mentioned target node can be directly added to the target queue corresponding to the global mode. If it does not exist, a corresponding target queue can be created for the global mode first, and optionally a new thread can be created for the target queue corresponding to the global mode, and the newly created thread can be associated and bound with the available resources supported by the above-mentioned target node. After completing the creation of the target queue corresponding to the global mode, the ready frame task of the above-mentioned target node can be added to the target queue corresponding to the global mode. Then wait for calling the corresponding thread to schedule the ready frame task of the target node in the above-mentioned target queue to the first available resource for execution. For example, when the trigger time of the above-mentioned ready frame task is reached, the first thread can be called to schedule the above-mentioned ready frame task to the first available resource for execution. The above-mentioned first available resource is one or more available resources among the m available resources supported by the target node. It can be understood that in actual applications, in the global mode, any ready frame task of the target node can be migrated and executed between multiple candidate available resources during the execution process, so as to improve the load balancing between different available resources and make the load between different available resources relatively balanced as much as possible. At the same time, it also allows the nodes to use the private resources (such as private cache) on each available resource to improve operating efficiency and avoid disordered competition for available resources between different target nodes.
[0047] S202. When the scheduling mode includes a partition mode, the ready frame task of the target node is added to the target queue corresponding to each of the m available resources. If the ready frame task has been executed in any available resource, the ready frame task in the target queue corresponding to other available resources is discarded. The other available resources are the resources among the m available resources except any available resource, and m is a positive integer customized according to actual conditions.
[0048] In the partition (scheduling) mode, the present disclosure can create a corresponding target queue for each available resource supported by the system in advance. In the case where the target node supports m available resources, the present disclosure can adopt a greedy strategy to reduce the scheduling delay. Specifically, the present disclosure can add the ready frame task of the above target node to the target queue corresponding to each of the m available resources supported by the target node. Then wait for the corresponding thread to be called to schedule the ready frame task of the target node in the above target queue to the corresponding available resource for execution. For example, when the trigger time of the above ready frame task is reached, the second thread can be called to schedule the above ready frame task to the corresponding available resource for execution. When the ready frame task of the above target node is scheduled to be executed in any available resource, the ready frame task of the above target node in the corresponding target queue in other available resources can be discarded.
[0049] In a specific implementation, after detecting that the ready frame task of the above-mentioned target node in the target queue corresponding to any available resource is executed, the present disclosure may continue to detect whether the ready frame task of the above-mentioned target node in the target queue corresponding to other available resources is extracted to wait for execution; if it is extracted, the ready frame task of the above-mentioned target node in the target queue corresponding to other available resources may be discarded; otherwise, no limitation may be made. For example, in an actual application, when the ready frame task of the target node is taken out for the first time to wait for execution, the corresponding thread (such as the second thread) may be responsible for scheduling / allocating the ready frame task to the corresponding available resource for execution, such as using a load balancing strategy to schedule the ready frame task to the available resource with the smaller / smallest load among the m available resources for execution, etc. Subsequently, when the ready frame task of the target node is taken out from other target queues to wait for execution, the corresponding thread may discard the ready frame task to avoid repeated execution to waste resources and increase latency.
[0050] It should be noted that any one or more of the above steps S201 and S202 can be selected for execution according to actual needs. For example, when there is one target node, any one of the above steps S201 and S202 can be selected for execution according to actual conditions; when there are multiple target nodes, the above steps S201 and S202 can be executed according to actual conditions, and the present disclosure does not limit the order of execution of the above steps S201 and S202. For example, S202 can be executed first and then S201. In other words, the above global mode and partition mode can be mixed for different nodes to make the load between different resources relatively balanced, and at the same time, the nodes can make full use of the private cache resources on each available resource, which can effectively improve the operating efficiency and avoid disorderly competition for resources between different nodes.
[0051] It can be understood that in the present disclosure, each available resource can be configured with a corresponding thread, and a target queue can be assigned / configured with multiple threads with adjustable parameters, etc. When executing the ready frame task of the above target node, the present disclosure can call the corresponding thread to allocate the ready frame task of the above target node to the corresponding available resource to wait for execution, etc.; the present disclosure does not make too many restrictions and details on this.
[0052] In an optional embodiment, when the above-mentioned priority is not configured, the present disclosure may determine the above-mentioned priority as a default priority, such as the default maximum or minimum numerical priority, etc. Accordingly, the present disclosure may perform queue addition and scheduling execution of the above-mentioned ready frame task according to the above-mentioned default priority. Specifically, the present disclosure may add the above-mentioned ready frame task of the target node to the corresponding target queue according to the above-mentioned default priority, so that the corresponding thread may be called according to the above-mentioned default priority to schedule / allocate the above-mentioned ready frame task of the target node to the corresponding available resource for execution, etc.; the present disclosure does not make too many restrictions and detailed descriptions on this.
[0053] In another embodiment, the a priori configuration information includes available resources, and the number of the available resources is m, where m is a positive integer customized according to actual conditions, for example, it can be an empirical value set according to user experience, or it can be a statistical value calculated based on a series of experimental data. Figure 3 FIG. 1 is a schematic diagram of another resource scheduling and execution process according to an exemplary embodiment. Figure 3 The flowchart shown may include the following implementation steps:
[0054] S301. When m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resource, and the corresponding thread is called to execute the ready frame task in the target queue in the available resource.
[0055] When the target node supports m available resources and m is 1, the present disclosure can directly schedule / allocate the ready frame task of the target node to the target queue corresponding to the one available resource, and wait for the corresponding thread (for example, the third thread) to be scheduled to execute the ready frame task of the target node in the one available resource.
[0056] S302. When m is a positive integer greater than 1, the ready frame task of the target node is added to the target queues corresponding to the m available resources respectively. If the ready frame task has been executed in any available resource, the ready frame task in the target queues corresponding to other available resources is discarded; wherein the other available resources are the resources among the m available resources except any one of the available resources.
[0057] When the target node supports m available resources and m is a positive integer greater than 1, the present disclosure may adopt the partition mode by default, and add the ready frame tasks of the target node to the target queues corresponding to the m available resources respectively. Then wait for calling the corresponding thread to schedule the ready frame tasks of the target node in the target queue to the corresponding available resources for execution. For example, when the trigger time of the ready frame task is reached, the third thread may be called to schedule the ready frame tasks to the corresponding available resources for execution. When the ready frame tasks of the target node are scheduled to any available resource for execution, the ready frame tasks of the target node in the corresponding target queues in other available resources may be discarded.
[0058] In a specific implementation, after detecting that the ready frame task of the above-mentioned target node in the target queue corresponding to any available resource is executed, the present disclosure may continue to detect whether the ready frame task of the above-mentioned target node in the target queue corresponding to other available resources is extracted to wait for execution; if it is extracted, the ready frame task of the above-mentioned target node in the target queue corresponding to other available resources may be discarded; otherwise, no limitation may be made. For example, in an actual application, when the ready frame task of the target node is taken out for the first time to wait for execution, the corresponding thread (such as the third thread) may be responsible for scheduling / allocating the ready frame task to the corresponding available resource for execution, such as using a load balancing strategy to schedule the ready frame task to the available resource with the smaller / smallest load among the m available resources for execution, etc. Subsequently, when the ready frame task of the target node is taken out from other target queues to wait for execution, the corresponding thread may discard the ready frame task to avoid repeated execution to waste resources and increase latency.
[0059] It should be noted that one of the above steps S301 and S302 can be selected for execution according to actual conditions, and this disclosure does not make too many limitations and descriptions on this. Figure 1 and Figure 2The relevant introduction in the embodiments will not be repeated here.
[0060] In another embodiment, the a priori configuration information includes a priority, and the target node supports the use of m available resources, where m is a positive integer. It is understandable that when configuring the a priori configuration information, the present disclosure only configures the priority, and does not configure the available resources supported by the target node. When it comes to the use of available resources in the target node, the present disclosure may first determine the m available resources supported by the target node, and optionally the m available resources may be the default; and then perform other subsequent operations, which the present disclosure does not make too many limitations and descriptions. Please refer to Figure 4 FIG. 1 is a schematic diagram of a resource scheduling and execution process according to an exemplary embodiment. Figure 4 The flowchart shown may include the following implementation steps:
[0061] S401. Add the ready frame task of the target node to the corresponding target queue based on the priority of the target node, and wait for calling the corresponding thread to allocate the ready frame task in the corresponding target queue to the second available resource for execution; wherein the second available resource is a resource among the m available resources.
[0062] The present disclosure can add the ready frame task of the target node to the corresponding target queue based on the priority of the target node. For example, in global mode, it can be added to the target queue corresponding to the global mode; or in partition mode, it can be added to the target queue corresponding to each available resource supported by the target node, that is, the target queue corresponding to each of the m available resources supported by the target node. Then wait for calling the corresponding thread (for example, the fourth thread) to schedule / allocate the ready frame task of the target node in the target queue to the corresponding available resource (for example, the second available resource) for execution according to the priority of the target node. Specifically, the corresponding thread can be called according to the queue first-in-first-out mechanism to schedule the ready frame task in the target queue to the corresponding available resource for execution. For example, the ready frame task with a higher priority enters the target queue first, and is correspondingly extracted and allocated to the corresponding available resource for execution. The second available resource is one or more available resources among the m available resources supported by the target node. Optionally, in actual applications, any ready frame task of the target node in global mode can support migration and execution between multiple candidate available resources during execution, so as to improve the load balancing between different available resources. It can refer to the aforementioned Figure 2 The relevant descriptions in the embodiments are not repeated here. Figures 1 to 3 The relevant introduction in the embodiments will not be repeated here.
[0063] It should be noted that the present disclosure can implement the above-mentioned Figures 2 to 4 The present disclosure does not limit any one or more of the combined embodiments of the embodiments. Figure 5 FIG. 1 is a schematic diagram of another resource scheduling and execution process according to an exemplary embodiment. Figure 5 As shown, the above-mentioned prior configuration information includes scheduling mode, available resources and priority, and its flow chart may include the following implementation steps:
[0064] S501. If the scheduling mode includes a global mode, the ready frame task of the target node is added to the target queue corresponding to the global mode based on the priority of the target node, and the corresponding thread is called to allocate the ready frame task in the target queue to the third available resource for execution; wherein the third available resource is a resource among the m available resources.
[0065] In global mode, the present disclosure can add the ready frame task of the target node to the target queue corresponding to the global mode according to the priority of the target node. Then wait for calling the corresponding thread to schedule the ready frame task of the target node in the target queue to the third available resource for execution according to the priority of the target node. For example, when the trigger time of the ready frame task is reached, the fifth thread can be called to schedule the ready frame task to the third available resource for execution. The third available resource is one or more available resources among the m available resources supported by the target node. Optionally in actual applications, in global mode, any ready frame task of the target node can support migration and execution between multiple candidate available resources during execution, so as to improve the load balancing between different available resources, which can be referred to the aforementioned Figure 2 The relevant description in the embodiment will not be repeated here.
[0066] S502. If the scheduling mode includes a partition mode, when m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resources based on the priority of the target node, and the corresponding thread is called to execute the ready frame task in the target queue in the available resources.
[0067] In partition mode, if the target node supports one available resource, the present disclosure can directly schedule / allocate the ready frame task of the target node to the target queue corresponding to the one available resource according to the priority of the target node, and wait for the corresponding thread to be scheduled to execute the ready frame task of the target node in the one available resource according to the priority of the target node.
[0068] S503. If the scheduling mode includes a partition mode, when m is a positive integer greater than 1, the ready frame task of the target node is added to the target queues corresponding to the m available resources based on the priority of the target node, and if the ready frame task has been executed in any available resource, the ready frame task in the target queues corresponding to other available resources is discarded; wherein the other available resources are the resources among the m available resources except any available resource.
[0069] In the partition mode, if the target node supports m available resources, and m is a positive integer greater than 1, the present disclosure can adopt the partition mode by default, and add the ready frame tasks of the target node to the target queues corresponding to the m available resources respectively according to the priority of the target node. Then wait for the corresponding thread to be called to schedule the ready frame tasks of the target node in the target queue to the corresponding available resources for execution according to the priority of the target node. When the ready frame tasks of the target node are scheduled to any available resource for execution, the ready frame tasks of the target node in the corresponding target queues in other available resources can be discarded.
[0070] In a specific implementation, after detecting that the ready frame task of the above-mentioned target node in the target queue corresponding to any available resource is executed, the present disclosure may continue to detect whether the ready frame task of the above-mentioned target node in the target queue corresponding to other available resources is extracted to wait for execution; if it is extracted, the ready frame task of the above-mentioned target node in the target queue corresponding to other available resources may be discarded; otherwise, no limitation may be made. For example, in an actual application, when the ready frame task of the target node is taken out for the first time to wait for execution, the corresponding thread (for example, the sixth thread) may be responsible for scheduling / allocating the ready frame task to the corresponding available resource for execution, such as using a load balancing strategy to schedule the ready frame task to the available resource with the smaller / smallest load among the m available resources for execution, etc. Subsequently, when the ready frame task of the target node is taken out from other target queues to wait for execution, the corresponding thread may discard the ready frame task to avoid repeated execution to waste resources and increase latency.
[0071] It should be noted that the above steps S501 to S503 of the present disclosure can be implemented in combination with any one or more steps according to actual conditions, and the present disclosure does not limit this. For example, when the number of the above target nodes is 1, any one of the above steps S501 to S503 can be selected for execution according to actual conditions; for another example, when the number of the above target nodes is multiple, the above steps S501 and S503 can be executed according to actual conditions, and the present disclosure does not limit the order in which the above steps S501 to S503 are executed. For example, S503 can be executed first, then S502, and finally S501. In other words, the above global mode and partition mode can be mixed for different nodes to make the load between different resources relatively balanced, and at the same time, the nodes can make full use of the private cache resources on each available resource, which can effectively improve the operating efficiency and avoid disorderly competition for resources between different nodes.
[0072] In practical applications, the embodiments of the present disclosure may use a preset algorithm to allocate the ready frame tasks of the nodes to the corresponding available resources for execution. The preset algorithm may be, for example, as shown in Table 1 below:
[0073] Table 1
[0074]
[0075] It can be seen that the disclosure can allocate the ready frame tasks of the target node to the appropriate available resources (or computing units) for execution in real time, which can effectively reduce the scheduling delay of the ready frame tasks, avoid the impact of the fluctuation of the calculation time between different frame tasks of the same node, and keep the scheduling delay of the node at the millisecond level. The global mode and the partition mode can be mixed for different nodes to make the load between different available resources relatively balanced, and at the same time, the nodes can make full use of the private cache resources on each available resource, effectively improve the resource utilization and operation efficiency, and avoid the disordered competition for available resources between different nodes. That is, the disclosure realizes node-level resource isolation based on the hybrid scheduling of the global and partition modes while maintaining a high resource utilization rate. On this basis, the nodes are allocated to the appropriate available resources based on the greedy strategy, and there is no need to collect the historical operation data of the nodes and will not be affected by the fluctuation of the execution time, so that the scheduling delay of the nodes is kept at the millisecond level. In the real-time scheduling system (such as the autonomous driving system), the real-time performance of the autonomous driving system can be effectively guaranteed and the security of the system can be provided. In a specific implementation, the electronic device obtains the a priori configuration information and ready frame task of the target node, the a priori configuration information includes at least one of the scheduling mode, available resources and priority, and the ready frame task is the frame task currently waiting to be executed in the target node; based on the a priori configuration information of the target node, the ready frame task of the target node is resource scheduled and executed. In this way, the present disclosure can schedule the ready frame task of the target node to run and execute on the appropriate available resources (such as computing units) based on the a priori configuration information of the target node, which can effectively reduce the scheduling delay of the ready frame task and avoid the impact caused by fluctuations in the running / computing time between different ready frame tasks on the same node. It can also solve technical problems such as increased scheduling delay and impact on the safety of autonomous driving that exist in related technologies.
[0076] Based on the above examples, see Figure 6 FIG. 1 is a schematic diagram showing a structure of a task scheduling device according to an exemplary embodiment. Figure 6 The device shown can be applied to an electronic device, and the device may include an acquisition module 601 and a processing module 602. Among them:
[0077] The acquisition module 601 is configured to acquire a priori configuration information and a ready frame task of the target node, wherein the a priori configuration information includes at least one of a scheduling mode, available resources, and a priority, and the ready frame task is a frame task currently waiting to be executed in the target node;
[0078] The processing module 602 is configured to perform resource scheduling and execution on the ready frame task of the target node based on the prior configuration information of the target node.
[0079] In some embodiments, the a priori configuration information includes a scheduling mode, the target node supports the use of m available resources, m is a positive integer, and the processing module 602 is configured to:
[0080] When the scheduling mode includes a global mode, adding the ready frame task of the target node to the target queue corresponding to the global mode, waiting for calling the corresponding thread to allocate the ready frame task in the target queue to the first available resource for execution; or,
[0081] When the scheduling mode includes a partition mode, the ready frame task of the target node is added to the target queues corresponding to the m available resources respectively, and if the ready frame task has been executed in any available resource, the ready frame task in the target queues corresponding to other available resources is discarded;
[0082] The first available resource is a resource among the m available resources, and the other available resources are resources among the m available resources except any one of the available resources.
[0083] In some embodiments, the a priori configuration information includes available resources, and there are m available resources, where m is a positive integer. The processing module 602 is configured to:
[0084] When m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resource, and the corresponding thread is called to execute the ready frame task in the target queue in the available resource; or,
[0085] When m is a positive integer greater than 1, the ready frame tasks of the target node are added to the target queues corresponding to the m available resources respectively, and if the ready frame tasks have been executed in any available resource, the ready frame tasks in the target queues corresponding to other available resources are discarded;
[0086] The other available resources are resources among the m available resources except any one of the available resources.
[0087] In some embodiments, the a priori configuration information includes a priority, the target node supports the use of m available resources, m is a positive integer, and the processing module 602 is configured to:
[0088] Adding the ready frame task of the target node to the corresponding target queue based on the priority of the target node, waiting for calling the corresponding thread to allocate the ready frame task in the corresponding target queue to the second available resource for execution;
[0089] The second available resource is a resource among the m available resources.
[0090] In some embodiments, the a priori configuration information includes a scheduling mode, available resources and a priority, the available resources are m, and m is a positive integer. If the scheduling mode includes a global mode, the processing module 602 is configured as follows:
[0091] Adding the ready frame task of the target node to the target queue corresponding to the global mode based on the priority of the target node, and waiting for calling the corresponding thread to allocate the ready frame task in the target queue to the third available resource for execution;
[0092] The third available resource is a resource among the m available resources.
[0093] In some embodiments, the a priori configuration information includes a scheduling mode, available resources and a priority, the available resources are m, and m is a positive integer. If the scheduling mode is a partition mode, the processing module 602 is configured as follows:
[0094] When m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resource based on the priority of the target node, and the corresponding thread is called to execute the ready frame task in the target queue in the available resource; or,
[0095] When m is a positive integer greater than 1, the ready frame tasks of the target node are added to the target queues corresponding to the m available resources respectively based on the priority of the target node, and if the ready frame tasks have been executed in any available resource, the ready frame tasks in the target queues corresponding to other available resources are discarded;
[0096] The other available resources are resources among the m available resources except any one of the available resources.
[0097] In some embodiments, the processing module 602 is configured to:
[0098] After the ready frame task in the target queue corresponding to any available resource is executed, detecting whether the ready frame task in the target queue corresponding to other available resources is extracted to wait for execution;
[0099] When it is detected that the ready frame task in the target queue corresponding to other available resources is extracted, the ready frame task in the target queue corresponding to the other available resources is discarded.
[0100] In some embodiments, the ready frame task supports migration between available resources of the target node in the global mode.
[0101] In some embodiments, the priority includes an application layer priority and / or an operating system layer priority.
[0102] By implementing the embodiments of the present disclosure, the above-mentioned device can obtain the a priori configuration information and ready frame tasks of the target node, wherein the a priori configuration information includes at least one of the scheduling mode, available resources and priority, and the ready frame task is the frame task currently waiting to be executed in the target node; based on the a priori configuration information of the target node, the ready frame task of the target node is resource scheduled and executed. In this way, the present disclosure can schedule the ready frame task of the target node to run and execute on the appropriate available resources (such as computing units) based on the a priori configuration information of the target node, which can effectively reduce the scheduling delay of the ready frame task and avoid the impact caused by fluctuations in the running / computing time between different ready frame tasks on the same node. It can also solve technical problems such as increased scheduling delay and impact on the safety of autonomous driving that exist in related technologies.
[0103] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the task scheduling method provided by the present disclosure are implemented.
[0104] Figure 7 5 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. For example, the electronic device 500 may be a vehicle, a robot, a drone, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0105] Reference Figure 7 , the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output interface 512 , a sensor component 514 , and a communication component 516 .
[0106] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the task scheduling method described above. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0107] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0108] Power supply component 506 provides power to various components of device 500. Power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 500.
[0109] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0110] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0111] The input / output interface 512 provides an interface between the processing component 502 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0112] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, and the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0113] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0114] In an exemplary embodiment, the device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned task scheduling method.
[0115] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the device 500 to complete the above-mentioned upper task scheduling method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0116] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned task scheduling method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, for example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned task scheduling method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned task scheduling method.
[0117] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned task scheduling method when executed by the programmable device.
[0118] See also Figure 8 , Figure 8 6 is a functional block diagram of a vehicle 600 shown in an exemplary embodiment. The vehicle 600 can be configured in a fully or partially autonomous driving mode. For example, the vehicle 600 can obtain environmental information about its surroundings through the perception system 620, and obtain an autonomous driving strategy based on the analysis of the surrounding environmental information to achieve fully autonomous driving, or present the analysis results to the user to achieve partially autonomous driving.
[0119] The vehicle 600 may include various subsystems, such as an infotainment system 610, a perception system 620, a decision control system 630, a drive system 640, and a computing platform 650. Optionally, the vehicle 600 may include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and component of the vehicle 600 may be interconnected by wire or wirelessly.
[0120] In some embodiments, infotainment system 610 may include communication system 611 , entertainment system 612 , and navigation system 613 .
[0121] The communication system 611 may include a wireless communication system that can communicate wirelessly with one or more devices directly or via a communication network. For example, the wireless communication system may use 3G cellular communication, such as CDMA, EVDO, GSM / GPRS, or 4G cellular communication, such as LTE. Or 5G cellular communication. The wireless communication system may communicate with a wireless local area network (WLAN) using WiFi. In some embodiments, the wireless communication system may communicate directly with the device using an infrared link, Bluetooth, or ZigBee. Other wireless protocols, such as various vehicle communication systems, for example, the wireless communication system may include one or more dedicated short range communications (DSRC) devices, which may include public and / or private data communications between vehicles and / or roadside stations.
[0122] The entertainment system 612 may include a display device, a microphone and speakers. Users can listen to the radio and play music in the car based on the entertainment system; or connect the mobile phone to the vehicle and project the mobile phone's screen on the display device. The display device may be touch-screen, and users can operate by touching the screen.
[0123] In some cases, the user's voice signal can be obtained through a microphone, and based on the analysis of the user's voice signal, the user can control certain aspects of the vehicle 600, such as adjusting the temperature inside the vehicle, etc. In other cases, music can be played to the user through a speaker.
[0124] The navigation system 613 may include a map service provided by a map provider, thereby providing navigation of the driving route for the vehicle 600. The navigation system 613 may be used in conjunction with the vehicle's global positioning system 621 and inertial measurement unit 622. The map service provided by the map provider may be a two-dimensional map or a high-precision map.
[0125] The perception system 620 may include several sensors that sense information about the environment around the vehicle 600. For example, the perception system 620 may include a global positioning system 621 (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU) 622, a laser radar 623, a millimeter wave radar 624, an ultrasonic radar 625, and a camera 626. The perception system 620 may also include sensors of the internal systems of the monitored vehicle 600 (for example, an in-vehicle air quality monitor, a fuel gauge, an oil temperature gauge, etc.). Sensor data from one or more of these sensors can be used to detect objects and their corresponding characteristics (position, shape, direction, speed, etc.). This detection and recognition is a key function for the safe operation of the vehicle 600.
[0126] The global positioning system 621 is used to estimate the geographic location of the vehicle 600 .
[0127] The inertial measurement unit 622 is used to sense the change of the posture of the vehicle 600 based on the inertial acceleration. In some embodiments, the inertial measurement unit 622 may be a combination of an accelerometer and a gyroscope.
[0128] Lidar 623 utilizes lasers to sense objects in the environment in which vehicle 600 is located. In some embodiments, Lidar 623 may include one or more laser sources, a laser scanner, and one or more detectors, among other system components.
[0129] The millimeter wave radar 624 uses radio signals to sense objects in the surrounding environment of the vehicle 600. In some embodiments, in addition to sensing objects, the millimeter wave radar 624 can also be used to sense the speed and / or heading of the object.
[0130] The ultrasonic radar 625 may sense objects around the vehicle 600 using ultrasonic signals.
[0131] The camera device 626 is used to capture image information of the surrounding environment of the vehicle 600. The camera device 626 may include a monocular camera, a binocular camera, a structured light camera, a panoramic camera, etc. The image information acquired by the camera device 626 may include a static image or video stream information.
[0132] The decision control system 630 includes a computing system 631 that analyzes and makes decisions based on the information obtained by the perception system 620. The decision control system 630 also includes a vehicle controller 632 that controls the power system of the vehicle 600, and a steering system 633, a throttle 634 and a braking system 635 for controlling the vehicle 600.
[0133] The computing system 631 can be operated to process and analyze various information obtained by the perception system 620 in order to identify targets, objects and / or features in the surrounding environment of the vehicle 600. Targets may include pedestrians or animals, and objects and / or features may include traffic signals, road boundaries and obstacles. The computing system 631 may use object recognition algorithms, Structure from Motion (SFM) algorithms, video tracking and other technologies. In some embodiments, the computing system 631 can be used to map the environment, track objects, estimate the speed of objects, and so on. The computing system 631 can analyze the various information obtained and derive a control strategy for the vehicle.
[0134] The vehicle controller 632 can be used to coordinate the control of the vehicle's power battery and engine 641 to improve the power performance of the vehicle 600.
[0135] The steering system 633 is operable to adjust the forward direction of the vehicle 600. For example, in one embodiment, it may be a steering wheel system.
[0136] The throttle 634 is used to control the operating speed of the engine 641 and thereby control the speed of the vehicle 600 .
[0137] Braking system 635 is used to control the deceleration of vehicle 600. Braking system 635 can use friction to slow down wheel 644. In some embodiments, braking system 635 can convert the kinetic energy of wheel 644 into electric current. Braking system 635 can also take other forms to slow down the rotation speed of wheel 644 to control the speed of vehicle 600.
[0138] The drive system 640 may include components that provide powered movement for the vehicle 600. In one embodiment, the drive system 640 may include an engine 641, an energy source 642, a transmission system 643, and wheels 644. The engine 641 may be an internal combustion engine, an electric motor, an air compression engine, or a combination of other types of engines, such as a hybrid engine consisting of a gasoline engine and an electric motor, or a hybrid engine consisting of an internal combustion engine and an air compression engine. The engine 641 converts the energy source 642 into mechanical energy.
[0139] Examples of energy source 642 include gasoline, diesel, other petroleum-based fuels, propane, other compressed gas-based fuels, ethanol, solar panels, batteries, and other sources of electricity. Energy source 642 can also provide energy to other systems of vehicle 600.
[0140] The transmission system 643 can transmit the mechanical power from the engine 641 to the wheels 644. The transmission system 643 may include a gearbox, a differential, and a drive shaft. In one embodiment, the transmission system 643 may also include other devices, such as a clutch. Among them, the drive shaft may include one or more shafts that can be coupled to one or more wheels 644.
[0141] Some or all functions of the vehicle 600 are controlled by a computing platform 650. The computing platform 650 may include at least one processor 651 that may execute instructions 653 stored in a non-transitory computer-readable medium such as a memory 652. In some embodiments, the computing platform 650 may also be a plurality of computing devices that control individual components or subsystems of the vehicle 600 in a distributed manner.
[0142] The processor 651 may be any conventional processor, such as a commercially available CPU. Alternatively, the processor 651 may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof. Figure 6 Functionally illustrated processor, memory and other elements of the computer in the same block, but those of ordinary skill in the art will appreciate that the processor, computer or memory may actually include multiple processors, computers or memories that may or may not be stored in the same physical housing. For example, the memory may be a hard drive or other storage media that is located in a housing different from the computer. Therefore, references to processors or computers will be understood to include references to a collection of processors or computers or memories that may or may not operate in parallel. Different from using a single processor to perform the steps described herein, some components such as steering components and deceleration components may each have their own processors that only perform calculations related to the functions specific to the components.
[0143] In the embodiment of the present disclosure, the processor 651 may execute the above-mentioned task scheduling method.
[0144] In various aspects described herein, processor 651 may be located remote from the vehicle and in wireless communication with the vehicle. In other aspects, some of the processes described herein are performed on a processor disposed within the vehicle and others are performed by a remote processor, including taking the necessary steps to perform a single maneuver.
[0145] In some embodiments, the memory 652 may include instructions 653 (e.g., program logic) that may be executed by the processor 651 to perform various functions of the vehicle 600. The memory 652 may also include additional instructions, including instructions to send data to, receive data from, interact with, and / or control one or more of the infotainment system 610, the perception system 620, the decision control system 630, and the drive system 640.
[0146] In addition to instructions 653, memory 652 may also store data such as road maps, route information, the vehicle's location, direction, speed, and other such vehicle data, and other information. Such information may be used by vehicle 600 and computing platform 650 during operation of vehicle 600 in autonomous, semi-autonomous, and / or manual modes.
[0147] The computing platform 650 may control functions of the vehicle 600 based on input received from various subsystems, such as the drive system 640, the perception system 620, and the decision control system 630. For example, the computing platform 650 may utilize input from the decision control system 630 in order to control the steering system 633 to avoid an obstacle detected by the perception system 620. In some embodiments, the computing platform 650 may be operable to provide control over many aspects of the vehicle 600 and its subsystems.
[0148] Alternatively, one or more of the above-mentioned components may be installed or associated separately from the vehicle 600. For example, the memory 652 may exist partially or completely separately from the vehicle 600. The above-mentioned components may be communicatively coupled together in a wired and / or wireless manner.
[0149] Optionally, the above components are only examples. In actual applications, the components in the above modules may be added or deleted according to actual needs. Figure 6 It should not be understood as limiting the embodiments of the present disclosure.
[0150] An autonomous vehicle traveling on a road, such as vehicle 600 above, can identify objects in its surroundings to determine adjustments to the current speed. Objects can be other vehicles, traffic control devices, or other types of objects. In some examples, each identified object can be considered independently, and based on the object's respective characteristics, such as its current speed, acceleration, spacing from the vehicle, etc., can be used to determine the speed to be adjusted by the autonomous vehicle.
[0151] Optionally, the vehicle 600 or a perception and computing device associated with the vehicle 600 (e.g., computing system 631, computing platform 650) can predict the behavior of the identified object based on the characteristics of the identified object and the state of the surrounding environment (e.g., traffic, rain, ice on the road, etc.). Optionally, each identified object depends on the behavior of each other, so all the identified objects can also be considered together to predict the behavior of a single identified object. The vehicle 600 can adjust its speed based on the predicted behavior of the identified object. In other words, the autonomous vehicle can determine what stable state the vehicle will need to adjust to (e.g., accelerate, decelerate, or stop) based on the predicted behavior of the object. In this process, other factors can also be considered to determine the speed of the vehicle 600, such as the lateral position of the vehicle 600 in the road on which it is traveling, the curvature of the road, the proximity of static and dynamic objects, and the like.
[0152] In addition to providing instructions to adjust the speed of the autonomous vehicle, the computing device may also provide instructions to modify the steering angle of vehicle 600 so that the autonomous vehicle follows a given trajectory and / or maintains a safe lateral and longitudinal distance from objects near the autonomous vehicle (e.g., vehicles in adjacent lanes on the road).
[0153] The vehicle 600 may be any type of travel vehicle, such as a car, a truck, a motorcycle, a bus, a ship, an airplane, a helicopter, an RV, a train, etc., and the present disclosure does not specifically limit the vehicle.
[0154] By implementing the embodiments of the present disclosure, the electronic device obtains the a priori configuration information and ready frame task of the target node, the a priori configuration information includes at least one of the scheduling mode, available resources and priority, and the ready frame task is the frame task currently waiting to be executed in the target node; based on the a priori configuration information of the target node, the ready frame task of the target node is resource scheduled and executed. In this way, the present disclosure can schedule the ready frame task of the target node to run and execute on the appropriate available resources (such as computing units) based on the a priori configuration information of the target node, which can effectively reduce the scheduling delay of the ready frame task and avoid the impact caused by fluctuations in the running / computing time between different ready frame tasks on the same node. It can also solve technical problems such as increased scheduling delay and impact on the safety of autonomous driving that exist in related technologies.
[0155] See also Fig. 9 FIG. 1 is a schematic diagram showing the structure of a chip according to an exemplary embodiment. Fig. 9 The chip 700 shown includes a processor 701 and an interface 702. Optionally, it may also include a memory 703. The number of the processor 701 may be one or more, and the number of the interface 702 may be more than one.
[0156] In one embodiment, for a case where a chip is used to implement the method embodiment of the present disclosure:
[0157] The interface 702 is used to receive or output signals;
[0158] The processor 701 is used to execute part or all of the content in the task scheduling method embodiment.
[0159] It is understandable that the processor in the embodiment of the present disclosure can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0160] It is understandable that the memory in the embodiments of the present disclosure may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0161] It should be noted here that the description of the above storage medium, device and chip embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A task scheduling method, characterized in that: include: Acquire a priori configuration information and a ready frame task of a target node, wherein the a priori configuration information includes at least one of a scheduling mode, available resources, and a priority, and the ready frame task is a frame task currently waiting to be executed in the target node; Based on the prior configuration information of the target node, resource scheduling and execution of the ready frame task of the target node are performed; wherein the target node supports the use of m available resources, m is a positive integer, and based on the prior configuration information of the target node, resource scheduling and execution of the ready frame task of the target node include: When the scheduling mode includes a global mode, adding the ready frame task of the target node to a target queue corresponding to the global mode, waiting for calling a corresponding thread to allocate the ready frame task in the target queue to a first available resource for execution; When the scheduling mode includes a partition mode, the ready frame task of the target node is added to the target queues corresponding to the m available resources respectively, and if the ready frame task has been executed in any available resource, the ready frame task in the target queues corresponding to other available resources is discarded; The first available resource is a resource among the m available resources, and the other available resources are resources among the m available resources except any one of the available resources; If the ready frame task has been executed in any available resource, discarding the ready frame task in the target queue corresponding to other available resources includes: After the ready frame task in the target queue corresponding to any available resource is executed, detecting whether the ready frame task in the target queue corresponding to other available resources is extracted to wait for execution; When it is detected that the ready frame task in the target queue corresponding to other available resources is extracted, the ready frame task in the target queue corresponding to the other available resources is discarded.
2. The method according to claim 1, characterized in that: The priori configuration information includes available resources, and the available resources include m, where m is a positive integer. The resource scheduling and execution of the ready frame task of the target node based on the priori configuration information of the target node includes: When m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resource, and the corresponding thread is called to execute the ready frame task in the target queue in the available resource; or, When m is a positive integer greater than 1, the ready frame tasks of the target node are added to the target queues corresponding to the m available resources respectively, and if the ready frame tasks have been executed in any available resource, the ready frame tasks in the target queues corresponding to other available resources are discarded; The other available resources are resources among the m available resources except any one of the available resources.
3. The method according to claim 1, characterized in that The a priori configuration information includes a priority, the target node supports the use of m available resources, m is a positive integer, and the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node includes: Adding the ready frame task of the target node to the corresponding target queue based on the priority of the target node, waiting for calling the corresponding thread to allocate the ready frame task in the corresponding target queue to the second available resource for execution; The second available resource is a resource among the m available resources.
4. The method according to claim 1, characterized in that The a priori configuration information includes a scheduling mode, available resources and a priority, the available resources are m, and m is a positive integer. If the scheduling mode includes a global mode, then the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node includes: Adding the ready frame task of the target node to the target queue corresponding to the global mode based on the priority of the target node, and waiting for calling the corresponding thread to allocate the ready frame task in the target queue to the third available resource for execution; The third available resource is a resource among the m available resources.
5. The method according to claim 1, characterized in that: The a priori configuration information includes a scheduling mode, available resources and a priority, the available resources are m, and m is a positive integer. If the scheduling mode is a partition mode, then the resource scheduling and execution of the ready frame task of the target node based on the a priori configuration information of the target node includes: When m is 1, the ready frame task of the target node is added to the target queue corresponding to the available resource based on the priority of the target node, and the corresponding thread is called to execute the ready frame task in the target queue in the available resource; or, When m is a positive integer greater than 1, the ready frame tasks of the target node are added to the target queues corresponding to the m available resources respectively based on the priority of the target node, and if the ready frame tasks have been executed in any available resource, the ready frame tasks in the target queues corresponding to other available resources are discarded; The other available resources are resources among the m available resources except any one of the available resources.
6. The method according to claim 1 or 4, characterized in that: In the global mode, the ready frame task supports migration between available resources of the target node.
7. The method according to any one of claims 1 to 5, characterized in that The priority includes a priority at an application layer and / or a priority at an operating system layer.
8. A task scheduling device, characterized in that: include: An acquisition module is configured to acquire a priori configuration information and a ready frame task of a target node, wherein the a priori configuration information includes at least one of a scheduling mode, available resources, and a priority, and the ready frame task is a frame task currently waiting to be executed in the target node; A processing module is configured to perform resource scheduling and execution of the ready frame task of the target node based on the prior configuration information of the target node; wherein the target node supports the use of m available resources, m is a positive integer, and the processing module is further configured to, when the scheduling mode includes a global mode, add the ready frame task of the target node to a target queue corresponding to the global mode, and wait for calling a corresponding thread to allocate the ready frame task in the target queue to a first available resource for execution; when the scheduling mode includes a partition mode, add the ready frame task of the target node to a target queue corresponding to each of the m available resources, and if the ready frame task has been executed in any available resource, discard the ready frame task in the target queue corresponding to the other available resources; wherein the first available resource is a resource among the m available resources, and the other available resources are resources among the m available resources except any available resource; If the ready frame task has been executed in any available resource, discarding the ready frame task in the target queue corresponding to other available resources includes: After the ready frame task in the target queue corresponding to any available resource is executed, detecting whether the ready frame task in the target queue corresponding to other available resources is extracted to wait for execution; When it is detected that the ready frame task in the target queue corresponding to other available resources is extracted, the ready frame task in the target queue corresponding to the other available resources is discarded.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
11. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Controller and vehicle including the same
CN118132214A
Task scheduling method and device, equipment, storage medium and program product
CN118642822A