Process engine asynchronous task processing method, system and equipment and medium

By encapsulating the external tasks of the process engine as messages and processing them using message queues and distributed workers, the problems of high coupling between the process engine and external services and large network overhead are solved, thereby improving resource utilization and system reliability.

CN121542067APending Publication Date: 2026-02-17INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511402590.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Traditional workflow engines suffer from high system coupling, service timeouts blocking processes, and low resource utilization when handling external service tasks. In particular, when external services are unavailable, the engine's performance degrades or even crashes. Furthermore, existing asynchronous task modes require clients to actively poll, increasing network overhead and making dynamic scaling difficult.

Method used

External tasks of the process engine are encapsulated as task messages and published to a message queue. The message queue is then used to push these messages to distributed workers. After successfully executing a task, the distributed workers send a completion request. Dead-letter queues and dead-letter exchanges are used to handle task failures, enabling automatic retry and status updates of tasks. This reduces the coupling between the process engine and external services, reduces network overhead, and avoids process blocking.

Benefits of technology

By decoupling the process engine from external services, network overhead is reduced, resource utilization and system reliability are improved, process blockage caused by service timeouts is avoided, and the overall system performance and availability are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542067A_ABST
    Figure CN121542067A_ABST
Patent Text Reader

Abstract

The invention relates to the field of business process management, and provides a process engine asynchronous task processing method, system and device and a medium, and the method comprises the steps: a process engine packages a current to-be-processed external task into a task message, and issues the task message to a message queue; the message queue pushes the task message to the distributed workers; and under the condition that the distributed worker successfully executes the task corresponding to the task message, sending an external task completion request to the process engine, and triggering the process engine to continuously execute the step of packaging the current external task to be processed into the task message by the process engine until the task is finished. According to the method, the decoupling characteristic of the message queue is utilized to reduce the coupling degree of the process engine and the external service, the message queue actively pushes the task message to the distributed worker to reduce the network overhead, and in addition, the distributed worker sends the completion request to the process engine to push the process to continue after the task is successfully executed. And flow blocking caused by service timeout is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of resource allocation, and particularly relates to a process engine asynchronous task processing method, system, device and medium. BACKGROUND

[0002] The traditional process engine, such as Camunda engine, adopts synchronous calling when processing external service tasks, and has problems of high system coupling degree, service timeout blocking process, low resource utilization, etc. When the external service is unavailable, a large number of process instances will be accumulated, resulting in engine performance degradation or even crash.

[0003] In the related art, although the external task mode of the Camunda engine supports asynchrony, the client needs to actively poll, which increases network overhead and is difficult to dynamically scale. SUMMARY

[0004] The present application provides a process engine asynchronous task processing method, system, device and medium to solve the technical problems that the existing process engine needs client active polling, increases network overhead and is difficult to dynamically scale.

[0005] The present application provides a process engine asynchronous task processing method, comprising the following steps: The process engine encapsulates the current to-be-processed external task as a task message, and publishes the task message to a message queue; The message queue pushes the task message to a distributed worker; The distributed worker sends an external task completion request to the process engine in the case of successfully executing the task corresponding to the task message, so as to trigger the process engine to continue executing the step of encapsulating the current to-be-processed external task as a task message by the process engine, until the task ends.

[0006] According to the process engine asynchronous task processing method provided by the present application, after the message queue pushes the task message to the distributed worker, it further comprises: The message queue sends an execution failure confirmation signal after the distributed worker fails to successfully execute the task corresponding to the task message; The message queue routes the task message in the message queue to a dead letter exchange in the case of receiving the execution failure confirmation signal; and, The dead letter exchange routes the task message to a dead letter queue, and re-routes the task message to the message queue after listening to the cache time of the task message in the dead letter queue reaching a target survival time.

[0007] According to the process engine asynchronous task processing method provided by the application, the target survival time is obtained by the following way: The dead letter exchanger determines the routing times corresponding to the task message; The dead letter exchanger determines the initial survival time corresponding to the task message; The dead letter exchanger determines the target survival time according to the initial survival time and the routing times.

[0008] According to the process engine asynchronous task processing method provided by the application, after the dead letter exchanger routes the task message to the dead letter queue and listens to the cache time of the task message in the dead letter queue reaching the target survival time, and then routes the task message to the message queue again, the method further comprises: The dead letter exchanger sends an indication message of business execution failure to the process engine when it is determined that the routing times corresponding to the task message reach the maximum routing times; The process engine updates the execution state of the external task corresponding to the task message to a failure state in the local state database and triggers a preset compensation process after receiving the indication message.

[0009] According to the process engine asynchronous task processing method provided by the application, the process engine encapsulates the current external task to be processed into a task message, comprising: The process engine determines the service type and the initial survival time of the current external task to be processed; The process engine encapsulates the current external task to be processed into a task message according to the service type and the initial survival time.

[0010] According to the process engine asynchronous task processing method provided by the application, after the process engine encapsulates the current external task to be processed into a task message and publishes the task message to a message queue, the method further comprises: The message queue sends a first confirmation signal to the process engine; The process engine updates the publishing state of the external task to a published state in the local state database after receiving the first confirmation signal fed back by the message queue.

[0011] According to the process engine asynchronous task processing method provided by the application, after the message queue pushes the task message to a distributed worker, the method further comprises: The distributed worker sends a second confirmation signal to the message queue after successfully executing the task corresponding to the task message; The message queue deletes the task message in the message queue after receiving the second confirmation signal of the distributed worker feedback.

[0012] The application further provides a process engine asynchronous task processing system, comprising: a process engine, configured to encapsulate a current external task to be processed into a task message, and publish the task message to a message queue; the message queue, configured to push the task message to a distributed worker; the distributed worker, configured to send an external task completion request to the process engine in the case that the task corresponding to the task message is successfully executed, so as to trigger the process engine to continue to execute the step of encapsulating a current external task to be processed into a task message until the task is completed.

[0013] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the process engine asynchronous task processing method according to any one of the above when executing the program.

[0014] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the process engine asynchronous task processing method according to any one of the above.

[0015] The application further provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the process engine asynchronous task processing method according to any one of the above.

[0016] The process engine asynchronous task processing method, system, device and medium provided by the application reduce the coupling degree of the process engine and external services by encapsulating a current external task to be processed of the process engine into a task message and publishing the task message to a message queue, and utilize the decoupling characteristics of the message queue; meanwhile, the task message is actively pushed to a distributed worker by the message queue, thereby reducing network overhead; in addition, the distributed worker sends a completion request to the process engine after the task is successfully executed to promote the process to continue, thereby avoiding process blocking caused by service timeout. Therefore, the process engine asynchronous task processing method provided by the application effectively improves resource utilization and overall system reliability. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0018] Figure 1 is one of the flow engine asynchronous task processing method provided by the embodiment of the application.

[0019] Figure 2 is the second flow engine asynchronous task processing method provided by the embodiment of the application.

[0020] Figure 3 is the structure diagram of the flow engine asynchronous task processing device provided by the embodiment of the application.

[0021] Figure 4 is the structure diagram of the electronic device provided by the embodiment of the application. DETAILED DESCRIPTION

[0022] To make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0023] The flow engine asynchronous task processing method of the embodiment of the present application, as shown in Figure 1 , comprises steps 110, 120 and 130.

[0024] Step 110: The flow engine encapsulates the current external task to be processed as a task message, and publishes the task message to a message queue.

[0025] In the embodiment, when the flow engine needs to call an external task during the execution of a process instance, for example, calls a payment interface, sends an email, queries a certain database, etc., the flow engine encapsulates all the information of the external task as a standard task message. Usually, the task message comprises but is not limited to the following message contents: Task ID: unique identification of the task; Process instance ID: used to inform the worker executing the task that the task belongs to which process instance; Task type: such as payment or email sending, etc. Task parameters: data required for executing the task, such as payment amount, recipient address, etc. Callback address: which address should be notified after the worker completes the task.

[0026] After the flow engine completes the encapsulation of the above message contents, the encapsulated task message is published to a designated message queue (RabbitMQ).

[0027] Step 120, the message queue pushes the task message to a distributed worker.

[0028] After the message queue receives the task message from the process engine, it pushes it to one or more distributed workers.

[0029] Usually, the message is pushed based on the publish-subscribe mode. That is, the message queue pushes the task message to a worker node that has subscribed and is idle.

[0030] In one example, it can be implemented through the Basic.Consume protocol. In other words, when the distributed worker starts, it registers itself as a consumer with the message queue, and then the message queue actively pushes the messages in the queue to the distributed worker that is ready.

[0031] Step 130, the distributed worker sends an external task completion request to the process engine to trigger the process engine to continue executing the step of encapsulating the current external task to be processed by the process engine into a task message until the end of the task, in the case of successfully executing the task corresponding to the task message.

[0032] Here, successful execution means that the distributed worker has completed the business logic completely and correctly according to the information in the task message, and no business exception or failure has occurred.

[0033] In this embodiment, the distributed worker sends an external task completion request to the process engine, which contains the original task ID and the execution result of the task (e.g. payment success voucher, email sending status, etc.).

[0034] After the process engine receives this external task completion request, it finds the corresponding process instance according to the task ID and wakes it up from the waiting state. Then, the process engine stores the execution result returned by the distributed worker into the process variable and continues to execute the next node of the process instance.

[0035] If the next node of the process instance is another external task, continue to return to execute the above steps until the entire process instance is executed.

[0036] The process engine asynchronous task processing method of the embodiment of the application encapsulates the current external task to be processed of the process engine as a task message and publishes the task message to a message queue, utilizes the decoupling characteristic of the message queue to reduce the coupling degree of the process engine and the external service, simultaneously, the message queue actively pushes the task message to a distributed worker, reduces network overhead, in addition, the distributed worker sends a completion request to the process engine after successful execution of the task to promote the process to continue, and process blocking caused by service timeout is avoided. Therefore, the process engine asynchronous task processing method provided by the application effectively improves resource utilization and overall system reliability.

[0037] It should be noted that each embodiment of the present application can be freely combined, the order can be changed or executed alone, and does not need to rely on or depend on a fixed execution order.

[0038] In some embodiments, after the message queue pushes the task message to the distributed worker, the method further comprises: The message queue sends an execution failure confirmation signal when the distributed worker fails to successfully execute the task message corresponding business; The message queue routes the task message in the message queue to a dead letter exchange when the execution failure confirmation signal is received; and, The dead letter exchange routes the task message to a dead letter queue, and re-routes the task message to the message queue when it is detected that the cache time of the task message in the dead letter queue reaches a target survival time.

[0039] In the embodiment, referring to Figure 2 As shown in the figure, during the execution of the task by the distributed worker, due to various reasons such as network timeout, external service error, business logic exception, etc., the task cannot be successfully completed. In this case, the distributed worker sends an execution failure confirmation signal to the message queue after confirming the task execution failure. The execution failure confirmation signal is implemented through a negative acknowledgment (NACK) mechanism. The distributed worker calls the NACK method to inform the message queue: “I failed to successfully process this task, please take it back”.

[0040] After the message queue receives the execution failure confirmation signal (i.e. NACK) from the distributed worker, the message queue does not directly put the failed task message back to the original queue, but routes the failed task message to a dead letter exchange (DLX) to isolate the failed task message from the normal business queue, so as to avoid interference with the normal task processing process.

[0041] After receiving the failed task message, the dead letter exchange routes the failed task message to a dead letter queue bound to the dead letter exchange, and the message is temporarily stored in the dead letter queue. When the failed task message is placed in the dead letter queue, a target time-to-live (TTL) is set for the failed task message, i.e., a delay time (for example, 5 minutes). When the delay time of the failed task message in the dead letter queue reaches the preset TTL, the failed task message is automatically woken up. At this time, the dead letter queue re-routes the message back to the original message queue.

[0042] The flow engine asynchronous task processing method of the embodiment of the application eliminates the flow blockage caused by service failure by using the automatic retry mechanism of the dead letter queue, and thus improves the system availability.

[0043] In some embodiments, the target time-to-live is obtained in the following manner: The dead letter exchange determines the routing times corresponding to the task message; The dead letter exchange determines the initial time-to-live corresponding to the task message; The dead letter exchange determines the target time-to-live according to the initial time-to-live and the routing times.

[0044] In the embodiment, the interval of each retry is flexibly set by using the exponential backoff strategy. In other words, the more the routing times (i.e., the more times the task fails), the longer the waiting time before the next retry.

[0045] Specifically, after receiving the failed task message routed by the message queue, the dead letter exchange first checks the routing times of the failed task message. For example, when the failed task message is routed to the dead letter queue for the first time, the counter is set to 1. When the failed task message is re-routed from the dead letter queue back to the original message queue and routed to the dead letter queue again, the counter is updated to 2, and so on.

[0046] In addition, the dead letter exchange also obtains the initial time-to-live preset for the task message. The initial time-to-live is a configuration value. It can be globally uniform, or different initial values can be set for different types of tasks (such as payment, notification, and data analysis). The initial time-to-live represents how long the task should wait before the first retry after the first failure.

[0047] The dead letter exchange combines the initial time-to-live and the routing times to calculate the target time-to-live that should be waited for this time. Usually, the exponential backoff strategy is used, i.e., the target time-to-live = initial time-to-live * 2 (路由次数-1) .

[0048] The flow engine asynchronous task processing method of the embodiment of the application avoids invalid high-frequency retries when the service is busy, and improves the probability of automatic retry success through gradually increasing the waiting time, by calculating a dynamically increasing target survival time for each failed retry.

[0049] In some embodiments, the dead letter exchange routes the task message to a dead letter queue, and after listening to the cache time of the task message in the dead letter queue reaching a target survival time, the dead letter exchange further includes: The dead letter exchange sends an indication message of service execution failure to the flow engine in a case where the number of routings corresponding to the task message reaches a maximum number of routings; The flow engine updates the execution state of the external task corresponding to the task message to a failure state in a local state database after receiving the indication message, and triggers a preset compensation process.

[0050] In the embodiment, the dead letter exchange synchronously records the number of routings of the task each time the task message is re-routed from the dead letter queue back to the original message queue; when it is judged that the current number of routings has reached a preset maximum number of routings, subsequent retries are no longer performed, and an indication message of service execution failure is directly sent to the flow engine.

[0051] Here, the indication message usually needs to contain key identification information to ensure that the flow engine can accurately locate the task, for example: task ID, process instance ID, failure reason, cumulative number of failures, etc., to avoid the flow engine being unable to match the corresponding process instance due to missing information.

[0052] The flow engine updates the execution state of the task to a failure state in a local state database after receiving the indication message of service execution failure, to ensure that the process instance state is consistent with the actual business result; in addition, a pre-configured compensation process is triggered to perform a repair mechanism for the failed task, to avoid business data inconsistency or process interruption.

[0053] The flow engine asynchronous task processing method of the embodiment of the application sets a maximum number of routings, and after the number of routings reaches the maximum number of routings, the dead letter exchange informs the flow engine of failure, and then the flow engine updates the task failure state and triggers a compensation process, to prevent invalid resource consumption and ensure that the process instance state is consistent with the business result.

[0054] In some embodiments, the flow engine encapsulates the current external task to be processed as a task message, including: The flow engine determines the service type and initial survival time of the current external task to be processed; The process engine encapsulates the current external task to be processed as a task message according to the service type and the initial survival time.

[0055] In the embodiment, when the process engine is ready to process an external task, the service type and the initial survival time of the current external task to be processed need to be determined.

[0056] In an example, the process engine checks the definition of the current external task, such as a payment service, a mail notification service, or a stock deduction service. Then the service type of the external task is determined according to the definition of the external task. Further, the process engine checks the initial survival time of the current external task, which represents how long the task should wait before the first retry after the first failure. Finally, the service type, the initial survival time, and all other necessary information of the external task are packaged together as a standardized task message.

[0057] In some embodiments, after the process engine encapsulates the current external task to be processed as a task message and publishes the task message to the message queue, the method further comprises: The message queue sends a first confirmation signal to the process engine; The process engine updates the publishing state of the external task to a published state in the local state database after receiving the first confirmation signal fed back by the message queue.

[0058] When the message queue successfully receives and persists (writes to disk) the message, it actively returns a confirmation signal, i.e., the first confirmation signal, to the process engine. The first confirmation signal is used to inform the process engine that the task message has not been lost in the transmission process from the process engine to the message queue.

[0059] After receiving the first confirmation signal sent by the message queue, the process engine updates the local state database. Specifically, the process engine finds the corresponding external task record in its local state database according to the task ID contained in the first confirmation signal, and then updates the publishing state of the task from to-be-published or being-published to published.

[0060] The asynchronous task processing method of the process engine in the embodiment of the application ensures the reliability of the task message from the process engine to the message queue through the receipt mechanism.

[0061] In some embodiments, after the message queue pushes the task message to the distributed worker, the method further comprises: The distributed worker sends a second confirmation signal to the message queue after successfully executing the task corresponding to the task message; The message queue deletes the task message in the message queue after receiving the second confirmation signal of the distributed worker feedback.

[0062] In this embodiment, the distributed worker actively sends a second confirmation signal to the message queue to inform the message queue that the task has been completed after successfully executing the business logic corresponding to the task message.

[0063] After receiving the second confirmation signal sent by the worker, the message queue finds the corresponding task message through the message unique identifier in the second confirmation signal, and completely deletes the message from the message queue, so that the message is no longer pushed to other worker nodes.

[0064] The flow engine asynchronous task processing method of the embodiment of the application sends a second confirmation signal to the message queue after the distributed worker successfully executes the task, and the message queue deletes the corresponding task message after receiving the second confirmation signal, which not only avoids the task from being repeatedly consumed to cause business exceptions, but also timely releases the queue storage resources.

[0065] The flow engine asynchronous task processing system provided by the application will be described below, and the flow engine asynchronous task processing system described below can be correspondingly referred to the flow engine asynchronous task processing method described above.

[0066] The flow engine asynchronous task processing system of the embodiment of the application, as shown in Figure 3 includes: The flow engine 310 is configured to encapsulate the current external task to be processed by the flow engine into a task message, and publish the task message to a message queue. The message queue 320 is configured to push the task message to a distributed worker. The distributed worker 330 is configured to send an external task completion request to the flow engine in the case that the task corresponding to the task message is successfully executed, so as to trigger the flow engine to continue to execute the step of encapsulating the current external task to be processed by the flow engine into a task message until the task is completed.

[0067] The flow engine asynchronous task processing system of the embodiment encapsulates the current external task to be processed by the flow engine into a task message and publishes the task message to a message queue, reduces the coupling degree of the flow engine and external services by using the decoupling characteristics of the message queue, and at the same time, the message queue actively pushes the task message to the distributed worker to reduce network overhead. In addition, the distributed worker sends a completion request to the flow engine after successfully executing the task to promote the process to continue, which avoids the process blocking caused by service timeout. Therefore, the flow engine asynchronous task processing system provided by the application effectively improves the resource utilization and the overall reliability of the system.

[0068] Figure 4 An example of a schematic diagram of a physical structure of an electronic device is shown in Figure 4 The electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communications bus 440. The processor 410 can invoke a logical instruction in the memory 430 to execute a flow engine asynchronous task processing method, which includes: The flow engine encapsulates a current external task to be processed as a task message and publishes the task message to a message queue; The message queue pushes the task message to a distributed worker; The distributed worker sends an external task completion request to the flow engine in the case of successfully executing the task corresponding to the task message, so as to trigger the flow engine to continue to execute the step of encapsulating a current external task to be processed as a task message by the flow engine until the end of the task.

[0069] In addition, the logical instruction in the memory 430 described above can be implemented in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium, includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and each kind of medium that can store program codes.

[0070] On the other hand, the present application also provides a computer program product, which includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the flow engine asynchronous task processing method provided by each method, which includes: The flow engine encapsulates a current external task to be processed as a task message and publishes the task message to a message queue; The message queue pushes the task message to a distributed worker; The distributed worker sends an external task completion request to the process engine to trigger the process engine to continue to execute the step of encapsulating the current to-be-processed external task into a task message until the task ends, in a case where the distributed worker successfully executes the task corresponding to the task message.

[0071] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the process engine asynchronous task processing method provided by each of the above methods, the method comprising: The process engine encapsulates a current to-be-processed external task into a task message, and publishes the task message to a message queue; The message queue pushes the task message to a distributed worker; The distributed worker sends an external task completion request to the process engine to trigger the process engine to continue to execute the step of encapsulating the current to-be-processed external task into a task message until the task ends, in a case where the distributed worker successfully executes the task corresponding to the task message.

[0072] The above-described apparatus embodiments are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment according to actual needs. Those skilled in the art can understand and implement it without creative labor.

[0073] From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0074] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in each of the foregoing embodiments can still be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each of the embodiments of the present application.

Claims

1. A method for processing asynchronous tasks of a process engine, characterized in that, The method comprises the following steps: a process engine encapsulates a current external task to be processed into a task message, and publishes the task message to a message queue; the message queue pushes the task message to a distributed worker; the distributed worker sends an external task completion request to the process engine to trigger the process engine to continue to execute the step of encapsulating the current external task to be processed into the task message until the task is completed, in the case that the task message corresponding to the task is successfully executed.

2. The process engine asynchronous task processing method of claim 1, wherein, After the message queue pushes the task message to the distributed worker, the method further comprises the following steps: the message queue sends an execution failure confirmation signal in the case that the task message corresponding to the task is not successfully executed by the distributed worker; the message queue routes the task message in the message queue to a dead letter exchange in the case that the execution failure confirmation signal is received; and the dead letter exchange routes the task message to a dead letter queue, and re-routes the task message to the message queue in the case that the cache time of the task message in the dead letter queue reaches a target survival time.

3. The process engine asynchronous task processing method of claim 2, wherein, The target survival time is obtained by the following steps: the dead letter exchange determines the routing times corresponding to the task message; the dead letter exchange determines an initial survival time corresponding to the task message; the dead letter exchange determines the target survival time according to the initial survival time and the routing times.

4. The process engine asynchronous task processing method of claim 2, wherein, After the dead letter exchange routes the task message to the dead letter queue, and re-routes the task message to the message queue in the case that the cache time of the task message in the dead letter queue reaches the target survival time, the method further comprises the following steps: the dead letter exchange sends an indication message of business execution failure to the process engine in the case that the routing times corresponding to the task message reach a maximum routing times; the process engine updates the execution state of the external task corresponding to the task message to a failure state in a local state database, and triggers a preset compensation process in the case that the indication message is received.

5. The method of claim 1, wherein, The process engine encapsulates the current external task to be processed into the task message, comprising the following steps: the process engine determines the service type and the initial survival time of the current external task to be processed; the process engine encapsulates the current external task to be processed into the task message according to the service type and the initial survival time.

6. The method of claim 1, wherein, After the process engine encapsulates the current external task to be processed into the task message, and publishes the task message to the message queue, the method further comprises the following steps: the message queue sends a first confirmation signal to the process engine; the process engine updates the publishing state of the external task to a published state in the local state database in the case that the first confirmation signal fed back by the message queue is received.

7. The method of claim 1, wherein, After the message queue pushes the task message to the distributed worker, the method further comprises the following steps: the distributed worker sends a second confirmation signal to the message queue in the case that the task message corresponding to the task is successfully executed; The message queue deletes the task message in the message queue after receiving the second confirmation signal of the distributed worker feedback.

8. A process engine asynchronous task processing system, characterized in that, Comprise: A process engine, configured to encapsulate a current external task to be processed as a task message, and publish the task message to a message queue; The message queue is configured to push the task message to a distributed worker; The distributed worker is configured to send an external task completion request to the process engine in the case of successfully executing the task corresponding to the task message, so as to trigger the process engine to continue to execute the step of encapsulating the current external task to be processed as a task message until the end of the task.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the process engine asynchronous task processing method in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the process engine asynchronous task processing method in any one of claims 1 to 7.