Resource creation method and device based on directed acyclic graph, equipment and medium
By adopting a resource creation method based on directed acyclic graphs, the problem of code complexity in resource creation operations in cloud computing is solved, which simplifies the logic and improves maintainability.
Patent Information
- Application Number
- CN202311048818.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
In the field of cloud computing, resource creation operations require multiple modules to work together, which increases code complexity and reduces maintainability.
A resource creation method based on directed acyclic graphs is adopted. By receiving resource creation requests, searching serialized orchestration files, constructing target directed acyclic graphs, and creating resources based on these graphs.
It reduces the amount of code to write, simplifies the task execution logic, and improves maintainability.
Smart Images

Figure CN119493641A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud computing technology, and in particular to a resource creation method, device, equipment and medium based on a directed acyclic graph. Background Art
[0002] In the field of cloud computing, a series of operations such as resource creation usually consists of multiple consecutive tasks with dependencies, such as calling different modules to create virtual machines, networks, and storage disks.
[0003] In the related technology, some tasks require multiple modules to be called in coordination, such as combining modules through a reusable general application programming interface (API) interface or function, which requires writing or modifying a large amount of code logic and a large number of conditional judgment statements, thereby increasing the complexity of the code and reducing maintainability. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a resource creation method, device, equipment and medium based on a directed acyclic graph.
[0005] In a first aspect, the present disclosure provides a resource creation method based on a directed acyclic graph, comprising:
[0006] Receive resource creation request;
[0007] In response to the resource creation request, searching for a serialized orchestration file corresponding to the resource creation request;
[0008] Build the target directed acyclic graph according to the serialized orchestration file;
[0009] Create resources based on the target directed acyclic graph to obtain target resources.
[0010] In a second aspect, the present disclosure provides a resource creation device based on a directed acyclic graph, comprising:
[0011] A request receiving module, used for receiving a resource creation request;
[0012] A file search module, used to search for a serialized arrangement file corresponding to a resource creation request in response to the resource creation request;
[0013] The task construction module is used to build the target directed acyclic graph according to the serialized orchestration file;
[0014] The resource creation module is used to create resources based on the target directed acyclic graph to obtain target resources.
[0015] In a third aspect, the present disclosure provides a resource creation device based on a directed acyclic graph, comprising:
[0016] processor;
[0017] A memory for storing executable instructions;
[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the resource creation method based on the directed acyclic graph of the first aspect.
[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the directed acyclic graph-based resource creation method of the first aspect.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The directed acyclic graph-based resource creation method, apparatus, device and medium of the disclosed embodiments can receive a resource creation request, then respond to the resource creation request, search for a serialized orchestration file corresponding to the resource creation request, then build a target directed acyclic graph according to the serialized orchestration file, and finally create resources based on the target directed acyclic graph to obtain target resources. Thus, resource creation can be performed based on the target directed acyclic graph to obtain corresponding target resources, thereby reducing the amount of code that needs to be written, simplifying task running logic, and improving maintainability. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 A schematic diagram of a process of creating a resource based on a directed acyclic graph provided in an embodiment of the present disclosure;
[0024] Figure 2 A schematic diagram of a directed acyclic graph provided in an embodiment of the present disclosure;
[0025] Figure 3 A schematic diagram of a message proxy service provided by an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram of a task reentry process provided by an embodiment of the present disclosure;
[0027] Figure 5A schematic diagram of the structure of a resource creation device based on a directed acyclic graph provided in an embodiment of the present disclosure;
[0028] Figure 6 A schematic diagram of the structure of a resource creation device based on a directed acyclic graph provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] In order to solve the above problems, the embodiments of the present disclosure provide a resource creation method, apparatus, device and medium based on a directed acyclic graph. Figures 1 to 4 The resource creation method based on a directed acyclic graph provided by an embodiment of the present disclosure is described in detail.
[0036] Figure 1 A schematic flow chart of a resource creation method based on a directed acyclic graph provided in an embodiment of the present disclosure is shown.
[0037] In the embodiment of the present disclosure, the resource creation method based on the directed acyclic graph can be executed by a server, wherein the server can include but is not limited to servers such as cloud servers or cloud server clusters.
[0038] like Figure 1 As shown, the resource creation method based on the directed acyclic graph may include the following steps.
[0039] S110: Receive a resource creation request.
[0040] In an embodiment of the present disclosure, the server may receive a resource creation request.
[0041] Optionally, the resource creation request may be a request for creating a target resource.
[0042] Optionally, the target resource may be a resource that the user wants to create, for example, the target resource may be at least one of a virtual machine resource, a storage disk resource, and a network resource.
[0043] Specifically, when a user wants to create a target resource, such as a virtual machine resource, a storage disk resource, and a network resource, a resource creation request may be initiated to a server, and the server may receive the resource creation request.
[0044] S120: In response to the resource creation request, search for a serialization orchestration file corresponding to the resource creation request.
[0045] In an embodiment of the present disclosure, the server may search for a serialized orchestration file corresponding to the resource creation request in response to the resource creation request.
[0046] Optionally, the serialized orchestration file may be a file used for task orchestration. For example, the serialized orchestration file may be a data serialization (YAML Ain't Markup Language, yaml) file.
[0047] Specifically, after receiving the resource creation request, the server may respond to the resource creation request and search for a serialization orchestration file corresponding to the resource creation request.
[0048] S130: Construct a target directed acyclic graph according to the serialized arrangement file.
[0049] In the embodiment of the present disclosure, after finding the serialization orchestration file, the server may construct a target directed acyclic graph according to the serialization orchestration file.
[0050] Optionally, the target directed acyclic graph may be a process directed acyclic graph for creating target resources.
[0051] Specifically, after finding the serialized orchestration file, the server can build the corresponding target directed acyclic graph according to the content of the serialized orchestration file. When the function needs to be modified, the serialized orchestration file (yaml) can be directly updated, and the corresponding target directed acyclic graph can be built according to the updated yaml file, thereby realizing the update of the corresponding function.
[0052] S140. Create resources based on the target directed acyclic graph to obtain target resources.
[0053] In the disclosed embodiment, the server may create resources based on the target directed acyclic graph to obtain target resources.
[0054] Optionally, the resource creation may be to create a target resource according to a target directed acyclic graph.
[0055] Specifically, the server may perform resource creation tasks according to the target directed acyclic graph, thereby obtaining target resources.
[0056] Therefore, in the embodiment of the present disclosure, it is possible to receive a resource creation request, then respond to the resource creation request, find the serialized orchestration file corresponding to the resource creation request, then build a target directed acyclic graph according to the serialized orchestration file, and finally create resources based on the target directed acyclic graph to obtain the target resources. Thus, it is possible to create resources based on the target directed acyclic graph to obtain the corresponding target resources, thereby reducing the amount of code that needs to be written, simplifying the task running logic, and improving maintainability.
[0057] Optionally, before S120, the directed acyclic graph-based resource creation method may further include: generating a serialized orchestration file in response to task orchestration operations for multiple plug-ins.
[0058] In an embodiment of the present disclosure, the server may generate a serialized orchestration file in response to a task orchestration operation on a plurality of plug-ins.
[0059] Optionally, the plurality of plug-ins may be pre-packaged plug-ins, wherein each plug-in may include a task.
[0060] Optionally, the task scheduling operation may be an operation of performing task scheduling on multiple plug-ins.
[0061] Specifically, the server may first encapsulate multiple tasks into corresponding multiple plug-ins, and the user may perform task orchestration operations on the multiple plug-ins. The server may generate corresponding serialized orchestration files according to the task orchestration operations.
[0062] Optionally, the serialization orchestration file may include multiple keywords.
[0063] Optionally, the user may perform task scheduling operations through keywords, wherein the keywords may include at least one of workflow-level keywords, task-level keywords, and data-level keywords.
[0064] For example, workflow-level keywords may include workflow, requireArgs, inputField, task, etc.
[0065] Workflow: The name of the workflow service body and workflow, which is responsible for managing the execution process between multiple tasks. It describes the execution order, dependency relationship and method, input and output, etc. between tasks. It is defined in the YAML file. Each workflow can contain multiple tasks.
[0066] When uploading a yaml file to etcd, the name / seraph / yaml / workflow is used as the key, and the actual data of the yaml file is stored in etcd as the value. When calling the workflow interface, the workflow name is used as the outermost layer of the resource creation request.
[0067] Task: A customized task encapsulates an action. It adds some input / output and flow conditions to the general action that implements minimal functions, making it customized and dedicated to the task. It is defined in the yaml file. Each task corresponds to an action, that is, each task can correspond to a plug-in.
[0068] Action: The smallest general execution unit. An action is a command or an API request. An action is only focused on completing a general small task (such as sending a request to create a virtual machine, deleting a virtual machine, etc., which only contains a Hypertext Transfer Protocol (HTTP) operation).
[0069] requireArgs: Verify the input parameters in the resource creation request. The verifiable properties may include name, type, whether the parameter is allowed to exist (notnull), etc.
[0070] inputField: The parameter in the request body that you want to use in this workflow. If a parameter exists in the request body but does not exist in the inputField of the yaml, it cannot be used. If a parameter does not exist in the request body but exists in the inputField of the yaml, the value of the parameter will be set to "null inputField" of the string type.
[0071] For example, task-level keywords may include Name, action, sync-response, foreach, Params, publish, on-if, on-success, on-failure, on-complete, and so on.
[0072] Name: The name of the task, which can be customized by the user.
[0073] action: The action defined in the code corresponding to the task must have its executable method defined in the code and registered in the action register.
[0074] sync-response: If set to true, some execution results in the task can be returned to the caller as a synchronous response. If the task is executed successfully, the value of sync_response will be returned to the user in the caller's synchronous response body; if the task fails to execute, an error message will be returned to the user.
[0075] foreach: splits the current task into multiple sub-tasks according to the foreach data source. The name of the sub-task = the name of the parent task * the number of branches - the current branch. Each sub-task can obtain a certain data in the foreach data source through the .each_one keyword, and the subsequent tasks of the sub-task can obtain this data through .each_one.
[0076] Params: The input parameters of the task, corresponding to the parameters of the executable action in the code.
[0077] publish: Publish certain variables and use them as global variables of subsequent tasks.
[0078] on-if: After the current task is executed successfully, you can also use on-if to filter the tasks to be executed.
[0079] on-success, on-failure, on-complete: indicate success, failure, and the subordinate task to be executed after success or failure, respectively.
[0080] For example, data-level keywords may include parent_result, result, publish, each_one, and so on.
[0081] parent_result: Gets the execution result map of the parent task. You can continue to use the dot operator. to get the data of subsequent layers.
[0082] Result: Gets the execution result map of the current task. You can continue to use the dot operator. to get the data of the subsequent layers. As data that can be obtained after the task is executed, it can only be used as a data source for the publish and on-if keywords.
[0083] publish: published variables, refer to the task keyword publish.
[0084] each_one: sub-task variable, refer to the task keyword foreach.
[0085] Specifically, a user may perform task orchestration operations on multiple plug-ins through multiple keywords, and the server may generate a serialized orchestration file according to the task orchestration operations.
[0086] Therefore, a variety of keywords are used to realize rich serialization arrangement files, which greatly improves the controllability of the task process.
[0087] Optionally, the serialization arrangement file may further include multiple tasks and connection relationships between the multiple tasks.
[0088] Optionally, the multiple tasks may be tasks corresponding to multiple plug-ins.
[0089] Optionally, the connection relationship between multiple tasks can be used to represent the connection relationship between every two tasks. For example, the connection relationship can be an execution order relationship, a dependency relationship, and an output / input relationship.
[0090] Optionally, S130 may specifically include: determining a plurality of tasks in the serialized orchestration file; and combining and constructing the plurality of tasks according to connection relationships between the plurality of tasks in the serialized orchestration file to obtain a target directed acyclic graph.
[0091] In the embodiment of the present disclosure, the server may determine multiple tasks in a serialized orchestration file.
[0092] Specifically, the server may determine, according to the serialized orchestration file, a plurality of tasks that require the construction of a directed acyclic graph.
[0093] Furthermore, the server may combine and construct the multiple tasks according to the connection relationship between the multiple tasks in the serialized orchestration file to obtain a target directed acyclic graph.
[0094] Specifically, the server may combine and construct multiple tasks according to the connection relationship between multiple tasks in the serialized orchestration file, for example, combine and construct the execution order relationship, dependency relationship, and output / input relationship of multiple tasks, so as to obtain a target directed acyclic graph.
[0095] Figure 2 A schematic diagram of a directed acyclic graph provided by an embodiment of the present disclosure is shown.
[0096] like Figure 2 As shown, A, B, C, D, and E can be tasks corresponding to multiple plug-ins, such as Figure 2 The five tasks can be combined and constructed on the left. For example, if task A is the first task to be executed, after task A is executed, task B or task C can be executed according to different results, that is, the execution order relationship, dependency relationship, and output / input relationship among each task can be constructed. Figure 2 The right side can be the order in which one of the tasks is executed, that is, task A is executed first, then task B, and finally task E.
[0097] This reduces the amount of code that needs to be written, simplifies the task operation logic, and improves maintainability.
[0098] Optionally, the resource creation method based on a directed acyclic graph may further include: during the process of creating resources based on the target directed acyclic graph, detecting a failure event of a target task among multiple tasks, stopping resource creation; and performing a deletion rollback operation on the target directed acyclic graph.
[0099] In an embodiment of the present disclosure, during the process of creating resources based on the target directed acyclic graph, the server may detect a failure event of a target task among multiple tasks and stop creating resources.
[0100] Optionally, the failure event can be used to indicate that the target task fails to execute.
[0101] Specifically, during the process of creating resources based on the target directed acyclic graph, if the server detects that a target task among multiple tasks fails, such as a failure of task B, the server stops creating resources based on the target directed acyclic graph.
[0102] Furthermore, the server may perform a delete rollback operation on the target directed acyclic graph.
[0103] Optionally, the deletion rollback operation may be an operation of performing a deletion rollback on the created resources.
[0104] Specifically, after a target task fails, the server can perform a delete rollback operation on the target directed acyclic graph. For example, after a task B fails, the server can perform a delete rollback operation on the created task A, so that the task A can be restarted later. This can prevent resource leakage.
[0105] Optionally, the directed acyclic graph-based resource creation method may further include: performing an asynchronous monitoring operation through a message proxy service to obtain execution status of multiple tasks.
[0106] In the disclosed embodiment, the server may perform asynchronous monitoring operations through a message proxy service to obtain the execution status of multiple tasks.
[0107] Optionally, the message proxy service may be a service for performing asynchronous monitoring.
[0108] Specifically, the server can perform asynchronous monitoring operations through the message proxy service to obtain the execution status of multiple tasks, thereby avoiding the large amount of resource consumption caused by polling the API interface or database to check the task execution status.
[0109] Figure 3 A schematic diagram of a message proxy service provided by an embodiment of the present disclosure is shown.
[0110] like Figure 3 As shown, in the task process of creating resources based on the target directed acyclic graph, the server can use the message proxy service to implement event-driven asynchronous listening operations through the registration, publishing, and subscription modes, that is, to obtain the completion status of each task and forward the corresponding results to the server.
[0111] Figure 4 A schematic diagram of a task reentry process provided by an embodiment of the present disclosure is shown.
[0112] like Figure 4 As shown, when the server creates resources based on the target directed acyclic graph, it executes to task B, at which point the task stops. When the task is continued to be executed next time, the server can detect that task B has been executed, and thus continue to execute task C.
[0113] Figure 5 A schematic structural diagram of a resource creation device based on a directed acyclic graph provided by an embodiment of the present disclosure is shown.
[0114] like Figure 5As shown, the resource creation device 500 based on a directed acyclic graph may include a request receiving module 510 , a file searching module 520 , a task building module 530 and a resource creation module 540 .
[0115] The request receiving module 510 may be configured to receive a resource creation request.
[0116] The file search module 520 may be configured to search for a serialized orchestration file corresponding to a resource creation request in response to the resource creation request.
[0117] The task construction module 530 may be used to construct a target directed acyclic graph according to the serialized orchestration file.
[0118] The resource creation module 540 can be used to create resources based on the target directed acyclic graph to obtain target resources.
[0119] Therefore, in the embodiment of the present disclosure, it is possible to receive a resource creation request, then respond to the resource creation request, find the serialized orchestration file corresponding to the resource creation request, then build a target directed acyclic graph according to the serialized orchestration file, and finally create resources based on the target directed acyclic graph to obtain the target resources. Thus, it is possible to create resources based on the target directed acyclic graph to obtain the corresponding target resources, thereby reducing the amount of code that needs to be written, simplifying the task running logic, and improving maintainability.
[0120] In some embodiments of the present disclosure, the directed acyclic graph-based resource creation device 500 may further include a file generation module.
[0121] The file generation module may be used to generate a serialized orchestration file in response to a task orchestration operation for multiple plug-ins before searching for a serialized orchestration file corresponding to the resource creation request in response to the resource creation request.
[0122] In some embodiments of the present disclosure, the serialized orchestration file may include multiple keywords, and the keywords may include at least one of workflow-level keywords, task-level keywords, and data-level keywords.
[0123] In some embodiments of the present disclosure, the serialized orchestration file may further include multiple tasks and connection relationships between the multiple tasks.
[0124] In some embodiments of the present disclosure, the task construction module 530 may specifically include a task determination unit and a combination construction unit.
[0125] The task determination unit may be used to determine a plurality of tasks in a serialized orchestration file.
[0126] The combination construction unit can be used to combine and construct multiple tasks according to the connection relationship between the multiple tasks in the serialized orchestration file to obtain a target directed acyclic graph.
[0127] In some embodiments of the present disclosure, the directed acyclic graph-based resource creation device 500 may further include a creation stop module and a deletion rollback module.
[0128] The creation stop module can be used to detect a failure event of a target task among multiple tasks during the process of creating resources based on the target directed acyclic graph, and stop the resource creation.
[0129] The delete rollback module can be used to perform a delete rollback operation on a target directed acyclic graph.
[0130] In some embodiments of the present disclosure, the directed acyclic graph-based resource creation device 500 may further include an asynchronous monitoring module.
[0131] The asynchronous monitoring module can be used to perform asynchronous monitoring operations through the message proxy service to obtain the execution status of multiple tasks.
[0132] It should be noted that Figure 5 The resource creation device 500 shown in the figure can execute Figures 1 to 4 The various steps in the method embodiment shown in the figure are implemented Figures 1 to 4 The various processes and effects in the method embodiment shown are not described in detail here.
[0133] Figure 6 A schematic structural diagram of a resource creation device based on a directed acyclic graph provided by an embodiment of the present disclosure is shown.
[0134] In some embodiments of the present disclosure, Figure 6 The resource creation device based on the directed acyclic graph shown can be a server device. Specifically, the server can include but is not limited to servers such as cloud servers or cloud server clusters.
[0135] like Figure 6 As shown, the directed acyclic graph-based resource creation device may include a processor 601 and a memory 602 storing computer program instructions.
[0136] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0137] The memory 602 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 602 is a non-volatile solid-state memory. In a particular embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0138] The processor 601 reads and executes the computer program instructions stored in the memory 602 to perform the steps of the resource creation method based on the directed acyclic graph provided in the embodiment of the present disclosure.
[0139] In one example, the directed acyclic graph-based resource creation device may further include a transceiver 603 and a bus 604. Figure 6 As shown, the processor 601, the memory 602 and the transceiver 603 are connected via a bus 604 and communicate with each other.
[0140] The bus 604 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 604 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0141] The embodiment of the present disclosure further provides a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the resource creation method based on a directed acyclic graph provided by the embodiment of the present disclosure.
[0142] The above-mentioned storage medium may, for example, include a memory 602 of computer program instructions, and the above-mentioned instructions may be executed by a processor 601 of a resource creation device based on a directed acyclic graph to complete the resource creation method based on a directed acyclic graph provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0143] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0144] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource creation method based on a directed acyclic graph, characterized in that: include: Receive resource creation request; In response to the resource creation request, searching for a serialization orchestration file corresponding to the resource creation request; Constructing a target directed acyclic graph according to the serialized orchestration file; Resources are created based on the target directed acyclic graph to obtain target resources.
2. The method according to claim 1, characterized in that Before searching, in response to the resource creation request, for a serialized orchestration file corresponding to the resource creation request, the method further includes: In response to the task orchestration operation for the plurality of plug-ins, the serialized orchestration file is generated.
3. The method according to claim 1, characterized in that The serialized orchestration file includes a plurality of keywords, wherein the keywords include at least one of workflow-level keywords, task-level keywords, and data-level keywords.
4. The method according to claim 1, characterized in that The serialization arrangement file also includes a plurality of tasks and connection relationships between the plurality of tasks.
5. The method according to claim 4, characterized in that The step of constructing a target directed acyclic graph according to the serialized orchestration file includes: Determining the plurality of tasks in the serialized orchestration file; The multiple tasks are combined and constructed according to the connection relationship between the multiple tasks in the serialized orchestration file to obtain the target directed acyclic graph.
6. The method according to claim 5, characterized in that The method further comprises: In the process of creating resources based on the target directed acyclic graph, detecting that a failure event occurs in a target task among the multiple tasks, and stopping the resource creation; A delete rollback operation is performed on the target directed acyclic graph.
7. The method according to claim 5, characterized in that The method further comprises: An asynchronous monitoring operation is performed through a message proxy service to obtain the execution status of the multiple tasks.
8. A resource creation device based on a directed acyclic graph, characterized in that: include: A request receiving module, used for receiving a resource creation request; A file search module, configured to search for a serialized arrangement file corresponding to the resource creation request in response to the resource creation request; A task construction module, used to construct a target directed acyclic graph according to the serialized orchestration file; The resource creation module is used to create resources based on the target directed acyclic graph to obtain target resources.
9. A resource creation device based on a directed acyclic graph, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the resource creation method based on a directed acyclic graph as described in any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the resource creation method based on a directed acyclic graph as described in any one of claims 1 to 7.