Implementation method of workflow integrated thinking chain system

By designing a thinking chain structure with functional nodes and logical nodes as the core, combining semantic analysis and predefined template matching technology, dynamically adjusting task order and resource allocation, the shortcomings of traditional thinking chains in complex task scheduling and cross-system collaboration are solved, and efficient and flexible task execution and system stability are achieved.

CN120407808APending Publication Date: 2025-08-01CHENGDU MINGTU TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510478141.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The traditional thinking chain method has shortcomings in complex task scheduling, resource management and cross-system collaboration, and it is difficult to adapt to dynamic environments and real-time adjustments.

Method used

Design a thinking chain structure with functional nodes, logical nodes, and integrated nodes as the core, combining semantic analysis and predefined template matching technology, dynamically generate and adjust the thinking chain through intelligent logical modeling and real-time data analysis, realizing task scheduling and execution modules, and setting exception handling and self-optimization mechanisms.

Benefits of technology

It significantly improves the accuracy and adaptability of task disassembly, optimizes the task execution path, improves execution efficiency and system stability, reduces the impact of exceptions on the process, and enhances the flexibility and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407808A_ABST
    Figure CN120407808A_ABST
Patent Text Reader

Abstract

The invention discloses an implementation method of a workflow integrated thinking chain system, which comprises the following steps of: defining three types of core nodes, namely function nodes, logic nodes and integrated nodes, constructing a chain structure supporting dynamic generation, and realizing seamless integration among multiple workflows; according to the method, user input is disassembled into subtask nodes through semantic analysis and a predefined template, and a thinking chain is dynamically generated and adjusted in combination with intelligent logic modeling, real-time data analysis and dynamic rule iteration; meanwhile, the task scheduling and execution module calls an interface according to chain logic to complete node operation, and supports concurrent processing and state monitoring; the exception handling and self-optimization mechanism optimizes chain logic and improves execution efficiency and reliability through real-time exception detection, fault recovery and artificial intelligence analysis based on historical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of large models and artificial intelligence, and particularly to a method for implementing a chain of thought system integrated with a workflow. Background Art

[0002] The chain of thought (CoT) originates from the inference process of large-scale pre-trained language models. Its goal is to break down a problem into multiple steps and obtain the final result through step-by-step reasoning. Different from the traditional "one-step" problem-solving method, the chain of thought emphasizes constructing solutions to complex problems through explicit intermediate reasoning steps. In large models, the chain of thought system can simulate the human reasoning process and solve problems step by step, thereby improving the model's reasoning ability and accuracy. For example, when solving a complex reasoning problem, the model will show the intermediate reasoning of each step, rather than just giving the final answer. The essence of the chain of thought is to break down a complex problem into multiple small reasoning steps and guide the model to gradually generate results in these steps.

[0003] With the development of deep learning and large-scale pre-trained models, especially the emergence of models such as GPT and BERT, the chain of thought has gradually become an effective mechanism in reasoning tasks. In the above models, the chain of thought method usually performs task reasoning through the following steps: (1) Problem description, decomposing a complex task into multiple smaller and easier-to-solve subtasks; (2) Step-by-step reasoning process, through step-by-step reasoning, the model solves each subtask and continues the subsequent reasoning with the intermediate results; (3) Answer generation, obtaining the final conclusion by summarizing the results of all subtasks. Through the above operations, the chain of thought can handle tasks with complex dependencies, solve multi-step reasoning problems, and increase the accuracy and interpretability of reasoning.

[0004] The chain of thought is an important breakthrough in the field of artificial intelligence. By simulating the human step-by-step reasoning mechanism, it significantly improves the performance and interpretability of large language models in complex tasks. Its applications cover multiple fields such as education, medical care, and law, and promote the development of AI from a "black box" towards transparency and trustworthiness. In the future, with the maturity of multi-modal integration and automation technologies, the chain of thought will further expand the boundaries of AI and become one of the key technologies for general artificial intelligence (AGI).

[0005] Although the chain of thought has great advantages in reasoning tasks, in practical applications, there are also some challenges with the chain-of-thought method: when the task involves a large number of steps, the intermediate steps and reasoning paths in the chain of thought may become very complex, resulting in low execution efficiency of the reasoning process. The reasoning process of the task may depend on multiple context factors, making the structure and reasoning path of the chain of thought need to be adjusted in real time. In the traditional chain of thought, the reasoning process is usually static, lacking the ability to react immediately to external changes or changes in the task execution state, resulting in the inability of the reasoning process to flexibly adapt to complex dynamic environments. The above challenges will limit the effectiveness of the chain of thought in some tasks. Therefore, how to optimize the chain of thought to make it adaptable to changing environments and adjust in real time is an important research direction. In addition, existing chain-of-thought methods mainly focus on the reasoning of static tasks or simple tasks, while the dependencies, resource scheduling, status monitoring, etc. between tasks involved in complex workflows require the chain of thought to not only have the ability to reason step by step, but also have the ability to handle workflow elements.

[0006] Integrating workflow elements into the chain of thought can enable the chain of thought to not only be limited to a simple reasoning process when performing tasks, but also dynamically adjust the execution path, dependencies, resource allocation, etc. of the workflow according to the task execution situation. Such a chain of thought integrated with the workflow can achieve: when a certain task fails or needs to be adjusted, the chain of thought can reason out a new task sequence or dependencies, rather than just relying on a fixed process. Through multi-step reasoning, the chain of thought can automatically schedule tasks and optimize resource allocation according to the current resource status and task priorities. In a workflow involving multi-system collaboration, the chain of thought can manage data exchange, format conversion, and synchronization operations between different systems through reasoning. After combining workflow elements with the chain-of-thought system, a new workflow management mode can be achieved. This mode can dynamically adjust and optimize the execution of the workflow based on the reasoning process, and can provide adaptive solutions for complex cross-task dependencies, resource constraints, exception handling, etc.

[0007] The chain-of-thought method integrated with the workflow has significant advantages and application potential in the following fields. For example, in industrial Internet application fields such as industrial production and supply chain, the dependencies between multiple tasks are complex, and the execution status of each task may affect other tasks. Through multi-step reasoning of the chain of thought, the execution order, dependencies, and resource allocation of tasks can be dynamically adjusted. In scenarios that require collaboration across multiple systems, the chain of thought can effectively manage and synchronize data exchange and task scheduling between systems through the reasoning mechanism. In the face of task execution failures or resource shortages, the chain of thought can automatically reason out alternative paths or solutions, reduce manual intervention, and optimize the execution efficiency of the process.

[0008] The MindChain approach, which integrates workflow elements, represents an innovation in existing workflow management and reasoning methods. By incorporating workflow elements such as tasks, resources, and dependencies into the MindChain system, workflows can not only achieve intelligent, step-by-step reasoning but also cope with challenges such as dynamic changes, cross-system collaboration, and resource optimization. In the future, this approach will significantly enhance MindChain's reasoning capabilities within large models. Summary of the Invention

[0009] In view of this, the purpose of the present invention is to provide a method for implementing a workflow-integrated thinking chain system to solve the deficiencies in complex task scheduling, resource management and cross-system collaboration in traditional thinking chain applications.

[0010] The purpose of the present invention is achieved through the following technical solutions:

[0011] Step S1: Design the thinking chain structure, define the thinking chain structure with functional nodes, logical nodes, and integration nodes as the core, and form a directed chain model that supports workflow integration;

[0012] Step S2: Setting a semantic analysis template to decompose external input information into subtask nodes;

[0013] Step S3: Based on the workflow, through intelligent logic modeling, real-time data analysis and dynamic rule iteration, efficient integration and optimization across workflows are achieved, and thought chains are dynamically generated and adjusted;

[0014] Step S4: Implement the task scheduling and execution module, call the interface according to the chain logic to complete the node operation, and support concurrent processing and status monitoring;

[0015] Step S5: Set up exception handling and self-optimization mechanisms to provide exception detection and recovery capabilities, optimize chain logic through historical data accumulation and AI analysis, and improve execution efficiency and reliability.

[0016] Furthermore, the step S1 specifically includes:

[0017] Step S101: Define thought chain nodes, each node represents a specific workflow operation or decision point, and divide the nodes into functional nodes, logical nodes and integration nodes;

[0018] Step S102: Design chain logic based on the thinking chain nodes in S101, and use a directed graph or chain structure to describe the relationship between the nodes;

[0019] Step S103: Define the chain operation rules, determine the triggering conditions of the thinking chain, and describe the execution logic of the chain.

[0020] Furthermore, the step S2 specifically includes:

[0021] Step S201: According to the structural degree and domain knowledge coverage of the input task, select two complementary disassembly methods, namely: predefined template matching and semantic analysis dynamic parsing. Predefined template matching is applicable to fields with clear rules, and semantic analysis dynamic parsing is applicable to the open domain or complex instructions;

[0022] Step S202: Divide the tasks into two categories: highly repetitive tasks, such as order refunds, equipment failure reports, etc.; tasks with relatively fixed input formats, such as forms, specific keyword instructions; adopt the predefined template matching method;

[0023] Step S203: For unstructured inputs and tasks that require dynamic reasoning, adopt the semantic analysis dynamic parsing implementation method;

[0024] Furthermore, the specific method for constructing the predefined template matching method in step S202 is as follows:

[0025] First, based on historical task data or domain knowledge, define the mapping relationship between task types and subtask chains to construct a template library;

[0026] Secondly, for evaluating the importance of keywords in the input text, assist the template matching by setting a keyword weight calculation formula:

[0027]

[0028] where TF(t, d) represents the number of times the word t appears in the text d, n t represents the number of templates containing the keyword t, and N represents the total number of templates in the template library;

[0029] Then, convert the input text and the template keyword list into vectors, and calculate the template matching similarity. The formula is as follows:

[0030]

[0031] where V i represents the text vector of the i-th input, and V t represents the keyword vector of the t-th template;

[0032] If there is a large difference in length between the input text and the template, the normalization operation can be performed on the input text vector:

[0033]

[0034] where ||·||2 is the square root of the sum of the squares of each component;

[0035] Finally, for short texts, set a sorting function algorithm that is more suitable for short text matching, as follows:

[0036]

[0037] Among them, Q represents the input query, that is, the user input instruction, D represents the template description text, f(t,D) represents the frequency of word t in D, k1 and b represent adjustable parameters, Indicates the average length of text in the template library;

[0038] Furthermore, the semantic analysis dynamic parsing implementation method in step S203 is as follows:

[0039] First, parse the sentence structure and identify the logical relationship between actions. Use the maximum spanning tree algorithm constructed using the syntax tree. The formula is as follows:

[0040]

[0041] in, is a trainable parameter matrix in the neural network, used to calculate the dependency score between two words; h i , h j They represent the context vectors of the words respectively, and ⊙ represents the element-by-element multiplication of the vectors, which is used to capture the feature interaction between word pairs;

[0042] Then, based on the syntax tree, the core objects in the task are extracted through the named entity recognition model for the text input by the user. The probability prediction model of the entity label sequence is defined as follows:

[0043]

[0044] Among them, h i Represents the hidden state of the i-th position of the bidirectional LSTM model, M(y i-1 ,y i ) represents the label transfer matrix, W T lstm and W T crf represents the trainable model parameters based on the maximum spanning tree algorithm, exp(·) is the exponential operation function, and y i ' and y i Respectively represent i The actual value and predicted value of the entity label corresponding to the text;

[0045] Furthermore, the task objective is determined by the text classification model, and the intent label is predicted for the input text. The prediction function is defined as follows:

[0046] LP(lable=c|V i )=softmax(W c ·H |CLS| +b c )

[0047] Among them, V i represents the text vector of the i-th input, and H |CLS| represents the [CLS] token vector output by the large language model, and W c and b c represent the classification layer parameters;

[0048] Finally, output the updated label transition matrix M’(y i-1 , y i ).

[0049] Furthermore, the step S3 includes:

[0050] Step S301: Based on the thought chain generated in step S101, dynamically generate a thought chain according to the work process. Based on the real-time data stream input, update the state S i of the task node v i (t) and the relationship ω ij (t) between tasks through the task node state update formula and the task relationship weight update formula. The formulas are as follows:

[0051] S i (t + △t) = f(S i (t), D(t), Θ i (t))

[0052] ω ij (t + △t) = α · ω ij (t) + β · g(D(t), Θ ij (t))

[0053] Among them, S i (t) represents the state of node v i at time t; D(t) represents the real-time data stream input, which includes the label transition state matrix M’(y i-1 , y i ) obtained in step S2; Θ i (t) represents the dynamic condition set of task v i ; f represents the node state transition function; ω ij (t) represents the task dependency weight at time t; α is a parameter for controlling the task relationship weight; β is a parameter for controlling the influence degree of real-time input; g(·) represents the weight update function, which is calculated based on the data stream D(t) between tasks and the dependency condition Θ i (t);

[0054] Finally, output ω ij (t);

[0055] Step S302: Use ω ij(t) Dynamically adjust the thought chain of real-time input tasks, and dynamically regulate the dependency relationship and order of task nodes through the set of constraint conditions Φ(t). The method for adjusting the dependency relationship and optimizing the task order is defined as follows:

[0056]

[0057] Among them, ω ij (t) represents the current task dependency weight; h(ω ij (t), Φ(t)) is used to calculate the dependency optimization cost between tasks; ξ represents the threshold value, which is used to determine whether to eliminate inefficient or unnecessary task dependencies; Φ(t) represents the system constraint set, such as resource constraints, task priority and other constraint conditions; T k (t) represents the execution time of task node v k , c k represents the weight priority of the task node; O(t) represents the dependency relationship and scheduling order of the task;

[0058] Dynamically adjusting the thought chain needs to meet the global optimization goal. By reducing the global execution loss, adjust the dependency relationship and scheduling order O(t) of the tasks. The specific formula is as follows:

[0059]

[0060] Step S303: Apply the cross-process dynamic feedback mechanism and the system coordination and self-optimization mechanism to the states of different subsystems to achieve unified scheduling and optimization;

[0061] Further, the specific methods of the dynamic feedback mechanism and the system coordination and self-optimization mechanism in step S303 are as follows:

[0062] First, for the real-time feedback and iterative adjustment of the work process state, define the cross-process global feedback error E(t). The specific formula is as follows:

[0063]

[0064] Among them, F a,k (t) represents the actual execution result of the kth process, F e,k (t) represents the target expected value of the kth process, and N represents the total number of processes;

[0065] Second, dynamically adjust the key nodes in the thought chain according to E(t). The specific calculation method is as follows:

[0066]

[0067] Among them, Δω ij represents the adjustment amount of the dependency weight, and λ represents the feedback adjustment coefficient. Indicates the gradient influence of the error on the weight;

[0068] Then, define the collaborative state S C (t) among multiple systems, which is expressed as follows:

[0069]

[0070] where D k (t) represents the input state of the k-th subsystem, p k (t) represents the influence factor of the k-th subsystem, and m represents the number of subsystems;

[0071] Finally, solve for the global optimal solution of the collaborative state among multiple systems through dynamic constraint optimization. The method is defined as follows:

[0072]

[0073] where ψ(C(t), S c (t)) represents the global performance cost, that is, the performance cost between the task dependency and the collaborative state among multiple systems; T j represents the execution time of the j-th critical process; δ j represents the weight coefficient, which depends on the process importance; R j represents the resource allocation capacity.

[0074] Furthermore, the step S4 includes:

[0075] Step S401: Based on the importance S c (t) and the dependency ω ij of the task nodes in the chain of thought, first determine the task priority and define the priority scoring function of the task; then, dynamically allocate computing resources such as CPU, memory, and network bandwidth to meet the task requirements; finally, generate the optimal task scheduling sequence and execute the tasks according to the new task scheduling sequence at runtime. The priority scoring function is defined as follows:

[0076]

[0077] where S C (t) represents the current node state obtained in step S303, ω ij represents the weight of the edge between node i and node j, T a,i represents the estimated execution duration of node i, T f,i represents the latest execution time of task i; the first part λ1·S C (t) represents the real-time state of the node, the second part λ2·∑ ωij ω ij represents the degree of dependency between nodes, and the third part Indicates the urgency of the current node;

[0078] Step S402: Use the execution engine to be responsible for the execution and status management of actual tasks, generate a resource allocation matrix based on the priority of the tasks to monitor the running status of the tasks in real time, and dynamically adjust the thought chain fault tolerance and retry mechanism. Task parallelism and acceleration processing are achieved through the pipeline model, where the task allocation matrix and the pipeline model are defined as follows:

[0079]

[0080] Among them, R i (t) represents the task allocation matrix at the current moment; H(V i ) represents the priority of the current task; R m (t) represents the resource occupancy rate at the current moment; FT represents the pipeline model; C i represents the computing load; D i,j represents the data transfer volume; R i represents the task allocation matrix at the current moment; R ij is an element on R i used to represent the transmission delay from task i to task j; L(G) represents the set of all possible execution paths in the task dependency graph G; the max(·) function is used to obtain the maximum execution time of the tasks in the pipeline, and the first half is used to calculate the execution time of the current task, and the second half is used to calculate the transmission delay;

[0081] Step S403: Dynamic scheduling and optimization strategy. After optimizing the global scheduling performance.

[0082] Furthermore, for the dynamic scheduling and optimization strategy in step S403, the specific method for optimizing the global scheduling performance is as follows:

[0083] First, to ensure scheduling flexibility, a dynamic optimization strategy is designed. Through feedback regulation, the scheduling and execution efficiency are continuously improved. Based on the real-time feedback of the execution engine, the task order and resource allocation are adjusted. The specific formula is defined as follows:

[0084]

[0085] Among them, O represents the adjustment amount of the task scheduling order; E represents the global efficiency loss, represents the partial derivative operation, represents the sensitivity of the loss to the adjustment of the task order, and η and τ represent the adjustment coefficients used to adjust the task order;

[0086] Then, minimize the conflict between task dependencies and resource usage. The specific formula is shown as follows:

[0087]

[0088] Among them, CL represents the minimum execution loss of the input task V i and C(H(V i )) represents the execution loss of the input task V i , and H(V i ) represents the input task priority obtained in step S401; T i represents the duration of the i-th task occupying system resources; R i represents the resources corresponding to task i; κ ij represents the dependency cost between task i and task j;

[0089] Finally, during execution, the task allocation in the thought chain of the workflow is adjusted and optimized in real time according to the feedback. The specific method is as follows:

[0090]

[0091] Furthermore, the above-mentioned step S5 includes:

[0092] Step S501: To ensure the stable operation of the system, rapid fault recovery, and continuous optimization of the overall performance, enabling the workflow to have high stability and adaptability in complex and changing environments, a thought chain anomaly detection mechanism for workflow integration is set up, and anomalies are detected in real time by monitoring key indicators such as task nodes, data streams, and resource utilization rates. To efficiently monitor anomalies, a multi-dimensional monitoring model is adopted to comprehensively evaluate the health status of tasks. The method is as follows:

[0093]

[0094] Among them, ε i is the anomaly evaluation value of task i; M i (t) represents the health degree of the i-th monitoring indicator at time t, such as CPU utilization rate and memory occupancy rate; α i represents the weight coefficient of each monitoring indicator; ΔD represents the change in data during task execution; represents the change rate of data during task execution, which is used to judge data anomalies; β represents the weight factor of data anomalies; when ε i exceeds the preset threshold, the system determines that the task has an anomaly;

[0095] Step S502: Once an anomaly is detected, the system triggers a fault recovery mechanism and uses methods including but not limited to fault tolerance, rollback, and retry to repair the problem and minimize the impact of the anomaly on the overall process; for task execution anomalies, the system can recover through a task retry strategy; for continuously failed tasks, the system will roll back to a stable state;

[0096] Step S503: Using the dynamic scheduling and optimization strategy of S403, based on the anomaly detection results and system performance data, automatically update the task scheduling strategy. For resource anomalies, dynamically adjust resource allocation, and optimize the execution performance through load balancing. The method is as follows:

[0097]

[0098] Among them, U j represents the set of task outliers ε obtained by using Step S501 in the j-th subsystem; w j represents the importance degree of the j-th subsystem in the entire system; the value of w that minimizes the total system cost is obtained through argmin(·) j value;

[0099] Step S504: Combining the real-time feedback information R obtained in S503, adaptively adjust the task execution path to improve the task execution success rate and system efficiency; given the task dependency graph G(V, E), the dynamic path selection formula is defined as follows:

[0100] L = argmin(∑ v∈L(G) C(v) + ε(v))

[0101] where L represents the recalculated task execution path; C(v) represents the execution cost of task node v, L(G) represents the set of all possible execution paths in the task dependency graph G, and ε(v) represents the anomaly risk value of task node v, which is calculated by the anomaly detection model in Step S501.

[0102] The beneficial effects of the present invention include:

[0103] (1) Through semantic analysis and predefined template matching technology, the present invention can flexibly disassemble complex tasks into subtask nodes and support the dynamic generation of thinking chains. This method is not only applicable to application fields with clear rules, but also can handle open domains or complex instructions, significantly improving the accuracy and adaptability of task disassembly. By combining historical data and domain knowledge, the system can quickly match task templates and generate efficient subtask chains to ensure the flexibility and intelligence of task execution;

[0104] (2) Through intelligent logical modeling and real-time data parsing, the present invention can dynamically adjust the logical structure of the thinking chain and task dependency relationships according to the changes in task execution status and external environment. In addition, the system ensures the accuracy and efficiency of task execution by real-time updating the task node status and task relationship weights. This method is particularly applicable to complex workflows in large models and can optimize the task execution path according to real-time feedback to improve the overall execution efficiency;

[0105] (3) Through the task scheduling and execution module, the present invention supports concurrent processing and status monitoring, optimizing resource allocation and the execution order of tasks; the system can dynamically generate an optimal task scheduling sequence according to task priorities and resource availability, significantly improving the task execution efficiency. This method is particularly applicable to the scenario of multi-task parallel processing in large models, which can effectively reduce dependency conflicts between tasks and enhance the concurrent processing ability of the system;

[0106] (4) Through real-time anomaly detection, fault recovery, and artificial intelligence analysis methods based on historical data, the present invention can quickly detect and respond to abnormal situations during task execution, optimize the chain logic, and enhance the stability and reliability of the system; the system can automatically detect anomalies in task nodes, data streams, and resource utilization rates, and quickly recover task execution through mechanisms such as fault tolerance, rollback, and retry, reducing the impact of anomalies on the overall process and ensuring the efficient operation of the workflow;

[0107] (5) Through the dynamic path selection and anomaly risk value evaluation mechanism, the present invention can optimize the execution path in real time during task execution, significantly enhancing the fault tolerance and execution efficiency of complex workflows. The system dynamically adjusts path selection based on the anomaly risk values of task nodes, and combines the comprehensive evaluation of task execution costs and anomaly risks to achieve optimal path planning. This method effectively reduces the impact of anomalies on the overall process, improves the stability and reliability of the system, and is applicable to complex workflow scenarios that require high fault tolerance and real-time optimization.

[0108] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification and the foregoing claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0109] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings, where:

[0110] Figure 1 is a flowchart of a thinking chain system for workflow integration according to the present invention;

[0111] Figure 2 is a diagram of the thinking chain reasoning process for workflow integration according to the present invention;

[0112] Figure 3 is a node and structure diagram of the thinking chain for workflow integration in an embodiment of the present invention;

[0113] Figure 4 is a predefined template diagram of an embodiment of the present invention;

[0114] Figure 5 This is the process diagram of semantic understanding, task decomposition, and subtask generation in the embodiment of the present invention;

[0115] Figure 6 This is the result diagram assisted by the large model of the thinking chain method for the integration of the work process in the embodiment of the present invention;

[0116] Figure 7 This is the process diagram for optimizing the dynamic adjustment strategy of the thinking chain for the integration of the work process in the embodiment of the present invention. Detailed implementation manners

[0117] Hereinafter, with reference to the accompanying drawings, preferred embodiments of the present invention will be described in detail. It should be understood that the preferred embodiments are only for illustrating the present invention, rather than limiting the protection scope of the present invention.

[0118] A thinking chain system and implementation method for the integration of a work process according to the present invention, as Figure 1 shown below. The following will further elaborate on the specific steps of the above method through a specific embodiment. The user submits a work order through the intelligent customer service system: "The order number 20241201 shows that it has been shipped, but it has not been received for a week. Please refund the money." The system reasoning process is as Figure 2 shown. The system needs to decompose the task instructions input by the user into multiple subtask nodes, and dynamically generate a task execution path through the thinking chain system, and finally complete the refund process.

[0119] Step S1: Design the thinking chain structure, define a thinking chain structure with functional nodes, logical nodes, and integration nodes as the core, form a directed chain model that supports the integration of the work process, and the formed thinking chain is as Figure 3 shown;

[0120] Step S1 specifically includes the following sub-steps:

[0121] Step S101: Define the thinking chain nodes. Each node represents a specific work process operation or decision point, and the nodes are divided into functional nodes, logical nodes, and integration nodes; in this embodiment, the functional nodes represent specific operations, such as: "Obtain the order status", "Query the logistics information", "Trigger the refund process"; the logical nodes represent conditional judgments, such as: "Whether the logistics status is 'delivered'"; the integration nodes represent cross-system operations, such as: "Call the logistics system API", "Call the payment system API";

[0122] Step S102: Design the chain logic based on the thinking chain nodes in S101, and use a directed graph or chain structure to describe the association relationship between the nodes;

[0123] Step S103: Define the chain operation rules, determine the triggering conditions of the thinking chain, and describe the execution logic of the chain. When the user submits a work order containing the keyword "refund", the thinking chain is triggered; tasks are executed sequentially according to the node dependency relationship. If a certain node fails to execute, an exception handling mechanism is triggered;

[0124] Step S2: Set up a semantic analysis template to decompose the user input into subtask nodes;

[0125] Step S2 specifically includes the following sub-steps:

[0126] Step S201: According to the structural degree of the input task and the coverage of domain knowledge, select two complementary decomposition methods, namely: predefined template matching and semantic analysis dynamic parsing. Predefined template matching is applicable to domains with clear rules, and semantic analysis dynamic parsing is applicable to open domains or complex instructions;

[0127] Step S202: Divide tasks into two categories: highly repetitive tasks, such as order refunds, equipment failure repairs, etc.; tasks with relatively fixed input formats, such as forms, specific keyword instructions; adopt the predefined template matching method;

[0128] The specific method for constructing the predefined template matching method in Step S202 is as follows:

[0129] First, based on historical task data or domain knowledge, define the mapping relationship between task types and subtask chains to construct a template library. Based on historical work order data, predefined templates are as Figure 4 shown;

[0130] Secondly, for evaluating the importance of keywords in the input text, an auxiliary template matching keyword weight calculation formula is set:

[0131]

[0132] where TF(t,d) represents the number of times the word t appears in the text d, n t represents the number of templates containing the keyword t, and N represents the total number of templates in the template library;

[0133] For the input text: "Order number 20241201 not received, apply for refund", extract keywords: ["order number", "20241201", "not received", "refund"], template keywords: ["refund", "goods not received", "reshipment"]. Calculate the TF-IE vector: V i =[0.5, 0.2, 0.3, 0.4], V t =[0.6, 0.3, 0.1];

[0134] Then, convert the input text and the template keyword list into vectors, and calculate the template matching similarity, that is, the cosine similarity formula is as follows:

[0135]

[0136] Set the threshold θ = 0.8, Sim(V i ,V t ) = 0.85 > 0.8, the input text matches the template successfully, and directly call the template sub-task chain;

[0137] Finally, for short texts, set a sorting function algorithm that is more suitable for short text matching, as follows:

[0138]

[0139] Among them, Q represents the input query, that is, the user input instruction, D represents the template description text, f(t, D) represents the frequency of word t in D, and k1 and b represent adjustable parameters, represents the average length of the text in the template library; if multiple templates are matched, select the template with the highest confidence;

[0140] Step S203: For unstructured inputs, such as free text instructions; for tasks that require dynamic reasoning, such as multi-step decision-making problems, adopt a semantic analysis dynamic parsing implementation method; for the user input "The order shows that it has been shipped but not received. It may be due to an incorrect address. Please process the refund and contact the logistics", perform semantic understanding, task decomposition, and sub-task generation respectively. The specific implementation example is Figure 5 as shown, and the result assisted by the large model is as Figure 6 shown;

[0141] The semantic analysis dynamic parsing implementation method in the above step S203 is as follows:

[0142] First, parse the sentence structure, identify the logical relationship between actions, and use the maximum spanning tree algorithm constructed by the syntactic tree. The formula is as shown in the following formula:

[0143]

[0144] Among them, is the trainable parameter matrix in the neural network, which is used to calculate the dependency score between two words; h i , h j respectively represent the context vectors of words, and ⊙ represents element-wise multiplication of vectors, which is used to capture the feature interaction relationship between word pairs;

[0145] Then, based on the syntactic tree Tree, for the text input by the user, extract the core objects in the task through the named entity recognition model. The probability prediction model of the entity label sequence is defined as follows:

[0146]

[0147] Among them, h i represents the hidden state at the i-th position of the bidirectional LSTM model, M(y i-1 , y i ) represents the label transition matrix, W T lstm and W T crf represent the trainable model parameters based on the maximum spanning tree algorithm, exp(·) is the exponential operation function, y i ’ and y i respectively represent the true value and predicted value of the entity label corresponding to the i -th text;

[0148] Furthermore, the task objective is judged through the text classification model, and the intent label of the input text is predicted. The prediction function is defined as follows:

[0149] LP(lable = c|V i ) = softmax(W c ·H |CLS| + b c )

[0150] Among them, V i represents the text vector of the i-th input, H |CLS| represents the [CLS] token vector output by the large language model, W c and b c represent the classification layer parameters;

[0151] Finally, for the input task text vector V i = [0.5, 0.2, 0.3, 0.4], the updated label transition matrix M’(y i-1 , y i ) is calculated as follows:

[0152]

[0153] Step S3: According to the work process, through intelligent logic modeling, real-time data parsing, and dynamic rule iteration, achieve efficient integration and optimization across work processes, and dynamically generate and adjust the thought chain;

[0154] Step S3 specifically includes the following sub-steps:

[0155] Step S301: Based on the thought chain generated in Step S101, dynamically generate a thought chain according to the work process. Based on the real-time data stream input, update the task node v through the task node status update formula and the task relationship weight update formulai Status S i (t) The relationship between tasks ω ij (t), the formula is as follows:

[0156] S i (t+Δt)=f(S i (t),D(t),Θ i (t))

[0157] ω ij (t+Δt)=α·ω ij (t)+β·g(D(t),Θ ij (t))

[0158] Among them, S i (t) represents the node v i The state at time t; D(t) represents the real-time data stream input, which contains the label transfer state matrix M'(y i-1 ,y i );Θ i (t) represents the task v i The dynamic condition set; f represents the node state transition function; ω ij (t) represents the task dependency weight at time t; α is the parameter that controls the task dependency weight; β is the parameter that controls the influence of real-time input; g(·) represents the weight update function, which is based on the data flow D(t) between tasks and the dependency condition Θ i (t) calculated;

[0159] Finally, the output ω ij (t);

[0160] When the initial weight ω T2-T3 (t) = 0.8, and the relationship between tasks T2 and T3 is updated by calculation:

[0161] ω T2-T3 (t+Δt)=0.7*0.8+0.3*(-0.2)=0.5

[0162] Step S302: Using ω ij (t) Dynamically adjust the thinking chain of real-time input tasks, and dynamically adjust the dependency and order of task nodes through the constraint condition set Φ(t). The dependency adjustment and task order optimization method are defined as follows:

[0163]

[0164] Among them, ω ij (t) represents the current task dependency weight; h(ω ij(t), Φ(t)) is used to calculate the dependency optimization cost between tasks; ξ represents a threshold used to determine whether to eliminate inefficient or unnecessary task dependencies; Φ(t) represents the system constraint set, such as resource limitations, task priorities, and other constraint conditions; T k (t) represents the execution time of task node v k and c k represents the weight priority of the task node; O(t) represents the task dependencies and scheduling order;

[0165] Dynamically adjusting the thought chain needs to meet the global optimization goal. By reducing the global execution loss, adjust the task dependencies and scheduling order O(t). The specific formula is as follows:

[0166]

[0167] Before adjustment, the task chain is: T1 → T2 → T3 → T4, and the total loss Q = 1.2. After adjustment, the task chain is: T1 → T4, and the total loss Q = 0.5;

[0168] Step S303: Apply a cross-process dynamic feedback mechanism and a system coordination and self-optimization mechanism to the states of different subsystems to achieve unified scheduling and optimization;

[0169] The specific methods of the dynamic feedback mechanism and the system coordination and self-optimization mechanism in step S303 are as follows:

[0170] First, for the real-time feedback and iterative adjustment of the workflow state, by defining the cross-process global feedback error E(t), the specific formula is expressed as follows:

[0171]

[0172] Among them, F a,k (t) represents the actual execution result of the kth process. The actual time taken to complete the refund process is F a,k (t) = 15 minutes, and F e,k (t) represents the target expected value of the kth process. The expected time taken to complete the refund process is F e,k (t) = 10 minutes; the calculated error E(t) = 5 minutes;

[0173] Secondly, dynamically adjust the key nodes in the thought chain according to E(t). The specific calculation method is as follows:

[0174]

[0175] Among them, λ = 0.1; The original weight: ω T2-T3 = 0.5 - 0.1 * 0.5 = 0.45;

[0176] Then, define the collaborative state S of multiple systems C (t), and the calculation is as follows:

[0177]

[0178] where D k (t) represents the input state of the k-th subsystem, and p k (t) represents the influence factor of the k-th subsystem, and m represents the number of subsystems;

[0179] Finally, optimize and solve the global optimal solution of the collaborative state among multiple systems through dynamic constraints, and the method is defined as follows:

[0180]

[0181] where ψ(C(t), S c (t)) represents the global performance cost, that is, the performance cost between the task dependency and the collaborative state among multiple systems; T j represents the execution time of the j-th key process; δ j represents the weight coefficient, which depends on the process importance; R j represents the resource allocation capacity.

[0182] Step S4: Implement the task scheduling and execution module, and complete node operations by calling the interface according to the chain logic, supporting concurrent processing and status monitoring;

[0183] Step S401: Based on the importance S c (t) of the task nodes in the chain of thought and the dependency relationship ω ij , first determine the task priority and define the priority scoring function of the task; then, dynamically allocate computing resources such as CPU, memory, and network bandwidth to meet the task requirements; finally, generate the optimal task scheduling sequence and execute the task according to the new task scheduling sequence at runtime. The priority scoring function is defined as follows:

[0184]

[0185] where S C (t) represents the current node state obtained in step S303, ω ij represents the weight of the edge between node i and node j, T a,i represents the estimated execution duration of node i, T f,i represents the latest execution time of task i; the first part λ1·S C (t) represents the real-time state of the node, the second part λ2·∑ ωij ω ij represents the degree of dependency between nodes, and the third part represents the urgency of the current node;

[0186] Given the known parameters λ1 = 0.6, λ2 = 0.3, λ3 = 0.1; T1 represents a verification order, where the real-time status = 0.8, the depth of dependence = 1, the urgency = 0.2, and the priority of T1 is obtained as 0.6×0.8 + 0.3×1 + 0.1×0.2 = 0.86; T2 represents a logistics query, where the real-time status = 0.7, the depth of dependence = 2, the urgency = 0.5, and the priority of T2 is obtained as 0.6×0.7 + 0.3×2 + 0.1×0.5 = 1.07; T3 represents a conditional branch, where the real-time status = 0.9, the depth of dependence = 3, the urgency = 0.1, and the priority of T3 is obtained as 0.6×0.9 + 0.3×3 + 0.1×0.1 = 1.35; T4 represents a refund process, where the real-time status = 1.0, the depth of dependence = 4, the urgency = 0.3, and the priority of T4 is obtained as 0.6×1.0 + 0.3×4 + 0.1×0.3 = 1.83;

[0187] Sorted by priority: T4 > T3 > T2 > T1, but considering the dependency relationship (T1 → T2 → T3 → T4), the actual execution order is adjusted to: T1 → T2 → T3 → T4, but the actual resource allocation will be dynamically adjusted according to the priority;

[0188] The resource requirements for each task are as shown in the following table:

[0189] Task Execution Time (milliseconds) Resource Requirements Input Data Size Output Data Size Dependency T1 200 1 CPU, 500 MB 100 MB 50 MB No Dependency T2 500 0.5 CPU, 250 MB 50 MB 20 MB Depends on T1 T3 150 1 CPU, 400 MB 100 MB 30 MB Depends on T2 T4 300 1 CPU, 300 MB 50 MB 70 MB Depends on T4

[0190] Step S402: Use the execution engine to be responsible for the execution and status management of actual tasks, generate a resource allocation matrix based on the priority of the tasks to monitor the status of task execution in real time, and dynamically adjust the thought chain fault tolerance and retry mechanism, and achieve task parallelism and accelerated processing through the pipeline model, where the task allocation matrix and the pipeline model are defined as follows:

[0191]

[0192] Among them, R i (t) represents the task allocation matrix at the current moment; H(V i ) represents the priority of the current task; R m (t) represents the resource occupancy rate at the current moment; FT represents the pipeline model; C i represents the computing load; D i,j represents the data transfer volume; R i represents the task allocation matrix at the current moment; R ij is R iAn element on it is used to represent the transmission delay from task i to task j; L(G) represents the set of all possible execution paths in the task dependency graph G; the max(·) function is used to obtain the maximum execution time of tasks in the pipeline, and the first half part is used to calculate the execution time of the current task, and the second half part is used to calculate the transmission delay;

[0193] Known resource pool status: CPU = 80%, memory = 60%, network bandwidth = 50%; the resource requirements for each task are: T1: CPU = 80%, memory = 10%; T2: CPU = 40%, network bandwidth = 40%; T3: CPU = 80%, memory = 7%; T4: CPU = 80%, memory = 13%; the allocation strategy is obtained: the high-priority task T4 monopolizes the remaining CPU and memory, and T2 waits for the network bandwidth to be released before execution;

[0194] Step S403: Dynamic scheduling and optimization strategy. After the global scheduling performance is optimized as Figure 7 shown.

[0195] For the dynamic scheduling and optimization strategy in the said step S403, the specific method for optimizing the global scheduling performance is as follows:

[0196] First of all, to ensure the scheduling flexibility, a dynamic optimization strategy is designed, which mainly continuously improves the scheduling and execution efficiency through feedback regulation. Based on the real-time feedback of the execution engine, the task order and resource allocation are adjusted. The specific formula is defined as follows:

[0197]

[0198] Among them, O represents the adjustment amount of the task scheduling order; E represents the global efficiency loss, represents the partial derivative operation, represents the sensitivity of the loss to the adjustment of the task order, and η and τ represent the adjustment coefficients used to adjust the task order;

[0199] Known task execution times are T1 = 200ms, T2 = 500ms, T3 = 150ms, T4 = 300ms; resource capacities are CPU = 80%, memory = 60%; dependency costs are T1 - T2 = 0.3, T2 - T3 = 0.5, T3 - T4 = 0.2;

[0200] Then, minimize the conflict between task dependencies and resource usage. The specific result is shown in the following formula:

[0201]

[0202] Among them, CL represents the minimum execution loss of the input task V i ofi )) represents the execution loss of input task V i , and H(V i ) represents the priority of the input task obtained in step S401;

[0203] Finally, during execution, the task allocation in the workflow of the thought chain is adjusted and optimized in real time according to the feedback. The specific method is as follows:

[0204]

[0205] After optimization, by adjusting the task order and resource allocation, CL is reduced to 12.8, and the efficiency is increased by 30%; concurrent processing reduces the total time consumption from 650 ms to 450 ms, reducing the resource utilization rate by 30.8%; the CPU utilization rate is increased from 70% to 85%; the memory utilization rate is increased from 50% to 75%; the exception recovery ability, that is, the automatic retry success rate after task failure, is increased from 60% to 90%.

[0206] Step S5: Set up an exception handling and self-optimization mechanism to provide exception detection and recovery capabilities. Optimize the chain logic through historical data accumulation and artificial intelligence analysis to improve the execution efficiency and reliability;

[0207] Step S5 specifically includes the following steps:

[0208] Step S501: To ensure the stable operation of the system, rapid recovery from faults, and continuous optimization of the overall performance, enabling the workflow to have high stability and adaptability in complex and changing environments, set up a thought chain exception detection mechanism integrated with the workflow. Real-time detect exceptions by monitoring key indicators such as task nodes, data streams, and resource utilization rates; to efficiently monitor exceptions, adopt a multi-dimensional monitoring model to comprehensively evaluate the health status of tasks. The method is as follows:

[0209]

[0210] Given that the threshold is 2.5, because ε i > 2.5 exceeds the preset threshold, the system determines that the task has an exception and triggers the exception recovery mechanism;

[0211] Step S502: Once an exception is detected, the system triggers the fault recovery mechanism, and uses methods such as fault tolerance, rollback, and retry to repair the problem and minimize the impact of the exception on the overall process; for task execution exceptions, the system can recover through the task retry strategy; for continuously failed tasks, the system will roll back to a stable state;

[0212] Step S503: Using the dynamic scheduling and optimization strategy of S403, based on the anomaly detection results and system performance data, automatically update the task scheduling strategy. For resource anomalies, dynamically adjust resource allocation, and optimize the execution performance through load balancing. The method is as follows:

[0213]

[0214] Among them, U j represents the set of task outliers ε obtained by using Step S501 in the j-th subsystem; w j represents the importance degree of the j-th subsystem in the entire system; the value of w that minimizes the total system cost is obtained through argmin(·) j value;

[0215] Step S504: Combining the real-time feedback information R obtained in S503, adaptively adjust the task execution path to improve the task execution success rate and system efficiency; given the task dependency graph G(V, E), the dynamic path selection formula is defined as follows:

[0216] L = argmin(∑ v∈L(G) C(v) + ε(v))

[0217] Among them, L represents the recalculated task execution path; C(v) represents the execution cost of task node v, L(G) represents the set of all possible execution paths in the task dependency graph G, and ε(v) represents the anomaly risk value of task node v, which is calculated by the anomaly detection model in Step S501.

[0218] The present invention provides a method for implementing a thinking chain system integrated with a workflow. This system can dynamically adjust the task order, dependency relationship, and resource allocation, respond to anomalies in task execution in real time, optimize multi-task parallel execution, and efficiently collaborate among multiple systems. By combining static reasoning with dynamic decision-making, this thinking chain not only improves the flexibility and efficiency of task execution, but also enhances the adaptability to complex and uncertain environments, and can achieve intelligent and automated decision-making and adjustment in complex workflows, thereby significantly improving the overall efficiency and robustness of the workflow.

[0219] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0220] Those of ordinary skill in the art can understand that all or part of the steps carried by the method of the above embodiments can be completed by instructing relevant hardware through a program. The above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0221] In addition, each functional unit in various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0222] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc.

[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the present technical solution, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A method for implementing a thought chain system with workflow integration, characterized in that: The method includes the following steps: Step S1: Design a thinking chain structure, define a thinking chain structure with functional nodes, logical nodes, and integration nodes as the core, and form a directed chain model to support the integration of work processes; Step S2: Set up a semantic analysis template to disassemble external input information into subtask nodes; Step S3: According to the work process, through intelligent logical modeling, real-time data parsing, and dynamic rule iteration, achieve efficient integration and optimization across work processes, and dynamically generate and adjust the thinking chain; Step S4: Implement a task scheduling and execution module, call interfaces according to the chain logic to complete node operations, and support concurrent processing and status monitoring; Step S5: Set up an exception handling and self-optimization mechanism, provide the ability of exception detection and recovery, optimize the chain logic through historical data accumulation and artificial intelligence analysis, and output the optimal thinking chain structure.

2. The implementation method of a thinking chain system integrated with a work process according to claim 1, characterized in that: The specific content of step S1 includes: Step S101: Define thinking chain nodes, each node represents a specific work process operation or decision point, and the nodes are divided into functional nodes, logical nodes, and integration nodes; Step S102: Design chain logic based on the thinking chain nodes in S101, and use a directed graph or chain structure to describe the association relationship between nodes; Step S103: Define the chain operation rules, determine the trigger conditions of the thinking chain, and describe the execution logic of the chain.

3. The implementation method of a thinking chain system for integrating work processes according to claim 1, characterized in that: The step S2 includes: Step S201: According to the structured degree of the input task and the coverage of domain knowledge, select two complementary disassembly methods, namely: predefined template matching and semantic analysis dynamic parsing. Predefined template matching is applicable to domains with clear rules, and semantic analysis dynamic parsing is applicable to open domains or complex instructions; Step S202: Divide the tasks into two categories: highly repetitive tasks and tasks with relatively fixed input formats, and adopt the predefined template matching method; Step S203: For unstructured inputs and tasks that require dynamic reasoning, adopt the semantic analysis dynamic parsing implementation method.

4. The implementation method of a thinking chain system integrated with a work process according to claim 3, characterized in that: The specific method for constructing the predefined template matching method in step S202 is as follows: First, based on historical task data or domain knowledge, define the mapping relationship between task types and subtask chains to construct a template library; Secondly, for evaluating the importance of keywords in the input text, assist the template matching to set the keyword weight calculation formula: Among them, TF(t, d) represents the number of times the word t appears in the text d, and n t represents the number of templates containing the keyword t, and N represents the total number of templates in the template library; Then, convert the input text and the template keyword list into vectors, and calculate the template matching similarity. The formula is as follows: Among them, V i represents the text vector of the i-th input, and V t represents the template keyword vector of the t-th; If the length difference between the input text and the template is large, perform a normalization operation on the input text vector: Among them, ||·||2 is the square root of the sum of the squares of each component; Finally, for short texts, set a sorting function algorithm that is more suitable for short text matching, as shown below: Among them, Q represents the input query, that is, the user input instruction, D represents the template description text, f(t, D) represents the frequency of the word t in D, k1 and b represent adjustable parameters, represents the average length of the text in the template library.

5. The implementation method of a thinking chain system integrated with a work process according to claim 3, characterized in that: The semantic analysis dynamic parsing implementation method in step S203 is as follows: First, parse the sentence structure, identify the logical relationship between actions, and use the maximum spanning tree algorithm constructed by the syntactic tree, and the formula is shown as follows: Among them, is a trainable parameter matrix in the neural network, used to calculate the dependency score between two words; h i , h j respectively represent the context vectors of words, and ⊙ represents element-wise multiplication of vectors, used to capture the feature interaction relationship between word pairs; Then, based on the syntactic tree Tree, for the text input by the user, extract the core objects in the task through the named entity recognition model. The probability prediction model of the entity label sequence is defined as follows: where h i represents the hidden state at the i-th position of the bidirectional LSTM model, M(y i-1 , y i ) represents the label transition matrix, W T lstm and W T crf represent the trainable model parameters based on the maximum spanning tree algorithm, exp(·) is the exponential function, y i ’ and y i respectively represent the true value and the predicted value of the entity label corresponding to the i -th text; Furthermore, the task objective is judged by the text classification model, and the intent label of the input text is predicted. The prediction function is defined as follows: LP(label = c|V i ) = softmax(W c ·H |CLS| + b c ) Among them, V i represents the text vector of the i-th input, H |CLS| represents the [CLS] token vector output by the large language model, W c and b c represent the classification layer parameters; Finally, output the updated label transition matrix M’(y i-1 , y i ).

6. The implementation method of a thinking chain system integrated with a workflow according to claim 1, characterized in that: The step S3 includes: Step S301: Based on the thought chain generated in Step S101, dynamically generate a thought chain according to the work process. Based on the real-time data stream input, update the state S of task node v through the task node status update formula and the task relationship weight update formula i of the state S i (t) and the relationship ω ij (t) between tasks. The formulas are as follows: S i (t + △t) = f(S i (t), D(t), Θ i (t)) ω ij (t + △t) = α·ω ij (t) + β·g(D(t), Θ ij (t)) Among them, S i (t) represents the state of node v i at time t; D(t) represents the real-time data stream input, which includes the label transition state matrix M’(y i-1 , y i ) obtained in step S2; Θ i (t) represents the set of dynamic conditions of task v i ; f represents the node state transition function; ω ij (t) represents the task dependency weight at time t; α is a parameter for controlling the task relationship weight; β is a parameter for controlling the influence degree of real-time input; g(·) represents the weight update function, which is calculated based on the data stream D(t) between tasks and the dependency condition Θ i (t). Finally, output ω ij (t); Step S302: Utilize ω ij (t) to dynamically adjust the thought chain of the real-time input task, and dynamically adjust the dependency relationship and order of task nodes through the constraint set Φ(t). The method for adjusting the dependency relationship and optimizing the task order is defined as follows: Among them, ω ij (t) represents the current task dependency weight; h(ω ij (t), Φ(t)) is used to obtain the dependency optimization cost between tasks; ξ represents a threshold value used to determine whether to eliminate inefficient or unnecessary task dependencies; Φ(t) represents the system constraint set, such as resource limitations, task priority and other constraint conditions; T k (t) represents the execution time of task node v k , c k represents the weight priority of the task node; O(t) represents the task dependency and scheduling order; The dynamic adjustment of the thought chain needs to meet the global optimization objective. By reducing the global execution loss, the dependency relationship and scheduling order O(t) of the task are adjusted. The specific formula is as follows: Step S303: Apply the cross-process dynamic feedback mechanism and the system coordination and self-optimization mechanism to the states of different subsystems to achieve unified scheduling and optimization.

7. The implementation method of a thinking chain system for workflow integration according to claim 6, characterized in that: The specific methods of the dynamic feedback mechanism and the system coordination and self-optimization mechanism in step S303 are as follows: First, for the real-time feedback and iterative adjustment of the workflow state, the cross-process global feedback error E(t) is defined. The specific formula is as follows: Among them, F a,k (t) represents the actual execution result of the k-th process, and F e,k (t) represents the target expected value of the k-th process, and N represents the total number of processes; Second, the key nodes in the thought chain are dynamically adjusted according to E(t). The specific calculation method is as follows: Among them, Δω ij represents the adjustment amount of the dependence weight, and λ represents the feedback adjustment coefficient, represents the gradient influence of the error on the weight; Then, define the collaborative state S C (t) among multiple systems as follows: Among them, D k (t) represents the input state of the k-th subsystem, and p k (t) represents the influence factor of the k-th subsystem, and m represents the number of subsystems; Finally, the global optimal solution of the coordination state between multiple systems is obtained by dynamically constrained optimization. The method is defined as follows: Among them, ψ(C(t), S c (t)) represents the global performance cost, that is, the performance cost between the task dependency relationship and the collaborative state among multiple systems; T j represents the execution time of the j-th critical process; δ j represents the weight coefficient, which depends on the process importance; R j represents the resource allocation capacity.

8. The implementation method of a thinking chain system for workflow integration according to claim 7, characterized in that: The step S4 includes: Step S401: Based on the importance S of the task nodes in the chain of thought c (t) and the dependency relationship ω ij , first determine the task priority and define the priority scoring function of the task; then, dynamically allocate computing resources to meet the task requirements; finally, generate the optimal task scheduling sequence and execute the tasks according to the new task scheduling sequence at runtime. The priority scoring function is defined as follows: Among them, S C (t) represents the current node state obtained in step S303, ω ij represents the weight of the edge between node i and node j, T a,i represents the estimated execution duration of node i, T f,i represents the latest execution time of task i; The first part λ1·S C (t) represents the real-time state of the node, and the second part λ2·∑ ωij ω ij represents the degree of dependence between nodes, and the third part represents the urgency of the current node; Step S402: Use the execution engine to be responsible for the execution and status management of the actual task. Based on the priority of the task, a resource allocation matrix is generated to monitor the running status of the task in real time, and the thought chain fault tolerance and retry mechanism is dynamically adjusted. The task parallelism and acceleration processing are realized through the pipeline model. The task allocation matrix and the pipeline model are defined as follows: Among them, R i (t) represents the task allocation matrix at the current moment; H(V i ) represents the priority of the current task; R m (t) represents the resource occupancy rate at the current moment; FT represents the pipeline model; C i represents the computing load; D i,j represents the data transfer volume; R i represents the task allocation matrix at the current moment; R ij is an element on R i and is used to represent the transmission delay from task i to task j; L(G) represents the set of all possible execution paths in the task dependency graph G; the max(·) function is used to obtain the maximum execution time of tasks in the pipeline, and the first half is used to calculate the execution time of the current task, and the second half is used to calculate the transmission delay; Step S403: Apply the dynamic scheduling and optimization strategy to perform global scheduling and performance optimization on multiple subsystems.

9. The implementation method of a thinking chain system for workflow integration according to claim 8, characterized in that: The specific steps of the dynamic scheduling and optimization strategy in step S403 are as follows: First, to ensure the scheduling flexibility, a dynamic optimization strategy is designed. Through feedback regulation, the scheduling and execution efficiency are continuously improved. Based on the real-time feedback of the execution engine, the task order and resource allocation are adjusted. The specific formula is defined as follows: where, O represents the adjustment amount of the task scheduling order; E represents the global efficiency loss. represents the partial derivative operation. represents the sensitivity of the loss to the adjustment of the task order, and η and τ represent the adjustment coefficients used to adjust the task order. Then, minimize the conflict between the task dependency relationship and resource usage. The specific formula is shown as follows: where CL represents the minimum execution loss of the input task V i ), C(H(V i )) represents the execution loss of the input task V i ), and H(V i ) represents the input task priority obtained in step S401; T i represents the duration for which the i-th task occupies system resources; R i represents the resource corresponding to task i; κ ij represents the dependency cost between task i and task j; Finally, during execution, according to the feedback, the task allocation of the workflow in the thought chain is adjusted and optimized in real time. The specific method is as follows:

10. The implementation method of a thinking chain system integrated with a workflow according to claim 8 or 9, characterized in that: The step S5 includes: Step S501: Set the thought chain anomaly detection mechanism integrated with the workflow. By monitoring key indicators, anomalies are detected in real time. To efficiently monitor anomalies, a multi-dimensional monitoring model is adopted to comprehensively evaluate the health status of the task. The method is as follows: Among them, ε i Abnormal evaluation value of task i; M i (t) represents the health of the i-th monitoring indicator at time t, such as CPU utilization rate, memory occupancy rate; α i Represents the weight coefficient of each monitoring indicator; ΔD represents the change in data during the execution of the task; Represents the rate of change of data during the execution of the task, used to judge data anomalies; β represents the weight factor of data anomalies; when ε i Exceeds the preset threshold, the system determines that the task is abnormal; Step S502: Once an anomaly is detected, the system triggers the fault recovery mechanism to repair the problem and minimize the impact of the anomaly on the overall process. For task execution anomalies, the system recovers through the task retry strategy. For continuously failed tasks, the system will roll back to a stable state. Step S503: Use the dynamic scheduling and optimization strategy in step S403. Based on the anomaly detection results and system performance data, the task scheduling strategy is automatically updated. For resource anomalies, the resource allocation is dynamically adjusted, and the execution performance is optimized through load balancing. The method is as follows: Among them, U j represents the set of outliers ε of the tasks obtained by using step S501 in the j-th subsystem; w j represents the importance degree of the j-th subsystem in the entire system; the value of w that minimizes the total system cost is obtained through argmin(·) j value; Step S504: Combine the real-time feedback information R obtained in S503 to adaptively adjust the task execution path to improve the task execution success rate and system efficiency. Given the task dependency graph G(V, E), the dynamic path selection formula is defined as follows: L = argmin(∑ v∈L(G) C(v) + ε(v)) Among them, L represents the recalculated task execution path; C(v) represents the execution cost of task node v, L(G) represents the set of all possible execution paths in task dependency graph G, and ε(v) represents the exception risk value of task node v, which is calculated by the exception detection model in step S501.

Citation Information

Cited By

  • Automatic task processing method, system and device and storage medium

    CN121523861A