Task processing method, container network probing method, task processing system, computing device, computer readable storage medium, and computer program product
By identifying the resource dependencies between tasks, dividing the tasks into sets of subtasks without resource dependencies and processing these sets concurrently, the problem of low task processing efficiency is solved and more efficient task processing is achieved.
Patent Information
- Application Number
- PCT/IB2025/052409
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-19
- Filing Date
- 2025-03-06
- Publication Date
- 2025-09-25
AI Technical Summary
In the prior art, task processing efficiency is low because there are resource dependency conflicts between tasks, resulting in only one task being processed at a time and inability to effectively process tasks in parallel.
By identifying the resource dependencies between tasks, tasks are divided into multiple subtask sets, ensuring that there are no resource dependencies within the subtask sets, and then these subtask sets are processed concurrently.
It improves the task processing efficiency while ensuring the stability of task processing by processing tasks within the subtask set in parallel.
Smart Images

Figure IB2025052409_25092025_PF_FP_ABST
Abstract
Description
[0001] Technical field of task processing method, container network detection method, task processing system, computing device, computer-readable storage medium and computer program product
[0002]
[0001] The present disclosure relates to the field of computer technology, and more particularly to a task processing method, a container network detection method, a task processing system, a computing device, a computer-readable storage medium, and a computer program product.
[0003]
[0002] With the development of computer technology, more and more computer technologies are applied in the field of task processing. When processing tasks, multiple tasks are usually processed serially. However, with the rapid growth of tasks, simple serial processing solutions can no longer meet user needs. Therefore, how to efficiently process tasks has gradually become a research focus.
[0004] Currently, tasks without dependency conflicts are typically screened out from multiple tasks and processed concurrently. However, the above solution only considers the dependency conflicts between tasks. Tasks without dependency conflicts may also depend on the same processing resource. Since the same processing resource can only process one task at a time, the processing efficiency is still low. Therefore, an efficient task processing solution is urgently needed.
[0005]
[0004] In view of this, embodiments of the present disclosure provide a task processing method. One or more embodiments of the present disclosure also relate to a container network detection method, a task processing apparatus, a container network detection apparatus, a task processing system, a computing device, a computer-readable storage medium, and a computer program product.
[0006]
[0005] According to a first aspect of an embodiment of the present disclosure, a task processing method is provided, comprising: obtaining multiple subtasks of a target task; identifying resource dependencies between the multiple subtasks, and dividing the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed; for a target subtask set in the multiple subtask sets, calling resources corresponding to multiple target subtasks to be processed in the target subtask set, concurrently processing the multiple target subtasks to be processed, and obtaining processing results of the multiple target subtasks to be processed.
[0007]
[0006] According to a second aspect of an embodiment of the present disclosure, a container network detection method is provided, comprising: obtaining multiple subtasks of a target detection task; identifying container resource dependencies between the multiple subtasks, and dividing the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple to-be-processed subtasks, and there is no container resource dependency between the multiple to-be-processed subtasks; for a target subtask set in the multiple subtask sets, calling container resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining container network detection results for the multiple target to-be-processed subtasks.
[0008]
[0007] According to a third aspect of an embodiment of the present disclosure, a task processing system is provided, comprising a processing platform and multiple resources; the processing platform is used to obtain multiple subtasks of a target task; identify resource dependencies between the multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed; the resources are used to concurrently process the multiple target subtasks to be processed included in the target subtask set to obtain processing results of the multiple target subtasks to be processed, wherein the target subtask set is a set among the multiple subtask sets.
[0009]
[0008] According to a fourth aspect of an embodiment of the present disclosure, a task processing system is provided, comprising a processing platform and multiple container resources in a cloud cluster; the processing platform is configured to obtain multiple subtasks of a target task; identify container resource dependencies between the multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no container resource dependency between the multiple subtasks to be processed; the container resources are configured to concurrently process the multiple target subtasks to be processed included in the target subtask set to obtain processing results of the multiple target subtasks to be processed, wherein the target subtask set is a set among the multiple subtask sets.
[0010]
[0009] According to the fifth aspect of the embodiment of the present disclosure, a task processing device is provided, including: a first acquisition module, configured to acquire multiple subtasks of a target task; a first division module, configured to identify resource dependencies between multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed; a first processing module, configured to call the resources corresponding to multiple target subtasks to be processed in the target subtask set for the target subtask set in the multiple subtask sets, perform concurrent processing on the multiple target subtasks to be processed, and obtain processing results of the multiple target subtasks to be processed.
[0011]
[0010] According to a sixth aspect of an embodiment of the present disclosure, a container network detection apparatus is provided, comprising: a second acquisition module configured to acquire multiple subtasks of a target detection task; a second division module configured to identify container resource dependencies between the multiple subtasks and, based on the identification results, divide the multiple subtasks to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and no container resource dependencies exist between the multiple to-be-processed subtasks; and a second processing module configured to, for a target subtask set in the multiple subtask sets, invoke container resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently process the multiple target to-be-processed subtasks, and obtain container network detection results for the multiple target to-be-processed subtasks.
[0011] According to a seventh aspect of an embodiment of the present disclosure, a computing device is provided, comprising: a memory and a processor; the memory is configured to store a computer program / instruction, and the processor is configured to execute the computer program / instruction. When executed by the processor, the computer program / instruction implements the steps of the method provided in the first or second aspect.
[0012]
[0012] According to an eighth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the method provided in the first aspect or the second aspect are implemented.
[0013]
[0013] According to the ninth aspect of the embodiments of the present disclosure, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method provided in the first or second aspect above.
[0014]
[0014] An embodiment of the present disclosure provides a task processing method, which obtains multiple subtasks of a target task; identifies resource dependencies between the multiple subtasks, and divides the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed; for a target subtask set in the multiple subtask sets, the resources corresponding to the multiple target subtasks to be processed in the target subtask set are called, and the multiple target subtasks to be processed are processed concurrently to obtain processing results of the multiple target subtasks to be processed. Since there is no resource dependency between the multiple subtasks to be processed included in the subtask set, it means that there are no shared resources between the multiple subtasks to be processed. Therefore, the multiple subtasks to be processed in the subtask set are processed in parallel with each other, thereby improving the task processing efficiency while ensuring the stability of task processing.
[0015]
[0015] FIG1 is an architecture diagram of a task processing system provided by one embodiment of the present disclosure;
[0016]
[0016] FIG2 is an architecture diagram of another task processing system provided by one embodiment of the present disclosure;
[0017]
[0017] FIG3 is a flowchart of a task processing method provided by one embodiment of the present disclosure;
[0018]
[0018] FIG4 is a schematic diagram of a task relationship diagram in a task processing method provided by one embodiment of the present disclosure;
[0019]
[0019] FIG5 is a flowchart of a container network detection method provided by one embodiment of the present disclosure;
[0020]
[0020] FIG6 is a flowchart of a processing process of a container network detection method provided by one embodiment of the present disclosure;
[0021]
[0021] FIG7 is a flowchart of a task processing method provided by one embodiment of the present disclosure;
[0022]
[0022] FIG8 is a schematic diagram of the structure of a task processing device provided by one embodiment of the present disclosure;
[0023]
[0023] FIG9 is a schematic diagram of the structure of a container network detection device provided by one embodiment of the present disclosure;
[0024] FIG10 is a block diagram of a computing device provided by an embodiment of the present disclosure.
[0024]
[0025] The following description sets forth numerous specific details to facilitate a thorough understanding of the present disclosure. However, the present disclosure can be implemented in many other ways than those described herein, and those skilled in the art may make similar generalizations without departing from the scope of the present disclosure. Therefore, the present disclosure is not limited to the specific implementations disclosed below.
[0025]
[0026] The terms used in one or more embodiments of the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the one or more embodiments of the present disclosure. The singular forms "a," "an," "the," and "the" used in one or more embodiments of the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present disclosure refers to and
[0026]
[0027] It should be understood that while terms such as "first," "second," and so on may be used to describe various information in one or more embodiments of the present disclosure, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, "first" could also be referred to as "second," and similarly, "second" could also be referred to as "first," without departing from the scope of one or more embodiments of the present disclosure. Depending on the context, the term "if" as used herein could be interpreted as "when," "when," or "in response to a determination."
[0027]
[0028] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0028]
[0029] First, the terms involved in one or more embodiments of the present disclosure are explained.
[0029]
[0030] Observability: refers to the ability to monitor, measure, and understand the state of a system or application by examining its logs, events, and metrics.
[0030]
[0031] Observable systems: These are systems with integrated observability capabilities that allow developers and operations teams to monitor and observe the system or application. They also allow active input to be applied to observe the response of the application under test.
[0031]
[0032] Scheduling platform: In a multi-tasking situation, the task scheduler determines which task should obtain resources and execution priority, ensuring efficient task execution.
[0032]
[0033] A cluster is a group of computer systems interconnected by a high-speed network. These systems work together as a unified whole to provide enhanced performance, availability, scalability, and fault tolerance. Each computer in a cluster is called a cluster node. Cluster nodes coordinate through software and hardware technologies to share workloads, data storage, and provide continuous service to users. Clusters are commonly used in high-performance computing, load balancing, fault recovery, distributed databases, and cloud computing. Depending on their functionality and design goals, they can be categorized into various types, such as high-availability clusters, load balancing clusters, compute-intensive clusters, and storage clusters. In a containerized environment, a cluster consists of multiple physical or virtual machines, which are managed and scheduled by cluster management software to manage and schedule container instances distributed across the nodes.
[0033]
[0034] The present disclosure provides a task processing method and also relates to a container network detection method, a task processing apparatus, a container network detection apparatus, a task processing system, a computing device, a computer-readable storage medium, and a computer program product, each of which is described in detail in the following embodiments.
[0034]
[0035] Referring to Figure 1, Figure 1 shows an architectural diagram of a task processing system according to one embodiment of the present disclosure, the task processing system may include a processing platform 100 and a plurality of resources 200;
[0035]
[0036] The processing platform 100 is configured to obtain multiple subtasks of a target task; identify resource dependencies between the multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask sets include multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed;
[0036]
[0037] Resource 200 is used to concurrently process multiple target to-be-processed subtasks included in a target subtask set to obtain processing results of the multiple target to-be-processed subtasks, wherein the target subtask set is a set in the multiple subtask sets.
[0037]
[0038] By applying the solution of the embodiments of the present disclosure, since there is no resource dependency between the multiple pending subtasks included in the subtask set, indicating that the multiple pending subtasks do not share resources, the multiple pending subtasks within the subtask set can be processed in parallel, using the subtask set as a unit. This improves task processing efficiency while ensuring task processing stability.
[0038]
[0039] In practical applications, the multiple resources may be multiple container resources in a cloud cluster. Referring to FIG. 2 , FIG. 2 shows an architecture diagram of another task processing system provided by an embodiment of the present disclosure. The task processing system may include a processing platform 100 and multiple container resources 300 in a cloud cluster.
[0039]
[0040] The processing platform 100 is configured to obtain multiple subtasks of a target task; identify container resource dependencies between the multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and no container resource dependencies exist between the multiple to-be-processed subtasks;
[0040]
[0041] The container resource 300 is used to concurrently process multiple target to-be-processed subtasks included in a target subtask set to obtain processing results of the multiple target to-be-processed subtasks, wherein the target subtask set is a set of multiple subtask sets.
[0041]
[0042] By applying the solution of the embodiments of the present disclosure, since there is no container resource dependency between the multiple pending subtasks included in a subtask set, indicating that the multiple pending subtasks do not share container resources, the multiple pending subtasks within the subtask set can be processed in parallel, using the subtask set as a unit. This improves task processing efficiency while ensuring task processing stability.
[0042]
[0043] In an optional embodiment of the present disclosure, a task processing system can obtain multiple subtasks of a target task from multiple clients. The task processing system can be located in Cloud 1. Multiple clients can establish communication connections through the task processing system. In a task processing scenario, the task processing system provides task processing services between multiple clients. Multiple clients can act as senders or receivers, communicating through the task processing system. Users can interact with the task processing system through clients to receive data from other clients or send data to other clients. In a task processing scenario, users can publish data streams to the task processing system through clients. The task processing system then generates task processing results based on the data streams and pushes the results to other clients with which communication has been established.
[0043]
[0044] The client and the task processing system are connected via a network. The network provides a medium for the communication link between the client and the task processing system. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. Data transmitted by the client may need to undergo encoding, transcoding, compression, and other processing before being released to the task processing system.
[0044]
[0045] The client can be a browser, an app (application), a web application such as an H5 (Hypertext Markup Languages, version 5) application, a lightweight application (also known as a mini-program), or a cloud application. The client can be developed based on the software development kit (SDK) of the corresponding service provided by the task processing system, such as the real-time communication (RTC) SDK. The client can be deployed in an electronic device and rely on the device or certain apps in the device to run. For example, the electronic device may have a display and support information browsing, such as a personal mobile terminal such as a mobile phone, tablet computer, or personal computer. Various other types of applications are also typically configured in the electronic device, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0045]
[0046] The task processing system may include servers that provide various services, such as servers that provide communication services to multiple clients, servers that support backend training for models used by clients, and servers that process data sent by clients. It should be noted that the task processing system can be implemented as a distributed server cluster consisting of multiple servers or as a single server. The server can also be a server in a distributed system or a server integrated with a blockchain. The server can also be a cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content distribution network, etc.
[0046] (CDN, Content Delivery Network) and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.
[0047] It is worth noting that the task processing method provided in the embodiments of the present disclosure is generally executed by a task processing system. However, in other embodiments of the present disclosure, the client may also have similar functions to the task processing system, thereby executing the task processing method provided in the embodiments of the present disclosure. In other embodiments, the task processing method provided in the embodiments of the present disclosure may also be jointly executed by the client and the task processing system.
[0048]
[0048] Referring to FIG3, FIG3 shows a flowchart of a task processing method provided by an embodiment of the present disclosure, which specifically includes the following steps.
[0049]
[0049] Step 302: Acquire multiple subtasks of the target task.
[0050]
[0050] In one or more embodiments of the present disclosure, during task processing, multiple subtasks of a target task may be obtained, resources corresponding to each subtask may be called, multiple subtasks of the target task may be processed in parallel, and processing results of each subtask may be obtained.
[0051] Specifically, the target task can be a task of different types, such as an observation task, a log monitoring task, a network connectivity detection task, and the like. The target task can be referred to as a main task. Subtasks are components of the target task. Subtasks comply with resource processing rules and can be processed by the resource to obtain processing results. For example, target task A can include subtask A1, subtask A2, and subtask A3.
[0052] In practical applications, there are various ways to obtain multiple subtasks of a target task, and the specific method is selected based on actual circumstances. The present disclosure does not impose any limitation on this. In one possible implementation of the present disclosure, the multiple subtasks of the target task can be directly read from another data acquisition device or database. In another possible implementation of the present disclosure, the target task can be read from another data acquisition device or database, and the target task can be divided to obtain the multiple subtasks of the target task.
[0053]
[0053] In an optional embodiment of the present disclosure, the above-mentioned acquisition of multiple subtasks of the target task may include the following steps: acquiring the target task, wherein the target task carries resource information; splitting the target task according to the resource information to obtain multiple subtasks, and determining the resources corresponding to the multiple subtasks.
[0054]
[0054] Specifically, resource information is used to describe the resources used to process the target task. Resource information includes but is not limited to the identifier of the resource, the number of resources, etc. The resource is used to process the target task and obtain the task processing result corresponding to the target task. The resource can be a service resource in the task processing system or a container resource in a node of a cloud cluster. The resource can be selected according to the actual situation, and the embodiment of the present disclosure does not impose any restrictions on this. A resource can process at least one subtask. In actual applications, the management unit corresponding to the resource (such as pod) can be controlled through the application programming interface.
[0055] (API, Application Programming Interface) Pulls subtasks belonging to a resource, or a resource can receive subtasks actively sent by the task processing system.
[0056]
[55] In actual applications, there are many ways to obtain target tasks, and the specific method is selected according to the actual situation. The embodiments of this disclosure do not impose any restrictions on this. In one possible implementation of this disclosure, the target task can be directly read from other data acquisition devices or databases. In another possible implementation of this disclosure, the target task can be received by the user actively sending it through the client. In another possible implementation of this disclosure, the task configuration information sent by the user can be received, and the target task is determined based on the task configuration information. For example, a set of scripts and configurations that meet the task processing specifications are received from the user actively sending it through the client, and the target observation task is generated based on the scripts and configurations.
[0057]
[56] It should be noted that after obtaining the target task, the target task may not be directly executed by the resource, or the efficiency of direct execution by the resource is low. Therefore, the target task can be split according to the resource information to obtain multiple subtasks. There are many ways to split the target task, and the specific selection should be made according to the actual situation. This disclosure does not impose any restrictions on this. In one possible implementation of this disclosure, the target task can be randomly split to obtain multiple subtasks. In another possible implementation of this disclosure, the target task can be split according to the resource information to obtain multiple subtasks that can be executed by the resource. Furthermore, a task splitting strategy can be obtained, and the target task can be split based on the task splitting strategy and resource information to obtain multiple subtasks. Among them, the task splitting strategy includes but is not limited to a point-to-point strategy, a specified resource list strategy, a strategy of any two resources among multiple resources, a strategy of combining any two resources among multiple resources, and a strategy of multiple resources. The point-to-point strategy indicates that tasks are split based on two specific resources among multiple resources. The specified resource list strategy indicates that tasks are split based on resources in a specified resource list among multiple resources. The any two resources strategy indicates that tasks are split based on any two resources among multiple resources. The any two resource combination strategy indicates that tasks are split based on any combination of two resources among multiple resources.
[0058]
[57] For example, assuming that the resource information indicates that there are three resources, namely resource 1, resource 2 and resource 3, and the task splitting strategy is a strategy for combining any two resources among multiple resources, it can be determined that any two resource combinations include [resource 1-resource 2], [resource 1-resource 3] and [resource 2-resource 3]. Therefore, the target task can be split into three subtasks.
[0059]
[58] Furthermore, after the target task is split into multiple subtasks, the resources corresponding to the multiple subtasks can be determined, that is, the corresponding relationship between the subtasks and the resources can be determined. Specifically, when determining the resources corresponding to the multiple subtasks, the resources can be randomly allocated to the multiple subtasks based on the idle status of the multiple resources. Alternatively, the resources corresponding to the multiple subtasks can be determined based on the types of tasks that can be processed by each resource and the types of tasks of each subtask. It is worth noting that when processing the target task, only the concepts of the target task and subtasks can be exposed to the user, without revealing the logic of subtask generation and resource operation, so as to make the interaction more concise.
[0060] Using the solution of the embodiments of the present disclosure, a target task is obtained, wherein the target task carries resource information. Based on the resource information, the target task is split into multiple subtasks, and the resources corresponding to the multiple subtasks are determined. By splitting the target task into multiple subtasks, sufficient preparation is made for parallel processing of the target task, ensuring stable operation of task processing.
[0061]
[0060] Step 304: Identify resource dependencies between multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed.
[0062] In one or more embodiments of the present disclosure, after obtaining multiple subtasks of a target task, simply processing the subtasks serially is extremely inefficient. Furthermore, because each resource can only process one subtask at a time, and whether the processing of a subtask requires the participation of one or multiple resources is uncertain, concurrent processing of all subtasks is difficult. Based on the above analysis, in embodiments of the present disclosure, the dependencies between subtasks and resources can be analyzed to determine the task processing logic. Specifically, after obtaining multiple subtasks of a target task, the resource dependencies between the subtasks can be further identified, and the subtasks can be divided based on the identification results to obtain multiple subtask sets.
[0063] Specifically, the identification results include whether a resource dependency exists between subtasks and whether a resource dependency does not exist between subtasks. A resource dependency describes a constraint relationship between multiple subtasks due to sharing the same resource. For example, resource 1 processes subtask 1, resource 2 processes subtask 2, and resource 1 processes subtask 3. Since subtask 1 and subtask 3 are processed by the same resource 1, a resource dependency exists between subtask 1 and subtask 3, no resource dependency exists between subtask 1 and subtask 2, and no resource dependency exists between subtask 2 and subtask 3. A subtask set is a set consisting of multiple subtasks that do not have a resource dependency. Using the above example, subtask 1 and subtask 2 may constitute subtask set A, and subtask 2 and subtask 3 may constitute subtask set B.
[0064]
[0063] It should be noted that there are various ways to identify resource dependencies between multiple subtasks, and the method to be used depends on the actual situation. This is not limited in the embodiments of the present disclosure. In one possible implementation of the present disclosure, the resources corresponding to each subtask can be obtained. If any two subtasks have the same corresponding resources, that is, they use the same resources for processing, it indicates that the two subtasks are mutually exclusive, that is, there is a resource dependency relationship. If any two subtasks have different corresponding resources, it indicates that there is no resource dependency relationship between the two subtasks. In another possible implementation of the present disclosure, a pre-built task relationship graph can be obtained, and the resource dependency relationship between the multiple subtasks can be determined based on the task relationship graph.
[0065] In practical applications, after identifying resource dependencies between multiple subtasks, multiple subtasks that do not have resource dependencies can be directly grouped into a subtask set. After all subtasks are grouped, multiple subtask results can be obtained. Furthermore, to ensure that no subtasks are omitted from the subtask set, a task relationship graph can be constructed based on the identification results, and the task relationship graph can be used to determine multiple subtask sets.
[0066]
[0065] In a possible implementation of the present disclosure, the above-mentioned division of multiple subtasks according to the recognition results to obtain multiple subtask sets may include the following steps: determining, according to the recognition results, subtasks in the multiple subtasks that do not have resource dependencies; constructing a task relationship graph with the multiple subtasks as nodes and based on the edges obtained by connecting the subtasks that do not have resource dependencies; screening out multiple task relationship subgraphs from the task relationship graph, and determining multiple subtask sets based on the multiple task relationship subgraphs, wherein there are edges between the nodes in the task relationship subgraphs, and the subtask sets correspond one-to-one to the task relationship subgraphs.
[0067]
[0066] Specifically, two subtasks connected in the task relationship diagram indicate that there are no common resources involved in processing between the two subtasks, that is, the two subtasks can be processed in parallel.
[0068]
[0067] It should be noted that when selecting multiple task relationship subgraphs from the task relationship graph, it is desirable that the task relationship subgraphs include the largest possible number of subtasks, with each subtask being connected to the other. Solving the task relationship subgraph can be understood as a maximum clique problem. The target solution to this problem has been proven to be impossible to solve efficiently in polynomial time. Therefore, the disclosed embodiment employs an approximate algorithm to solve the problem. For a certain set of subtasks, all subtasks in the set have an edge in the task relationship graph, indicating that all subtasks in the set can be processed in parallel.
[0069]
[0068] Further, after screening out multiple task relationship subgraphs, for any task relationship subgraph, the multiple subtasks included in the task relationship subgraph can be divided into the same subtask set, thereby obtaining the subtask set corresponding to the task relationship subgraph.
[0070]
[0069] Referring to FIG. 4, FIG. 4 shows a schematic diagram of a task relationship graph in a task processing method provided by an embodiment of the present disclosure. As shown in FIG. 4, the task relationship graph includes subtask 1, subtask 2, subtask 3, subtask 4, subtask 5, and subtask 6. Subtask 1, subtask 2, and subtask 5 form a task relationship subgraph. This task relationship subgraph is the subgraph with the largest number of subtasks in the task relationship graph, and the task relationship graphs are connected in pairs.
[0070] Using the solution of the embodiment of the present disclosure, based on the recognition results, subtasks without resource dependencies are determined among the multiple subtasks; a task relationship graph is constructed based on the edges obtained by connecting the subtasks without resource dependencies using the multiple subtasks as nodes; multiple task relationship subgraphs are screened from the task relationship graph, and multiple subtask sets are determined based on the multiple task relationship subgraphs. By determining the subtask sets based on the task relationship graph, it is ensured that the subtask sets include the largest number of subtasks that are connected in pairs, thereby improving the concurrency of task processing.
[0071]
[0071] In an optional embodiment of the present disclosure, after the above-mentioned identification of resource dependencies between multiple subtasks and division of the multiple subtasks according to the identification results to obtain multiple subtask sets, the following steps may also be included: obtaining the subtask to be divided of the target task; for a first subtask set, identifying the resource dependency between the subtask to be divided and multiple first subtasks in the multiple subtask sets, wherein the first subtask set is any one of the multiple subtask sets; in the case that there is no resource dependency between the subtask to be divided and the multiple first subtasks, dividing the subtask to be divided into the first subtask set.
[0072]
[0072] Specifically, the subtask to be divided refers to a subtask whose subtask set is not determined. The method of obtaining the subtask to be divided of the target task is the same as the method of obtaining the subtask of the target task, and the embodiment of the present disclosure will not be repeated.
[0073] In practical applications, after obtaining the subtasks to be divided of the target task, all subtask sets can be traversed to identify the resource dependency relationships between the subtasks in each subtask set and the subtasks to be divided. If the subtask to be divided does not have a resource dependency relationship with each subtask in a certain subtask set, that is, each node in the task relationship subgraph corresponding to the subtask to be divided and the certain subtask set is connected by an edge, the subtask to be divided is divided into the subtask set. If no subtask set can be found in all subtask sets that does not have a resource dependency relationship with each subtask in the subtask set, a subtask set is constructed for the subtask to be divided.
[0074]
[0074] It should be noted that after determining the subtask set to be divided into subtasks, the subtasks in the set can be processed in parallel using the subtask set as a unit.
[0075] Using the solution of the embodiment of the present disclosure, a target task's subtasks to be divided are obtained; for a first subtask set, resource dependencies between the subtask to be divided and multiple first subtasks in multiple subtask sets are identified, where the first subtask set is any one of the multiple subtask sets; and if no resource dependencies exist between the subtask to be divided and the multiple first subtasks, the subtask to be divided is assigned to the first subtask set. By accurately determining the subtask set to which the subtask to be divided belongs, the stability of task parallel processing is ensured, thereby improving task processing efficiency.
[0076]
[0076] Step 306: For the target subtask set in the multiple subtask sets, call the resources corresponding to the multiple target to-be-processed subtasks in the target subtask set, perform concurrent processing on the multiple target to-be-processed subtasks, and obtain processing results of the multiple target to-be-processed subtasks.
[0077]
[0077] In one or more embodiments of the present disclosure, multiple subtasks of a target task are obtained; resource dependencies between the multiple subtasks are identified, and the multiple subtasks are divided according to the identification results. After obtaining multiple subtask sets, further, for a target subtask set in the multiple subtask sets, resources corresponding to multiple target to-be-processed subtasks in the target subtask set can be called, and the multiple target to-be-processed subtasks are processed concurrently to obtain processing results of the multiple target to-be-processed subtasks.
[0078] Specifically, concurrent processing refers to executing multiple tasks simultaneously at the same time. The target subtask set can be any one of the multiple subtask sets, or it can be the subtask set with the largest number of subtasks in the target subtask set. For example, during task processing, the subtask set with the largest number of subtasks is selected from all subtask sets, and each subtask in this subtask set is processed concurrently.
[0079]
[0079] By applying the solution of the embodiments of the present disclosure, since there is no resource dependency between the multiple pending subtasks included in the subtask set, indicating that the multiple pending subtasks do not share resources, the multiple pending subtasks within the subtask set can be processed in parallel, using the subtask set as a unit. By considering and analyzing the dependencies and associations between subtasks and resources during task processing, task processing efficiency is improved while ensuring task processing stability.
[0080]
[0080] In an optional embodiment of the present disclosure, in order to improve the concurrency capability of task processing, a subtask set including the largest number of subtasks may be selected as the target subtask set. After concurrent processing of the target to-be-processed subtasks in the target subtask set begins, before selecting the target subtask set for concurrent processing in each round, the multiple subtasks may be updated based on the processing status of the multiple subtasks, and the subtask set may be re-divided to ensure that the target subtask set determined in each round of task processing includes as many subtasks as possible. That is, after the above-mentioned target subtask set in the multiple subtask sets is targeted, resources corresponding to the multiple target to-be-processed subtasks in the target subtask set are called, the multiple target to-be-processed subtasks are concurrently processed, and processing results of the multiple target to-be-processed subtasks are obtained, the following steps may also be included: updating the multiple subtasks based on the processing status of the multiple subtasks to obtain the updated multiple subtasks; returning to the step of identifying resource dependencies between the multiple subtasks, and dividing the multiple subtasks based on the identification results to obtain the multiple subtask sets, until the processing of the multiple subtasks is completed and the task processing result of the target task is obtained.
[0081]
[0081] Specifically, the processing status of a subtask includes unprocessed (new), processing (running) and processed (completed), where unprocessed means that the subtask is waiting to be processed, processing means that the subtask is in the process of being processed, and processed means that the subtask has been completed.
[0082] In actual applications, multiple subtasks can be updated based on their processing status to obtain the updated subtasks in various ways, and the method chosen depends on actual circumstances. The present disclosure does not impose any limitations on this method. In one possible implementation of the present disclosure, since subtasks with a processed status do not affect the processing of other subtasks, subtasks with a processed status can be deleted. Because subtasks with resource dependencies on subtasks in the processing status cannot be processed simultaneously with subtasks in the processing status and are therefore not selected for processing in the current round, subtasks with resource dependencies on subtasks in the processing status can be temporarily deleted. For candidate subtasks that were in the processing status in the previous round and have a processed status in the current round, subtasks with resource dependencies on the candidate subtasks can be restored to obtain the updated subtasks.
[0082]
[0083] Using the solution of the embodiments of the present disclosure, the multiple subtasks are updated based on their processing status to obtain updated subtasks. The process then returns to identify resource dependencies between the multiple subtasks and, based on the identification results, divides the multiple subtasks to obtain multiple subtask sets. This process continues until the multiple subtasks are processed and the task processing result of the target task is obtained. By updating the multiple subtasks, the number of subtasks in the subtask set selected for each round of concurrent processing is maximized, thereby improving task processing concurrency.
[0083]
[0084] In another possible implementation of the present disclosure, the updating of the plurality of subtasks according to the processing statuses of the plurality of subtasks to obtain the updated plurality of subtasks may include the following steps: filtering out target subtasks from the plurality of subtasks according to the processing statuses, wherein the target subtasks include subtasks with a processing status of being processed and subtasks with no resource dependency relationship with the subtasks with a processing status of being processed and with a processing status of being unprocessed; and deleting subtasks other than the target subtask from the plurality of subtasks to obtain the updated plurality of subtasks.
[0084]
[0085] It should be noted that when selecting a target subtask from multiple subtasks based on their processing status, the processing status of each of the multiple subtasks can be first obtained. Subtasks with a processing status of "in progress" and subtasks with no resource dependencies on subtasks with a processing status of "unprocessed" can then be identified as target subtasks. There are various methods for obtaining the processing status of each of the multiple subtasks, and the method of choice depends on the specific circumstances. The present disclosure does not impose any limitations on this method. In one possible implementation of the present disclosure, subtask processing logs can be obtained from a database, and the processing status of each subtask can be determined based on the subtask processing logs. In another possible implementation of the present disclosure, a status query API of the task processing system can be called to obtain the processing status of each of the multiple subtasks.
[0085]
[0086] Using the solution of the embodiments of the present disclosure, a target subtask is selected from multiple subtasks based on their processing status. The target subtasks include subtasks with a processing status of "in progress" and subtasks with a processing status of "unprocessed" and no resource dependency on subtasks with a processing status of "in progress." Subtasks other than the target subtask are deleted from the multiple subtasks to obtain updated subtasks. By deleting subtasks other than the target subtask from the multiple subtasks to obtain updated subtasks, accurate updates of the multiple subtasks are ensured, thereby improving task processing concurrency.
[0086]
[0087] In an optional embodiment of the present disclosure, the above-mentioned target subtask set in multiple subtask sets, calling resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining processing results of the multiple target to-be-processed subtasks may also include the following steps: determining the processing priorities of the multiple subtask sets based on the number of subtasks in the multiple subtask sets; and determining the target subtask set based on the processing priorities.
[0087]
[0088] Specifically, the processing priority is used to describe the processing priority order of each subtask in the subtask set. A subtask set with a higher processing priority has more subtasks, and a subtask set with a lower processing priority has fewer subtasks.
[0088]
[0089] It should be noted that the task processing order of each subtask set can be determined according to the processing priority, the number of subtasks that can be processed simultaneously at the same time may not be limited, and the processing time of each subtask may not be limited.
[0089]
[0090] In practical applications, there are various ways to determine the target subtask set based on processing priority, and the specific method to be used depends on the actual situation. The embodiments of the present disclosure do not impose any limitation on this. In one possible implementation of the present disclosure, the subtask set with the highest processing priority can be directly determined as the target subtask set. In another possible implementation of the present disclosure, multiple subtask sets can be sorted in descending order of processing priority, and the subtask set with the highest sorting priority can be determined as the target subtask set.
[0090]
[0091] Using the solution of the embodiments of the present disclosure, the processing priorities of multiple subtask sets are determined based on the number of subtasks in the multiple subtask sets. A target subtask set is then determined based on the processing priorities. By determining the target subtask set based on the processing priorities, the target subtask set is guaranteed to contain the largest number of target pending subtasks, thereby improving task processing concurrency.
[0091]
[0092] In an optional embodiment of the present disclosure, the above-mentioned target subtask set in multiple subtask sets, calling resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining processing results of the multiple target to-be-processed subtasks may further include the following steps: updating the target subtask set according to the processing priority to obtain an updated target subtask set; returning to execute the step of calling resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining processing results of the multiple target to-be-processed subtasks, until the processing of multiple subtasks is completed, and obtaining the task processing result of the target task.
[0092]
[0093] It should be noted that after calling the resources corresponding to multiple target pending subtasks in the target subtask set and completing the concurrent processing of multiple target pending subtasks, the next round of task processing begins. At this time, the subtask set with the highest processing priority can be selected from the multiple unprocessed subtask sets based on the processing priority, and this subtask set is determined as the updated target subtask set.
[0093]
[0094] Using the solution of the embodiments of the present disclosure, the target subtask set is updated based on the processing priority to obtain an updated target subtask set. The process then returns to execute the steps of calling the resources corresponding to the multiple target pending subtasks in the target subtask set, concurrently processing the multiple target pending subtasks, and obtaining the processing results of the multiple target pending subtasks. This continues until the multiple subtasks are processed and the task processing result of the target task is obtained. By updating the target subtask set based on the processing priority, the target subtask set in each round of processing is ensured to be the subtask set with the largest number of subtasks, thereby improving the concurrent processing capability of tasks.
[0094]
[0095] In practical applications, system observability is a major issue in the software field. Good observability can better help developers and operations personnel monitor and understand the status of systems or applications. Traditional system observation relies on logs, metrics, and events output by the monitored system. Because these outputs are pre-built into the system, insufficient coverage of embedded observation points can lead to unobservable situations. Furthermore, developers and operations personnel cannot provide additional input to traditional observation systems; system outputs are all based on user requests. Therefore, traditional observation systems focus more on observation capabilities and lack testability (testing and probing). For example, in container network connectivity testing, the observation system needs to generate executable tasks between specific nodes. If connectivity testing is performed between any two nodes in the entire cluster, N executable tasks will be generated. A simple task execution plan executes tasks serially, but this is inefficient. A fully parallel execution plan is also obviously inefficient because different executable tasks may depend on the same node.
[0095]
[0096] Therefore, the embodiment of the present disclosure proposes a solution for concurrent processing in an observable system based on parallel dependency analysis. The observable system has observations of logs, indicators and events, but focuses on active external input detection projects.
[0096] (e.g., a container network detection project). The detection project can be a script customized by R&D and operation and maintenance personnel. As an observable system, it is necessary to help R&D and operation and maintenance personnel generate specific executable distributed tasks.
[0097]
[0097] The following further describes the task processing method provided by the present disclosure, using the application of the task processing method in a container network detection scenario as an example, with reference to FIG5. FIG5 shows a flowchart of a container network detection method provided by one embodiment of the present disclosure, which specifically includes the following steps.
[0098]
[0098] Step 502: Acquire multiple subtasks of the target detection task.
[0099]
[0099] Step 504: Identify the container resource dependency relationship between the multiple subtasks, and divide the multiple subtasks according to the identification result to obtain multiple subtask sets, wherein the subtask set includes multiple subtasks to be processed, and there is no container resource dependency relationship between the multiple subtasks to be processed.
[0100] Step 506: For the target subtask set in the multiple subtask sets, call the container resources corresponding to the multiple target to-be-processed subtasks in the target subtask set, concurrently process the multiple target to-be-processed subtasks, and obtain container network detection results for the multiple target to-be-processed subtasks.
[0100]
[0101] It should be noted that the implementation of steps 502 to 506 is the same as the implementation of steps 302 to 306 described above, and will not be described in detail in this embodiment of the present disclosure.
[0101]
[0102] Using the solution of the disclosed embodiments, since there are no container resource dependencies between the multiple pending subtasks within a subtask set, indicating that they do not share container resources, the multiple pending subtasks within the subtask set can be processed in parallel, using the subtask set as a unit. By analyzing the dependencies and associations between subtasks and container resources during target detection task processing, the efficiency of target detection tasks is improved while ensuring processing stability.
[0102]
[0103] Referring to Figure 6, a flowchart illustrating the processing process of a container network detection method provided by one embodiment of the present disclosure is shown. As shown in Figure 6, a user can submit a target task to a processing platform within a task processing system. The processing platform can also manage the target task. The processing platform can generate and distribute multiple subtasks within the target task. After generating the subtasks, the processing platform maps the subtasks to container resources on the nodes and distributes the subtasks to the pedestal pods within each node in the cluster. Alternatively, the pedestal pods can request tasks from the processing platform. After the container resources in the cluster concurrently process the subtasks, the pedestal pods can report the subtask status to the processing platform.
[0103]
[0104] 7 , which shows a process flow chart of a task processing method provided by an embodiment of the present disclosure, specifically including:
[0104]
[0105] The user submits a task to the task processing system; the processing platform in the task processing system generates a target task based on the task and waits for scheduling; when processing the target task, the target task can be split into multiple subtasks; the multiple subtasks are analyzed concurrently to determine the subtasks that can be processed concurrently; the subtasks that can be processed concurrently are sent to the corresponding resources, and the resources are scheduled to process the subtasks; after the scheduled resources have completed the execution of the subtasks, it can be determined whether all the subtasks of the target task have been executed; if so, the target task generated based on the task is returned to wait for scheduling; if not, the target task generated based on the task is returned to the concurrent analysis of the multiple subtasks to determine the subtasks that can be processed concurrently, and the subtasks that can be processed concurrently are sent to the corresponding resources, and the resources are scheduled to process the subtasks until all the subtasks of the target task have been executed, and then a new target task generated based on the task is returned to wait for scheduling.
[0105]
[0106] Corresponding to the above-mentioned task processing method embodiment, the present disclosure also provides a task processing device embodiment. FIG8 shows a schematic structural diagram of a task processing device provided by one embodiment of the present disclosure. As shown in FIG8 , the device includes:
[0106]
[0107] A first acquisition module 802 is configured to acquire multiple subtasks of a target task;
[0107]
[0108] A first division module 804 is configured to identify resource dependencies between multiple subtasks and divide the multiple subtasks according to the identification result to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and there is no resource dependency between the multiple to-be-processed subtasks;
[0108]
[0109] The first processing module 806 is configured to call resources corresponding to multiple target to-be-processed subtasks in the target subtask set for the target subtask set in the multiple subtask sets, concurrently process the multiple target to-be-processed subtasks, and obtain processing results of the multiple target to-be-processed subtasks.
[0109]
[0110] Optionally, the first partitioning module 804 is further configured to determine, based on the identification results, subtasks among the multiple subtasks that do not have resource dependencies; construct a task relationship graph using the multiple subtasks as nodes and based on edges obtained by connecting the subtasks that do not have resource dependencies; filter out multiple task relationship subgraphs from the task relationship graph, and determine multiple subtask sets based on the multiple task relationship subgraphs, wherein edges exist between nodes in the task relationship subgraphs, and the subtask sets correspond one-to-one to the task relationship subgraphs.
[0110]
[0111] Optionally, the apparatus further includes: a determining module configured to determine processing priorities of the multiple subtask sets according to the number of subtasks in the multiple subtask sets; and determine a target subtask set according to the processing priorities.
[0111]
[0112] Optionally, the device also includes: a first update module, configured to update the target subtask set according to the processing priority to obtain an updated target subtask set; return to the step of executing and calling the resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining the processing results of the multiple target to-be-processed subtasks, until the processing of multiple subtasks is completed, and the task processing result of the target task is obtained.
[0112]
[0113] Optionally, the device further includes: a second updating module, configured to update the multiple subtasks according to the processing status of the multiple subtasks to obtain the updated multiple subtasks; return to execute the step of identifying the resource dependency relationship between the multiple subtasks, and dividing the multiple subtasks according to the identification results to obtain multiple subtask sets, until the multiple subtasks are processed and the task processing result of the target task is obtained.
[0113]
[0114] Optionally, the second updating module is further configured to filter out a target subtask from the multiple subtasks based on the processing status, wherein the target subtask includes a subtask with a processing status of being processed and a subtask that has no resource dependency relationship with the subtask with a processing status of being processed and has a processing status of being unprocessed; and delete subtasks other than the target subtask from the multiple subtasks to obtain the updated multiple subtasks.
[0114]
[0115] Optionally, the device also includes: an identification module, configured to obtain the subtasks to be divided of the target task; for the first subtask set, identifying the resource dependency relationship between the subtask to be divided and multiple first subtasks in multiple subtask sets, wherein the first subtask set is any one of the multiple subtask sets; if there is no resource dependency relationship between the subtask to be divided and the multiple first subtasks, dividing the subtask to be divided into the first subtask set.
[0115]
[0116] Optionally, the first acquisition module 802 is further configured to acquire a target task, wherein the target task carries resource information; split the target task according to the resource information to obtain multiple subtasks, and determine resources corresponding to the multiple subtasks.
[0116]
[0117] The solution of the disclosed embodiments enables parallel processing of multiple pending subtasks within a subtask set, as there are no resource dependencies between the multiple pending subtasks within the set. This indicates that the multiple pending subtasks do not share resources. By analyzing the dependencies and relationships between subtasks and resources during task processing, task processing efficiency is improved while ensuring stable processing.
[0117]
[0118] The above is a schematic diagram of a task processing device according to this embodiment. It should be noted that the technical solution of this task processing device and the technical solution of the task processing method described above are based on the same concept. For details not described in detail in the technical solution of the task processing device, please refer to the description of the technical solution of the task processing method described above.
[0118]
[0119] Corresponding to the above-mentioned container network detection method embodiment, the present disclosure also provides an embodiment of a container network detection device. FIG9 shows a schematic structural diagram of a container network detection device provided by one embodiment of the present disclosure. As shown in FIG9 , the device includes:
[0119]
[0120] A second acquisition module 902 is configured to acquire multiple subtasks of the target detection task;
[0120]
[0121] A second partitioning module 904 is configured to identify container resource dependencies between multiple subtasks and partition the multiple subtasks according to the identification result to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and no container resource dependencies exist between the multiple to-be-processed subtasks.
[0121]
[0122] The second processing module 906 is configured to, for a target subtask set in the multiple subtask sets, call container resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently process the multiple target to-be-processed subtasks, and obtain container network detection results for the multiple target to-be-processed subtasks.
[0122]
[0123] Using the solution of the disclosed embodiments, since there are no container resource dependencies between the multiple pending subtasks within a subtask set, indicating that they do not share container resources, the multiple pending subtasks within the subtask set can be processed in parallel, using the subtask set as a unit. By analyzing the dependencies and associations between subtasks and container resources during target detection task processing, the efficiency of target detection tasks is improved while ensuring processing stability.
[0124] The above is a schematic diagram of a container network detection device according to this embodiment. It should be noted that the technical solution of this container network detection device and the technical solution of the container network detection method described above share the same concept. For details not described in detail in the technical solution of the container network detection device, refer to the description of the technical solution of the container network detection method described above.
[0123]
[0125] Figure 10 shows a block diagram of a computing device according to one embodiment of the present disclosure. The components of computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020. Processor 1020 is connected to memory 1010 via a bus 1030, and database 1050 is used to store data.
[0124]
[0126] The computing device 1000 also includes an access device 1040 that enables the computing device 1000 to communicate via one or more networks 1060. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0125]
[0127] In one embodiment of the present disclosure, the aforementioned components of computing device 1000 and other components not shown in FIG. 10 may also be connected to one another, for example, via a bus. It should be understood that the computing device block diagram shown in FIG. 10 is for illustrative purposes only and does not limit the scope of the present disclosure. Those skilled in the art may add or replace other components as needed.
[0126]
[0128] Computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1000 may also be a mobile or stationary server.
[0127]
[0129] The processor 1020 is configured to execute a computer program / instruction, which implements the steps of the above-mentioned task processing method or container network detection method when executed by the processor.
[0128]
[0130] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device shares the same concept as the technical solutions of the task processing method and the container network detection method described above. For details not described in detail in the technical solution of the computing device, refer to the description of the technical solutions of the task processing method or the container network detection method described above.
[0129]
[0131] An embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned task processing method or container network detection method are implemented.
[0130]
[0132] The above is an illustrative embodiment of a computer-readable storage medium. It should be noted that the technical solution of this storage medium shares the same concept as the technical solutions of the aforementioned task processing method and container network detection method. For details not described in detail in the technical solution of the storage medium, refer to the description of the technical solutions of the aforementioned task processing method or container network detection method.
[0131]
[0133] An embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned task processing method or container network detection method.
[0132]
[0134] The above is an illustrative embodiment of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product shares the same concept as the technical solutions of the aforementioned task processing method and container network detection method. For details not described in detail in the technical solution of the computer program product, refer to the description of the technical solutions of the aforementioned task processing method or container network detection method.
[0133]
[0135] The foregoing description describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134]
[0136] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunication signals, and software distribution media. It should be noted that the content of the computer-readable medium may be appropriately increased or decreased based on the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0135]
[0137] It should be noted that, for ease of description, the aforementioned method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present disclosure are not limited by the order of the actions described. Depending on the embodiments of the present disclosure, certain steps may be performed in a different order or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily required for the embodiments of the present disclosure.
[0136]
[0138] In the above embodiments, the description of each embodiment is given with emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0137]
[0139] The preferred embodiments disclosed above are intended only to illustrate the present disclosure. The alternative embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of the embodiments disclosed. These embodiments are selected and described in detail to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize the present disclosure. The present disclosure is limited only by the claims and their full scope and equivalents.
Claims
Claims 1. A task processing method, comprising: Get multiple subtasks of the target task; Identifying resource dependencies between the multiple subtasks, and dividing the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and there is no resource dependency between the multiple to-be-processed subtasks; For a target subtask set in the multiple subtask sets, resources corresponding to multiple target to-be-processed subtasks in the target subtask set are called, the multiple target to-be-processed subtasks are processed concurrently, and processing results of the multiple target to-be-processed subtasks are obtained.
2. The method according to claim 1, wherein dividing the plurality of subtasks according to the recognition results to obtain a plurality of subtask sets comprises: According to the identification result, determining that there is no subtask with a resource dependency relationship among the multiple subtasks; Constructing a task relationship graph using the multiple subtasks as nodes and based on edges obtained by connecting the subtasks that do not have resource dependencies; A plurality of task relationship subgraphs are screened out from the task relationship graph, and the plurality of subtask sets are determined according to the plurality of task relationship subgraphs, wherein the edges exist between the nodes in the task relationship subgraphs, and the subtask sets correspond one-to-one to the task relationship subgraphs.
3. The method according to claim 1, wherein, for a target subtask set in the multiple subtask sets, calling resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining processing results of the multiple target to-be-processed subtasks, further comprises: Determine the processing priorities of the multiple subtask sets according to the number of subtasks in the multiple subtask sets; and determine the target subtask set according to the processing priorities.
4. The method according to claim 3, wherein for a target subtask set in the multiple subtask sets, resources corresponding to multiple target to-be-processed subtasks in the target subtask set are called, the multiple target to-be-processed subtasks are processed concurrently, and after obtaining processing results of the multiple target to-be-processed subtasks, the method further comprises: updating the target subtask set according to the processing priority to obtain an updated target subtask set; Return to the step of executing the calling of the resources corresponding to the multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining the processing results of the multiple target to-be-processed subtasks, until the processing of the multiple subtasks is completed, and obtaining the task processing result of the target task.
5. The method according to claim 1, wherein the target subtask set in the plurality of subtask sets 22 The method further comprises: calling resources corresponding to multiple target to-be-processed subtasks in the target subtask set, concurrently processing the multiple target to-be-processed subtasks, and obtaining processing results of the multiple target to-be-processed subtasks, and further comprising: updating the multiple subtasks according to the processing status of the multiple subtasks to obtain multiple updated subtasks; returning to execute the step of identifying resource dependencies between the multiple subtasks, and dividing the multiple subtasks according to the identification results to obtain multiple subtask sets, until the processing of the multiple subtasks is completed, and obtaining the task processing result of the target task.
6. The method according to claim 5, wherein updating the plurality of subtasks according to the processing status of the plurality of subtasks to obtain the updated plurality of subtasks comprises: According to the processing status, a target subtask is filtered out from the multiple subtasks, wherein the target subtask includes a subtask with a processing status of being processed and a subtask with no resource dependency relationship with the subtask with a processing status of being processed and a subtask with a processing status of being unprocessed; and subtasks other than the target subtask are deleted from the multiple subtasks to obtain a plurality of updated subtasks.
7. The method according to claim 1, further comprising: identifying resource dependencies between the plurality of subtasks and dividing the plurality of subtasks according to the identification results to obtain a plurality of subtask sets; Get the subtasks to be divided into the target task; For a first subtask set, identifying a resource dependency relationship between the subtask to be divided and a plurality of first subtasks in the plurality of subtask sets, wherein the first subtask set is any one of the plurality of subtask sets; In a case where there is no resource dependency relationship between the subtask to be divided and the plurality of first subtasks, the subtask to be divided is divided into the first subtask set.
8. The method according to claim 1, wherein obtaining a plurality of subtasks of a target task comprises: Acquire a target task, wherein the target task carries resource information; split the target task according to the resource information to obtain a plurality of subtasks, and determine resources corresponding to the plurality of subtasks.
9. A container network detection method, comprising: Obtain multiple subtasks of the target detection task; Identifying container resource dependencies between the multiple subtasks, and dividing the multiple subtasks according to the identification result to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and no container resource dependencies exist between the multiple to-be-processed subtasks; For the target subtask set in the multiple subtask sets, call multiple target subtasks in the target subtask set. The container resources corresponding to the target subtasks to be processed are marked, the multiple target subtasks to be processed are concurrently processed, and the container network detection results of the multiple target subtasks to be processed are obtained.
10. A task processing system comprising a processing platform and multiple resources; the processing platform is configured to obtain multiple subtasks of a target task; identify resource dependencies between the multiple subtasks, and divide the multiple subtasks according to the identification results to obtain multiple subtask sets, wherein: The subtask set includes multiple subtasks to be processed, and there is no resource dependency between the multiple subtasks to be processed; the resources are used to concurrently process the multiple target subtasks to be processed included in the target subtask set to obtain processing results of the multiple target subtasks to be processed, wherein the target subtask set is a set among the multiple subtask sets.
11. A task processing system, comprising a processing platform and multiple container resources in a cloud cluster; the processing platform is configured to obtain multiple subtasks of a target task; Identifying container resource dependencies between the multiple subtasks, and dividing the multiple subtasks according to the identification result to obtain multiple subtask sets, wherein the subtask sets include multiple to-be-processed subtasks, and no container resource dependencies exist between the multiple to-be-processed subtasks; The container resource is used to concurrently process multiple target to-be-processed subtasks included in a target subtask set to obtain processing results of the multiple target to-be-processed subtasks, wherein the target subtask set is a set in the multiple subtask sets.
12. A computing device, comprising: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 8 or claim 9 are implemented.
13. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of any one of claims 1 to 8 or the method of claim 9.
14. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of any one of claims 1 to 8 or the method of claim 9.
Citation Information
Patent Citations
Two-stage self-adaptive scheduling method suitable for large-scale parallel data processing tasks
CN108920261A
Task scheduling method, task scheduling system, storage medium and computer equipment
CN110134499A
Efficient data collection engine and application thereof
CN117112182A
Task parallel processing method, device and equipment based on deep learning
CN117369969A
Method and device for decomposing and scheduling basic model task with enhanced thinking map prompt
CN117370638A