Workflow processing method and apparatus, device, and storage medium

By automatically identifying target containers and creating workflow instances, the problem of low workflow deployment efficiency is solved, enabling efficient and flexible workflow deployment and scheduling, and improving instance resource utilization and service stability.

WO2025246167A1PCT designated stage Publication Date: 2025-12-04BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/127801
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

In existing technologies, workflow deployment is inefficient, and traditional solutions require manual deployment of workflows to servers, which affects deployment efficiency and flexibility.

Method used

By responding to a received workflow deployment request, the system automatically identifies the target container and creates at least one instance of the workflow, updates routing information to bind to the instance address, and sends the request to the target instance, thus implementing a serverless framework that improves deployment efficiency and flexibility.

Benefits of technology

It improves the deployment and scheduling efficiency of workflows, enhances instance resource utilization, and ensures service stability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024127801_04122025_PF_FP_ABST
    Figure CN2024127801_04122025_PF_FP_ABST
Patent Text Reader

Abstract

According to the embodiments of the present disclosure, provided are a workflow processing method and apparatus, a device, and a storage medium. The method comprises: in response to receiving a deployment request for a workflow, determining a target container for deploying the workflow; sending a loading message to the target container so as to instruct the target container to obtain a compiled file of the workflow and create at least one instance of the workflow; and updating routing information of the workflow so as to bind the workflow to an address of the at least one instance, so that a request for the workflow is sent to a target instance among the at least one instance on the basis of the routing information. Thus, the embodiments of the present disclosure can improve workflow deployment efficiency, workflow scheduling efficiency, and the flexibility of workflow deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, equipment and storage media for processing workflows Technical Field

[0001] The exemplary embodiments disclosed herein relate generally to the field of computers, and more particularly to methods, apparatus, devices, and computer-readable storage media for processing workflows. Background Technology

[0002] With the development of computer technology, code development methods have become increasingly convenient. People can not only develop single functions in the development environment, but also build workflows by orchestrating multiple functions. Such workflows can be deployed to corresponding servers to provide services corresponding to the workflow.

[0003] Summary of the Invention

[0004] In a first aspect of this disclosure, a method for processing a workflow is provided. The method includes: in response to receiving a deployment request for a workflow, determining a target container for deploying the workflow; sending a load message to the target container to instruct the target container to acquire a compiled file of the workflow and create at least one instance of the workflow; and updating routing information of the workflow to bind the workflow to the address of the at least one instance, such that requests for the workflow are sent to the target instance in the at least one instance based on the routing information.

[0005] In a second aspect of this disclosure, an apparatus for processing a workflow is provided. The apparatus includes: a determining module configured to determine a target container for deploying the workflow in response to receiving a deployment request for the workflow; a sending module configured to send a loading message to the target container, instructing the target container to acquire a compiled file of the workflow and create at least one instance of the workflow; and an updating module configured to update routing information of the workflow to bind the workflow to the address of at least one instance, such that requests for the workflow are sent to the target instance among the at least one instance based on the routing information.

[0006] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.

[0007] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the method of the first aspect.

[0008] In a fifth aspect of this disclosure, a computer program product is provided. The computer program product includes computer-executable instructions that, when executed by a processor, implement the method of the first aspect.

[0009] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0011] Figure 1 shows a schematic diagram in which a workflow processing system according to embodiments of the present disclosure may be implemented;

[0012] Figure 2 illustrates a flowchart of an example process of a processing workflow according to some embodiments of the present disclosure;

[0013] Figure 3 illustrates a schematic diagram of a management instance process according to some embodiments of the present disclosure;

[0014] Figure 4 illustrates a schematic diagram of a process for another management instance according to some embodiments of the present disclosure;

[0015] Figure 5 shows a schematic structural block diagram of an example apparatus for processing workflows according to some embodiments of the present disclosure; and

[0016] Figure 6 shows a block diagram of an electronic device capable of implementing several embodiments of the present disclosure. Detailed Implementation

[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0018] It should be noted that the headings of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and embodiments of any type may be included under any section / subsection. Furthermore, embodiments described in any section / subsection may be combined in any way with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0019] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0020] The embodiments of this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with applicable laws, regulations, and relevant provisions. In the embodiments of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, in implementing the embodiments of this disclosure, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained in accordance with relevant laws and regulations through appropriate means. The specific methods of notification and / or authorization may vary depending on the actual situation and application scenario, and the scope of this disclosure is not limited in this respect.

[0021] In this specification and the embodiments, any processing of personal information will be carried out only under the premise of legality (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information other than that necessary for basic functions will not affect the user's use of basic functions.

[0022] In some scenarios, developers can write workflows in the development environment and then compile and deploy them. However, according to traditional methods, developers need to manually deploy such workflows to the corresponding servers to provide the services. This affects the deployment efficiency of workflows.

[0023] In view of this, embodiments of the present disclosure propose a scheme for processing workflows. The scheme includes: in response to receiving a deployment request for a workflow, determining a target container for deploying the workflow; further, sending a load message to the target container to instruct the target container to obtain the compiled files of the workflow and create at least one instance of the workflow; further, updating the routing information of the workflow to bind the workflow to the address of at least one instance, such that requests for the workflow are sent to the target instance among the at least one instance based on the routing information.

[0024] In this manner, embodiments of the present disclosure can automatically determine the target container and automatically create at least one instance of the workflow in response to a received workflow deployment request, thereby improving workflow deployment efficiency. Furthermore, by supporting the creation of multiple instances of the workflow within a container, embodiments of the present disclosure can also achieve instance-level scheduling of the workflow, thereby improving scheduling efficiency.

[0025] Furthermore, embodiments of this disclosure improve the flexibility of workflow deployment by binding the workflow to the address of at least one instance, so that requests for the workflow can be processed by the target instance of at least one instance.

[0026] The following section provides a detailed description of various example implementations of this scheme, with reference to the accompanying drawings.

[0027] Example Environment

[0028] Figure 1 shows a schematic diagram of a workflow processing system 100 that can be implemented according to embodiments of the present disclosure. As shown in Figure 1, the workflow processing system 100 may include a control unit 110.

[0029] In the workflow processing system 110, the control unit 110 can, in response to receiving a deployment request for the workflow, determine the target container (container 120) for deploying the workflow; further, the control unit 110 can send a load message to the container 120 to instruct the container 120 to obtain the compiled file of the workflow, and the container 120 can create at least one instance of the workflow based on the compiled file; further, the control unit 110 can update the routing information of the workflow to the naming service 130, and the naming service 130 can bind the workflow to the address of the at least one instance; further, the routing acquisition unit 140 can, in response to receiving a request for the workflow, obtain the routing information of the workflow from the naming service 130, and based on the routing information of the workflow, send the request for the workflow to the target instance in the at least one instance in the container 120.

[0030] In some embodiments, the business unit 150 may send the workflow created by the user to the compilation unit 160 so that the compilation unit 160 compiles the workflow; further, the business unit 150 may automatically send a deployment request for the workflow to the control unit in response to the successful compilation by the compilation unit 160, or the business unit 150 may also receive the user's deployment instruction in response to the successful compilation by the compilation unit 160, and send the deployment request for the workflow to the control unit based on the user's deployment instruction.

[0031] In some embodiments, in response to successful compilation of the workflow, compilation unit 160 can generate a compiled file of the workflow. Based on this, container 120 can obtain the compiled file of the workflow from compilation unit 160.

[0032] In some embodiments, the service unit 150 may send a request for the workflow to the routing acquisition unit 140. The request for the workflow may include, but is not limited to, requests initiated by a user or initiated automatically by a program. Thus, the routing acquisition unit 140 may receive the request for the workflow.

[0033] It should be understood that the control unit 110, container 120, naming service 130, routing acquisition unit 140, business unit 150, and compilation unit 160 can be configured in the same / different terminals or servers and communicate with each other via communication connections. Users can interact with the workflow processing system 100 via electronic devices (including terminals and / or servers) and / or their attached devices where the business unit 150 is deployed.

[0034] Specifically, the terminal can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable gaming terminals, VR / AR devices, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal may also support any type of user-facing interface (such as "wearable" circuitry).

[0035] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Servers can also include computing systems / servers, such as mainframes, edge computing nodes, and computing devices in cloud environments, etc.

[0036] Communication connections can be established via wired or wireless means. These connections may include, but are not limited to, Bluetooth, mobile network, Universal Serial Bus (USB), and Wireless Fidelity (WiFi) connections; the embodiments of this disclosure are not limited in this respect. In the embodiments of this disclosure, the control unit 110, container 120, naming service 130, routing acquisition unit 140, service unit 150, and compilation unit 160 can interact via communication connections to achieve signaling exchange.

[0037] It should be understood that the structure and function of the various elements in the workflow processing system 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0038] The following description will continue with reference to the accompanying drawings, which will provide some exemplary embodiments of this disclosure.

[0039] Example process

[0040] Figure 2 shows a flowchart of an example process 200 for processing a workflow according to some embodiments of the present disclosure. Process 200 can be implemented at a workflow processing system 100. Process 200 will now be described with reference to Figure 1.

[0041] At box 210, in response to receiving a workflow deployment request, workflow processing system 100 determines the target container for deploying the workflow.

[0042] As examples, deployment requests can originate from business unit 150, or from its appropriate data processing unit or electronic device. Taking a deployment request originating from business unit 150 as an example, business unit 150 can present a workflow editing interface to the user to obtain the workflow edited by the user, or it can provide an interface to receive workflows, etc. Based on the workflow, business unit 150 can send a deployment request for that workflow to control unit 110 in workflow processing system 100. The deployment request is used to request the deployment of the workflow in workflow processing system 100; specifically, the deployment request can be used to request the deployment of the compiled files corresponding to the workflow in the form of a service in workflow processing system 100.

[0043] Furthermore, in response to receiving a workflow deployment request, the control unit 110 can determine the target container (e.g., container 120) for deploying the workflow from the containers of the workflow processing system 100. Container 120 may be deployed with a workflow virtual machine, and container 120 provides the ability to deploy workflows based on the workflow virtual machine.

[0044] In some embodiments, the workflow processing system 100 may further include a container manager, which can manage the containers of the workflow processing system 100. In response to receiving a deployment request for a workflow, the control unit 110 sends the deployment request to the container manager. The container manager determines the container 120 for deploying the workflow based on a container scheduling policy to improve the resource utilization of container resources. The container scheduling policy can be set according to actual needs, which will not be described in detail in this disclosure.

[0045] Furthermore, since deploying workflows directly in containers can lead to many timeliness issues, such as the need for the workflow processing system 100 to frequently scale the container up and down in the event of a sudden surge in workflow requests, resulting in a long response delay and affecting the processing efficiency of the workflow processing system 100, the embodiments of this disclosure also provide a scheme for creating at least one instance corresponding to the workflow.

[0046] At box 220, workflow processing system 100 sends a load message to target container to instruct target container to obtain the compiled file of workflow and create at least one instance of workflow.

[0047] In some embodiments, the control unit 110 in the workflow processing system 100 sends a load message for a workflow to a determined container 120 for loading the workflow. In response to receiving the load message, the container 120 obtains the compiled file of the workflow. Further, based on the compiled file of the workflow, the container 120 creates at least one instance capable of executing the workflow.

[0048] As examples, the compiled file can be a compiled file generated by compilation unit 160 in response to the completion of workflow compilation, or a compiled file obtained by compiling the workflow in other ways. An instance is a workflow instance; executing an instance that loads the workflow can implement the service corresponding to the workflow. At least one instance can independently execute the workflow and independently implement the service corresponding to the workflow.

[0049] In some embodiments, the workflow processing system 100 can control the number of at least one instance to improve the resource utilization of the instance. Specifically, the workflow processing system 100 can periodically obtain status messages from at least one instance of the workflow, the status messages indicating the resource usage status of at least one instance; and adjust the number of at least one instance of the workflow based on the resource usage status.

[0050] As examples, status messages can indicate the resource usage status of a corresponding instance, such as the usage status of compute resources, storage resources, and network resources.

[0051] In some embodiments, the workflow processing system 100 may include a management unit to facilitate the scheduling of management instances. Specifically, the control unit 110 in the workflow processing system 100 periodically obtains status messages from at least one instance of the workflow and sends the status messages to the management unit. Based on the resource usage status of at least one instance indicated by the status message, the management unit adjusts the number of at least one instance of the workflow and instructs the control unit 110 to expand or shrink the number of at least one instance based on that number.

[0052] The following explanation is based on Figure 3. Figure 3 illustrates a schematic diagram of a management instance process according to some embodiments of the present disclosure. As shown in Figure 3, the number of instances in the workflow is 3. The control unit 110 can periodically obtain the status messages of instance 121 from instance 121, periodically obtain the status messages of instance 122 from instance 122, and periodically obtain the status messages of instance 123 from instance 123. Further, the control unit 110 sends the status messages of instances 121, 122, and 123 to the management unit 170. Based on the resource usage status of instances 121, 122, and 123 indicated by the status messages of instances 121, 122, and 123, the management unit 170 can determine whether it is necessary to increase or decrease the number of instances, so as to instruct the control unit 110 to expand or shrink instances 121, 122, and 123.

[0053] For example, if the resource usage status of instances 121, 122, and 123 indicates that their resource load is low, then control unit 110 can adjust the number of workflow instances to 2 or 1, etc. As another example, if the resource usage status of instances 121, 122, and 123 indicates that their resource load is high, requiring more instances to avoid high latency caused by queuing requests for the workflow. Based on this, control unit 110 can increase the number of workflow instances.

[0054] In some embodiments, the communication connection between the workflow instance and the control unit 110 may be lost due to instance failure, communication connection failure, or other reasons. Based on this, the control unit 110 can terminate the association between the workflow and the instance. Specifically, the control unit 110 terminates the association between the workflow and the first instance in response to not receiving a status message from the first instance of at least one instance within a predetermined time period.

[0055] As examples, the predetermined time period can be set according to the actual application. Taking 1 second as an example, if the control unit 110 does not receive a status message from the first instance within 1 second, it can be considered that the first instance is no longer able to provide the service corresponding to the workflow. Based on this, in order to ensure the normal operation of the service corresponding to the workflow, the control unit 110 can sever the association between the workflow and the first instance. Furthermore, the control unit 110 can also allocate services to other instances in at least one instance of the workflow.

[0056] In some embodiments, if too many first instances become disconnected, it may affect the speed at which the workflow processing system 100 responds to requests for workflows. Therefore, the number of instances can be checked periodically. Specifically, the control unit 110 can determine the number of valid instances associated with the workflow. Based on a comparison of this number with a target number, the control unit 110 creates additional instances associated with the workflow or terminates existing instances associated with the workflow.

[0057] As examples, a valid instance is an instance that has a normal communication connection with the control unit 110, meaning that the control unit 110 can receive status information from the valid instance within a predetermined time period. The target number can be determined based on the actual application, for example, based on the number of requests for the workflow, the preset number of request queues, etc.

[0058] Based on the numerical relationship between the number of valid instances associated with the workflow and the target number, the control unit 110 can determine whether there is redundancy or insufficiency of valid instances. Further, in response to the number of valid instances associated with the workflow being less than the target number, the control unit 110 can create additional instances associated with the workflow and update the routes of these additional instances, which can then run the workflow. Alternatively, in response to the number of valid instances associated with the workflow being greater than the target number, the control unit 110 can terminate existing instances associated with the workflow to reduce instance resource consumption; these existing instances are, for example, the aforementioned valid instances.

[0059] The following explanation is based on Figure 4. Figure 4 illustrates a schematic diagram of another instance management process according to some embodiments of the present disclosure. As shown in Figure 4, the control unit 110 may include an instance controller 111 and an instance number controller 112. The control unit 110 can use the instance controller 111 to decouple the workflow from the first instance (e.g., instance 123). The control unit 110 can also use the instance number controller 112 to control the number of instances to meet a target number (e.g., 3). Taking the allocation of a new instance 124 to the workflow by the control unit 110 as an example, the control unit 110 can update the routing information of instance 124 to the naming service 130 to facilitate subsequent service provision.

[0060] Based on this, by automatically determining the target container and automatically creating at least one instance of the workflow in response to a received workflow deployment request, the workflow deployment efficiency is improved. Furthermore, in order to improve service efficiency, the workflow processing system 100 can update the workflow routing information so as to quickly respond to requests for the workflow based on the routing information.

[0061] Returning to Figure 2, at box 230, the workflow processing system 100 updates the workflow's routing information to bind the workflow to the address of at least one instance, such that requests for the workflow are sent to the target instance in at least one instance based on the routing information.

[0062] As examples, the routing information of a workflow may include the address of at least one instance. Based on this, the control unit 110 can store the updated routing information of the workflow in the naming service 130 so that the subsequent routing acquisition unit 140 can quickly obtain the routing information of the workflow.

[0063] In some embodiments, a user can invoke the service corresponding to a workflow through the business unit 150. The business unit 150 can send a request for the workflow to the routing acquisition unit 140. In response to receiving the request for the workflow, the routing acquisition unit 140 obtains the routing information of the workflow from the naming service 130, thereby determining the address of at least one instance corresponding to the workflow. Further, based on the address of at least one instance, the routing acquisition unit 140 sends the request for the workflow to a target instance among the at least one instance. Based on this, the target instance can process the request for the workflow to provide the service corresponding to the workflow to the user.

[0064] In some embodiments, the route acquisition unit 140 may determine a second instance from at least one instance to instruct the second instance to process the request for the workflow. Specifically, in response to receiving a target request for the workflow, the route acquisition unit 140 may determine at least one instance corresponding to the workflow based on routing information; determine a second instance from the at least one instance; and send a first invocation message to the second instance to instruct the second instance to process the target request.

[0065] As examples, the second instance can be implemented through random scheduling.

[0066] In some embodiments, since the resources consumed by each instance in at least one instance may differ during operation, determining the second instance through random scheduling may lead to uneven resource usage among instances, affecting the stability of the workflow processing system 100. Therefore, the routing acquisition unit 140 can determine the second instance for processing the target request from at least one instance based on the resource usage status of at least one instance.

[0067] As examples, the route acquisition unit 140 can acquire the resource usage status of at least one instance from at least one instance. Further, the route acquisition unit 140 can identify instances among the at least one instance whose resource usage is below a preset threshold as second instances. Alternatively, the route acquisition unit 140 can sort the instances based on their resource usage status, and identify instances whose sorting order reaches a preset threshold as second instances, etc.

[0068] In some embodiments, the route acquisition unit 140 may also use an affinity scheduling method to determine the second instance. Specifically, the route acquisition unit 140 may determine the historical requests associated with the target request; and determine the instance used to process the historical requests as the second instance.

[0069] As examples, a historical request may be the same or similar to the task handled by the target request, and a historical request may be the same as the workflow requested to be scheduled by the target request. Based on this, the instance that handles the historical request can be regarded as an instance that is more compatible with the target request and identified as the second instance.

[0070] Furthermore, based on the determined address of the second instance, the routing acquisition unit 140 can send a first invocation request for the workflow to the second instance. Based on the first invocation request, the second instance executes the workflow compilation file loaded in the second instance to process the target request of the workflow.

[0071] In some embodiments, due to system, environmental, or other reasons, the process of the second instance processing the target request (i.e., the historical processing procedure) may fail to start or be interrupted. Based on this, the workflow processing system 100 can retry starting the second instance, i.e., request the restoration of the second instance. Specifically, the target request may include a restoration request for restoring the historical processing procedure of the workflow.

[0072] In some embodiments, the second instance may fail or be upgraded. Based on this, the workflow processing system 100 can replace the instance to ensure the stability of the service provided. Specifically, the route acquisition unit 140 may send a second invocation message to a third instance among at least one instance in response to determining that the second instance has failed to process the request or in response to the second instance being triggered for upgrade, to instruct the third instance to process the target request.

[0073] As examples, the process of scheduling the third instance can be implemented according to the steps of scheduling the second instance described above, or by other scheduling methods, which will not be elaborated further in this disclosure. Therefore, the embodiments of this disclosure, based on at least one instance of flexible scheduling, can achieve more flexible workflow deployment.

[0074] In this manner, embodiments of this disclosure can automatically determine the target container and automatically create at least one instance of the workflow in response to a received workflow deployment request, thereby improving workflow deployment efficiency. Furthermore, embodiments of this disclosure improve workflow deployment flexibility by binding the workflow to the address of at least one instance, allowing requests for the workflow to be processed by the target instance among at least one instance. Moreover, embodiments of this disclosure improve scheduling efficiency and instance resource utilization through scheduling decisions for at least one instance, and ensure the stability of services corresponding to subsequently scheduled workflows.

[0075] Example devices and equipment

[0076] Embodiments of this disclosure also provide corresponding apparatus for implementing the methods or processes described above. Figure 5 shows a schematic structural block diagram of an example apparatus 500 for processing workflows according to certain embodiments of this disclosure. Apparatus 500 may be implemented as or included in electronic device 110. The various modules / components in apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.

[0077] As shown in Figure 5, the apparatus 500 includes: a determining module 510 configured to determine a target container for deploying the workflow in response to receiving a deployment request for the workflow; a sending module 520 configured to send a loading message to the target container to instruct the target container to obtain the compiled files of the workflow and create at least one instance of the workflow; and an updating module 530 configured to update the routing information of the workflow to bind the workflow to the address of at least one instance, such that requests for the workflow are sent to the target instance in the at least one instance based on the routing information.

[0078] In some embodiments, the apparatus 500 further includes a number adjustment module configured to: periodically acquire status messages from at least one instance of the workflow, the status messages indicating the resource usage status of the at least one instance; and adjust the number of at least one instance of the workflow based on the resource usage status.

[0079] In some embodiments, the apparatus 500 further includes a release module configured to release the association between the workflow and the first instance in response to not receiving a status message from the first instance of at least one instance within a predetermined time period.

[0080] In some embodiments, the apparatus 500 further includes a number control module configured to: determine the number of valid instances associated with the workflow; and based on a comparison of the number with a target number, create additional instances associated with the workflow or terminate existing instances associated with the workflow.

[0081] In some embodiments, the apparatus 500 further includes a first processing module configured to: in response to receiving a target request for a workflow, determine at least one instance corresponding to the workflow based on routing information; determine a second instance from the at least one instance; and send a first invocation message to the second instance to instruct the second instance to process the target request.

[0082] In some embodiments, the first processing module is further configured to: determine a second instance from the at least one instance for processing the target request based on the resource usage status of the at least one instance.

[0083] In some embodiments, the first processing module is further configured to: determine a historical request associated with the target request; and determine an instance for processing the historical request as a second instance.

[0084] In some embodiments, the target request includes a recovery request for resuming historical processing of the workflow.

[0085] In some embodiments, the apparatus 500 further includes a second processing module configured to: in response to determining that the second instance has failed to process the request or in response to the second instance being triggered to upgrade, send a second invocation message to a third instance among at least one instance to instruct the third instance to process the target request.

[0086] The units included in device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units may be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units in device 500 may be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0087] Figure 6 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 600 shown in Figure 6 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 600 shown in Figure 6 can be used to implement the electronic device 110 of Figure 1 or the device 500 of Figure 5.

[0088] As shown in Figure 6, the electronic device 600 is in the form of a general-purpose electronic device. Components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 600.

[0089] Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data and accessible within electronic device 600.

[0090] Electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 6, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0091] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0092] Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0093] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

[0094] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0095] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0096] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0098] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A method for processing a workflow, comprising: determining a target container for deploying a workflow in response to receiving a deployment request of the workflow; sending a load message to the target container to instruct the target container to obtain a compiled file of the workflow and create at least one instance of the workflow; and updating routing information of the workflow to bind the workflow to an address of the at least one instance, such that a request for the workflow is sent to a target instance among the at least one instance based on the routing information. 2.The method of claim 1, further comprising: periodically obtaining a status message from the at least one instance of the workflow, the status message indicating a resource usage status of the at least one instance; and adjusting a number of the at least one instance of the workflow based on the resource usage status. 3.The method of claim 2, further comprising: dissociating the workflow from a first instance among the at least one instance in response to not receiving a status message from the first instance within a predetermined time period. 4.The method of claim 1, further comprising: determining a number of valid instances associated with the workflow; and creating an additional instance associated with the workflow or ending an existing instance associated with the workflow based on a comparison of the number with a target number. 5.The method of claim 1, further comprising: determining the at least one instance corresponding to the workflow based on the routing information in response to receiving a target request of the workflow; determining a second instance from the at least one instance; and sending a first invocation message to the second instance to instruct the second instance to process the target request. 6.The method of claim 5, wherein determining the second instance from the at least one instance comprises: determining the second instance from the at least one instance for processing the target request based on a resource usage status of the at least one instance. 7.The method of claim 5, wherein determining the second instance from the at least one instance comprises: determining a historical request associated with the target request; and determining an instance for processing the historical request as the second instance. 8.The method of claim 7, wherein the target request comprises a recovery request for recovering a historical processing process of the workflow. 9.The method of claim 5, further comprising: sending a second invocation message to a third instance among the at least one instance to instruct the third instance to process the target request in response to determining that the second instance fails to process the request or in response to the second instance being triggered to upgrade. 10.An apparatus for processing a workflow, comprising: a determining module configured to determine a target container for deploying a workflow in response to receiving a deployment request of the workflow; a sending module configured to send a load message to the target container to instruct the target container to obtain a compiled file of the workflow and create at least one instance of the workflow; and a routing module configured to update routing information of the workflow to bind the workflow to an address of the at least one instance, such that a request for the workflow is sent to a target instance among the at least one instance based on the routing information. ​ ​ ​ ​ ​ an updating module configured to update routing information of the workflow to bind the workflow to an address of the at least one instance, so that a request for the workflow is sent to a target instance among the at least one instance based on the routing information.

11. An electronic device, comprising: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions when executed by the at least one processing unit cause the electronic device to perform the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having stored thereon a computer program, the computer program being executable by a processor to implement the method according to any one of claims 1 to 9.

13. A computer program product tangibly stored in a computer storage medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Workflow deployment method and device, computer equipment and storage medium

    CN111966744A

  • Data processing method, device and equipment and readable storage medium

    CN117667322A

  • System and method for a distributed workflow system

    US20220308911A1

  • System and method for enhanced container deployment

    US20230222045A1

  • Systems and methods for state management and workflow completion

    US20230394407A1