Task sending method and device, task execution method and device, equipment and medium

By creating multiple task queues in a distributed system and configuring monitoring tasks, the problems of low task sending efficiency and task dependency sequence are solved, and efficient task scheduling and data processing are achieved.

CN119597410APending Publication Date: 2025-03-11KUNLUNXIN TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311126189.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In distributed systems, task sending efficiency is low, especially when there is a task dependency, which causes the task sending outlet to be blocked and affects the data processing efficiency.

Method used

By creating multiple task queues and configuring monitoring tasks in the queue, the first-in-first-out feature of the queue is used to ensure that dependent tasks only start execution after the dependent task is executed, thereby improving the efficiency of task sending and execution.

Benefits of technology

While using multiple task queues to improve task sending efficiency, ensure that the execution order of multiple tasks with interdependencies is correct, improve the convenience of task scheduling, and thus improve data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597410A_ABST
    Figure CN119597410A_ABST
Patent Text Reader

Abstract

The invention provides a task sending method and device, equipment and a medium, and relates to the technical field of computers, in particular to the technical field of chips and data processing. According to the implementation scheme, a plurality of task queues including a first queue and a second queue are created; obtaining a first data processing task aiming at the first queue and a second data processing task aiming at the second queue, wherein the first data processing task and the second data processing task respectively comprise to-be-processed data, data processing instruction information and task dependency information; in response to determining that the second data processing task depends on the first data processing task, creating a first monitoring task which is to be ended in response to determining that the first data processing task has been executed; storing the first data processing task in a first queue; storing the first monitoring task and the second data processing task in the second queue; and sending the first queue and the second queue to a data processing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to chip technology and data processing technology, and specifically to a task sending and task execution method, device, electronic device, computer-readable storage medium and computer program product. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] With the development of artificial intelligence technology, more and more applications based on artificial intelligence technology have achieved results far exceeding traditional algorithms. Deep learning is a data-intensive and computationally intensive algorithm. In order to improve the training speed and reasoning speed of large-scale deep learning models, distributed systems can be used to perform data processing, and the host needs to send data processing tasks to the data processing device.

[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0005] The present disclosure provides a task sending and task execution method, device, electronic device, computer-readable storage medium and computer program product.

[0006] According to one aspect of the present disclosure, a task sending method is provided, including: creating multiple task queues, the multiple task queues including a first queue and a second queue; obtaining a first data processing task for the first queue and a second data processing task for the second queue, wherein the first data processing task and the second data processing task respectively include data to be processed, data processing instruction information and task dependency information; in response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, creating a first monitoring task, wherein the first monitoring task is to be terminated in response to determining that the first data processing task has been executed; storing the first data processing task in the first queue; storing the first monitoring task and the second data processing task in the second queue; and sending the first queue and the second queue to a data processing device.

[0007] According to another aspect of the present disclosure, a task execution device is provided, including: receiving a first queue and a second queue, wherein the first queue and the second queue are obtained using the task sending method as described above; and executing at least one task in the first queue and multiple tasks in the second queue, wherein the at least one task in the first queue is executed sequentially according to the order of each task in the first queue, and the multiple tasks in the second queue are executed sequentially according to the order of each task in the second queue.

[0008] According to another aspect of the present disclosure, a chip is provided, comprising at least one of the task sending device and the task executing device as described above.

[0009] According to another aspect of the present disclosure, a data processing system is provided, comprising the task sending device as described above and the task executing device as described above.

[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute at least one of the above-mentioned task sending method and task execution method.

[0011] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute at least one of the above-mentioned task sending method and task execution method.

[0012] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program can implement at least one of the above-mentioned task sending method and task execution method when executed by a processor.

[0013] According to one or more embodiments of the present disclosure, the efficiency of task sending and execution may be improved.

[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0016] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an exemplary embodiment of the present disclosure;

[0017] Figure 2 A flowchart of a task sending method according to an exemplary embodiment of the present disclosure is shown;

[0018] Figure 3 A flowchart of a task execution method according to an exemplary embodiment of the present disclosure is shown;

[0019] Figure 4 A structural block diagram of a task sending device according to an exemplary embodiment of the present disclosure is shown;

[0020] Figure 5 A structural block diagram of a task execution device according to an exemplary embodiment of the present disclosure is shown;

[0021] Figure 6 A schematic diagram showing the structure of a data processing system according to an exemplary embodiment of the present disclosure is shown;

[0022] Figure 7 A schematic diagram of the structure of a task execution device according to an exemplary embodiment of the present disclosure is shown;

[0023] Figure 8 A schematic diagram of the structure of a task execution device according to an exemplary embodiment of the present disclosure is shown;

[0024] Fig. 9 A schematic diagram showing multiple task queues according to an exemplary embodiment of the present disclosure is shown;

[0025] Fig.10 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0027] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0028] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0029] When a distributed system is used to perform data processing, the host needs to distribute multiple data processing tasks to each data processing device in the system. In order to improve the processing efficiency of the system, an asynchronous task distribution and processing method can usually be adopted. In the related art, a cache space or a single task queue is usually used to cache the data processing tasks to be distributed, so that the data processing tasks at the queue exit are distributed to the corresponding data processing devices in turn. In this case, when there is a dependency relationship between multiple tasks corresponding to different data processing devices, the data processing tasks that depend on other tasks must wait for the dependent data processing tasks to be executed before they can be distributed, which leads to the congestion of the task sending exit and the low efficiency of task sending.

[0030] Based on this, the present invention provides a task sending method, which creates multiple task queues for sending data processing tasks. When a data processing task depends on another data processing task belonging to other queues, a corresponding monitoring task is configured to be inserted into the queue, and the first-in-first-out feature of the queue is used to ensure that the dependent data processing task is not executed until the dependent data processing task is monitored to be completed. In this way, while using multiple queues to improve the task sending efficiency, it is possible to ensure that the execution order of multiple tasks with mutual dependencies is correct, thereby improving the convenience of task scheduling and further improving data processing efficiency.

[0031] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0032] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0033] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the task sending method or the task execution method.

[0034] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0035] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0036] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send data processing tasks to be performed. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0037] Client devices 101, 102, 103, 104, 105 and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various categories and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), short message service (SMS) applications, and may use various communication protocols.

[0038] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0039] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0040] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0041] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0042] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0043] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different categories. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0044] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different categories of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0045] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0046] Figure 2 FIG. 2 shows a flow chart of a task sending method 200 according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:

[0047] Step S201, creating multiple task queues, the multiple task queues including a first queue and a second queue;

[0048] Step S202: obtaining a first data processing task for the first queue and a second data processing task for the second queue, wherein the first data processing task and the second data processing task respectively include data to be processed, data processing instruction information and task dependency information;

[0049] Step S203: in response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, creating a first monitoring task, wherein the first monitoring task is terminated in response to determining that the first data processing task has been completed;

[0050] Step S204: storing the first data processing task in the first queue;

[0051] Step S205: storing the first monitoring task and the second data processing task in the second queue; and

[0052] Step S206: Send the first queue and the second queue to a data processing device.

[0053] Therefore, while using multiple task queues to send data processing tasks, when it is determined that the second data processing task belonging to different queues is dependent on the first data processing task, by configuring the monitoring task and inserting it into the second queue corresponding to the second data processing task, the first-in-first-out feature of the queue can be used to ensure that the second data processing task is not executed until the monitoring of the first data processing task is completed. This allows the use of multiple queues to improve the task sending efficiency while ensuring that the execution order of tasks with dependencies is correct, thereby improving the convenience of task scheduling and thereby improving data processing efficiency.

[0054] In some examples, more task queues may be created based on the needs of actual application scenarios to further improve the efficiency of task sending. In some examples, the above task queues may be implemented in the form of stream processing, that is, multiple task streams are created, based on which task dispatch is implemented to support the execution of more complex computational graphs containing multiple tasks and improve data processing efficiency.

[0055] In some examples, the task dependency information of each of the multiple tasks and the corresponding relationship between each task and the task queue can be determined based on a computation graph containing multiple tasks. For example, in one example, when the computation graph is a directed acyclic graph containing multiple task nodes, the directed acyclic graph can be divided into multiple links according to the topological relationship between the nodes of the directed acyclic graph, each link containing one or more task nodes, and then the multiple links are respectively mapped to multiple task queues, that is, the corresponding relationship between each task and the task queue is determined, and then the task dependency information of each task is determined based on the topological relationship between the nodes of the directed acyclic graph.

[0056] In some examples, the data processing device may include a graphics processing unit (GPU), a central processing unit (CPU), or various types of computing chips, computing arrays and other logic devices, such as a field programmable gate array (FPGA), which is not limited in the present disclosure.

[0057] According to some embodiments, method 200 further includes: in response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, creating a first update task, wherein the first update task is used to update the first monitoring variable to a first value; and storing the first update task after the first data processing task, and wherein the first monitoring task is to be terminated in response to determining that the first monitoring variable is updated to the first value. Thus, by inserting the first update task after the first data processing task, the first update task can be used to update the monitoring variable after the first data processing task is executed, and the first monitoring task inserted in the second queue only needs to read and detect the value of the monitoring variable, so that it can more conveniently and efficiently monitor whether the first data processing task has been executed, so as to improve the efficiency of task sending.

[0058] In one example, a status flag register at a specific address may be configured in the hardware as a monitoring variable. When the first data processing task is completed and the first update task is executed, the value of the corresponding first monitoring variable is updated to the specified first value. When the first monitoring task is executed, the value of the corresponding first monitoring variable is continuously checked based on a fixed time interval until it is determined that the first monitoring variable has been updated to the expected first value. The first monitoring task can be terminated, indicating that the first data processing task has been completed. After the first monitoring task is completed, the second data processing task can be executed, which realizes the control of the second data processing task to be executed after the first data processing task, ensuring the correctness of the task execution order.

[0059] In some examples, it is also possible to monitor whether the first data processing task has been completed by other means, for example, a report task may be inserted after the first data processing task, so that report information can be sent to the first monitoring task after the first data processing task is completed, so as to monitor the task execution status. As long as the first monitoring task in the second queue can obtain the execution status information of the first data processing task, the present disclosure does not limit the implementation method of monitoring.

[0060] In actual application scenarios, a distributed system composed of multiple data processing devices can be used to perform various types of data processing tasks. For example, when it is necessary to perform training or reasoning tasks of large-scale deep learning models, data processing tasks may include scalar calculations, vector calculations, data handling, and other types. In this case, the distributed system may include hardware units such as scalar calculation units, vector calculation units, and data handling units that are suitable for different types of data processing tasks.

[0061] Based on this, according to some embodiments, when the data processing device includes multiple processing units, method 200 also includes: determining the first task type of the first data processing task based on the data processing instruction information of the first data processing task; determining the second task type of the second data processing task based on the data processing instruction information of the second data processing task; and sending the first task type and the second task type to the data processing device, so that the data processing device can determine the first processing unit for executing the first data processing task and the second processing unit for executing the second data processing task based on the first task type and the second task type. Thus, by allowing the task sender to determine its task type based on the instructions included in the data processing task, so that the data processing device can directly allocate the corresponding processing unit based on the task type, the convenience of task scheduling can be improved, thereby improving the efficiency of data processing.

[0062] In some examples, task types may include data computing tasks, data handling tasks, etc., and data computing tasks may be further classified based on information such as data computing type and operand type. For example, scalar computing tasks, vector computing tasks, tensor computing tasks, etc. may be divided according to operand type. Arithmetic logic computing tasks, logarithmic computing tasks, etc. may also be divided according to data computing type. As long as the task type corresponding to the hardware processing unit can be obtained, the present disclosure does not limit the specific content of the task type.

[0063] It is understandable that different types of data processing tasks carry different information. For example, a data transport task needs to carry the source address, the destination address, the amount of data to be transported, the transport control instructions, etc., and a data calculation task needs to carry the data calculation type, the data to be calculated or the storage address of the data to be calculated, the amount of data to be calculated, etc. Furthermore, a data processing task may also contain richer information, such as the type of data to be processed, etc., to achieve more accurate task scheduling.

[0064] In actual application scenarios, there may be a fixed instruction set that is compatible with the data processing device, and the data processing device can implement data processing tasks by executing instructions in the instruction set.

[0065] Based on this, according to some embodiments, the data processing device stores multiple data processing instructions, and the data processing instruction information of the first data processing task includes the storage address of the first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes the storage address of the second data processing instruction corresponding to the second data processing task. Thus, a fixed instruction set corresponding to the data processing device can be stored in a specified location, and each data processing task only needs to carry the instruction address corresponding to the task, thereby improving the task transmission efficiency and saving hardware resources.

[0066] In some examples, the storage address of the first data processing instruction may be a memory identifier, storage path information, etc. corresponding to the first data processing instruction, or may also be pointer information.

[0067] In some examples, the first data processing task may only carry the storage address of the data to be processed, such as a memory identifier, storage path information, pointer information, etc., so that the data processing device can read the data to be processed based on this, thereby reducing the data volume of the data processing task, improving task transmission efficiency, and saving hardware resources.

[0068] According to one aspect of the present disclosure, a task execution method is also provided. Figure 3 FIG. 3 is a flowchart of a task execution method 300 according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the method 300 includes:

[0069] Step S301, receiving a first queue and a second queue, wherein the first queue and the second queue are obtained by using the method 200 as described above; and

[0070] Step S302, execute at least one task in the first queue and multiple tasks in the second queue, wherein the at least one task in the first queue is executed sequentially according to the order of each task in the first queue, and the multiple tasks in the second queue are executed sequentially according to the order of each task in the second queue.

[0071] By utilizing method 200 to obtain multiple task queues containing multiple data processing tasks, the task executor (i.e., the data processing device) only needs to directly receive the first queue and the second queue, and then execute the tasks sequentially based on the first-in-first-out rule of the queue, thereby improving efficiency while ensuring the correct execution order of multiple data processing tasks.

[0072] According to some embodiments, method 300 further includes: receiving a first task type of the first data processing task and a second task type of the second data processing task; determining a first processing unit corresponding to the first task type and a second processing unit corresponding to the second task type, wherein the execution of at least one task in the first queue and multiple tasks in the second queue includes: executing the first data processing task using the first processing unit; and executing the second data processing task using the second processing unit. Thus, by directly allocating corresponding processing units based on task types, the convenience of task scheduling can be improved, thereby improving the efficiency of data processing.

[0073] It is understandable that there is a definite mapping relationship between different task types and different types of processing units. In some examples, the processing units in the data processing device may include scalar computing units, vector computing units, tensor computing units, etc., and may also be divided into arithmetic logic units, logarithmic computing units, etc. according to the data computing type.

[0074] In some examples, the processing unit may be a processing cluster composed of multiple sub-units. By utilizing multiple sub-units to execute data processing tasks in parallel, the processing capability of the cluster can be improved, thereby improving data processing efficiency.

[0075] Based on this, according to some embodiments, when the first processing unit includes multiple sub-units, the method 300 further includes: dividing the data to be processed of the first data processing task into multiple sub-data, and wherein, using the first processing unit to perform the first data processing task includes: using the multiple sub-units to process the multiple sub-data respectively. Thus, by dividing the data to be processed into multiple sub-data, multiple sub-units can be used for parallel computing to make full use of hardware resources and improve data processing efficiency.

[0076] In actual application scenarios, there may be a fixed instruction set that is compatible with the data processing device, and the data processing device can implement data processing tasks by executing instructions in the instruction set.

[0077] According to some embodiments, when the data processing instruction information of the first data processing task includes the storage address of the first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes the storage address of the second data processing instruction corresponding to the second data processing task, the method 300 further includes: reading the first data processing instruction based on the data processing instruction information of the first data processing task; and reading the second data processing instruction based on the data processing instruction information of the second data processing task, wherein the execution of at least one task in the first queue and the plurality of tasks in the second queue includes: executing the first data processing instruction based on the to-be-processed data of the first data processing task; and executing the second data processing instruction based on the to-be-processed data of the second data processing task. Thus, when a fixed instruction set corresponding to the data processing device is stored in a designated location, the instruction address corresponding to the task carried in each data processing task can be read, and then the data processing instruction to be executed can be read and executed based on the instruction address, thereby reducing the data volume of the data processing task, improving the task transmission efficiency, and saving hardware resources.

[0078] In actual application scenarios, the hardware processing units included in the data processing device are limited, so there is a possibility that multiple egress tasks corresponding to multiple queues need to occupy the same processing unit.

[0079] Based on this, according to some embodiments, the second queue also includes a third data processing task located before the second data processing task, and the method 300 also includes: obtaining the first priority information of the first queue and the second priority information of the second queue, wherein the execution of at least one task in the first queue and multiple tasks in the second queue includes: in response to determining that the first data processing task is located at the exit of the first queue, and in response to determining that the third data processing task is located at the exit of the second queue, based on the first priority information and the second priority information, determining the execution order of the first data processing task and the third data processing task; and based on the execution order, executing the first data processing task and the third data processing task. When multiple exit tasks corresponding to multiple queues need to occupy the same processing hardware, the execution order can be determined by further obtaining the priority information of each queue, thereby improving the convenience of data processing task scheduling.

[0080] In some examples, the priority information may be manually configured and stored, based on which the on-demand control of the task execution order can be further achieved.

[0081] In some embodiments, the first priority information includes a first probability, the second priority information includes a second probability, and wherein the determining the execution order of the first data processing task and the third data processing task based on the first priority information and the second priority information includes: based on the first probability and the second probability, randomly determining the data processing task to be executed first from the first data processing task and the third data processing task to obtain the execution order, wherein the probability that the first data processing task is the data processing task to be executed first is the first probability, and the probability that the second data processing task is the data processing task to be executed first is the second probability. By using the priority execution probability to indicate the priority of the execution order, the execution order of tasks in different queues can be controlled more reasonably and accurately, and precise control of the task execution speed can be achieved under the premise of avoiding long waiting times in the task execution status of one or more queues.

[0082] In some examples, the priority information may also be in other forms, such as configuring a simple priority identifier for each task queue. When multiple export tasks need to occupy the same processing hardware, the execution order is determined by comparing the priority identifiers of different queues.

[0083] According to one aspect of the present disclosure, a task sending device is also provided. Figure 4 FIG. 4 shows a structural block diagram of a task sending device 400 according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the device 400 includes:

[0084] A first creating unit 401 is configured to create a plurality of task queues, wherein the plurality of task queues include a first queue and a second queue;

[0085] A first acquisition unit 402 is configured to acquire a first data processing task for the first queue and a second data processing task for the second queue, wherein the first data processing task and the second data processing task respectively include data to be processed, data processing instruction information and task dependency information;

[0086] A second creating unit 403 is configured to create a first monitoring task in response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, wherein the first monitoring task is to be terminated in response to determining that the first data processing task has been completed;

[0087] a storage unit 404 configured to store the first data processing task into the first queue, and the storage unit 404 is further configured to store the first monitoring task and the second data processing task into the second queue; and

[0088] The sending unit 405 is configured to send the first queue and the second queue to a data processing device.

[0089] According to some embodiments, the device 400 also includes: a third creation unit, configured to create a first update task in response to determining that task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, wherein the first update task is used to update the first monitoring variable to a first value, wherein the storage unit 404 is also configured to store the first update task after the first data processing task, and wherein the first monitoring task is to be terminated in response to determining that the first monitoring variable is updated to the first value.

[0090] According to some embodiments, the data processing device includes multiple processing units, and the device 400 also includes: a first determination unit, configured to determine a first task type of the first data processing task based on data processing instruction information of the first data processing task, the first determination unit is also configured to determine a second task type of the second data processing task based on data processing instruction information of the second data processing task, and the sending unit 405 is also configured to send the first task type and the second task type to the data processing device, so that the data processing device can determine a first processing unit for executing the first data processing task and a second processing unit for executing the second data processing task based on the first task type and the second task type.

[0091] According to some embodiments, the data processing device stores multiple data processing instructions, and wherein the data processing instruction information of the first data processing task includes the storage address of the first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes the storage address of the second data processing instruction corresponding to the second data processing task.

[0092] According to one aspect of the present disclosure, a task execution device is also provided. Figure 5 FIG. 5 shows a structural block diagram of a task execution device 500 according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the device 500 includes:

[0093] A receiving unit 501 is configured to receive a first queue and a second queue, wherein the first queue and the second queue are obtained by using the apparatus 400 as described above; and

[0094] The execution unit 502 is configured to execute at least one task in the first queue and multiple tasks in the second queue, wherein the at least one task in the first queue is executed sequentially according to the order of each task in the first queue, and the multiple tasks in the second queue are executed sequentially according to the order of each task in the second queue.

[0095] According to some embodiments, the receiving unit 501 is also configured to receive a first task type of the first data processing task and a second task type of the second data processing task, and the device 500 also includes: a second determination unit, configured to determine a first processing unit corresponding to the first task type and a second processing unit corresponding to the second task type, and wherein the execution unit 502 is configured to: use the first processing unit to execute the first data processing task; and use the second processing unit to execute the second data processing task.

[0096] According to some embodiments, the first processing unit includes multiple sub-units, and the device 500 also includes: a division unit, configured to divide the data to be processed of the first data processing task into multiple sub-data, and wherein the execution unit 502 is configured to: use the multiple sub-units to process the multiple sub-data respectively.

[0097] According to some embodiments, when the data processing instruction information of the first data processing task includes the storage address of the first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes the storage address of the second data processing instruction corresponding to the second data processing task, the device 500 also includes: a reading unit, configured to read the first data processing instruction based on the data processing instruction information of the first data processing task, and the reading unit is also configured to read the second data processing instruction based on the data processing instruction information of the second data processing task, wherein the execution unit 502 is configured to: execute the first data processing instruction based on the data to be processed of the first data processing task; and execute the second data processing instruction based on the data to be processed of the second data processing task.

[0098] According to some embodiments, the second queue also includes a third data processing task located before the second data processing task, and the device 500 also includes: a second acquisition unit, configured to acquire first priority information of the first queue and second priority information of the second queue, wherein the execution unit 502 includes: a determination subunit, configured to determine the execution order of the first data processing task and the third data processing task based on the first priority information and the second priority information in response to determining that the first data processing task is located at the exit of the first queue, and in response to determining that the third data processing task is located at the exit of the second queue; and an execution subunit, configured to execute the first data processing task and the third data processing task based on the execution order.

[0099] According to some embodiments, the first priority information includes a first probability, the second priority information includes a second probability, and wherein the determination subunit is configured to: based on the first probability and the second probability, randomly determine the data processing task to be executed first from the first data processing task and the third data processing task to obtain the execution order, wherein the probability that the first data processing task is the data processing task to be executed first is the first probability, and the probability that the second data processing task is the data processing task to be executed first is the second probability.

[0100] According to another aspect of the present disclosure, a chip is provided, comprising at least one of the task sending device 400 and the task executing device 500 as described above.

[0101] According to another aspect of the present disclosure, a data processing system is provided, comprising the task sending device 400 as described above and the task executing device 500 as described above.

[0102] Exemplary embodiments of the present disclosure will be further described below in conjunction with the accompanying drawings.

[0103] Figure 6 FIG. 6 shows a schematic diagram of the structure of a data processing system 600 according to an exemplary embodiment of the present disclosure. Figure 6As shown, the data processing system 600 includes a task sending device 400, a task execution device 500, a first memory 601 connected to the task sending device 400, and a second memory 602 connected to the task execution device 500. In some examples, when the data processing system 600 is applied to perform large-scale computing tasks, the task sending device 400 and the first memory 601 can be arranged on the host side, and the task execution device 500 and the second memory 602 can be used as a coprocessor of the host. In some examples, the host and the coprocessor can communicate through a serial bus, based on which the data processing tasks are sent and the data processing results are transmitted. It can be understood that the data transfer between the first memory 601 and the second memory 602 can be completed by using the task sending device 400 and the task execution device 500.

[0104] Figure 7 FIG. 5 shows a schematic diagram of the structure of a task execution device 500 according to an exemplary embodiment of the present disclosure. Figure 7 As shown, the task execution device 500 includes: a receiving unit 501 for communicating with a host and receiving data processing tasks; an execution unit 502, including multiple processing units of different types. In one example, the multiple processing units may include a first processing unit 701 for performing general scalar and vector calculations, a second processing unit 702 for performing specific deep learning-based tensor and vector calculations, and a third processing unit 703 for performing data transfer; an on-chip interconnect unit 704, which may be, for example, a communication bus for realizing instruction and data exchange between a processing unit and a storage unit (for example, which may include an on-chip storage unit and a second memory outside the chip), which can be understood; an on-chip memory 705, which is used to realize instruction and data caching.

[0105] Figure 8 FIG. 5 shows a schematic diagram of the structure of a receiving unit 501 according to an exemplary embodiment of the present disclosure. Figure 8 As shown, the receiving unit 501 includes: a communication unit 810 for communicating with the host; a queue storage structure 820 including multiple queues. It can be understood that the number of queues in the queue storage structure 820 can be configured according to actual needs; a distribution unit 830, used to distribute the data processing tasks located at the queue exit to each processing unit; a control unit 840, used to process monitoring tasks, communicate with the host to feedback the execution status of the data processing tasks, etc.

[0106] In some examples, the task execution device 500 may include multiple receiving units 501 to utilize a larger number of task queues, distribution units, and control units to achieve larger-scale task scheduling, thereby achieving large-scale parallel computing and improving data processing efficiency.

[0107] Fig. 9FIG. 2 shows a schematic diagram of multiple task queues according to an exemplary embodiment of the present disclosure. Fig. 9 As shown, the tasks of each queue are stored in the queue from the queue entrance and executed in sequence according to the first-in-first-out order, that is, only tasks are selected from the queue exit and executed each time. By utilizing the first-in-first-out feature of the queue, the order of task execution can be controlled. It can be understood that multiple tasks in the same queue need to be executed serially, while tasks belonging to different queues can be executed in parallel to improve task execution efficiency.

[0108] As described above, the task type of the data processing task may be configured according to the type of the processing unit. In this example, the task type may include: a general computing task corresponding to the first processing unit 701, an AI computing task corresponding to the second processing unit 702, a data handling task corresponding to the third processing unit 703, and a synchronization control task. More specifically, the synchronization control task may include an update task and a monitoring task for realizing dependencies between tasks, and may also include a control task for realizing task monitoring between a host and a task execution device.

[0109] In one example, when multiple queues are obtained by executing the method 200 or using the task sending device 400, the execution process of the task execution device 500 includes the following steps:

[0110] Step S1, the communication unit 810 receives the first queue and the second queue obtained by executing the method 200, and stores them in the queue storage structure 820 respectively;

[0111] Step S2, obtaining the tasks to be issued from the queue exit, and when the data processing tasks are obtained, using the distribution unit 830 to distribute them to the processing units in the execution unit 502, specifically, the corresponding processing unit can be determined based on the task type of the obtained data processing tasks;

[0112] Step S3: After receiving the data processing task, the processing unit reads the data processing instruction from the memory based on the storage address of the data processing instruction carried in the data processing task and executes it. It can be understood that the instruction set adapted to the processing unit can be pre-stored in the on-chip memory 705.

[0113] Step S4: When a synchronous control task is obtained, the control unit 840 is used to process it.

[0114] In some examples, the execution unit 502 may report task status information to the receiving unit 501 after a data processing task is completed or interrupted, so that the receiving unit 501 can determine whether to continue distributing the data processing task according to the task status information.

[0115] In some examples, the data processing task may also carry a report flag to indicate whether the data processing task needs to be reported to the host after execution. When the report flag of a data processing task indicates that the execution status of the task needs to be reported, an execution status signal may be sent to the host after execution of the task is completed, or a specified value may be written to an address specified by the host, so that the host can learn the execution status of the task by monitoring the written value of the specified address.

[0116] In some examples, the multiple export tasks corresponding to each of the multiple queues in step S2 may correspond to the same processing unit. In this case, the execution order can be determined by further obtaining the priority information of each queue. In one example, the priority information of the queue can be manually configured and stored, for example, it can be priority order information. When there are multiple queues with the same priority order, the execution order of the multiple export tasks can be determined by polling. In one example, the priority information of the queue can be the execution probability information described above. By using the priority execution probability to indicate the priority of the execution order, the task execution speed of different queues can be controlled more reasonably and accurately.

[0117] In one example, the distribution unit 830 may include multiple distribution sub-units, and different distribution sub-units are used to respectively implement the distribution of different types of data processing tasks, which is equivalent to separately managing different types of processing units to improve task scheduling efficiency.

[0118] In this example, multiple egress tasks corresponding to multiple queues may be grouped based on task type, and then the task execution order may be further determined based on queue priority information within the same group.

[0119] In some examples, the distribution unit 830 can simultaneously implement data splitting and packaging functions. As described above, the processing unit can be a processing cluster composed of multiple sub-units to improve the processing capacity of the cluster. In this case, the distribution unit can be used to split the to-be-processed data corresponding to the data processing task into multiple sub-data.

[0120] In one example, the data to be processed may be split into multiple sub-data based on the data processing capacity of each sub-unit, and for each sub-data, a target sub-unit is selected from multiple sub-units of the corresponding type and calculations are performed on the sub-data. When all calculations of the multiple sub-data are completed, the data processing task is completed.

[0121] In some examples, asynchronous computing can be performed for multiple sub-data, that is, when the multiple sub-data corresponding to data processing task A are not fully calculated, idle sub-units can be used to perform calculations based on data processing task B, so as to further improve the utilization of hardware resources and improve data processing efficiency.

[0122] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute at least one of the above-mentioned task sending method and task execution method.

[0123] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute at least one of the above-mentioned task sending method and task execution method.

[0124] According to another aspect of the present disclosure, a computer program product is further provided, including a computer program, wherein the computer program implements at least one of the above-mentioned task sending method and task execution method when executed by a processor.

[0125] refer to Fig.10 , a block diagram of an electronic device 1000 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0126] like Fig.10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0127] Multiple components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, an output unit 1007, a storage unit 1008, and a communication unit 1009. The input unit 1006 can be any type of device that can input information to the device 1000. The input unit 1006 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 1007 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1008 can include but is not limited to a disk and an optical disk. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0128] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above, such as at least one of the task sending method and the task execution method. For example, in some embodiments, at least one of the task sending method and the task execution method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of at least one of the task sending method and the task execution method described above may be executed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute at least one of the task sending method and the task execution method in any other appropriate manner (for example, by means of firmware).

[0129] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0130] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0131] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0133] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0134] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0136] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A task sending method, comprising: Creating a plurality of task queues, wherein the plurality of task queues include a first queue and a second queue; Acquire a first data processing task for the first queue and a second data processing task for the second queue, wherein the first data processing task and the second data processing task respectively include data to be processed, data processing instruction information and task dependency information; In response to determining that the task dependency information of the second data processing task indicates that the second data processing task is dependent on the first data processing task, creating a first monitoring task, wherein the first monitoring task is to be terminated in response to determining that the first data processing task has been completed; Storing the first data processing task in the first queue; storing the first monitoring task and the second data processing task in the second queue; and The first queue and the second queue are sent to a data processing device.

2. The method of claim 1, further comprising: In response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, creating a first update task, wherein the first update task is used to update the first monitoring variable to a first value; and After storing the first update task in the first data processing task, And wherein the first monitoring task is to be ended in response to determining that the first monitoring variable is updated to the first value.

3. The method according to claim 1 or 2, wherein: The data processing device includes a plurality of processing units, and the method further includes: determining a first task type of the first data processing task based on the data processing instruction information of the first data processing task; determining a second task type of the second data processing task based on the data processing instruction information of the second data processing task; and The first task type and the second task type are sent to a data processing device so that the data processing device can determine a first processing unit for executing the first data processing task and a second processing unit for executing the second data processing task based on the first task type and the second task type.

4. The method according to any one of claims 1 to 3, wherein: The data processing device stores multiple data processing instructions, and wherein the data processing instruction information of the first data processing task includes the storage address of the first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes the storage address of the second data processing instruction corresponding to the second data processing task.

5. A task execution method, wherein the task includes a data processing task, and the method comprises: receiving a first queue and a second queue, wherein the first queue and the second queue are obtained by using the method described in any one of claims 1 to 4; and Execute at least one task in the first queue and multiple tasks in the second queue, wherein the at least one task in the first queue is executed sequentially according to the order of each task in the first queue, and the multiple tasks in the second queue are executed sequentially according to the order of each task in the second queue.

6. The method of claim 5, further comprising: Receiving a first task type of the first data processing task and a second task type of the second data processing task; determining a first processing unit corresponding to the first task type and a second processing unit corresponding to the second task type, The executing at least one task in the first queue and multiple tasks in the second queue includes: Using the first processing unit, executing the first data processing task; and The second data processing task is performed using the second processing unit.

7. The method of claim 6, wherein: The first processing unit includes a plurality of sub-units, and the method further includes: Divide the data to be processed of the first data processing task into a plurality of sub-data, And wherein, using the first processing unit to perform the first data processing task includes: The plurality of sub-data are processed respectively by the plurality of sub-units.

8. The method according to any one of claims 5 to 7, wherein: When the data processing instruction information of the first data processing task includes a storage address of a first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes a storage address of a second data processing instruction corresponding to the second data processing task, the method further includes: Based on the data processing instruction information of the first data processing task, reading the first data processing instruction; and reading the second data processing instruction based on the data processing instruction information of the second data processing task, The executing at least one task in the first queue and multiple tasks in the second queue includes: executing the first data processing instruction based on the data to be processed of the first data processing task; and The second data processing instruction is executed based on the data to be processed of the second data processing task.

9. The method according to any one of claims 5 to 8, wherein: The second queue also includes a third data processing task located before the second data processing task, and the method further includes: obtaining first priority information of the first queue and second priority information of the second queue, The executing at least one task in the first queue and multiple tasks in the second queue includes: In response to determining that the first data processing task is located at an exit of the first queue, and in response to determining that the third data processing task is located at an exit of the second queue, determining an execution order of the first data processing task and the third data processing task based on the first priority information and the second priority information; and Based on the execution order, the first data processing task and the third data processing task are executed.

10. The method of claim 9, wherein: The first priority information includes a first probability, the second priority information includes a second probability, And wherein, determining the execution order of the first data processing task and the third data processing task based on the first priority information and the second priority information comprises: Based on the first probability and the second probability, the data processing task to be executed first is randomly determined from the first data processing task and the third data processing task to obtain the execution order, wherein the probability that the first data processing task is the data processing task to be executed first is the first probability, and the probability that the second data processing task is the data processing task to be executed first is the second probability.

11. A task sending device, comprising: A first creating unit is configured to create a plurality of task queues, wherein the plurality of task queues include a first queue and a second queue; A first acquisition unit is configured to acquire a first data processing task for the first queue and a second data processing task for the second queue, wherein the first data processing task and the second data processing task respectively include data to be processed, data processing instruction information and task dependency information; A second creating unit is configured to create a first monitoring task in response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, wherein the first monitoring task is to be terminated in response to determining that the first data processing task has been completed; a storage unit, configured to store the first data processing task in the first queue, The storage unit is further configured to store the first monitoring task and the second data processing task into the second queue; and The sending unit is configured to send the first queue and the second queue to a data processing device.

12. The apparatus of claim 11, further comprising: a third creating unit, configured to, in response to determining that the task dependency information of the second data processing task indicates that the second data processing task depends on the first data processing task, create a first updating task, wherein the first updating task is used to update the first monitoring variable to a first value; The storage unit is further configured to store the first update task after the first data processing task. And wherein the first monitoring task is to be ended in response to determining that the first monitoring variable is updated to the first value.

13. The device according to claim 11 or 12, wherein: The data processing device comprises a plurality of processing units, and the device further comprises: A first determining unit is configured to determine a first task type of the first data processing task based on the data processing instruction information of the first data processing task, The first determining unit is further configured to determine a second task type of the second data processing task based on the data processing instruction information of the second data processing task, The sending unit is also configured to send the first task type and the second task type to a data processing device so that the data processing device can determine a first processing unit for executing the first data processing task and a second processing unit for executing the second data processing task based on the first task type and the second task type.

14. The device according to any one of claims 11 to 13, wherein: The data processing device stores multiple data processing instructions, and wherein the data processing instruction information of the first data processing task includes the storage address of the first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes the storage address of the second data processing instruction corresponding to the second data processing task.

15. A task execution device, wherein the task includes a data processing task, and the device comprises: a receiving unit configured to receive a first queue and a second queue, wherein the first queue and the second queue are obtained by using the apparatus described in any one of claims 11 to 14; and An execution unit is configured to execute at least one task in the first queue and multiple tasks in the second queue, wherein the at least one task in the first queue is executed sequentially according to the order of each task in the first queue, and the multiple tasks in the second queue are executed sequentially according to the order of each task in the second queue.

16. The device of claim 15, wherein: The receiving unit is further configured to receive a first task type of the first data processing task and a second task type of the second data processing task, The device also includes: a second determining unit configured to determine a first processing unit corresponding to the first task type and a second processing unit corresponding to the second task type; And wherein the execution unit is configured to: Using the first processing unit, executing the first data processing task; and The second data processing task is performed using the second processing unit.

17. The device of claim 16, wherein: The first processing unit includes a plurality of sub-units, and the device further includes: a dividing unit, configured to divide the to-be-processed data of the first data processing task into a plurality of sub-data, And wherein the execution unit is configured to: The plurality of sub-data are processed respectively by the plurality of sub-units.

18. The device according to any one of claims 15 to 17, wherein: When the data processing instruction information of the first data processing task includes a storage address of a first data processing instruction corresponding to the first data processing task, and the data processing instruction information of the second data processing task includes a storage address of a second data processing instruction corresponding to the second data processing task, the apparatus further includes: a reading unit, configured to read the first data processing instruction based on the data processing instruction information of the first data processing task, The reading unit is further configured to read the second data processing instruction based on the data processing instruction information of the second data processing task, Wherein, the execution unit is configured as: executing the first data processing instruction based on the data to be processed of the first data processing task; and The second data processing instruction is executed based on the data to be processed of the second data processing task.

19. The device according to any one of claims 15 to 18, wherein: The second queue also includes a third data processing task located before the second data processing task, and the apparatus further includes: A second obtaining unit is configured to obtain first priority information of the first queue and second priority information of the second queue, Wherein, the execution unit includes: a determining subunit configured to, in response to determining that the first data processing task is located at an exit of the first queue, and in response to determining that the third data processing task is located at an exit of the second queue, determine an execution order of the first data processing task and the third data processing task based on the first priority information and the second priority information; and The execution subunit is configured to execute the first data processing task and the third data processing task based on the execution order.

20. The device of claim 19, wherein: The first priority information includes a first probability, the second priority information includes a second probability, And wherein, the determining subunit is configured as: Based on the first probability and the second probability, the data processing task to be executed first is randomly determined from the first data processing task and the third data processing task to obtain the execution order, wherein the probability that the first data processing task is the data processing task to be executed first is the first probability, and the probability that the second data processing task is the data processing task to be executed first is the second probability.

21. A chip comprising the device according to any one of claims 11 to 20.

22. A data processing system comprising: The device as claimed in any one of claims 11 to 14; as well as A device as claimed in any one of claims 15 to 20.

23. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-10.

25. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1 to 10 when executed by a processor.

Citation Information

Cited By

  • Electronic equipment and data processing method

    CN122111693A