Intelligent workflow driving method and device, computer equipment and readable storage medium
By switching to intent-driven mode when the main process instance reaches an intent node, and creating sub-process instances in parallel, the problem that traditional workflows cannot handle multiple intent interactions is solved, and efficient process processing of complex business is achieved.
Patent Information
- Application Number
- CN202510914290.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-17
Smart Images

Figure CN120806600A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and can be applied to the fields of financial technology and medical health, and in particular relates to an intelligent workflow driving method and device, a computer device and a readable storage medium. BACKGROUND
[0002] With the acceleration of digital transformation in the fields of medical health and financial technology, the demand for intelligent process management by business scenarios is increasingly urgent. In the field of medical health, online consultation and prescription circulation scenarios need to be combined with AI to achieve diagnosis assistance and process automation; in the field of financial technology, insurance underwriting and customer rights management businesses rely on flexible workflows to cope with complex requirements of multiple channels and multiple rules.
[0003] In related technologies, traditional workflow frameworks such as traditional workflows represented by Activity adopt linear approval processes, which are applied to online consultation and prescription circulation scenarios, and LLM flow frameworks represented by Dify adopt fixed node type processing processes, which are applied to insurance underwriting and customer rights management scenarios.
[0004] In the process of implementing the present application, the applicant found that the related technologies at least have the following problems:
[0005] Traditional workflows only support linear approval processes and cannot cope with multi-intent interactions, and LLM workflows support intent recognition but can only handle simple processes and cannot implement node expansion and process nesting for complex businesses. SUMMARY
[0006] Therefore, the present application provides an intelligent workflow driving method and device, a computer device and a readable storage medium, which mainly aims to solve the problem that traditional workflows only support linear approval processes and cannot cope with multi-intent interactions, and LLM workflows support intent recognition but can only handle simple processes and cannot implement node expansion and process nesting for complex businesses.
[0007] According to a first aspect of the present application, an intelligent workflow driving method is provided, which comprises:
[0008] receiving a business trigger signal uploaded by a user based on a terminal device, and creating a main process instance according to the business trigger signal;
[0009] setting a workflow driving mode to a linear driving mode, and running the main process instance according to the linear driving mode until a business node with a node type of an intent node is reached, adjusting the workflow driving mode to an intent driving mode, and starting a user session according to the intent driving mode;
[0010] listening to a user inputted business content, determining at least one user intent existing in the business content;
[0011] determining a workflow template corresponding to each user intent according to an intent mapping configured by the intent node, and creating a sub-process instance for each user intent in parallel according to the workflow template corresponding to each user intent, wherein each of the sub-process instances is mounted under the main process instance;
[0012] after all the sub-process instances are run, returning to the main process instance, adjusting the workflow driving mode to a linear driving mode, and continuing to run a business node after the intent node according to the linear driving mode.
[0013] According to a second aspect of the present application, an intelligent workflow driving device is provided, which comprises:
[0014] a receiving module configured to receive a business trigger signal uploaded by a user based on a terminal device, and create a main process instance according to the business trigger signal;
[0015] a setting module configured to set a workflow driving mode to a linear driving mode, and run the main process instance according to the linear driving mode until a business node of an intent node type is reached, adjust the workflow driving mode to an intent driving mode, and start a user session according to the intent driving mode;
[0016] a first determining module configured to listen to a user inputted business content, and determine at least one user intent existing in the business content;
[0017] a second determining module configured to determine a workflow template corresponding to each user intent according to an intent mapping configured by the intent node, and create a sub-process instance for each user intent in parallel according to the workflow template corresponding to each user intent, wherein each of the sub-process instances is mounted under the main process instance;
[0018] a running module configured to, after all the sub-process instances are run, return to the main process instance, adjust the workflow driving mode to a linear driving mode, and continue to run a business node after the intent node according to the linear driving mode.
[0019] According to a third aspect of the present application, a computer device is provided, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of any one of the first aspect when executing the computer program.
[0020] According to a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program. The computer program, when executed by a processor, implements the steps of the method according to any one of the first aspect.
[0021] By means of the technical solutions described above, the intelligent workflow driving method, device, computer device and readable storage medium provided by the present application are provided. When the main process instance runs to the intention node, the workflow driving mode is actively switched from the linear driving mode to the intention driving mode, and then the natural language processing technology is used to analyze multiple intentions in the user input content, and a sub-process instance corresponding to each user intention is created in parallel and mounted under the main process instance. In the complex scene of financial customer service, medical diagnosis and other multi-dimensional interaction requirements, the multi-mode driving and process nesting mechanism of the embodiments of the present application breaks through the limitation of the traditional workflow framework which only supports single rule approval, significantly improves the system response efficiency, and can more accurately and efficiently realize the business requirements of users.
[0022] The above description is only a summary of the technical solutions of the present application. In order to enable the technical means of the present application to be more clearly understood, the following detailed description of the embodiments of the present application can be implemented according to the content of the description, and in order to enable the above and other purposes, characteristics and advantages of the present application to be more obvious and easy to understand, the following detailed description of the embodiments of the present application is provided. BRIEF DESCRIPTION OF DRAWINGS
[0023] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not meant to limit the present application. Furthermore, the same reference numerals are used throughout the several drawings to designate the same or similar parts. In the drawings:
[0024] Figure 1 A flowchart of an intelligent workflow driving method provided by an embodiment of the present application is shown;
[0025] Figure 2 Another flowchart of an intelligent workflow driving method provided by an embodiment of the present application is shown;
[0026] Figure 3 Another flowchart of an intelligent workflow driving method provided by an embodiment of the present application is shown;
[0027] Figure 4 Another flowchart of an intelligent workflow driving method provided by an embodiment of the present application is shown;
[0028] Figure 5 Another flowchart of an intelligent workflow driving method provided by an embodiment of the present application is shown;
[0029] Figure 6Another intelligent workflow driving method provided by the embodiment of the application is shown in a flowchart;
[0030] Figure 7 A structure diagram of an intelligent workflow driving device provided by the embodiment of the application is shown;
[0031] Figure 8 A device structure diagram of a computer device provided by the embodiment of the application is shown. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present application, and cannot be interpreted as a limitation of the present application.
[0033] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms unless specifically stated otherwise. It should be further understood that the use of the term "including" in the specification of the present application means that the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0034] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as that understood by ordinary skilled persons in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood as having meanings consistent with those in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such.
[0035] Those skilled in the art will appreciate that, as used herein, a "terminal" is inclusive of a device with wireless signal reception capabilities, a device with wireless signal reception capabilities only, and a device with both reception and transmission hardware enabling two-way communications over a bi-directional communication link. Such devices can include cellular or other communications devices with or without a multi-line display; Personal Communications Service (PCS) devices that can combine a voice, data processing, facsimile, and / or data communications capabilities; PDA's (Personal Digital Assistants) that can include a radio frequency receiver and / or a Global Positioning System (GPS) receiver, a pager, or other devices that have a radio frequency receiver and / or a Global Positioning System (GPS) receiver; a conventional laptop and / or palmtop computer and / or other devices that have a radio frequency receiver and / or a Global Positioning System (GPS) receiver. As used herein, "terminal" can be portable, transportable, installed in a vehicle (aeronautical, maritime, and / or land), or adapted and / or configured for local operation and / or for operation in a distributed fashion at any other location on Earth and / or in space. As used herein, "terminal" can also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playing function, a smart television, a set-top box, and the like.
[0036] The intelligent workflow driving method provided in the embodiments of the present application is applicable to a SOP workflow driving engine system. The SOP workflow driving engine system mainly consists of two parts, namely, a SOP workflow customization background and a SOP workflow driving engine. A related technical person can access the SOP workflow customization background and perform process design on a workflow canvas provided by the SOP workflow customization background. The system is preset with a rich node type library, including a start node, a sub-process node, a business node, a pass card node, a function node, a dialogue node, an intent node, an event node, a message node, a parallel node, and an end node. The related technical person performs process design by dragging and dropping node components and connection lines on the workflow canvas. When drawing a connection line between nodes, a semantic constraint condition can be bound, such as 'whether a traditional Chinese medicine prescription can be pushed' and 'whether a customer unit price exceeds 200 yuan'. The designed template is stored in a template warehouse in a JSON format after passing a legality check. In addition, the SOP workflow driving engine system also provides a man-machine interaction interface, and a user with a business demand can access the man-machine interaction interface provided by the SOP workflow driving engine based on a terminal device, and upload a business trigger signal on the man-machine interaction page. It should be noted that the terminal device used by the user can be an electronic device such as a mobile phone, a tablet computer or a computer, and the present application does not specifically limit the device model of the terminal device.
[0037] The embodiments of the present application provide an intelligent workflow driving method, as shown in Figure 1 The method comprises the following steps:
[0038] S10, receiving a business trigger signal uploaded by a user based on a terminal device, and creating a main process instance according to the business trigger signal.
[0039] In the embodiments of the present application, a user with a business demand can access a man-machine interaction interface provided by a SOP workflow driving engine based on a terminal device, and input a business demand on the man-machine interaction page, that is, upload a business trigger signal. Further, as shown in Figure 2 The SOP workflow driving engine responds to the business trigger signal and performs the following steps S11 to S14 to create a main process instance.
[0040] S11, using an event listening module to capture the business trigger signal, analyzing metadata corresponding to the business trigger signal, and reading field content of a target field in the metadata.
[0041] In this step, after the user uploads the service trigger signal through the terminal device, the system receives the service trigger signal and parses the metadata corresponding to the service trigger signal. It can be understood that the metadata corresponding to the service trigger signal includes fields such as service type, user and terminal information, and extension information. In the embodiments of the present application, the target field is the service type field, and the system can parse the metadata by cooperating a regular expression matching engine and a natural language processing (NLP) module, and then obtain the field content corresponding to the service type field. For example,
service type: online consultation
service type: health insurance consultation
[0042] S12, read all template indexes in the template repository, determine a specified template index matching the field content in all template indexes, and load a workflow template corresponding to the specified template index.
[0043] In the embodiments of the present application, the template repository is a structured storage carrier for storing workflow templates created by the SOP workflow customization background. The workflow templates include three types of basic template types, namely general workflow templates, sub-process workflow templates, and channel workflow templates. It can be understood that the general workflow templates are mainly for basic business processes, such as identity verification, session initialization, etc. The sub-process workflow templates encapsulate smaller business units and can support parent process nesting, such as prescription review, right query, etc. The channel workflow templates are mainly used to adapt to differentiated service entrances and contain channel-specific interaction nodes.
[0044] It can be understood that in the process of storing the workflow template, a template index needs to be created for the workflow template. The template index is a unique identifier carrier of the template, adopts a composite key-value pair structure, and its metadata at least includes a basic attribute field, an intent label field and a sub-process reference field. It should be noted that the basic attribute field can include a template identifier, a template creation time and a template version number, etc. The intent label field is used to indicate the user intent applicable to the template, which is a predefined user intent based on the disassembly of the business scenario. The sub-process reference field is used to indicate the list of sub-process template indexes referenced by the template.
[0045] In actual operation, the system can perform real-time scanning on the index in the template repository through the distributed search engine. For the business type field specified in the metadata, the regular expression engine matches the set of intent labels in the index to determine the template index with consistent content as the specified template index, such as the templates “follow-up visit” and “health insurance consultation”. For ambiguous input, the knowledge base is used for semantic expansion, and then the cosine similarity algorithm is used to calculate the matching degree with each index to determine the template with the highest matching degree as the specified template index. For example, the text converted from voice is “I want to claim hospitalization expenses”, the semantic expansion is performed using the medical template-template financial cross-domain knowledge graph to obtain the template “claim hospitalization expenses”-“health insurance-hospitalization claim application”, and then the cosine similarity algorithm is used to calculate the index matching degree based on the “health insurance-hospitalization claim application” template.
[0046] S13, verifying the legality of the nodes and the connection lines in the workflow template, and generating a verification result.
[0047] In this step, before calling the workflow template, the system will again verify the legality of the nodes and the connection lines in the workflow template to ensure that the process can run normally. Specifically, the node type can be matched with the business scenario constraint through the enumeration value verifier. For example, in the medical scenario, the “prescription issuing node” template must be a doctor role node with approval authority, and a nurse role node is prohibited from directly issuing a prescription. In the financial scenario, the “fund transfer node” template must be associated with a joint rule check sub-process node, otherwise it is considered to be an abnormal configuration. The effectiveness of the connection between nodes can also be detected based on the graph theory adjacency matrix algorithm to ensure that the starting node and the target node have a legal connection in the template canvas. For example, in the financial claim process, the template “data submission node” template is not connected to the template “audit node” template, which triggers an exception.
[0048] Finally, if all verification links indicate pass, a verification result indicating that the structure of the workflow template is normal is generated, and then step S14 is executed to create a main process instance using the process instance factory. If any verification link indicates fail, a verification result indicating that the structure of the workflow template is abnormal is generated. It can be understood that if the verification result indicates that the structure of the workflow template is abnormal, the system will generate a template exception prompt and send the prompt to the operation terminal of the relevant technical personnel. At the same time, an artificial service prompt is generated and sent to the user terminal, and an artificial agent is dispatched to handle the business needs of the user. In actual operation, the current session context of the user can be transmitted to the artificial agent system after desensitization through an encrypted channel to avoid repeated information collection.
[0049] It can be understood that after the technical personnel create the workflow template, the system can perform business rule verification on the workflow template in addition to verifying the process template infrastructure, for example, verifying whether the template "electronic medical record review node" template is configured with patient authorization validity period constraints to prevent unauthorized access to medical data. Check if the template "traditional Chinese medicine prescription node" template is associated with the template "incompatibility knowledge base call" template sub-process to ensure prescription safety. Verify whether the template "health insurance claim node" template contains the template "past medical history check" template and the template "claim fraud rule engine call" template node to meet the insurance industry regulatory requirements. For the intent mapping rules of the LLM template node (i.e., the intent node), verify the association between the intent label and the downstream sub-process node, such as whether the medical scenario template "query test report intent" template correctly associates the template "test report template API template call node". After all the checks indicate that the structure of the workflow template is normal, the workflow template is stored in the template warehouse.
[0050] S14, when the verification result indicates that the structure of the workflow template is normal, a process instance factory is called to create a main process instance.
[0051] In this step, the process instance factory can construct an instance generator according to the actual application scenario, such as a medical instance generator and a financial instance generator. Further, when the verification result indicates that the structure of the workflow template is normal, the SOP workflow driving engine extracts the basic parameters in the business trigger signal, including user identification, terminal device information, business trigger timestamp, and channel source identification, and sends the basic parameters to the corresponding instance generator. Through the instance generator, a data storage area is dynamically allocated, for example, a medical channel template creates a context container containing a real-time vital sign cache area, and physical isolation of different scene data is realized through containerization technology (such as Docker), meeting the security and compliance requirements of medical privacy data and financial transaction data. Further, the system realizes intelligent binding of template nodes and business data through a dynamic parameter mapping engine, for example, injecting "patient ID" in the metadata into the "userIdentifier" parameter of the medical template "identity verification node". Pass "customer number" to the "policyHolderId" field of the financial template "policy query node", etc.
[0052] It can be understood that the instance generator supports the context parameter passing between the parent process and the sub-process, and the cascading injection is realized through the sub-process reference relationship in the template index. For example, when the medical main process "online consultation" triggers the "prescription review sub-process", the parameters such as "diagnosis result" and "dose of medication" are automatically passed to the sub-process node. When the financial main process "health insurance consultation" calls the "equity query sub-process", it carries parameters such as "customer risk level" and "policy effective date" to complete initialization. After initialization, an identifier is generated for the main process instance, and then the instance state and identifier of the main process instance are written into the Hbase process table. It should be noted that the Hbase process table refers to a process instance state storage and full-link tracking table based on the distributed database HBase, which is mainly used to record the running state, identifier and execution trajectory of the main process instance, to support process log tracking and analysis at a large data level.
[0053] S20, set the workflow driving mode to linear driving mode, and run the main process instance according to the linear driving mode until a business node of the node type is an intent node, adjust the workflow driving mode to intent driving mode, and start a user session according to the intent driving mode.
[0054] In this step, as shown in Figure 3 , the workflow engine first configures the driving mode of the current main process instance as linear driving mode. In this mode, the engine executes each business node in series according to the predefined workflow template node connection sequence, such as running the "identity verification node" first, calling the third-party API to verify the user's identity. The identity information provided by the user is sent to the API, and the subsequent process is determined according to the verification result returned by the API. The engine continues to execute the subsequent nodes in order until an intent node is encountered, that is Figure 3 , the "diagnosis node". When the intent node is detected, the engine immediately switches the driving mode of the current main process instance from "linear driving mode" to "intent driving mode". At the same time, the engine sends the pre-set interaction sentences associated with the intent node to the terminal device operated by the user through the integrated communication module. These interaction sentences aim to guide the user to input information or express intent, for example, asking "What business do you need to handle?" or "Please tell me your specific needs". After sending the interaction sentences, the engine marks the instance state of the main process instance as paused to freeze the timestamp of the main process instance. That is, the timer or time-related state of the process instance will be suspended and no longer advanced during the pause period, thereby ensuring that the process state remains accurately frozen during the waiting period for user input. After completing the above operations, the engine starts a session with the user according to the intent driving mode. In this mode, the engine listens to and parses the business content input by the user through the terminal device, and according to the parsing result and the predefined intent processing logic, decides the subsequent operation path, such as Figure 3As shown, one of the prescription sub-process, the medical sub-process, the benefit interpretation sub-process is executed, or the prescription sub-process, the medical sub-process, the benefit interpretation sub-process are processed in parallel.
[0055] S30, listen to the service content input by the user, and determine at least one user intent existing in the service content.
[0056] In the embodiments of the present application, as shown Figure 4 The system creates an independent real-time listening thread for the current intent node, the thread actively subscribes to the user input channel, and sets a timeout threshold, such as 30s, 60s, etc. If the system receives the service content input by the user before the timeout threshold, it executes the following step S33 to determine at least one user intent existing in the service content. If the system does not receive the service content input by the user before the timeout threshold, it executes the following step S32 to return the running result of the interaction timeout.
[0057] S31, start a real-time listening thread, subscribe to the user input channel and set a timeout.
[0058] In this step, in order to reasonably utilize system resources and give the user sufficient input time, the system starts an independent real-time listening thread, which connects to the user input channel through a specific communication protocol and completes the subscription operation of the user input channel. The user input channel here can be in various forms, such as network-based API interface, input box of graphical user interface, audio receiving port of voice interaction system, etc., which can receive the service content submitted by the user through keyboard input, voice command, touch operation, etc. At the same time, the system sets a configurable timeout parameter for the listening thread. The setting of the timeout time is based on the actual business demand, for example, in some business scenarios with high requirements for interaction timeliness, the timeout time can be set to a shorter value, such as 30 seconds; while in some scenarios that allow the user to have more thinking time, the timeout time can be appropriately extended, such as 5 minutes. The role of this timeout time is to define the effective duration of the system waiting for user input, and once the duration is exceeded, the system will trigger the corresponding processing logic.
[0059] S32, if the service content input by the user is not received within the timeout time, return the running result of the interaction timeout, determine the to-be-operated business node corresponding to the running result according to the running rule associated with the intent node, and adjust the workflow driving mode to the linear driving mode, and continue to operate the to-be-operated business node according to the linear driving mode.
[0060] In this step, if no user input business content is detected within the timeout time, the system will generate and return an interactive timeout running result. This running result contains identification information of the interactive timeout and related metadata such as timestamps, which are used for subsequent process processing and log recording. After generating the interactive timeout running result, the system will query and determine the next pending business node according to the predefined running rules in the intent node. Each intent node is associated with a specific set of running rules during system design phase, which are stored in the form of JSON format files, clearly specifying the target node to jump to under different running results. For example, in the common customer service business scenario, if the intent node corresponds to the user question consultation link, when the interactive timeout occurs, according to the predefined rules, the system will default to jump to the manual takeover node, so as to intervene the user demand by manual customer service. In the order processing business scenario, interactive timeout may cause the process to jump to the order confirmation node, waiting for the user's further operation.
[0061] Further, the system will switch the current workflow driving mode from intent driving mode to linear driving mode, and process the determined pending business node according to the rules of linear driving mode. It should be noted that if the pending node is still an intent node, the system will set the workflow driving mode to intent driving mode again to ensure that the intent node can be accurately processed based on the user input intent, and update the state information of the process instance synchronously, including node execution state, timestamp, associated data, etc., so as to monitor and trace the running situation of the entire workflow.
[0062] S33, if the user input business content is received within the timeout time, the business content is identified based on natural language processing technology, at least one user intent existing in the business content is determined, and the instance state of the intent node is marked as a suspended state to freeze the main process instance timestamp.
[0063] In this step, if the user input business content is received within the timeout time, including text messages, speech-to-text results, etc. First, the input data is preprocessed, including text cleaning, speech-to-text, multi-language normalization, etc., to form standardized processable text. Then, a large language model (LLM) node is called for intent recognition, which supports batch processing of multiple potential intents in user input, such as simultaneously recognizing "claim doctor guide" and "query benefits" complex intents.
[0064] Further, to prevent concurrent conflicts and provide accurate time reference for subsequent process recovery, after identifying the user intent, the system updates the instance state of the current intent node to "pause" through the database state field, and records the accurate timestamp in the main process instance to freeze the execution time of the node. Then, according to the identified user intent, the pre-defined intent-process mapping rule is queried to automatically match and start the corresponding sub-process. If multiple independent intents are detected, the engine creates a parallel execution environment through thread pool technology to support the synchronous operation of multiple sub-processes, and each sub-process avoids mutual interference through resource isolation mechanism to improve processing efficiency.
[0065] S40, according to the intent mapping configured by the intent node, determine the workflow template corresponding to each user intent, and create a sub-process instance for each user intent in parallel according to the workflow template corresponding to each user intent, wherein each sub-process instance is mounted under the main process instance.
[0066] As shown in Figure 5 When the system identifies that the user has multiple user intents, the system maps each user intent to the corresponding workflow template ID through the pre-configured intent mapping table. Further, to improve processing efficiency, the system uses thread pool technology to create multiple sub-process instances in parallel, each corresponding to a user intent. These sub-process instances are all mounted under the main process instance. The parent-child relationship is recorded in the Hbase process table, and the identifier of the main process instance serves as the root node identifier of all sub-processes, ensuring clear process hierarchy.
[0067] S41, call the workflow template, which inherits the context of the main process instance and adds user intent parameters.
[0068] During the creation of the sub-process instance, the parameter injection mechanism is used to realize the inheritance of the context data of the main process instance by the sub-process instance, and the addition of intent parameters related to the current intent, ensuring that the sub-process can obtain complete running context while maintaining data consistency with the main process. After parameter injection is completed, the sub-process template is instantiated into an executable process instance, ready to enter the running phase.
[0069] S42, set the workflow driving mode of the sub-process instance to a linear driving mode, and run the sub-process instance according to the linear driving mode until a business node of which the node type is an intent node is reached, adjust the workflow driving mode to an intent driving mode, start a user session according to the intent driving mode, listen to the business content input by the user, determine at least one user intent existing in the business content, determine the workflow template corresponding to each user intent according to the intent mapping configured for the intent node, and create a process instance in parallel for each user intent according to the workflow template corresponding to each user intent, wherein each process instance is mounted under the sub-process instance.
[0070] In this step, the sub-process instance starts by default in a linear driving mode, that is, it is executed in series according to the node connection order defined in the workflow template. During the execution process, if the current node is a business node of the sub-template, the execution process enters the nested processing branch. Figure 6 As shown in the figure, first, it is judged whether the current execution node is a business node of the sub-template. If it is a business node of the sub-process, the nested processing branch is entered. Further, the parent instance is suspended, that is, the instance state of the intent node in the main process instance is marked as a pause state to freeze the time stamp of the main process instance, and the cleaning of the business parameters of the sub-process node is called to clear the temporary data of the sub-node to avoid interference. Next, the connection module of the current node is called to parse all the outgoing edge connections (including sequential and conditional connections) of the node to generate a connection list. It is judged whether there is a valid connection in the connection. If there is, the To connection is loaded, that is, the metadata of the target node is loaded according to the connection pointing, and then the To node attributes are replaced, including system attributes, system functions and user attributes.
[0071] It can be understood that if the sub-process node is still an intention node, the registered intention instance is executed, and when the associated robot does not support real-time triggering, the intention object (such as intention_instance) is recorded and temporarily stored for asynchronous invocation. If the sub-process node is a node other than an intention node, the built-in logic is directly executed. It should be noted that the intention node is a robot node, which needs to call the robot to have a conversation with the user to obtain the business content input by the user. That is, when the process runs to the business node of the type of intention node, the system will pause the current sub-process, and switch the driving mode from linear driving to intention driving mode. In the intention driving mode, the system starts the user conversation listening, and real-time receives and identifies the new intention input by the user. Once a new intention is identified, the system will create a corresponding secondary sub-process instance for each new intention according to the pre-configured intention mapping rule. These secondary sub-process instances are mounted under the current sub-process, that is, the primary sub-process, forming a nested structure, and the parent_instance_id field points to the primary sub-process ID, and the like can form a multi-level nested process structure. Multiple new intentions can trigger multiple secondary sub-processes in parallel, and the state changes and parameter passing of all process instances are recorded to the Hbase process table, ensuring that the entire process execution process is traceable and auditable. When the secondary sub-process encounters an intention node again, the driving mode switching and sub-process creation process described above will be repeated, forming a flexible and deeply nested intention-driven workflow network.
[0072] S50, after all sub-process instances are run, return to the main process instance, adjust the workflow driving mode to the linear driving mode, and continue to run the business nodes after the intention nodes in the linear driving mode.
[0073] In the embodiment of the present application, when the system detects that the state of all sub-process instances meets the preset termination condition, that is, the instance state becomes the first state indicating completion and / or the second state indicating exception, the result merger is triggered to collect the running results of the sub-process instances, and the running results of each sub-process instance are standardized in the main process context format, for example, the "reimbursement amount" of the medical claim sub-process and the "treatment time" of the medical guide sub-process are unified into a standard time format and a currency unit. The instance state of the main process instance is adjusted from the pause state to the running state, and the temporary intention parameters related to the sub-process in the main process context are removed to avoid the influence of outdated data on the subsequent process. The standardized sub-process running results are injected into the corresponding data storage location according to the main process node configuration rule for direct calling by the subsequent nodes.
[0074] It can be understood that if the instance state of the sub-process instance is the second state and is a mandatory process, the main process instance generates an exception prompt and rolls back the sub-process instance. In actual operation, the number of rollbacks can be set, and if the instance state of the sub-process instance is still the second state after the number of rollbacks reaches a preset number threshold, manual intervention is adjusted to run the sub-process instance.
[0075] The method provided by the embodiment of the application actively switches the workflow driving mode from the linear driving mode to the intention driving mode when the main process instance runs to the intention node, and then analyzes multiple intentions in the user input content through natural language processing technology, and creates a sub-process instance corresponding to each user intention in parallel and mounts it under the main process instance. In complex scenarios such as financial customer service and medical diagnosis that have multi-dimensional interaction needs, the embodiment of the application breaks through the limitation of the traditional workflow framework that only supports single rule approval through the multi-mode driving and process nesting mechanism, significantly improves the system response efficiency, and can more accurately and efficiently realize the business needs of users.
[0076] Further, as Figure 1 As a specific implementation of the method, the embodiment of the application provides an intelligent workflow driving device, as shown in Figure 7 The system includes a receiving module 701, a setting module 702, a first determining module 703, a second determining module 704, and a running module 705.
[0077] The receiving module 701 is configured to receive a business trigger signal uploaded by a user based on a terminal device, and create a main process instance according to the business trigger signal.
[0078] The setting module 702 is configured to set the workflow driving mode as a linear driving mode, and run the main process instance according to the linear driving mode until a business node of which the node type is an intention node is reached, adjust the workflow driving mode to an intention driving mode, and start a user session according to the intention driving mode.
[0079] The first determining module 703 is configured to listen to business content input by a user, and determine at least one user intention existing in the business content.
[0080] The second determining module 704 is configured to determine a workflow template corresponding to each user intention according to an intention mapping configured for the intention node, and create a sub-process instance for each user intention in parallel according to the workflow template corresponding to each user intention, wherein each sub-process instance is mounted under the main process instance.
[0081] The running module 705 is configured to return to the main process instance after all sub-process instance running is completed, adjust the workflow driving mode to a linear driving mode, and continue to run the business nodes after the intent node according to the linear driving mode.
[0082] In a specific application scenario, the receiving module 701 is configured to capture the business trigger signal by using an event listening module, analyze the metadata corresponding to the business trigger signal, and read the field content of a target field in the metadata, where the target field is used to indicate the business type corresponding to the business trigger signal; read all template indexes in a template warehouse, determine a specified template index matched with the field content in all the template indexes, load a workflow template corresponding to the specified template index, where the warehouse template includes a plurality of workflow templates, the workflow template is obtained by configuring a workflow canvas provided by a workflow customization background, the type of the workflow template includes a general workflow template, a sub-process workflow template, and a channel workflow template, the workflow template includes business nodes and a connection line, the connection line is used to define the execution order between the business nodes, the node type of the business node includes but is not limited to a start node, a sub-process node, a business node, a pass card node, a function node, a dialogue node, an intent node, an event node, a message node, a parallel node, and an end node, verify the legality of the nodes and the connection line in the workflow template, and generate a verification result; when the verification result indicates that the structure of the workflow template is normal, invoke a process instance factory to create the main process instance.
[0083] In a specific application scenario, the receiving module 701 is configured to extract a basic parameter from the business trigger signal, initialize a context container of the main process instance according to the basic parameter, and generate an identifier for the main process instance; write the instance state of the main process instance and the identifier into a process table, where the process table is used to perform whole-process link tracking on the main process instance.
[0084] In a specific application scenario, the setting module 702 is configured to, when running to a business node of which the node type is an intent node, invoke a communication module to send a message to the terminal device, and mark the instance state of the main process instance as a pause state to freeze the timestamp of the main process instance, where the content of the message is an interactive sentence associated with the intent node.
[0085] In a specific application scenario, the first determining module 703 is configured to start a real-time monitoring thread, subscribe to a user input channel and set a timeout time; if no service content input by a user is received within the timeout time, an interactive timeout running result is returned, a to-be-operated service node corresponding to the running result is determined according to a running rule associated with the intent node, the workflow driving mode is adjusted to a linear driving mode, and the to-be-operated service node is continuously operated according to the linear driving mode; if the service content input by the user is received within the timeout time, the service content is identified based on a natural language processing technology, at least one user intent existing in the service content is determined, and an instance state of the intent node is marked as a pause state to freeze a main process instance timestamp.
[0086] In a specific application scenario, the second determining module 704 is configured to call the workflow template, the workflow template inherits a context of the main process instance and adds a user intent parameter; the workflow driving mode of the sub-process instance is set to a linear driving mode, and the sub-process instance is operated according to the linear driving mode until a business node of a node type of an intent node is reached, the workflow driving mode is adjusted to an intent driving mode, a user session is started according to the intent driving mode, service content input by a user is monitored, at least one user intent existing in the service content is determined, a workflow template corresponding to each user intent is determined according to an intent mapping configured for the intent node, and a process instance is created in parallel for each user intent according to the workflow template corresponding to each user intent, where each process instance is mounted under the sub-process instance.
[0087] In a specific application scenario, the running module 705 is configured to, when the instance states of all sub-process instances become the first state and / or the second state, trigger a result merger to collect running results of the sub-process instances and standardize the running results of each sub-process instance according to a main process context format; the instance state of the main process instance is adjusted from a pause state to a running state, a user intent parameter is removed from the context corresponding to the main process instance, and the running results of each sub-process instance are injected; if there is a sub-process instance whose instance state is the second state and is a required process, the main process instance generates an exception prompt and rolls back the sub-process instance.
[0088] The device provided by the embodiment of the application actively switches the workflow driving mode from a linear driving mode to an intention driving mode when the main process instance runs to an intention node, and then analyzes multiple intentions in the user input content through a natural language processing technology, and creates a sub-process instance corresponding to each user intention in parallel and mounts the sub-process instance under the main process instance. In a complex scene such as financial customer service and medical diagnosis that has multi-dimensional interaction requirements, the embodiment of the application breaks through the limitation of the traditional workflow framework that only supports single rule approval through the multi-mode driving and process nesting mechanism, significantly improves the system response efficiency, and can more accurately and efficiently realize the business requirements of users.
[0089] It should be noted that other corresponding descriptions of the functions of the intelligent workflow driving device provided by the embodiment of the application can be referred to the corresponding descriptions in Figures 1 to 6 , which will not be described here.
[0090] To solve the above technical problems, the embodiment of the application further provides a computer device. For details, please refer to Figure 8 , Figure 8 The basic structure block diagram of the computer device of the embodiment is shown in the figure.
[0091] As shown in Figure 8 , the internal structure diagram of the computer device. The computer device includes a processor, a non-volatile storage medium, a memory and a network interface connected through a system bus. Among them, the non-volatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequence, the computer readable instructions are executed by the processor, the processor can realize a data relationship reconstruction method. The processor of the computer device is used to provide computing and control ability to support the operation of the whole computer device. The memory of the computer device can store computer readable instructions, and the computer readable instructions are executed by the processor, so that the processor executes a data relationship reconstruction method. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand that the structure shown in Figure 8 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0092] The processor in the embodiment is used to execute Figure 7The specific functions of the receiving module 701, the setting module 702, the first determining module 703, the second determining module 704, and the running module 705 are stored in the memory with program codes and various data required for execution of the above modules. The network interface is used for data transmission between the user terminal or the server. The memory in the embodiment stores program codes and data required for execution of all sub-modules in the data relationship reconstruction device, and the server can call the program codes and data of the server to execute the functions of all sub-modules.
[0093] The application further provides a storage medium storing computer readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the data relationship reconstruction method according to any one of the embodiments.
[0094] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The program can include the processes of the above-mentioned embodiments when executed. The storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0095] Those skilled in the art can understand that the steps, measures, and schemes in the various operations, methods, and processes discussed in the present application can be alternated, changed, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in the present application can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art with the various operations, methods, and processes disclosed in the present application can also be alternated, changed, rearranged, decomposed, combined, or deleted.
[0096] The above only describes some embodiments of the present application. It should be noted that those skilled in the art can make several improvements and refinements without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. An intelligent workflow driving method, characterized in that: include: Receive a service trigger signal uploaded by the user based on the terminal device, and create a main process instance according to the service trigger signal; Set the workflow driving mode to the linear driving mode, and run the main process instance according to the linear driving mode until it reaches a business node whose node type is an intent node, adjust the workflow driving mode to the intent driving mode, and start a user session according to the intent driving mode; Monitoring business content input by a user and determining at least one user intention in the business content; Determine the workflow template corresponding to each user intent according to the intent mapping configured by the intent node, and create a sub-process instance in parallel for each user intent according to the workflow template corresponding to each user intent, wherein each sub-process instance is mounted under the main process instance; After all sub-process instances have finished running, return to the main process instance, adjust the workflow driving mode to the linear driving mode, and continue to run the business nodes after the intention node according to the linear driving mode.
2. The method according to claim 1, characterized in that The receiving of a service trigger signal uploaded by a user based on a terminal device and creating a main process instance according to the service trigger signal includes: An event monitoring module is used to capture the service trigger signal, parse metadata corresponding to the service trigger signal, and read the field content of a target field in the metadata, where the target field is used to indicate the service type corresponding to the service trigger signal; Read all template indexes in the template warehouse, determine the specified template index that matches the field content in all the template indexes, and load the workflow template corresponding to the specified template index. The warehouse template includes multiple workflow templates. The workflow template is configured on the workflow canvas provided by the workflow customization background. The types of workflow templates include general workflow templates, sub-process workflow templates, and channel workflow templates. The workflow template includes business nodes and connections. The connections are used to define the execution order between business nodes. The node types of the business nodes include but are not limited to start nodes, sub-process nodes, business nodes, pass card nodes, function nodes, speech nodes, intent nodes, event nodes, message nodes, parallel nodes, and end nodes. Verifying the validity of nodes and connections in the workflow template and generating verification results; When the verification result indicates that the structure of the workflow template is normal, the process instance factory is called to create the main process instance.
3. The method according to claim 2, characterized in that When the verification result indicates that the structure of the workflow template is normal, after calling the process instance factory to create the main process instance, the method further includes: Extracting basic parameters from the service trigger signal, initializing the context container of the main process instance according to the basic parameters, and generating an identifier for the main process instance; The instance state of the main process instance and the identifier are written into a process table, and the process table is used to track the entire process link of the main process instance.
4. The method according to claim 1, wherein The adjusting the workflow driven mode to the intent driven mode and starting the user session according to the intent driven mode includes: When running to a business node whose node type is an intention node, the communication module is called to send a message to the terminal device, and the instance state of the main process instance is marked as a paused state to freeze the timestamp of the main process instance, wherein the content of the message is the interactive statement associated with the intention node.
5. The method according to claim 1, wherein The monitoring of the service content input by the user and determining at least one user intention in the service content includes: Start a real-time monitoring thread, subscribe to the user input channel and set a timeout; If the business content input by the user is not received within the timeout period, the operation result of the interaction timeout is returned, and the business node to be run corresponding to the operation result is determined according to the operation rule associated with the intention node, and the workflow driving mode is adjusted to the linear driving mode, and the business node to be run continues to be run according to the linear driving mode; If business content input by the user is received within the timeout period, the business content is identified based on natural language processing technology, at least one user intention in the business content is determined, and the instance state of the intention node is marked as paused to freeze the main process instance timestamp.
6. The method according to claim 1, characterized in that The process of creating a sub-process instance for each user intent in parallel based on the workflow template corresponding to each user intent includes: Calling the workflow template, where the workflow template inherits the context of the main process instance and adds a user intent parameter; Set the workflow driving mode of the sub-process instance to a linear driving mode, and run the sub-process instance according to the linear driving mode until it runs to a business node whose node type is an intent node, adjust the workflow driving mode to an intent driving mode, and start a user session according to the intent driving mode, and listen to the business content input by the user, determine at least one user intent in the business content, determine the workflow template corresponding to each user intent according to the intent mapping configured by the intent node, and create a process instance in parallel for each user intent according to the workflow template corresponding to each user intent, wherein each of the process instances is mounted under the sub-process instance.
7. The method according to claim 1, characterized in that After all sub-process instances have finished running, returning to the main process instance includes: When the instance states of all sub-process instances change to the first state and / or the second state, the result merger is triggered to collect the running results of the sub-process instances and standardize the running results of each sub-process instance according to the main process context format; Adjust the instance state of the main process instance from the paused state to the running state, remove the user intention parameter in the context corresponding to the main process instance, and inject the running results of each sub-process instance; Among them, if there is a sub-process instance whose instance state is the second state and is a required process, the main process instance generates an exception prompt and rolls back the sub-process instance.
8. An intelligent workflow driving device, characterized in that: include: A receiving module is used to receive a service trigger signal uploaded by a user based on a terminal device, and create a main process instance according to the service trigger signal; A setting module, configured to set the workflow driving mode to a linear driving mode, and run the main process instance according to the linear driving mode until it reaches a business node whose node type is an intent node, adjust the workflow driving mode to an intent driving mode, and start a user session according to the intent driving mode; A first determining module is configured to monitor the service content input by the user and determine at least one user intention in the service content; A second determination module is configured to determine the workflow template corresponding to each user intent according to the intent mapping configured by the intent node, and to create a sub-process instance for each user intent in parallel according to the workflow template corresponding to each user intent, wherein each of the sub-process instances is mounted under the main process instance; The running module is used to return to the main process instance after all sub-process instances have finished running, adjust the workflow driving mode to the linear driving mode, and continue to run the business nodes after the intention node according to the linear driving mode.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method and device for managing process instances in semiconductor computer integrated manufacturing system
CN121073182A