Task decomposition method, task orchestration method, device and related equipment
By decomposing task numbers into prime and composite numbers and classifying parallel and serial tasks, the problem of not being able to identify parallel relationships in existing technologies is solved, thus improving task orchestration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD
- Filing Date
- 2025-08-25
- Publication Date
- 2026-07-28
AI Technical Summary
In existing technologies, when multiple intelligent agents collaborate to execute tasks, the parallel relationships cannot be effectively identified, resulting in poor task orchestration.
By decomposing the initial task number into prime and composite numbers, and using the set of prime numbers to classify tasks into parallel and serial tasks, and adding them to different task lists respectively, the identification and decomposition of parallel and serial tasks can be achieved.
It improves task orchestration efficiency, effectively identifies the relationship between parallel and serial tasks, and improves task decomposition results.
Smart Images

Figure CN121029413B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a task orchestration method, a task decomposition method, an apparatus, and related equipment. Background Technology
[0002] With the development of agent technology, collaborative task execution by multiple agents can effectively improve task efficiency. In related technologies, before multiple agents can collaboratively execute a task, the task needs to be decomposed into sub-tasks for each agent, which then executes these sub-tasks. Because sub-tasks can have sequential or parallel relationships, task orchestration requires traversing the sub-tasks to understand their relationships before orchestration to improve the efficiency of each agent. However, current technologies can only identify sequential relationships and whole-part relationships, failing to effectively identify parallel relationships, resulting in poor task orchestration performance.
[0003] It is evident that the relevant technologies suffer from poor task orchestration performance. Summary of the Invention
[0004] This invention provides a task decomposition method, a task orchestration method, an apparatus, and related equipment to address the problem of low task orchestration efficiency in related technologies.
[0005] To solve the above problems, the present invention is implemented as follows:
[0006] In a first aspect, embodiments of the present invention provide a task decomposition method, applied to a first device, comprising:
[0007] Receive an initial task file sent by a second device, the initial task file including multiple initial tasks and a number corresponding to each initial task, the number being a prime number or a composite number;
[0008] In the case where there are multiple first tasks among the multiple initial tasks, the numbers corresponding to the multiple first tasks are decomposed to obtain the first prime number corresponding to each first task, and the number of each first task is a composite number;
[0009] Based on the first prime number, the multiple first tasks are classified to obtain multiple parallel tasks and / or multiple serial tasks. The first prime number corresponding to the multiple parallel tasks is a prime number of a first set, and the first prime number corresponding to the multiple serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different.
[0010] The plurality of parallel tasks are added to a first sublist of the first task list, the plurality of serial tasks are added to a second sublist of the first task list, and a second task is added to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
[0011] In a second aspect, embodiments of the present invention provide a task orchestration method, applied to a second device, comprising:
[0012] Obtain a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and its adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task.
[0013] The multiple initial tasks are arranged based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set.
[0014] An initial task file is generated based on the number corresponding to each initial task and the plurality of initial tasks;
[0015] Send the initial task file to the first device.
[0016] Thirdly, embodiments of the present invention also provide a task decomposition apparatus, comprising:
[0017] The receiving module is used to receive an initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number.
[0018] The decomposition module is used to decompose the numbers corresponding to the multiple first tasks in the case of multiple initial tasks to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number.
[0019] A classification module is used to classify the plurality of first tasks based on the first prime number to obtain a plurality of parallel tasks and / or a plurality of serial tasks. The first prime number corresponding to the plurality of parallel tasks is a prime number of a first set, and the first prime number corresponding to the plurality of serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different.
[0020] The first adding module is used to add the plurality of parallel tasks to a first sublist of the first task list, add the plurality of serial tasks to a second sublist of the first task list, and add a second task to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
[0021] Fourthly, embodiments of the present invention also provide a task orchestration apparatus, comprising:
[0022] The acquisition module is used to acquire a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task.
[0023] The arrangement module is used to arrange the multiple initial tasks based on the first set, the second set and the relationship information to obtain the number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set.
[0024] The generation module is used to generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks;
[0025] The sending module is used to send the initial task file to the first device.
[0026] Fifthly, embodiments of the present invention also provide an electronic device, including a transceiver and a processor.
[0027] The transceiver is used to receive an initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number.
[0028] The processor is configured to, when there are multiple first tasks among the multiple initial tasks, decompose the numbers corresponding to the multiple first tasks to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number;
[0029] The processor is further configured to classify the plurality of first tasks based on the first prime number to obtain a plurality of parallel tasks and / or a plurality of serial tasks, wherein the first prime number corresponding to the plurality of parallel tasks is a prime number of a first set, and the first prime number corresponding to the plurality of serial tasks is a prime number of a second set, wherein the prime numbers included in the first set and the prime numbers included in the second set are different.
[0030] The processor is further configured to add the plurality of parallel tasks to a first sublist of the first task list, add the plurality of serial tasks to a second sublist of the first task list, and add a second task to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
[0031] Sixthly, embodiments of the present invention also provide an electronic device, including a transceiver and a processor.
[0032] The transceiver is used to acquire a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task.
[0033] The processor is configured to arrange the plurality of initial tasks based on the first set, the second set, and the relational information to obtain a number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set.
[0034] The processor is further configured to generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks;
[0035] The transceiver is also used to send the initial task file to the first device.
[0036] In a seventh aspect, embodiments of the present invention provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the task decomposition method described in the first aspect, or implements the steps of the task orchestration method described in the second aspect.
[0037] Eighthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the task decomposition method described in the first aspect, or implements the steps of the task orchestration method described in the second aspect.
[0038] In a ninth aspect, the present invention also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the task decomposition method described in the first aspect, or implement the steps of the task orchestration method described in the second aspect.
[0039] In this embodiment of the invention, an initial task file sent by a second device is received. The initial task file includes multiple initial tasks and a number corresponding to each initial task, wherein the number is a prime number or a composite number. If multiple first tasks exist among the multiple initial tasks, the numbers corresponding to the multiple first tasks are decomposed to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number. Based on the first prime number, the multiple first tasks are classified to obtain multiple parallel tasks and / or multiple serial tasks. The first prime number corresponding to the multiple parallel tasks is a prime number of a first set, and the first prime number corresponding to the multiple serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different. The multiple parallel tasks are added to a first sublist of the first task list, the multiple serial tasks are added to a second sublist of the first task list, and a second task is added to a second task list. The second task is the initial task among the multiple initial tasks whose corresponding number is a prime number. In this way, multiple initial tasks are divided into a first task and a second task by numbering. Then, the first prime number obtained by decomposing the number corresponding to the first task determines whether the first task is a serial task or a parallel task. Finally, the parallel task is added to the first task list, and the serial and second tasks are added to the second task list. This decomposes multiple initial tasks into parallel tasks in the first task list and serial tasks in the second task list, thereby achieving the identification of serial and parallel tasks and improving the task decomposition effect. Furthermore, this task decomposition process only requires decomposition and identification of numbers, which can effectively improve the task orchestration efficiency. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart of a task decomposition method applied to a first device according to an embodiment of the present invention;
[0042] Figure 2 This is a flowchart of a task orchestration method applied to a second device, provided by an embodiment of the present invention;
[0043] Figure 3 This is a structural diagram of a task decomposition device provided in an embodiment of the present invention;
[0044] Figure 4This is a structural diagram of an electronic device provided in an embodiment of the present invention;
[0045] Figure 5 This is a structural diagram of a task orchestration device provided in an embodiment of the present invention;
[0046] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Please see Figure 1 , Figure 1 This is a flowchart of a task decomposition method applied to a first device provided by an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0049] Step 101: Receive the initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number.
[0050] The aforementioned first device is used to decompose tasks. The first device can be a server device or a terminal device that executes tasks, and multiple intelligent agents are deployed on the first device. By receiving initial task files sent by the second device through the first device, multiple initial tasks are decomposed and assigned to different intelligent agents, thereby realizing the coordinated execution of tasks by multiple intelligent agents.
[0051] The initial task file mentioned above is a file obtained by arranging the tasks to be decomposed. It can be obtained by writing the tasks to be decomposed according to the execution order and inputting the written content into a preset template; or by arranging the written content through a preset arrangement model.
[0052] The compiled initial task file includes multiple initial tasks and a corresponding number for each initial task. The type of the initial task can be determined by the number.
[0053] It should be noted that multiple initial tasks are obtained by decomposing the tasks to be decomposed. There are different types of relationships between multiple initial tasks, including serial relationships and parallel relationships. At this time, the number of the initial task is set according to the relationship between adjacent initial tasks, so that when decomposing the task, the relationship between two adjacent initial tasks can be determined according to the number of each initial task, and thus the type of each initial task can be determined.
[0054] In the case where the initial task is a prime number (i.e., the second task), the initial task and the two adjacent initial tasks are in a serial relationship, so the initial task can be regarded as a serial task. However, in the case where the initial task is a composite number (i.e., the first task), at least one of the two adjacent initial tasks is in a parallel relationship with the initial task, and it is necessary to further determine whether the initial task is a serial task or a parallel task.
[0055] Step 102: If there are multiple first tasks among the multiple initial tasks, decompose the numbers corresponding to the multiple first tasks to obtain the first prime number corresponding to each first task, wherein the number of each first task is a composite number.
[0056] The numbers of the multiple first tasks mentioned above are composite numbers. That is, when the number of the initial task is a composite number, the initial task is in parallel with an adjacent task. In this case, it is necessary to further determine whether the initial task is a serial task or a parallel task.
[0057] It should be noted that composite numbers can be decomposed into the product of multiple prime numbers. In the case of a first task, the number of the first task can be decomposed to obtain the first prime number corresponding to the first number. The first prime number can be used to determine whether the first task is a serial task or a parallel task.
[0058] Step 103: Classify the multiple first tasks based on the first prime number to obtain multiple parallel tasks and / or multiple serial tasks. The first prime number corresponding to the multiple parallel tasks is a prime number of a first set, and the first prime number corresponding to the multiple serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different.
[0059] The prime numbers in the first set are different from those in the second set. The first task can be determined as a parallel task or a serial task by whether the first prime number belongs to the first set or the second set.
[0060] In the process of encoding the initial task file, the relationship between the initial tasks can be used to determine whether the initial task is a parallel task or a serial task. If the initial task is a parallel task, the first prime number is obtained from the first set, and then a composite number is generated based on the first prime number. If the initial task is a serial task, the first prime number is obtained from the second set, and then a composite number is generated based on the first prime number. In this way, when decomposing the number of the first task to obtain the first prime number, the set to which the first prime number belongs can be used to determine whether the first task is a serial task or a parallel task.
[0061] Alternatively, when encoding the initial task file, one could first determine whether the initial task is a parallel or serial task based on the relationships between them. If the initial task is a parallel task, a first prime number is obtained from a first set, and another prime number is obtained from a second set. Then, a composite number is generated based on the first prime number and the other prime number. If the initial task is a serial task, a first prime number and another prime number are obtained from the second set, and a composite number is generated based on the first prime number. In this way, it is also possible to determine whether the first task is a serial or parallel task based on the set to which the first prime number belongs when decomposing the number of the first task.
[0062] In some implementations, the first set and the second set can be obtained by dividing a certain range of prime numbers according to a preset rule. For example, the first set and the second set can be obtained by dividing a plurality of prime numbers arranged in order of size according to a fixed interval. The fixed interval can be 1. That is, the prime numbers in the first set can be the 1st, 3rd, 5th, ..., n-1th prime numbers among a plurality of prime numbers arranged in order of size, and the prime numbers in the second set can be the 2nd, 4th, 6th, ..., nth prime numbers among a plurality of prime numbers arranged in order of size, where n is an even number.
[0063] Step 104: Add the multiple parallel tasks to the first sublist of the first task list, add the multiple serial tasks to the second sublist of the first task list, and add the second task to the second task list. The second task is the initial task with the prime number among the multiple initial tasks.
[0064] The aforementioned first task list stores multiple first tasks, and the aforementioned second task list stores serial tasks. The first task list includes a first sublist and a second sublist. The first sublist stores multiple parallel tasks, and the second sublist stores serial tasks. This allows multiple parallel tasks with parallel relationships to be assigned to a single agent using the first sublist, and different serial tasks to one or more agents using the second sublist and the second task list. After dividing multiple initial tasks into parallel and serial tasks by numbering, the parallel and serial tasks are added to different task lists to facilitate subsequent assignment of different initial tasks to different agents based on the first and second task lists.
[0065] In this embodiment of the invention, an initial task file sent by a second device is received. The initial task file includes multiple initial tasks and a number corresponding to each initial task, wherein the number is a prime number or a composite number. If multiple first tasks exist among the multiple initial tasks, the numbers corresponding to the multiple first tasks are decomposed to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number. Based on the first prime number, the multiple first tasks are classified to obtain multiple parallel tasks and / or multiple serial tasks. The first prime number corresponding to the multiple parallel tasks is a prime number of a first set, and the first prime number corresponding to the multiple serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different. The multiple parallel tasks are added to a first sublist of the first task list, the multiple serial tasks are added to a second sublist of the first task list, and a second task is added to a second task list. The second task is the initial task among the multiple initial tasks whose corresponding number is a prime number. In this way, multiple initial tasks are divided into a first task and a second task by numbering. Then, the first prime number obtained by decomposing the number corresponding to the first task determines whether the first task is a serial task or a parallel task. Finally, the parallel task is added to the first task list, and the serial and second tasks are added to the second task list. This decomposes multiple initial tasks into parallel tasks in the first task list and serial tasks in the second task list, thereby achieving the identification of serial and parallel tasks and improving the task decomposition effect. Furthermore, this task decomposition process only requires decomposition and identification of numbers, which can effectively improve the task orchestration efficiency.
[0066] In one embodiment, the step of decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task includes:
[0067] For each of the first tasks, the number is decomposed to obtain a set of prime numbers corresponding to each first task, and the set of prime numbers includes multiple prime numbers;
[0068] A second prime number is determined based on the prime number sets corresponding to the plurality of first tasks, wherein the second prime number is a prime number included in the prime number sets corresponding to at least two first tasks;
[0069] The first prime number corresponding to each first task is determined based on the second prime number. The first prime number is a prime number other than the second prime number among the multiple prime numbers included in the set of prime numbers corresponding to each first task.
[0070] It should be noted that a composite number can be decomposed into at least two prime numbers. When encoding the first task, a first prime number is assigned according to the type of the first task, so as to determine whether the first task is a serial task or a parallel task. Specifically, when the first task is a parallel task, the first prime number is obtained from a first set; when the first task is a serial task, the first prime number is obtained from a second set.
[0071] However, since the first task's number is a composite number, decomposing it will result in multiple prime numbers, requiring the determination of the first prime. Therefore, when encoding multiple first tasks with parallel relationships, the first prime can be multiplied by other common prime numbers to obtain a composite number. To determine the first prime, only the second prime number in the set of prime numbers corresponding to multiple first tasks needs to be determined. Then, based on the set of prime numbers and the second prime number corresponding to each first task, the first prime number is determined. In this case, the first prime number is unique to each first task. The first prime number is used to determine whether a first task is a serial or parallel task.
[0072] Among them, the other common prime numbers, i.e., the second prime numbers, can be prime numbers in the first set or prime numbers in the second set. Furthermore, two or more initial tasks that have a parallel relationship can be set as a whole. There is at least one whole among the multiple first tasks, and the second prime numbers are the same in each whole. The second prime numbers in different wholes can be the same or different.
[0073] In this embodiment of the invention, for each first task, the number is decomposed to obtain a set of prime numbers corresponding to each first task, the set of prime numbers including multiple prime numbers; a second prime number is determined based on the set of prime numbers corresponding to the multiple first tasks, the second prime number being a prime number included in at least two sets of prime numbers corresponding to the first tasks; a first prime number is determined based on the second prime number, the first prime number being a prime number other than the second prime number among the multiple prime numbers included in the set of prime numbers corresponding to each first task. Thus, when setting the number of the first task, the number is set as the composite of the first prime number and the second prime number. Each first task has a different first prime number, while at least two first tasks have the same second prime number. Therefore, the first prime number can be determined from the set of prime numbers when decomposing the code of the first task, and thus, the first task can be determined as a serial task or a parallel task based on the first set, the second set, and the first prime number.
[0074] In one embodiment, before decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task, the method further includes:
[0075] The multiple initial tasks are traversed to obtain their arrangement order.
[0076] After adding the plurality of parallel tasks to a first sublist of a first task list, adding the plurality of serial tasks to a second sublist of the first task list, and adding the second task to a second task list, the method further includes:
[0077] Based on the arrangement order, a mapping relationship is established between the tasks in the first task list and the second task list, and the mapping relationship is used to determine the execution order of the first task and the second task.
[0078] It should be noted that there is a certain execution order among the multiple initial tasks. After different initial tasks are assigned to different agents, the agents still need to execute multiple initial tasks according to this execution order.
[0079] In this embodiment of the invention, the plurality of initial tasks are traversed to obtain their arrangement order. A mapping relationship is established between the tasks in the first task list and the second task list based on this arrangement order. This mapping relationship is used to determine the execution order of the first and second tasks. Thus, after each agent completes an initial task, the next initial task to be executed can be determined through the mapping relationship.
[0080] Specifically, the process of decomposing the initial task file can be represented by the following steps:
[0081] Step 1: Iterate through the initial task file to obtain multiple initial tasks, their arrangement order, and each initial task's number. When a new initial task is encountered, proceed to Step 2; after iterating through all initial tasks, proceed to Step 4.
[0082] Step 2: Identify the number of each initial task. If the number is a prime number, the initial task is the second task, and the task is added to the second task list; if the number is a composite number, proceed to Step 3.
[0083] Step 3: Continue iterating through the initial tasks until the number of the encountered initial task is a prime number. Stop iterating at this point. The encountered initial task with a composite number (i.e., the first task) is considered a whole task E. The previous initial task is N (which can be an initial task in the first task list or the second task list). Each first task in the whole task is denoted as E1, E2, E3, ... Decompose each first task to obtain multiple prime numbers for each task. Determine the first and second prime numbers for each first task based on these prime numbers. If the first prime number of a first task is a prime number in the first set, add that first task to the first sublist of the first task list; if the first prime number of a first task is a prime number in the second set, add that first task to the second sublist of the first task list.
[0084] After the task is added, a mapping relationship is constructed between the initial task N and the overall task E based on the execution order, so that the next initial task to be executed can be determined according to the mapping relationship when executing tasks.
[0085] Step 4: Complete the task breakdown.
[0086] It should be noted that, in addition to decomposing tasks through a single primary device as described above, tasks can also be decomposed using distributed nodes.
[0087] Specifically, in one embodiment, before decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task, the method further includes:
[0088] The plurality of initial tasks are traversed to obtain the plurality of initial tasks arranged in order, and the line number of each initial task in the initial task file;
[0089] Add the row number of the third task among the plurality of initial tasks to the row number table. The third task is either the task whose number is a prime number, or the number of the task preceding the third task is a prime number.
[0090] The multiple initial tasks are divided into multiple task fragments based on the row numbers in the row number table, and each task fragment includes at least one initial task.
[0091] The multiple task shards are sequentially assigned to multiple nodes, with each task shard corresponding to one of the multiple nodes. The multiple nodes are used to execute the initial tasks included in the multiple task shards.
[0092] The line numbers mentioned above are used to indicate the position of the initial task content within the initial task file. Specifically, the line number can be the line number of the first line of the initial task content. By using the line number of the initial task, its position within the initial task file can be quickly determined, allowing for its extraction.
[0093] It should be noted that the relationships between different initial tasks vary. When assigning initial tasks, the relationship between the initial task and other tasks must be considered. Specifically, when the initial task number is a prime number, the initial task is a sequential task and can be assigned individually or jointly with other initial tasks to an agent. However, when the initial task number is a composite number, the initial task has a parallel relationship with at least one other initial task. In this case, the initial task and the parallel task should be jointly assigned to an agent, which will then execute the parallel task.
[0094] Specifically, when the number of the third task is a composite number and the number of the task preceding the third task is also a composite number, the third task and the task preceding the third task are parallel and need to be treated as a whole; while when the number of the third task is a composite number and the number of the task preceding the third task is a prime number, the third task and the task preceding the third task are serial and can be assigned to different agents.
[0095] In this way, by adding the row number of the third task to the row number table, the tasks included in each task slice reached through the row number slice in the row number table are a whole (i.e., a single serial task or multiple parallel tasks with parallel relationships), thereby enabling the initial task to be assigned to different agents.
[0096] The aforementioned nodes are distributed nodes, and each node deploys an agent. After the multiple initial tasks are divided into pieces based on the row numbers in the row number table, each piece is assigned to the corresponding node, so that the agent in the node can extract the initial task based on the content of the task piece and then execute the extracted initial task.
[0097] The method for extracting the initial task from the task fragments through nodes is the same as the method for task decomposition in the first device, and will not be described again here.
[0098] In this embodiment of the invention, the plurality of initial tasks are traversed to obtain the plurality of initial tasks arranged in order, and the line number of each initial task in the initial task file; the line number of the third task among the plurality of initial tasks is added to the line number table, wherein the third task is the task with a prime number, or the number of the task preceding the third task is a prime number; the plurality of initial tasks are fragmented based on the line numbers in the line number table to obtain a plurality of task fragments, each task fragment including at least one initial task; the plurality of task fragments are sequentially assigned to a plurality of nodes, wherein the plurality of task fragments and the plurality of nodes correspond one-to-one, and the plurality of nodes are used to execute the initial tasks included in the plurality of task fragments. In this way, by fragmenting the plurality of initial tasks by line numbers, the tasks included in each fragment are considered as a whole, and by assigning different task fragments to different nodes, different nodes can extract a whole task from the task fragments for execution.
[0099] In one embodiment, the step of sharding the multiple initial tasks based on the row numbers in the row number table to obtain multiple task shards includes:
[0100] Obtain the historical execution volume of each of the multiple nodes;
[0101] For each node, the shard size parameter corresponding to each node is calculated based on the historical execution task volume and the size of the initial task file;
[0102] The multiple initial tasks are sharded based on the shard size parameter and the row number in the row number table to obtain the first task shard corresponding to the first node and the row number corresponding to the first task shard. The first node is one of the multiple nodes, the first task shard is one of the multiple task shards, and the size of the first task shard matches the shard size parameter corresponding to the first node.
[0103] The step of sequentially allocating the multiple task shards to multiple nodes includes:
[0104] Subtask files are extracted from the initial task file based on the line number corresponding to the first task segment;
[0105] The subtask file is sent to the first node, which is used to decompose the subtask file to obtain the at least one initial task.
[0106] It should be noted that different agents may perform tasks differently in different rounds. Some agents may have a heavy load during their last task execution, while others may have a light load. To achieve load balancing among agents and avoid situations where some agents consistently have a high load while others consistently have a low load, task partitioning should be done reasonably based on the size of the task partitions and the agent load.
[0107] The aforementioned historical task execution volume is used to characterize the historical execution status of a node. In some implementations, the historical task execution volume can be the number of tasks executed within a preset time period or the total workload. In other implementations, the historical task execution volume can also be the number of tasks and workload of the last executed task.
[0108] The aforementioned fragment size parameter is used to characterize the size of the initial tasks in a task fragment. In some implementations, the fragment size parameter can be the number of initial tasks in a task fragment; in other implementations, the fragment size parameter can be a parameter representing the workload generated when the initial tasks are executed during task allocation.
[0109] For example, the historical execution task volume refers to the number of tasks executed during the last task execution. Based on the historical execution task volume and the size of the initial task file, the shard size parameter corresponding to each node is calculated. This can be achieved by calculating the weight value corresponding to each node and then setting the product of the weight value and the total number of initial tasks as the classification size parameter. The weight value corresponding to each node can be the quotient of the historical execution task volume of each node and the sum of the historical execution task volumes of all nodes.
[0110] For example, the historical execution task volume refers to the workload of the task during its last execution. Based on the historical execution task volume and the size of the initial task file, the shard size parameter corresponding to each node is calculated. This can be achieved by calculating the weight value corresponding to each node, and then setting the product of the weight value and the total workload of multiple initial tasks as the classification size parameter. The weight value corresponding to each node can be the quotient of the historical execution task volume of each node and the sum of the historical execution task volumes of all nodes.
[0111] In some implementations, the fragment size parameter can also be calculated using the following formula:
[0112]
[0113] In the formula, p i p is the partition size parameter for the i-th node. i The minimum value is 1, l is the total workload of multiple initial tasks, and t iLet t represent the historical number of tasks executed by the i-th node, n be the total number of nodes, and t be the total number of tasks executed. j Let t be the historical number of tasks executed by the j-th node. x This represents the largest or smallest historical number of tasks executed among multiple nodes. Specifically, in t... i When t is greater than the average of the historical task execution volume of multiple nodes, x The largest historical execution volume among multiple nodes; in t i When t is less than or equal to the average of the historical task execution volume of multiple nodes, x It represents the minimum historical execution task volume among multiple nodes.
[0114] The above-mentioned sharding of the multiple initial tasks based on the shard size parameter and the row number in the row number table to obtain the first task shard corresponding to the first node and the row number corresponding to the first task shard, specifically, sharding the multiple initial tasks according to the row number to obtain the first task shard, such that the size of the first task shard matches the shard size parameter of the first node.
[0115] The size of the first task shard is matched with the shard size parameter of the first node. This can be achieved by matching the number of tasks in the first task shard with the number represented by the shard size parameter, or by matching the workload of the tasks in the first task shard with the workload represented by the shard size parameter.
[0116] In this embodiment of the invention, the historical execution task volume of each of the plurality of nodes is obtained; for each node, a shard size parameter corresponding to each node is calculated based on the historical execution task volume and the size of the initial task file; the plurality of initial tasks are sharded based on the shard size parameter and the row number in the row number table to obtain a first task shard corresponding to a first node, and a row number corresponding to the first task shard, wherein the first node is one of the plurality of nodes, the first task shard is one of the plurality of task shards, and the size of the first task shard matches the shard size parameter corresponding to the first node; a subtask file is extracted from the initial task file based on the row number corresponding to the first task shard; the subtask file is sent to the first node, and the first node is used to decompose the subtask file to obtain at least one initial task. Thus, by calculating the shard size parameter corresponding to each node using the historical execution task parameter and the size of the initial task file, and then sharding the plurality of initial tasks according to the shard size parameter and the row number in the row number table to obtain the first task shard corresponding to the first node, the allocation of the first task corresponding to each node can be balanced according to the historical execution task volume, achieving load balancing among different nodes.
[0117] In one embodiment, the first set and the second set are obtained as follows:
[0118] Obtain an initial set of prime numbers, wherein the initial set of prime numbers includes multiple initial prime numbers arranged in order of size;
[0119] Calculate the difference between two adjacent initial prime numbers;
[0120] If the difference is less than or equal to a set threshold, the two adjacent initial prime numbers are added to the first set;
[0121] The second set is determined based on the initial set of prime numbers and the first set.
[0122] In this embodiment of the invention, the initial set of prime numbers is divided into a first set and a second set by the difference between two initial prime numbers, thereby realizing the difference between the prime numbers in the first set and the second set.
[0123] For example, the prime numbers in the first set can be represented as shown in Table 1 below:
[0124] Prime numbers in the first set of Table 1
[0125]
[0126] The prime numbers in the second set can be represented by Table 2 below:
[0127] Prime numbers in the second set of Table 2
[0128]
[0129] As can be seen from Tables 1 and 2 above, there are no identical prime numbers in the first set and the second set. The first set and the second set can be used to determine whether the first task is a serial task or a parallel task, and multiple initial tasks can be numbered.
[0130] Please see Figure 2 , Figure 2 This is a flowchart of a task orchestration method applied to a second device provided by an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:
[0131] Step 201: Obtain a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and its adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task.
[0132] Step 202: Arrange the multiple initial tasks based on the first set, the second set, and the relationship information to obtain the number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on the prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set.
[0133] Step 203: Generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks;
[0134] Step 204: Send the initial task file to the first device.
[0135] In this embodiment of the invention, a first set and a second set, multiple initial tasks to be arranged, and relationship information between each initial task and adjacent tasks are obtained. The first set and the second set include multiple prime numbers, and the prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task, and the first task is either a parallel task or a serial task. Based on the first set, the second set, and the relationship information, the multiple initial tasks are arranged to obtain a number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on the prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set. An initial task file is generated based on the number corresponding to each initial task and the multiple initial tasks. The initial task file is sent to a first device. In this way, multiple initial tasks are arranged using a first set, a second set, and association relationships. The first task's number is the product of prime numbers in the first and second sets, and the second task's number is a prime number in the second set. This allows for task decomposition based on the initial task's number, identifying whether a task is sequential or parallel. This improves the effectiveness of task decomposition. Simultaneously, the numbering system enables rapid decomposition of initial tasks, significantly increasing task arrangement efficiency.
[0136] Among them, the initial tasks can be tasks stored in a task list, tasks stored in a table in a manual scenario, or tasks stored in a database in an automatic scenario.
[0137] It should be noted that the relationships between different initial tasks are different. The type of each initial task needs to be determined based on the relationship information that represents the relationship between adjacent initial tasks, and then a corresponding number is assigned to each initial task so that the initial task file can be decomposed according to the number, thereby improving the efficiency of task arrangement.
[0138] In the case where the first initial task is the first task, this task must be a sequential task. In this case, the smallest prime number is directly obtained from the second set as the number of the first task. However, after obtaining the smallest prime number, to avoid different initial tasks having the same prime number, the smallest prime number needs to be removed from the second set, so that when assigning numbers to other sequential tasks, the numbers of different sequential tasks are different.
[0139] If the first initial task is not the first task, the relationship between the first initial task and adjacent tasks needs to be considered in order to determine how to encode the first initial task.
[0140] These can be categorized into cases where the first initial task is the first task, the second task, or other intermediate tasks, and numbered accordingly.
[0141] Specifically, for the case where the first initial task is the first task, in one embodiment, the step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes:
[0142] When the relational information indicates that the first initial task is the first task, the smallest prime number in the second set is set as the number corresponding to the first initial task, and the first initial task is one of the multiple initial tasks.
[0143] After numbering the first initial task, delete the smallest prime number in the second set.
[0144] That is, for the i-th initial task, when i=1, the initial task is a serial task. In this case, the smallest prime number is taken out sequentially from the second set, the prime number is assigned to the first initial task as a number, and the prime number is deleted from the second set.
[0145] Furthermore, in the case where the first initial task is another intermediate task, in one specific embodiment, the arrangement of the plurality of initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes at least one of the following:
[0146] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and the first initial task is in a serial relationship with the next task, the smallest prime number in the second set is set as the number corresponding to the first initial task.
[0147] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and in a parallel relationship with the next task, the product of the smallest prime number in the second set and the smallest prime number in the first set is set as the number corresponding to the first initial task.
[0148] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a parallel relationship with the previous task and in a serial relationship with the next task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task, and the second prime number is the prime number of the second set.
[0149] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in parallel with the previous task and the first initial task is in parallel with the next task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task.
[0150] The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task further includes:
[0151] After assigning the first initial task number, delete the smallest prime number in the first set and / or the smallest prime number in the second set.
[0152] That is, for the i-th initial task among multiple initial tasks, if the i-th initial task is in a serial relationship with the (i-1)-th initial task and the i-th initial task is in a serial relationship with the (i+1)-th initial task, then the i-th initial task is a single serial task. In this case, the smallest prime number is obtained from the second set and set as the number of the i-th initial task, and then the prime number is deleted from the second set.
[0153] When the i-th initial task and the (i-1)-th initial task are in a sequential relationship, and the i-th task and the (i+1)-th initial task are in a parallel relationship, the i-th initial task and the (i-1)-th initial task are not a whole, and the i-th initial task and the (i+1)-th initial task are a whole, the smallest prime number is taken from the second set as the common prime number (second prime number) of the whole, and the smallest prime number is taken from the first set as the first prime number. The product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task. The first prime number and the second prime number are deleted from the first set and the second prime number respectively.
[0154] When the i-th initial task and the (i-1)-th initial task are in parallel relationship, and the i-th task and the (i+1)-th initial task are in serial relationship, the i-th initial task and the (i-1)-th initial task are a whole, and the i-th initial task and the (i+1)-th initial task are not a whole. In this case, the second prime number of the (i-1)-th initial task and the i-th initial task are the same. Therefore, we only need to take the smallest prime number from the first set as the first prime number, set the product of the smallest prime number and the second prime number of the (i-1)-th initial task as the number, and then delete the first prime number from the first set.
[0155] When the i-th initial task and the (i-1)-th initial task are in parallel relationship, and the i-th task and the (i+1)-th initial task are in parallel relationship, the i-th initial task, the (i-1)-th initial task, and the (i+1)-th initial task are considered as a whole. In this case, the second prime number of the (i-1)-th initial task and the i-th initial task are the same. Therefore, we only need to take the smallest prime number from the first set as the first prime number, set the product of the smallest prime number and the second prime number of the (i-1)-th initial task as the number, and then delete the first prime number from the first set.
[0156] In the case where the first initial task is another intermediate task, in one specific embodiment, the arrangement of the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes at least one of the following:
[0157] When the relational information indicates that the first initial task is the last task and the first initial task is in a sequential relationship with the previous task, the smallest prime number in the second set is set as the number corresponding to the first initial task.
[0158] When the relationship information indicates that the first initial task is the last task and the first initial task is in parallel with the previous task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task.
[0159] The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task further includes:
[0160] After assigning the first initial task number, delete the smallest prime number in the first set and / or the smallest prime number in the second set.
[0161] That is, for the last initial task, if the i-th initial task and the (i-1)-th initial task are in a sequential relationship, and the i-th initial task and the (i-1)-th initial task are not a whole, then the smallest prime number is directly taken from the second set as the code, and the smallest prime number in the second set is deleted.
[0162] For the last initial task, if the i-th initial task and the (i-1)-th initial task are parallel, the i-th initial task and the (i-1)-th initial task are considered as a whole. In this case, the second prime number of the (i-1)-th initial task and the i-th initial task are the same. Therefore, it is only necessary to take the smallest prime number from the first set as the first prime number, set the product of the smallest prime number and the second prime number of the (i-1)-th initial task as the number, and then delete the first prime number from the first set.
[0163] In some implementations, after arranging the plurality of initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task, the method further includes:
[0164] The number and content corresponding to each initial task are merged into one line to obtain multiple lines of content;
[0165] The process of generating an initial task file based on the number corresponding to each initial task and the plurality of initial tasks includes:
[0166] An initial task file is generated based on the aforementioned multi-line content.
[0167] In this embodiment of the invention, an initial task file is generated based on multiple lines of content, so that the position of different initial tasks in the initial task file can be determined according to the line number, so as to facilitate the segmentation of the initial task file according to the line number.
[0168] Please see Figure 3 , Figure 3 This is a structural diagram of a task decomposition device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the task decomposition device 300 includes:
[0169] The receiving module 301 is used to receive an initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number.
[0170] The decomposition module 302 is used to decompose the numbers corresponding to the multiple first tasks in the case that there are multiple first tasks in the multiple initial tasks, to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number.
[0171] The classification module 303 is used to classify the plurality of first tasks based on the first prime number to obtain a plurality of parallel tasks and / or a plurality of serial tasks. The first prime number corresponding to the plurality of parallel tasks is a prime number of a first set, and the first prime number corresponding to the plurality of serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different.
[0172] The first adding module 304 is used to add the plurality of parallel tasks to a first sublist of the first task list, add the plurality of serial tasks to a second sublist of the first task list, and add a second task to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
[0173] In one embodiment, the decomposition module 302 includes:
[0174] The decomposition unit is used to decompose the number for each first task to obtain a set of prime numbers corresponding to each first task, wherein the set of prime numbers includes multiple prime numbers.
[0175] The first determining unit is used to determine a second prime number based on the prime number sets corresponding to the plurality of first tasks, wherein the second prime number is a prime number included in the prime number sets corresponding to at least two first tasks.
[0176] The second determining unit is used to determine a first prime number corresponding to each first task based on the second prime number, wherein the first prime number is a prime number other than the second prime number among the multiple prime numbers included in the set of prime numbers corresponding to each first task.
[0177] In one embodiment, the task decomposition device 300 further includes:
[0178] The first traversal module is used to traverse the multiple initial tasks and obtain the arrangement order of the multiple initial tasks;
[0179] A module is established to create a mapping relationship between tasks in the first task list and the second task list based on the arrangement order. The mapping relationship is used to determine the execution order of the first task and the second task.
[0180] In one embodiment, the task decomposition device 300 further includes:
[0181] The second traversal module is used to traverse the plurality of initial tasks to obtain the plurality of initial tasks arranged in order, and the line number of each initial task in the initial task file.
[0182] The second adding module is used to add the row number of the third task among the plurality of initial tasks to the row number table, wherein the third task is the task whose number is a prime number, or the number of the task preceding the third task is a prime number.
[0183] The sharding module is used to shard the multiple initial tasks based on the row numbers in the row number table to obtain multiple task shards, each task shard including at least one initial task.
[0184] The allocation module is used to sequentially allocate the multiple task shards to multiple nodes, wherein the multiple task shards and the multiple nodes correspond one-to-one, and the multiple nodes are used to execute the initial tasks included in the multiple task shards.
[0185] In one embodiment, the sharding module includes:
[0186] The acquisition unit is used to acquire the historical execution task volume of each of the plurality of nodes;
[0187] The calculation unit is used to calculate the shard size parameter corresponding to each node based on the historical execution task volume and the size of the initial task file;
[0188] The sharding unit is used to shard the plurality of initial tasks based on the sharding size parameter and the row number in the row number table to obtain the first task shard corresponding to the first node and the row number corresponding to the first task shard. The first node is one of the plurality of nodes, the first task shard is one of the plurality of task shards, and the size of the first task shard matches the sharding size parameter corresponding to the first node.
[0189] The allocation module includes:
[0190] The extraction unit is used to extract subtask files from the initial task file based on the line number corresponding to the first task segment;
[0191] A sending unit is configured to send the subtask file to the first node, and the first node is configured to decompose the subtask file to obtain the at least one initial task.
[0192] In one embodiment, the first set and the second set are obtained as follows:
[0193] Obtain an initial set of prime numbers, wherein the initial set of prime numbers includes multiple initial prime numbers arranged in order of size;
[0194] Calculate the difference between two adjacent initial prime numbers;
[0195] If the difference is less than or equal to a set threshold, the two adjacent initial prime numbers are added to the first set;
[0196] The second set is determined based on the initial set of prime numbers and the first set.
[0197] The task decomposition apparatus provided in this embodiment of the invention is capable of achieving the above. Figure 1 Each process and technical feature of the various embodiments of the task decomposition method shown corresponds one-to-one and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0198] It should be noted that the task decomposition device in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0199] This invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the above-described functionality. Figure 1 The various processes of the task decomposition method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0200] For details, see Figure 4 As shown, this embodiment of the invention also provides an electronic device, including a bus 401, a transceiver 402, an antenna 403, a bus interface 404, a processor 405, and a memory 406.
[0201] The transceiver 402 is used to receive an initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number.
[0202] The processor 405 is configured to, when there are multiple first tasks among the multiple initial tasks, decompose the numbers corresponding to the multiple first tasks to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number.
[0203] The processor 405 is further configured to classify the plurality of first tasks based on the first prime number to obtain a plurality of parallel tasks and / or a plurality of serial tasks, wherein the first prime number corresponding to the plurality of parallel tasks is a prime number of a first set, and the first prime number corresponding to the plurality of serial tasks is a prime number of a second set, wherein the prime numbers included in the first set and the prime numbers included in the second set are different.
[0204] The processor 405 is further configured to add the plurality of parallel tasks to a first sublist of the first task list, add the plurality of serial tasks to a second sublist of the first task list, and add a second task to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
[0205] In one embodiment, the step of decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task includes:
[0206] For each of the first tasks, the number is decomposed to obtain a set of prime numbers corresponding to each first task, and the set of prime numbers includes multiple prime numbers;
[0207] A second prime number is determined based on the prime number sets corresponding to the plurality of first tasks, wherein the second prime number is a prime number included in the prime number sets corresponding to at least two first tasks;
[0208] The first prime number corresponding to each first task is determined based on the second prime number. The first prime number is a prime number other than the second prime number among the multiple prime numbers included in the set of prime numbers corresponding to each first task.
[0209] In one embodiment, the processor 405 is further configured to traverse the plurality of initial tasks to obtain the arrangement order of the plurality of initial tasks;
[0210] The processor 405 is further configured to establish a mapping relationship between tasks in the first task list and the second task list based on the arrangement order, the mapping relationship being used to determine the execution order of the first task and the second task.
[0211] In one embodiment, the processor 405 is further configured to traverse the plurality of initial tasks to obtain the plurality of initial tasks arranged in order, and the line number of each initial task in the initial task file.
[0212] The processor 405 is further configured to add the row number of the third task among the plurality of initial tasks to the row number table, wherein the third task is the task whose number is a prime number, or the number of the task preceding the third task is a prime number.
[0213] The processor 405 is further configured to divide the plurality of initial tasks into multiple task fragments based on the row numbers in the row number table, and each task fragment includes at least one initial task.
[0214] The processor 405 is further configured to sequentially allocate the plurality of task shards to a plurality of nodes, wherein the plurality of task shards and the plurality of nodes correspond one-to-one, and the plurality of nodes are configured to execute the initial tasks included in the plurality of task shards.
[0215] In one embodiment, the step of sharding the multiple initial tasks based on the row numbers in the row number table to obtain multiple task shards includes:
[0216] Obtain the historical execution volume of each of the multiple nodes;
[0217] For each node, the shard size parameter corresponding to each node is calculated based on the historical execution task volume and the size of the initial task file;
[0218] The multiple initial tasks are sharded based on the shard size parameter and the row number in the row number table to obtain the first task shard corresponding to the first node and the row number corresponding to the first task shard. The first node is one of the multiple nodes, the first task shard is one of the multiple task shards, and the size of the first task shard matches the shard size parameter corresponding to the first node.
[0219] The step of sequentially allocating the multiple task shards to multiple nodes includes:
[0220] Subtask files are extracted from the initial task file based on the line number corresponding to the first task segment;
[0221] The subtask file is sent to the first node, which is used to decompose the subtask file to obtain the at least one initial task.
[0222] In one embodiment, the first set and the second set are obtained as follows:
[0223] Obtain an initial set of prime numbers, wherein the initial set of prime numbers includes multiple initial prime numbers arranged in order of size;
[0224] Calculate the difference between two adjacent initial prime numbers;
[0225] If the difference is less than or equal to a set threshold, the two adjacent initial prime numbers are added to the first set;
[0226] The second set is determined based on the initial set of prime numbers and the first set.
[0227] exist Figure 4 In this document, a bus architecture (represented by bus 401) is used. Bus 401 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 may be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 405 is transmitted over a wireless medium via antenna 403, which further receives data and transmits data to processor 405.
[0228] Processor 405 is responsible for managing bus 401 and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 406 can be used to store data used by processor 405 during operation.
[0229] Optionally, the processor 405 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU).
[0230] Please see Figure 5 , Figure 5 This is a structural diagram of a task orchestration device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the task decomposition device 500 includes:
[0231] The acquisition module 501 is used to acquire a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is a first task or a second task. The first task is a parallel task or a serial task.
[0232] The arrangement module 502 is used to arrange the plurality of initial tasks based on the first set, the second set and the relationship information to obtain the number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set.
[0233] The generation module 503 is used to generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks;
[0234] The sending module 504 is used to send the initial task file to the first device.
[0235] In one embodiment, the orchestration module 502 includes:
[0236] The first numbering unit is used to set the smallest prime number in the second set as the number corresponding to the first initial task when the relation information indicates that the first initial task is the first task, and the first initial task is one of the multiple initial tasks.
[0237] The first deletion unit is used to delete the smallest prime number in the second set after the first initial task is numbered.
[0238] In one embodiment, the orchestration module 502 includes at least one of the following:
[0239] The second numbering unit is used to set the smallest prime number in the second set as the number corresponding to the first initial task when the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and the first initial task is in a serial relationship with the next task.
[0240] The third numbering unit is used to set the product of the smallest prime number in the second set and the smallest prime number in the first set as the number corresponding to the first initial task when the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and in a parallel relationship with the next task.
[0241] The fourth numbering unit is used to obtain the second prime number for calculating the number of the previous task when the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a parallel relationship with the previous task and in a serial relationship with the next task, and set the product of the smallest prime number in the first set and the second prime number as the number corresponding to the first initial task, where the second prime number is the prime number of the second set.
[0242] The fifth numbering unit is used to obtain the second prime number for calculating the number of the previous task when the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in parallel with the previous task and the first initial task is in parallel with the next task, and set the product of the smallest prime number in the first set and the second prime number as the number corresponding to the first initial task.
[0243] The arrangement module 502 further includes:
[0244] The second deletion unit is used to delete the smallest prime number in the first set and / or the smallest prime number in the second set after the first initial task number is assigned.
[0245] In one embodiment, the orchestration module 502 includes at least one of the following:
[0246] The sixth numbering unit is used to set the smallest prime number in the second set as the number corresponding to the first initial task when the relation information indicates that the first initial task is the last task and the first initial task is serially related to the previous task.
[0247] The seventh numbering unit is used to obtain the second prime number for calculating the number of the previous task when the relationship information indicates that the first initial task is the last task and the first initial task is in a parallel relationship with the previous task, and set the product of the smallest prime number in the first set and the second prime number as the number corresponding to the first initial task.
[0248] The arrangement module 502 further includes:
[0249] The third deletion unit, after assigning the first initial task number, deletes the smallest prime number in the first set and / or the smallest prime number in the second set.
[0250] The task decomposition apparatus provided in this embodiment of the invention is capable of achieving the above. Figure 2 Each process of the various embodiments of the task orchestration method shown has a corresponding technical feature and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0251] It should be noted that the task decomposition device in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0252] This invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the above-described functionality. Figure 2 The various processes of the task orchestration method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0253] For details, see Figure 6 As shown, this embodiment of the invention also provides an electronic device, including a bus 601, a transceiver 602, an antenna 603, a bus interface 604, a processor 605, and a memory 606.
[0254] The transceiver 602 is used to acquire a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task.
[0255] The processor 605 is configured to arrange the plurality of initial tasks based on the first set, the second set and the relation information to obtain a number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set.
[0256] The processor 605 is further configured to generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks;
[0257] The transceiver 602 is also used to send the initial task file to the first device.
[0258] In one embodiment, the step of arranging the plurality of initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes:
[0259] When the relational information indicates that the first initial task is the first task, the smallest prime number in the second set is set as the number corresponding to the first initial task, and the first initial task is one of the multiple initial tasks.
[0260] After numbering the first initial task, delete the smallest prime number in the second set.
[0261] In one embodiment, the step of arranging the plurality of initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes at least one of the following:
[0262] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and the first initial task is in a serial relationship with the next task, the smallest prime number in the second set is set as the number corresponding to the first initial task.
[0263] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and in a parallel relationship with the next task, the product of the smallest prime number in the second set and the smallest prime number in the first set is set as the number corresponding to the first initial task.
[0264] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a parallel relationship with the previous task and in a serial relationship with the next task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task, and the second prime number is the prime number of the second set.
[0265] In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in parallel with the previous task and the first initial task is in parallel with the next task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task.
[0266] The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task further includes:
[0267] After assigning the first initial task number, delete the smallest prime number in the first set and / or the smallest prime number in the second set.
[0268] In one embodiment, the step of arranging the plurality of initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes at least one of the following:
[0269] When the relational information indicates that the first initial task is the last task and the first initial task is in a sequential relationship with the previous task, the smallest prime number in the second set is set as the number corresponding to the first initial task.
[0270] When the relationship information indicates that the first initial task is the last task and the first initial task is in parallel with the previous task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task.
[0271] The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task further includes:
[0272] After assigning the first initial task number, delete the smallest prime number in the first set and / or the smallest prime number in the second set.
[0273] exist Figure 6 In this document, a bus architecture (represented by bus 601) is used. Bus 601 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 605 and memory represented by memory 606. Bus 601 can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 604 provides an interface between bus 601 and transceiver 602. Transceiver 602 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 605 is transmitted over a wireless medium via antenna 603, which further receives data and transmits data to processor 605.
[0274] Processor 605 manages bus 601 and general processing, and also provides various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 606 can be used to store data used by processor 605 during operation.
[0275] Optionally, the processor 605 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU).
[0276] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the above-described functions. Figure 1 The corresponding processes in the task decomposition method implementation, or the implementation of the above. Figure 2 The various processes corresponding to the task orchestration method embodiments, and which achieve the same technical effect, will not be described again here to avoid repetition. The computer-readable storage medium mentioned includes, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0277] The present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described... Figure 1 The corresponding processes in the task decomposition method implementation, or the implementation of the above. Figure 2 The various processes in the corresponding task orchestration method embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0278] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing eight possibilities: A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0279] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0280] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0281] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A task decomposition method, applied to a first device, characterized in that, include: Receive an initial task file sent by a second device, the initial task file including multiple initial tasks and a number corresponding to each initial task, the number being a prime number or a composite number; In the case where there are multiple first tasks among the multiple initial tasks, the numbers corresponding to the multiple first tasks are decomposed to obtain the first prime number corresponding to each first task, and the number of each first task is a composite number; Based on the first prime number, the multiple first tasks are classified to obtain multiple parallel tasks and / or multiple serial tasks. The first prime number corresponding to the multiple parallel tasks is a prime number of a first set, and the first prime number corresponding to the multiple serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different. The plurality of parallel tasks are added to a first sublist of the first task list, the plurality of serial tasks are added to a second sublist of the first task list, and a second task is added to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
2. The method as described in claim 1, characterized in that, The step of decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task includes: For each of the first tasks, the number corresponding to the first task is decomposed to obtain a set of prime numbers corresponding to each first task, and the set of prime numbers includes multiple prime numbers; A second prime number is determined based on the prime number sets corresponding to the plurality of first tasks, wherein the second prime number is a prime number included in the prime number sets corresponding to at least two first tasks; The first prime number corresponding to each first task is determined based on the second prime number. The first prime number is a prime number other than the second prime number among the multiple prime numbers included in the set of prime numbers corresponding to each first task.
3. The method as described in claim 1, characterized in that, Before decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task, the method further includes: The multiple initial tasks are traversed to obtain their arrangement order. After adding the plurality of parallel tasks to a first sublist of a first task list, adding the plurality of serial tasks to a second sublist of the first task list, and adding the second task to a second task list, the method further includes: Based on the arrangement order, a mapping relationship is established between the tasks in the first task list and the second task list, and the mapping relationship is used to determine the execution order of the first task and the second task.
4. The method according to any one of claims 1 to 3, characterized in that, Before decomposing the numbers corresponding to the plurality of first tasks to obtain the first prime number corresponding to each first task, the method further includes: The plurality of initial tasks are traversed to obtain the plurality of initial tasks arranged in order, and the line number of each initial task in the initial task file; Add the row number of the third task among the plurality of initial tasks to the row number table. The third task is either the task whose number is a prime number, or the number of the task preceding the third task is a prime number. The multiple initial tasks are divided into multiple task fragments based on the row numbers in the row number table, and each task fragment includes at least one initial task. The multiple task shards are sequentially assigned to multiple nodes, with each task shard corresponding to one of the multiple nodes. The multiple nodes are used to execute the initial tasks included in the multiple task shards.
5. The method as described in claim 4, characterized in that, The process of partitioning the multiple initial tasks based on the row numbers in the row number table yields multiple task partitions, including: Obtain the historical execution volume of each of the multiple nodes; For each node, the shard size parameter corresponding to each node is calculated based on the historical execution task volume and the size of the initial task file; The multiple initial tasks are sharded based on the shard size parameter and the row number in the row number table to obtain the first task shard corresponding to the first node and the row number corresponding to the first task shard. The first node is one of the multiple nodes, the first task shard is one of the multiple task shards, and the size of the first task shard matches the shard size parameter corresponding to the first node. The step of sequentially allocating the multiple task shards to multiple nodes includes: Subtask files are extracted from the initial task file based on the line number corresponding to the first task segment; The subtask file is sent to the first node, which is used to decompose the subtask file to obtain the at least one initial task.
6. The method according to any one of claims 1 to 3, characterized in that, The first set and the second set are obtained in the following way: Obtain an initial set of prime numbers, wherein the initial set of prime numbers includes multiple initial prime numbers arranged in order of size; Calculate the difference between two adjacent initial prime numbers; If the difference is less than or equal to a set threshold, the two adjacent initial prime numbers are added to the first set; The second set is determined based on the initial set of prime numbers and the first set.
7. A task orchestration method, applied to a second device, characterized in that, include: Obtain a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and its adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task. The multiple initial tasks are arranged based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set. An initial task file is generated based on the number corresponding to each initial task and the plurality of initial tasks; Send the initial task file to the first device.
8. The method as described in claim 7, characterized in that, The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes: When the relational information indicates that the first initial task is the first task, the smallest prime number in the second set is set as the number corresponding to the first initial task, and the first initial task is one of the multiple initial tasks. After numbering the first initial task, delete the smallest prime number in the second set.
9. The method as described in claim 7, characterized in that, The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes at least one of the following: In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and the first initial task is in a serial relationship with the next task, the smallest prime number in the second set is set as the number corresponding to the first initial task. In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a serial relationship with the previous task and in a parallel relationship with the next task, the product of the smallest prime number in the second set and the smallest prime number in the first set is set as the number corresponding to the first initial task. In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in a parallel relationship with the previous task and in a serial relationship with the next task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task, and the second prime number is the prime number of the second set. In the case where the relationship information indicates that the first initial task is not the first task or the last task, and the first initial task is in parallel with the previous task and the first initial task is in parallel with the next task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task. The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task further includes: After assigning the first initial task number, delete the smallest prime number in the first set and / or the smallest prime number in the second set.
10. The method as described in claim 7, characterized in that, The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task includes at least one of the following: When the relational information indicates that the first initial task is the last task and the first initial task is in a sequential relationship with the previous task, the smallest prime number in the second set is set as the number corresponding to the first initial task. When the relationship information indicates that the first initial task is the last task and the first initial task is in parallel with the previous task, the second prime number for calculating the number of the previous task is obtained, and the product of the smallest prime number in the first set and the second prime number is set as the number corresponding to the first initial task. The step of arranging the multiple initial tasks based on the first set, the second set, and the relationship information to obtain a number corresponding to each initial task further includes: After assigning the first initial task number, delete the smallest prime number in the first set and / or the smallest prime number in the second set.
11. A task decomposition device, characterized in that, include: The receiving module is used to receive an initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number. The decomposition module is used to decompose the numbers corresponding to the multiple first tasks in the case of multiple initial tasks to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number. A classification module is used to classify the plurality of first tasks based on the first prime number to obtain a plurality of parallel tasks and / or a plurality of serial tasks. The first prime number corresponding to the plurality of parallel tasks is a prime number of a first set, and the first prime number corresponding to the plurality of serial tasks is a prime number of a second set. The prime numbers included in the first set and the prime numbers included in the second set are different. The first adding module is used to add the plurality of parallel tasks to a first sublist of the first task list, add the plurality of serial tasks to a second sublist of the first task list, and add a second task to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
12. A task orchestration device, characterized in that, include: The acquisition module is used to acquire a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task. The arrangement module is used to arrange the multiple initial tasks based on the first set, the second set and the relationship information to obtain the number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set. The generation module is used to generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks; The sending module is used to send the initial task file to the first device.
13. An electronic device, characterized in that, Including transceivers and processors, The transceiver is used to receive an initial task file sent by the second device. The initial task file includes multiple initial tasks and a number corresponding to each initial task. The number is a prime number or a composite number. The processor is configured to, when there are multiple first tasks among the multiple initial tasks, decompose the numbers corresponding to the multiple first tasks to obtain a first prime number corresponding to each first task, wherein the number of each first task is a composite number; The processor is further configured to classify the plurality of first tasks based on the first prime number to obtain a plurality of parallel tasks and / or a plurality of serial tasks, wherein the first prime number corresponding to the plurality of parallel tasks is a prime number of a first set, and the first prime number corresponding to the plurality of serial tasks is a prime number of a second set, wherein the prime numbers included in the first set and the prime numbers included in the second set are different. The processor is further configured to add the plurality of parallel tasks to a first sublist of the first task list, add the plurality of serial tasks to a second sublist of the first task list, and add a second task to a second task list, wherein the second task is the initial task with a prime number among the plurality of initial tasks.
14. An electronic device, characterized in that, Including transceivers and processors, The transceiver is used to acquire a first set and a second set, multiple initial tasks to be arranged, and information on the relationship between each initial task and adjacent tasks. The first set and the second set include multiple prime numbers. The prime numbers included in the first set and the prime numbers included in the second set are different. Each initial task is either a first task or a second task. The first task is either a parallel task or a serial task. The processor is configured to arrange the plurality of initial tasks based on the first set, the second set, and the relational information to obtain a number corresponding to each initial task. The number corresponding to the first task is a composite number obtained based on prime numbers in the first set and the second set, and the number corresponding to the second task is a prime number in the second set. The processor is further configured to generate an initial task file based on the number corresponding to each initial task and the plurality of initial tasks; The transceiver is also used to send the initial task file to the first device.
15. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the task decomposition method as described in any one of claims 1 to 6, or implements the steps of the task decomposition method as described in any one of claims 7 to 10.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the task decomposition method as described in any one of claims 1 to 6, or implements the steps of the task decomposition method as described in any one of claims 7 to 10.
17. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the task decomposition method as described in any one of claims 1 to 6, or implement the steps of the task decomposition method as described in any one of claims 7 to 10.