Workflow processing method, system and equipment based on topological relation and storage medium

By using a workflow processing method based on topology relationships, and leveraging DAG to identify parallel nodes and dynamic tool scheduling, the performance bottlenecks, hard coding issues, and poor scalability of traditional distributed service architectures are resolved, achieving efficient and flexible business process management.

CN121961479APending Publication Date: 2026-05-01CTRIP BUSINESS TRAVEL INFORMATION SERVICE (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CTRIP BUSINESS TRAVEL INFORMATION SERVICE (SHANGHAI) CO LTD
Filing Date
2026-01-19
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional distributed service architectures suffer from severe performance bottlenecks in high-concurrency scenarios. Hard-coded business logic leads to high change costs, data synchronization is not real-time, system scalability is poor, and there is a lack of effective process orchestration and context management.

Method used

A workflow processing method based on topology relationships is adopted, which identifies parallel nodes through a directed acyclic graph (DAG), performs dynamic tool scheduling and unified state management, and achieves parallel execution, unified state management and dynamic tool scheduling, thereby improving system throughput and flexibility.

Benefits of technology

It significantly improves the system's processing performance and resource utilization, simplifies system design and state management, enhances system robustness and observability, achieves high flexibility and scalability, and reduces change costs and error risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121961479A_ABST
    Figure CN121961479A_ABST
Patent Text Reader

Abstract

The invention provides a workflow processing method, system and device based on a topological relation and a storage medium. The method comprises the steps that a workflow context object is initialized according to a service request; based on directed acyclic graph (DAG) configuration, processing tasks corresponding to the function nodes are executed in parallel, independent service logic or AI tool calling is packaged by the function nodes, and execution results of the tasks are written into a workflow context object through a predefined state key updating strategy; in the parallel execution process, Top-K tools matched with the current processing requirement are dynamically screened and called through an intelligent tool scheduling module; and after all parallel tasks are executed, performing aggregation and post-processing on intermediate results in the workflow context objects, and generating and returning a final response. Through parallel execution, unified state management and dynamic tool scheduling, the throughput, the response speed and the flexibility of the system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data business processing, and more specifically, to a workflow processing method, system, device, and storage medium based on topology relationships. Background Technology

[0002] With the rapid development of internet services, distributed systems have become the mainstream technical architecture supporting massive user access and complex business logic. However, in high-concurrency scenarios such as product recommendation, search ranking, real-time risk control, and price calculation, traditional distributed service architectures face severe challenges in terms of performance, agility, and data consistency, mainly in the following aspects: 1. Performance bottleneck caused by serial processing: Many business scenarios require aggregating information from multiple heterogeneous data sources. For example, a hotel recommendation request might need to call user profiling services, real-time model calculation services, inventory services, and promotion services. In traditional architectures, these external service calls are often executed serially. Assuming each service call takes an average of 50 milliseconds, serially calling five services would take more than 250 milliseconds. This is insufficient to meet users' expectations for low latency in high-concurrency scenarios, and the system throughput is limited by the total processing time of a single request, failing to fully utilize the parallel computing capabilities of modern multi-core CPUs.

[0003] 2. The rigidity and high change costs resulting from hard-coded business logic: Business rules, such as sorting strategies, filtering conditions, discount calculations, and A / B testing traffic distribution logic, require frequent adjustments in the internet environment to quickly respond to market changes or conduct business experiments. Traditional development models embed these rules into the application code in a hard-coded form. Any rule modification, regardless of size, requires a series of processes including code modification, code review, compilation, packaging, deployment, and server restart. This process is not only time-consuming (ranging from hours to days), but also prone to introducing errors and posing high operational risks. More importantly, it severely hinders the ability to rapidly iterate and conduct canary releases, making the system unable to adapt to the needs of agile business development. The root cause lies in the tight coupling between business logic and the technical framework supporting its operation, lacking effective isolation and dynamic management mechanisms.

[0004] 3. Real-time issues arising from polling-based data synchronization mechanisms: Systems often rely on external dynamic data, such as the availability of goods, real-time hotel room status, and inventory levels. To ensure performance, this data is typically cached in in-memory databases like Redis. Traditional cache updates often use scheduled tasks to poll the database or message source (e.g., every 5 minutes). This approach has significant latency, and untimely data updates can lead to serious problems, such as recommending sold-out hotels or discontinued products to users, severely impacting user experience and business reputation. While this can be improved by shortening the polling interval, this places unnecessary pressure on the database and network.

[0005] 4. Poor system scalability due to tightly coupled architecture: As business diversifies, the system needs to support more and more business scenarios. In traditional architectures, each new business scenario (e.g., adding a list page recommendation or grid view recommendation outside the recommendation system) often requires adding new branch logic to the core service code. This leads to the continuous expansion of the core code, with complexity increasing exponentially. The logic of different business scenarios becomes intertwined, making the code difficult to understand, test, and maintain, severely restricting system scalability.

[0006] Existing technologies offer several solutions attempting to address some of the aforementioned issues. For example, some solutions employ thread pools to call external services in parallel to improve performance, but lack unified process orchestration and context management, resulting in high code complexity. Regarding dynamic business rules, some systems have introduced rule engines such as Drools and Aviator, but these typically suffer from high performance overhead, high learning costs, or limited hot update capabilities, and fail to achieve deep integration with various stages of the processing flow. As for cache updates, while some solutions attempt to use message queues (such as Kafka and RocketMQ) to drive cache updates, they often lack fine-grained cache key generation strategies and unified management of multiple cache instances, making it difficult to handle complex and ever-changing business data models.

[0007] In view of this, the present invention provides a workflow processing method, system, device and storage medium based on topology that can systematically solve the above problems and provide high performance, high agility, high real-time performance and easy scalability. Summary of the Invention

[0008] To address the problems in the prior art, the present invention aims to provide a workflow processing method, system, device, and storage medium based on topology relationships, which overcomes the difficulties of the prior art and improves system throughput, response speed, and flexibility through parallel execution, unified state management, and dynamic tool scheduling.

[0009] Embodiments of the present invention provide a workflow processing method based on topology relationships, comprising the following steps: S110. Receive a business request, parse the request parameters of the business request, and initialize a workflow context object according to the business type; S120. Determine the multiple functional nodes and their topological relationships included in the current business process based on the pre-configured directed acyclic graph (DAG). The DAG includes a start node, multiple parallel-executed functional nodes, an aggregation node, and an end node. S130. Create asynchronous tasks for functional nodes that are determined to be executable in parallel based on the topology relationship. Execute each asynchronous task concurrently through the asynchronous execution engine. Each asynchronous task performs the following sub-steps: Invoke the intelligent tool scheduling module to dynamically select the Top-K most relevant tools from the tool library based on the processing needs of the current functional node; Invoke the selected tools to execute specific business logic or AI processing tasks; Write the results of the tool execution to the specified status key in the workflow context object according to the predefined status key update strategy. S140. Wait for all asynchronous tasks executed in parallel to complete, and aggregate and post-process the results written by each asynchronous task in the workflow context object through the aggregation node; S150. Generate the final business response based on the aggregated results and return it.

[0010] Preferably, in step S120, the directed acyclic graph (DAG) is defined and managed by a graph configuration engine. The graph configuration engine parses the graph structure definition based on a domain-specific language or configuration file and converts it into an executable task dependency network.

[0011] Preferably, the graph configuration engine supports hot updates, so that when the DAG configuration of a business process changes, the new graph structure can be loaded and applied to subsequent requests without restarting the system.

[0012] Preferably, in step S130, the intelligent tool scheduling module dynamically selects the Top-K most relevant tools from the tool library based on the processing needs of the current functional node, including the following steps: By analyzing the input parameters of the current functional node or the intermediate data in the workflow context object through a large language model, the core task intent and semantic features are extracted. Calculate the similarity between the semantic features and the vector embeddings of the descriptive information of each tool in the tool library; Based on similarity scores, the top-K most relevant tool identifiers are selected; The execution method corresponding to the selected tool is dynamically loaded and instantiated through reflection.

[0013] Preferably, the state key update strategy in step S130 includes an overwrite strategy and an append strategy; The coverage strategy is used to cover the previous results with the results of subsequent tasks when multiple tasks generate results of the same semantic dimension. The append strategy is used to collect the same type of results from multiple tasks in a list format.

[0014] Preferably, in step S130, the asynchronous execution engine provides independent timeout control, retry mechanism and degradation strategy for each asynchronous task; when an asynchronous task fails or times out, it is retried according to its configured retry strategy. If it ultimately fails, the preset degradation logic is executed, or an exception is thrown and the workflow engine triggers the overall exception handling process.

[0015] Preferably, in step S140, the workflow context object uses a type-safe mapping mechanism during serialization, automatically deserializing intermediate state data in JSON format into strongly typed objects through predefined Java entity classes for use by subsequent nodes.

[0016] Embodiments of the present invention also provide a topology-based workflow processing system for implementing the above-described topology-based workflow processing method, wherein the topology-based workflow processing system includes: The business request module receives business requests, parses the request parameters of the business requests, and initializes a workflow context object according to the business type. The node configuration module determines the multiple functional nodes and their topological relationships included in the current business process based on the pre-configured directed acyclic graph (DAG). The DAG includes a start node, multiple parallel-executed functional nodes, an aggregation node, and an end node. The asynchronous task module creates asynchronous tasks for functional nodes that are determined to be executable in parallel based on the topology. Each asynchronous task is executed concurrently by the asynchronous execution engine, and each asynchronous task performs the following sub-steps: The intelligent tool scheduling module dynamically selects the Top-K most relevant tools from the tool library based on the processing needs of the current functional node; the selected tool is invoked to execute specific business logic or AI processing tasks; and the result of the tool execution is written to the specified status key in the workflow context object according to a predefined status key update strategy. The state management module waits for all concurrently executed asynchronous tasks to complete, and aggregates and post-processes the results written by each asynchronous task in the workflow context object through the aggregation node; The results aggregation module generates the final business response based on the aggregated results and returns it.

[0017] Embodiments of the present invention also provide a workflow processing device based on topology relationships, comprising: processor; A memory in which executable instructions of the processor are stored; The processor is configured to execute the steps of the above-described workflow processing method based on topology by executing the executable instructions.

[0018] Embodiments of the present invention also provide a computer-readable storage medium for storing a program that, when executed, implements the steps of the above-described workflow processing method based on topology relationships.

[0019] The purpose of this invention is to provide a workflow processing method, system, device, and storage medium based on topology relationships. By parallel execution, unified state management, and dynamic tool scheduling, it effectively solves the problems of low efficiency, complex state management, and poor scalability of traditional serial processing architectures, and significantly improves system throughput, response speed, and flexibility. Attached Figure Description

[0020] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.

[0021] Figure 1 This is a flowchart of the workflow processing method based on topology relationships of the present invention.

[0022] Figure 2 This is an overall architecture diagram of the workflow processing system based on topology relationships of the present invention.

[0023] Figure 3 This is a schematic diagram of the topology-based workflow processing device of the present invention.

[0024] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

[0025] The following specific examples illustrate the implementation methods of this application. Those skilled in the art can easily understand the other advantages and effects of this application from the content disclosed herein. This application can also be implemented or applied through other different specific embodiments, and various details in this application can be modified or changed according to different viewpoints and application systems without departing from the spirit of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.

[0026] The embodiments of this application will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily implement the application. This application may be embodied in many different forms and is not limited to the embodiments described herein.

[0027] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics represented in connection with that embodiment or example, which are included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate different embodiments or examples represented in this application, as well as features of different embodiments or examples.

[0028] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0029] For the purpose of clearly describing this application, devices that are not relevant to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.

[0030] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.

[0031] When we say that a device is "above" another device, this can mean that it is directly above the other device, or it can mean that other devices are present in between. Conversely, when we say that a device is "directly" "above" another device, there are no other devices present in between.

[0032] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0033] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this application. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in the specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.

[0034] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present application, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.

[0035] Figure 1 This is a flowchart of the workflow processing method based on topology relationships according to the present invention. For example... Figure 1 As shown, the workflow processing method based on topology relationships of the present invention includes the following steps: S110. Receive business requests, parse the request parameters of the business requests, and initialize the workflow context object according to the business type.

[0036] S120. Based on the pre-configured Directed Acyclic Graph (DAG), determine the multiple functional nodes and their topological relationships within the current business process. The DAG includes a start node, multiple concurrently executing functional nodes, an aggregation node, and an end node. A Directed Acyclic Graph (DAG) is a special graph data structure composed of two key elements: Direction: The connecting lines (edges) in the graph have a direction, representing the dependency or flow relationship from one node to another; this is unidirectional. Acyclic: There are no cycles in the graph. This means it is impossible to start from one node and eventually return to it along the direction of an edge. Node: Represents an independent functional unit, processing step, or business logic (e.g., "extract text features," "call the risk control model," "generate copy A"). Directed Edge: Represents the execution order dependency between nodes. An edge from node A to node B means "A must be completed before B can begin." DAG configuration is the technological cornerstone for achieving the three major advantages of parallelization, orchestration, and configurability.

[0037] S130. Create asynchronous tasks for functional nodes that are determined to be executable in parallel based on topology relationships. Execute these asynchronous tasks concurrently using the asynchronous execution engine. Each asynchronous task performs the following sub-steps: Invoke the intelligent tool scheduling module to dynamically select the Top-K most relevant tools from the tool library based on the processing needs of the current functional node. Invoke the selected tools to execute specific business logic or AI processing tasks. Write the results of the tool execution to the specified status key in the workflow context object according to a predefined status key update strategy.

[0038] S140. Wait for all concurrently executed asynchronous tasks to complete, and aggregate and post-process the results written by each asynchronous task in the workflow context object through the aggregation node.

[0039] S150. Generate the final business response based on the aggregated results and return it.

[0040] This invention defines the core framework for workflow processing. Through a standardized process of "parsing-initialization-concurrent execution-aggregation," it achieves modularization and decoupling of business logic. Its core effect lies in using a Directed Acyclic Graph (DAG) to identify concurrency points, transforming serial processing into parallel execution, thereby significantly shortening the overall end-to-end response time of requests. This is particularly suitable for business scenarios involving multiple independent I / O operations or computationally intensive subtasks. Simultaneously, centralized result aggregation and context management ensure the consistency and orderliness of data processing. A DAG is a "central nervous system" that organically combines three major innovations: "configurable process orchestration," "intelligent parallel execution," and "unified state management." It transforms the entire system from a "hard-coded process" into a "data-driven, dynamically adjustable topological network."

[0041] In a preferred embodiment, in step S120, the Directed Acyclic Graph (DAG) is defined and managed through a graph configuration engine. The graph configuration engine parses the graph structure definition based on a domain-specific language (DSL) or configuration file and converts it into an executable task dependency network. For example, the engine can parse configuration files based on YAML, JSON, or a specific DSL, converting the defined nodes, edges, and node attributes (such as timeout, retry count, and tool filtering prompts) into an in-memory graph structure, and further into task units that can be scheduled by an asynchronous execution engine. The graph configuration engine supports hot updates, allowing operations personnel to modify business processes without downtime. By introducing a graph configuration engine, this invention decouples the topology of business processes from hard-coded logic, achieving separation between "process logic" and "execution code." This allows business experts or product personnel to define and modify processes using declarative domain-specific languages ​​(DSLs) or configuration files (such as YAML / JSON) without requiring developers to deeply modify the code. This significantly improves the maintainability and scalability of business processes, reducing change costs and error risks.

[0042] In a preferred embodiment, the graph configuration engine supports hot updates. When the DAG configuration of a business process changes, the new graph structure can be loaded and applied to subsequent requests without restarting the system. Hot update capability is a key feature of this embodiment. It ensures that the system can respond instantly to changes in business rules, strategies, or processes while maintaining 24 / 7 uninterrupted service. When new processes need to be deployed, process defects fixed, or A / B testing conducted, these changes can take effect without interrupting existing services, greatly improving system availability, flexibility, and ease of maintenance, and meeting the needs of rapid iteration in internet businesses.

[0043] In a preferred embodiment, step S130 involves invoking the intelligent tool scheduling module to dynamically select the Top-K most relevant tools from the tool library based on the processing requirements of the current functional node. This includes the following steps: analyzing the input parameters of the current functional node or intermediate data in the workflow context object using a large language model to extract the core task intent and semantic features; calculating the similarity between the semantic features and the vector embeddings of the description information of each tool in the tool library; and selecting the Top-K most relevant tool identifiers based on the similarity scores. This mechanism achieves logical decoupling between tools and processes. New tools only need to register their description information with the tool library to be automatically discovered and invoked by the process. This invention dynamically loads and instantiates the execution method corresponding to the selected tool through a reflection mechanism. The core effect of this embodiment is the introduction of dynamic tool adaptation capabilities based on semantic understanding. Unlike traditional tool invocation based on hard-coded rules, analyzing task intent through a large model and matching the most relevant tools gives the system powerful generalization capabilities and scenario adaptability. When faced with new requirements or complex and ambiguous instructions, the system can intelligently recommend and combine the best toolset from the tool library, improving the accuracy and success rate of task execution and reducing process failures caused by improper tool selection. This is a key manifestation of the system's "intelligence".

[0044] In a preferred embodiment, the state key update strategy in step S130 includes an overwrite strategy and an append strategy. The overwrite strategy is used to overwrite previous results with the results of subsequent tasks when multiple tasks generate results of the same semantic dimension. The append strategy is used to collect similar results produced by multiple tasks in list form.

[0045] This invention provides a flexible and controllable intermediate data management strategy. Explicit update rules (overwrite or append) eliminate data races and inconsistencies that may arise during concurrent writes to the state context. The "overwrite strategy" ensures eventual consistency of critical data, while the "append strategy" fully preserves the results of parallel tasks. This mechanism enhances the workflow's ability to handle complex data streams, provides clear and structured input for subsequent aggregation nodes, and simplifies the development of each functional node. Developers only need to follow predefined strategies without worrying about the complexities of data merging.

[0046] In a preferred embodiment, in step S130, the asynchronous execution engine provides independent timeout control, retry mechanisms, and degradation strategies for each asynchronous task. When an asynchronous task fails or times out, it is retried according to its configured retry strategy. If it ultimately fails, the preset degradation logic is executed, or an exception is thrown and the workflow engine triggers the overall exception handling process. (For example, a simplified local method is used instead of a remote call, or a default value is filled in, thereby avoiding the failure of a single node causing the entire workflow to fail. The workflow level also has an exception handling mechanism to uniformly handle serious errors that cannot be degraded.) This embodiment provides a solid guarantee for the robustness and reliability of the system. By configuring an independent elastic strategy for each asynchronous task, fault isolation and local processing are achieved. Timeout control prevents the entire workflow from being dragged down by the "freezing" of individual tasks. The retry mechanism deals with temporary failures (such as network jitter). The degradation strategy ensures that even when some functions fail, the system can still provide impaired but usable services or clear exception information. These measures work together to give the entire workflow engine production-grade fault tolerance, ensuring the success rate and stability of core business processes.

[0047] In a preferred embodiment, in step S140, the workflow context object employs a type-safe mapping mechanism during serialization. It automatically deserializes intermediate state data in JSON format into strongly typed objects using predefined Java entity classes for use by subsequent nodes. When the workflow context object needs to be persisted or transmitted over a network (e.g., for debugging or cross-service transmission), it undergoes serialization and deserialization via a state serializer. This serializer uses a type-safe mapping mechanism and leverages the customized deserialization capabilities of libraries such as Jackson to automatically and safely convert intermediate data in JSON format into strongly typed Java objects using predefined Java entity classes (such as Product.class, MarketingCopy.class). This facilitates type-safe operations by subsequent nodes and reduces runtime type errors.

[0048] This implementation addresses the type safety issue in data transmission within a distributed, asynchronous environment. Automatic serialization / deserialization using predefined strongly typed entity classes has two main benefits: First, during development, compiler type checking can proactively identify issues like incorrect field names and type mismatches, reducing runtime errors. Second, at runtime, it avoids the tediousness and potential errors of manually parsing JSON strings, improving code robustness and readability, ensuring clear and reliable data exchange between nodes, and reducing the complexity of later maintenance.

[0049] This invention constructs a high-concurrency, highly flexible, and highly intelligent automated workflow engine by combining the structured process management of Directed Acyclic Graphs (DAGs) with the dynamic tool scheduling capabilities of large-scale models. It can decompose complex business processes into atomic tasks that can be executed in parallel, and dynamically select the optimal tool using the semantic understanding capabilities of large-scale models, thereby significantly improving the efficiency and intelligence of business processing while ensuring system stability.

[0050] The following is a specific implementation example applied to an online travel platform scenario to further illustrate this technical solution. An online travel platform needs to quickly generate marketing copy for its numerous listed tourist destinations and hotels. Each destination has a set of original materials, including a text description and several images. The operations team hopes to leverage artificial intelligence technology to simultaneously generate multiple marketing copy pieces in different styles, and automatically select the best one to three for testing or direct deployment.

[0051] Traditional methods suffer from the following drawbacks: low efficiency of serial processing; inflexible manual scheduling; and time-consuming result integration. The implementation process of this solution is as follows: Operations personnel configure a workflow through the management backend. Its core definition includes the workflow name, a list of nodes, and a list of edges. The node list defines a start node, a text feature extraction node, an image feature extraction node, multiple copywriting generation nodes of different styles, an aggregation filtering node, and an end node. Each node is detailed with its type, tooltips, input / output keys, execution strategy, and optional fault tolerance configurations (such as retries and degradation schemes). The edge list clearly defines the dependencies between nodes, ensuring that feature extraction nodes can execute in parallel, and that copywriting generation nodes of different styles execute in parallel afterward, finally converging at the aggregation node.

[0052] The platform's algorithm team provides several dedicated tools, which are registered in the vector library of the intelligent tool scheduling module. These include: a tourism text feature extractor based on a specific model, a tourism image analysis service, various copywriting generation models with different styles, and an automatic copywriting scoring model.

[0053] The platform's backend system initiates batch tasks. For a single destination request: text feature extraction and image feature extraction nodes start in parallel. The intelligent tool scheduling module matches the corresponding feature extraction tools based on prompts. The two tools process the text and images in parallel, and the results are stored in the context. Subsequently, multiple style copywriting generation nodes start simultaneously after the features are ready. The intelligent tool scheduling module accurately matches the corresponding copywriting generation model based on their unique tool prompts. These models run in parallel, each generating a copywriting with a distinct style, and each is written into the context. The aggregation and filtering node waits for all style copywriting to be generated. It executes its embedded logic: collects all copywriting; implicitly calls the intelligent tool scheduling module to match copywriting scoring tools for batch scoring; and finally performs filtering and sorting to produce the optimal result. The system returns the optimal marketing copy generated for the destination in a short time. Compared to the traditional serial calling method, this solution significantly improves processing efficiency through parallelization. For batch tasks, the system can leverage the complete independence between workflow instances, combined with external batch processing scheduling, to achieve massive concurrent processing, greatly shortening the overall job time.

[0054] To add a new copywriting style, simply add a corresponding node in the workflow configuration and register the corresponding copywriting generation tool to the vector library; no modification to the core system code is required. If a tool is unstable, a more lenient timeout retry strategy and fallback plan can be configured for it to ensure the overall system remains available.

[0055] Compared with existing technologies, the distributed service architecture method provided by this invention brings significant technological advancements and commercial value: Significantly improves processing performance and resource utilization: By identifying parallelizable nodes through DAG orchestration, the traditional serial process is transformed into parallel execution, making full use of multi-core CPU resources. Real-world testing shows that in typical scenarios such as augmented product information, overall processing latency is reduced by more than 50%, and system throughput is increased several times.

[0056] Significantly simplifies system design and state management: By introducing a unified workflow context object and a declarative state key update strategy, complex data flow logic is decoupled from the code and transformed into configuration-based management. This makes the process logic clear, data dependencies explicit, and significantly reduces code complexity and maintenance costs.

[0057] Enhanced system robustness and observability: The built-in asynchronous execution engine provides node-level timeout, retry, and degradation capabilities, combined with workflow-level exception handling, effectively improving the system's resilience to partial failures. Meanwhile, standardized context objects facilitate end-to-end logging and tracing, enhancing system observability.

[0058] Achieving high flexibility and scalability: The intelligent tool scheduling module completely decouples tools from processes. New tools can be automatically discovered simply by embedding their functional descriptions into the vector library, without requiring any modification to the process orchestration code. The graph configuration engine supports hot updates, enabling rapid deployment of business process adjustments and achieving business agility.

[0059] Provides type safety and developer friendliness: Through a type-safe context serialization mechanism, loosely typed JSON data is converted into strongly typed objects, providing developers with compile-time type checking and support, reducing runtime errors and improving development efficiency.

[0060] Figure 2 This is a system architecture diagram of the browser connector service in the workflow processing system based on topology relationships of this invention. (See diagram below.) Figure 2 As shown, the workflow processing system based on topology relationships of the present invention includes: The business request module 51 receives a business request, parses the request parameters of the business request, and initializes a workflow context object according to the business type. The node configuration module 52 determines the multiple functional nodes and their topological relationships included in the current business process based on the pre-configured directed acyclic graph (DAG). The DAG includes a start node, multiple parallel-executed functional nodes, an aggregation node, and an end node. The asynchronous task module 53 creates asynchronous tasks for functional nodes that are determined to be executable in parallel based on the topology. The asynchronous execution engine executes each asynchronous task concurrently. Each asynchronous task performs the following sub-steps: calling the intelligent tool scheduling module to dynamically select the Top-K most relevant tools from the tool library based on the processing needs of the current functional node; calling the selected tools to execute specific business logic or AI processing tasks; and writing the results of the tool execution to the specified status key in the workflow context object according to the predefined status key update strategy. The state management module 54 waits for all asynchronous tasks executed in parallel to complete, and aggregates and post-processes the results written by each asynchronous task in the workflow context object through the aggregation node; The result aggregation module 55 generates the final business response based on the aggregated results and returns it.

[0061] In summary, the topology-based workflow processing system of the present invention effectively solves the problems of low efficiency, complex state management, and poor scalability of traditional serial processing architectures through parallel execution, unified state management, and dynamic tool scheduling, and significantly improves system throughput, response speed, and flexibility.

[0062] This invention also provides a topology-based workflow processing device, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a topology-based workflow processing method by executing the executable instructions.

[0063] As shown above, the workflow processing device based on topology of this invention, through parallel execution, unified state management and dynamic tool scheduling, effectively solves the problems of low efficiency, complex state management and poor scalability of traditional serial processing architecture, and significantly improves system throughput, response speed and flexibility.

[0064] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."

[0065] Figure 3 This is a schematic diagram of the topology-based workflow processing device of the present invention. See below for reference. Figure 3 To describe an electronic device 600 according to this embodiment of the present invention. Figure 3 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0066] like Figure 3 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0067] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0068] Storage unit 620 may include readable media in the form of volatile storage units, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include read-only memory (ROM) 6203.

[0069] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0070] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0071] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0072] This invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of a topology-based workflow processing method. In some possible implementations, various aspects of the invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described method section of this specification according to various exemplary embodiments of the invention.

[0073] As shown above, this embodiment of the workflow processing system based on topology relationships of the present invention effectively solves the problems of low efficiency, complex state management and poor scalability of traditional serial processing architecture through parallel execution, unified state management and dynamic tool scheduling, and significantly improves system throughput, response speed and flexibility.

[0074] Figure 4 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 4As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0075] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0076] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0077] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0078] In summary, the purpose of this invention is to provide a workflow processing method, system, device, and storage medium based on topology relationships. Through parallel execution, unified state management, and dynamic tool scheduling, it effectively solves the problems of low efficiency, complex state management, and poor scalability of traditional serial processing architectures, and significantly improves system throughput, response speed, and flexibility.

[0079] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A workflow processing method based on topology relationships, characterized in that, Includes the following steps: S110. Receive a business request, parse the request parameters of the business request, and initialize a workflow context object according to the business type; S120. Determine the multiple functional nodes and their topological relationships included in the current business process based on the pre-configured directed acyclic graph (DAG). The DAG includes a start node, multiple parallel-executed functional nodes, an aggregation node, and an end node. S130. Create asynchronous tasks for functional nodes that are determined to be executable in parallel based on the topology relationship. Execute each asynchronous task concurrently through the asynchronous execution engine. Each asynchronous task performs the following sub-steps: Invoke the intelligent tool scheduling module to dynamically select the Top-K most relevant tools from the tool library based on the processing needs of the current functional node; Invoke the selected tools to execute specific business logic or AI processing tasks; Write the results of the tool execution to the specified status key in the workflow context object according to the predefined status key update strategy. S140. Wait for all asynchronous tasks executed in parallel to complete, and aggregate and post-process the results written by each asynchronous task in the workflow context object through the aggregation node; S150. Generate the final business response based on the aggregated results and return it.

2. The workflow processing method based on topology relationships according to claim 1, characterized in that, In step S120, the directed acyclic graph (DAG) is defined and managed by a graph configuration engine. The graph configuration engine parses the graph structure definition based on a domain-specific language or configuration file and converts it into an executable task dependency network.

3. The workflow processing method based on topology relationships according to claim 2, characterized in that, The graph configuration engine supports hot updates. When the DAG configuration of a business process changes, the new graph structure can be loaded and applied to subsequent requests without restarting the system.

4. The workflow processing method based on topology relationships according to claim 1, characterized in that, In step S130, the intelligent tool scheduling module dynamically selects the Top-K most relevant tools from the tool library based on the processing requirements of the current functional node, including the following steps: By analyzing the input parameters of the current functional node or the intermediate data in the workflow context object through a large language model, the core task intent and semantic features are extracted. Calculate the similarity between the semantic features and the vector embeddings of the descriptive information of each tool in the tool library; Based on similarity scores, the top-K most relevant tool identifiers are selected; The execution method corresponding to the selected tool is dynamically loaded and instantiated through reflection.

5. The workflow processing method based on topology relationships according to claim 4, characterized in that, The status key update strategy in step S130 includes an overwrite strategy and an append strategy; The coverage strategy is used to cover the previous results with the results of subsequent tasks when multiple tasks generate results of the same semantic dimension. The append strategy is used to collect the same type of results from multiple tasks in a list format.

6. The workflow processing method based on topology relationships according to claim 4, characterized in that, In step S130, the asynchronous execution engine provides independent timeout control, retry mechanism and degradation strategy for each asynchronous task. When an asynchronous task fails or times out, it is retried according to its configured retry strategy. If it ultimately fails, the preset degradation logic is executed, or an exception is thrown and the workflow engine triggers the overall exception handling process.

7. The workflow processing method based on topology relationships according to claim 1, characterized in that, In step S140, the workflow context object uses a type-safe mapping mechanism during serialization, automatically deserializing intermediate state data in JSON format into strongly typed objects through predefined Java entity classes for use by subsequent nodes.

8. A workflow processing system based on topology relationships, used to implement the workflow processing method based on topology relationships as described in claim 1, characterized in that, include: The business request module receives business requests, parses the request parameters of the business requests, and initializes a workflow context object according to the business type. The node configuration module determines the multiple functional nodes and their topological relationships included in the current business process based on the pre-configured directed acyclic graph (DAG). The DAG includes a start node, multiple parallel-executed functional nodes, an aggregation node, and an end node. The asynchronous task module creates asynchronous tasks for functional nodes that are determined to be executable in parallel based on the topology. Each asynchronous task is executed concurrently by the asynchronous execution engine, and each asynchronous task performs the following sub-steps: The intelligent tool scheduling module dynamically selects the Top-K most relevant tools from the tool library based on the processing needs of the current functional node; the selected tool is invoked to execute specific business logic or AI processing tasks; and the result of the tool execution is written to the specified status key in the workflow context object according to a predefined status key update strategy. The state management module waits for all concurrently executed asynchronous tasks to complete, and aggregates and post-processes the results written by each asynchronous task in the workflow context object through the aggregation node; The results aggregation module generates the final business response based on the aggregated results and returns it.

9. A workflow processing device based on topology relationships, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the topology-based workflow processing method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the workflow processing method based on topology relationships as described in any one of claims 1 to 7.