System for building workflow based on large model to realize intelligent dialogue
Patent Information
- Application Number
- CN202411649928.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
The delivery under the existing AI application development model is actually long, the usage scenarios are fixed and limited, and the development and maintenance threshold is high.
The system based on large models is adopted to build workflows, and the node configuration module, plug-in import module, context variable filling module and workflow execution module are used to realize the functions of low-code construction AI tools, and support drag-and-drop configuration and external plug-in integration functions.
The function of building AI tools with low code is realized. Users can integrate entity extraction, intention recognition, logical judgment, API calls and other capabilities without writing complex code, and provide external plug-in integration functions to meet personalized needs and lower development and maintenance thresholds.
Smart Images

Figure CN119597271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a technology combining AI with industrial software, and in particular to a system for realizing intelligent dialogue based on building workflows based on large models. Background Art
[0002] With the development of artificial intelligence technology in the industrial field, especially the progress of natural language processing and deep learning, users' demand for intelligence and automation is increasing. Enterprises hope to use these technologies to improve the system's understanding of user input and help enterprises quickly build tools with AI capabilities for personalized functional requirements. Traditional customized development of AI applications has a long application cycle, limited application scenarios, requires a code base, and has high development costs, which can no longer meet existing needs.
[0003] Given the long delivery time, limited usage scenarios, and high development and maintenance thresholds under the existing AI application development model, there is an urgent need for a system that builds workflows based on large models to achieve intelligent dialogue. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a system for realizing intelligent dialogue by building a workflow based on a large model.
[0006] (II) Technical solution
[0007] In order to achieve the above object, the main technical solutions adopted by the present invention include:
[0008] In a first aspect, an embodiment of the present invention provides a system for implementing intelligent dialogue based on a large model-based workflow, including:
[0009] The node configuration module is used to select one or more nodes to configure in the configuration area according to the information displayed in the current user interface configuration layer to form a workflow;
[0010] A plug-in import module, used for importing data of the plug-in node in the workflow to describe the input and output parameter formats of the plug-in node when there is a plug-in node in the workflow;
[0011] The context variable filling module is used to fill the input and output variables of the node according to different types when the node is executed in the workflow;
[0012] The workflow execution module is used to parse the nodes and node connection relationships in the workflow, and execute the processing logic of the nodes according to the specified workflow sequence.
[0013] Optionally, the node types of the user interface configuration layer include:
[0014] Large model node, intent recognition node, logic node, API node, plug-in node.
[0015] Optionally, the workflow execution module includes:
[0016] The node selection unit is used to select the next execution node according to the result of conditional judgment based on the logical node or intention recognition node workflow execution module in the workflow.
[0017] Optionally, the plug-in node includes: a built-in initialization plug-in and a third-party plug-in.
[0018] Optionally, the context variable populating module is specifically used to:
[0019] When the node is executed, the input and output variables of the node are filled according to different types. When the referenced variable does not exist or the type does not match, the system issues an error message or fills it with a specified default value;
[0020] Input and output variables include: text type, number type, list type;
[0021] The input variable mode includes: constant mode and reference mode;
[0022] In the reference mode, the current node is allowed to reference the output variable of the previous node in the execution order;
[0023] The start node of the workflow is used to receive an input statement from the user. When the workflow is started, the input statement is used as a variable by other nodes of the workflow.
[0024] Optionally, the context variable filling module is also used to:
[0025] When the plug-in node is an initialization plug-in, the initialization SQL is used to enter data for the plug-in node;
[0026] When the plug-in node is a third-party plug-in, it is imported through a Schema document that complies with the OpenAPI specification. After the Schema document is imported, it is disassembled into structured data to describe the input and output parameter formats of the plug-in node.
[0027] Optionally, the importing by conforming to the OpenAPI specification Schema document includes:
[0028] Get the Server address in the Schema, extract the authentication method and get all interface objects;
[0029] Loop through each interface object to check whether the interface object is referenced. If not, obtain the Param parameter. Otherwise, redundantly add the authentication method to the interface information and obtain the Param parameter.
[0030] Get Body parameters and return parameters, and store interface information into the database to achieve import.
[0031] In a second aspect, an embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0032] The memory is used to store computer programs;
[0033] The processor is used to implement the system as described in the first aspect when executing the program stored in the memory.
[0034] In a third aspect, an embodiment of the present invention further discloses a computer-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the system as described in the first aspect.
[0035] (III) Beneficial effects
[0036] The system of the embodiment of the present invention solves the problems of long delivery time, fixed and limited usage scenarios, and high development and maintenance threshold in the AI application development model in the prior art.
[0037] The system of the embodiment of the present invention realizes the function of building AI tools with low code. It uses the drag-and-drop method to integrate capabilities such as entity extraction, intent recognition, logical judgment, API calls, etc. without the need for users to write complex codes. At the same time, it provides external plug-in integration function, allowing developers to integrate their existing codes or functions to meet personalized needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A structural block diagram of a system for implementing intelligent dialogue based on a large model-based workflow provided by an embodiment of the present invention;
[0039] Figure 2 A structural block diagram of another system for implementing intelligent dialogue based on a large model-based workflow provided by an embodiment of the present invention;
[0040] Figure 3 The present invention provides a flowchart for importing a third-party plug-in through a Schema document that complies with the OpenAPI specification. DETAILED DESCRIPTION
[0041] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0042] The embodiment of the present invention proposes a system for realizing intelligent dialogue based on a large model-based workflow, which uses a large language model and its derivative capabilities to realize the function of building AI tools with low code. The drag-and-drop method allows users to integrate capabilities such as entity extraction, intent recognition, logical judgment, API calls, etc. without having to write complex codes. At the same time, it provides external plug-in integration functions, allowing developers to integrate their existing codes or functions to meet personalized needs.
[0043] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0044] Embodiment 1
[0045] like Figure 1 As shown, Figure 1 The structural block diagram of a system for implementing intelligent dialogue based on a large model-based workflow provided by an embodiment of the present invention is shown. The system of this embodiment includes:
[0046] The node configuration module is used to select one or more nodes to configure in the configuration area according to the information displayed in the current user interface configuration layer to form a workflow; for example, the nodes of the user interface configuration layer in this embodiment may include: the node types of the user interface configuration layer include: large model nodes, intent recognition nodes, logic nodes, API nodes, plug-in nodes, etc. This embodiment is only for illustration and is not limited to it.
[0047] A plug-in import module, used for importing data of the plug-in node in the workflow to describe the input and output parameter formats of the plug-in node when there is a plug-in node in the workflow;
[0048] The context variable filling module is used to fill the input and output variables of the node according to different types when the node is executed in the workflow;
[0049] The workflow execution module is used to parse the nodes and node connection relationships in the workflow, and execute the processing logic of the nodes according to the specified workflow sequence.
[0050] Furthermore, the workflow execution module may include: a node selection unit, configured to select a next execution node according to a result of a conditional judgment based on a logical node or an intention recognition node in the workflow.
[0051] When there is no branch node, the workflow execution module may execute the next node according to the workflow sequence.
[0052] In an optional implementation, the context variable filling module may be specifically used to: fill the input and output variables of the node according to different types when the node is executed, and when the reference variable does not exist or the type does not match, the system issues an error message or fills it with a specified default value;
[0053] Input and output variables include: text type, number type, list type;
[0054] The input variable mode includes: constant mode and reference mode;
[0055] In the reference mode, the current node is allowed to reference the output variable of the previous node in the execution order;
[0056] The start node of the workflow is used to receive an input statement from the user. When the workflow is started, the input statement is used as a variable by other nodes of the workflow.
[0057] In a specific implementation process, the plug-in nodes of the aforementioned user interface configuration layer may include: a built-in initialization plug-in and a third-party plug-in.
[0058] At this time, the above context variable filling module is also used to:
[0059] When the plug-in node is an initialization plug-in, the initialization SQL is used to enter data for the plug-in node;
[0060] When the plug-in node is a third-party plug-in, it is imported through a Schema document that complies with the OpenAPI specification. After the Schema document is imported, it is disassembled into structured data to describe the input and output parameter formats of the plug-in node.
[0061] To better understand the process of importing data in third-party plug-ins, the steps of importing data through the OpenAPI specification Schema document are described as follows: Figure 3 As shown:
[0062] Get the Server address in the Schema, extract the authentication method and get all interface objects;
[0063] Loop through each interface object to check whether the interface object is referenced. If not, obtain the Param parameter. Otherwise, redundantly add the authentication method to the interface information and obtain the Param parameter.
[0064] Get Body parameters and return parameters, and store interface information into the database to achieve import.
[0065] The system of this embodiment realizes the function of building AI tools with low code. It uses a drag-and-drop method to integrate capabilities such as entity extraction, intent recognition, logical judgment, API calls, etc. without the need for users to write complex codes. It also provides external plug-in integration functions, allowing developers to integrate their existing codes or functions to meet personalized needs.
[0066] Embodiment 2
[0067] The present invention provides a system for realizing intelligent dialogue based on a large model-based workflow, which includes four components from top to bottom: a user interface configuration layer, a plug-in layer, a core processing layer, and a data storage layer. Figure 2 As shown, the overall system architecture of this embodiment is described as follows.
[0068] The user interface configuration layer is mainly used to provide users with an entry for configuring workflows. This module consists of nodes and connections between nodes. Users drag and drop nodes to form a complete workflow through connections. Each node has input and output variables, which serve as the value transfer medium for workflow execution. Finally, the output value of the end node is used as the output content of the entire workflow.
[0069] Nodes currently have the following node types: start node, large model node, intent recognition node, logic node, API node, plug-in node and end node.
[0070] Start node: A node inherent in each workflow initialization. The user's conversation content will be used as the output variable of the start node.
[0071] Large model node: The information in the incoming text can be extracted and used as the output variable of the node. The text passed to the large model node can use the placeholder to reference the input variable of this node. For example, the input variable is: name = Li Ming, and the target text of the large model node is: "I am {{name}}, 18 years old this year." If you want the large model node to output the two variables "name" and "age", after the node is executed, the two variables "name" and "age" output by the node will be filled with specific values "name = Li Ming" and "name = 18".
[0072] Logical node: used for logical judgment of variable values. The judgment result types are divided into "yes" and "no". The actual judgment result will determine the execution direction of the next node in the workflow.
[0073] API node: The node needs to configure the URL and parameters of the called interface. When the API node is executed, the corresponding interface will be called, and the output variable configured by the user will be filled with the interface return value.
[0074] Plug-in node: A plug-in node is equivalent to an API node with a preset format. The plug-in layer predefines the input and output formats of the plug-in. When the workflow is introduced and the plug-in is selected, the input and output variables will be automatically brought out.
[0075] Reply node: When this node is executed, it will block the workflow process, save the context and parameter information of the current pipeline, and directly reply to the user's question. When the user asks the second question, the context and the last executed node information will be restored from the database and continue execution.
[0076] End node: No matter how the workflow is configured, it will eventually converge to the end node, where the output content will be configured and the input variables can be referenced to splice the final output copy.
[0077] In addition, the plug-in layer includes initialization plug-ins and third-party plug-ins. The initialization plug-in uses the system initialization SQL to enter data. The third-party plug-in can be imported through the Schema document that conforms to the OpenAPI specification. The Schema document describes one or more interface information. After the Schema document is imported, it will be disassembled into structured data (such as Figure 3 As shown), it is used to describe the input and output parameter format of the workflow plug-in node. When the workflow is executed to the plug-in node, the parameters can be organized according to the structured input and output parameter format to call and extract the return result and pass it to the next node.
[0078] The core processing layer consists of three main parts:
[0079] 1. Context variable filling module:
[0080] This is one of the key components of workflow execution. Workflows are composed of nodes and lines connected in series. Except for the start and end nodes, they all have input and output variables. These variables can be different data types such as text, numbers, lists, etc. The input variables of the nodes support two modes: constant and reference. In reference mode, the node is allowed to reference the output variables of the previous node in the execution order.
[0081] At the start node of the workflow, you can set a statement to receive user input. When the workflow starts, the input value provided by the user can be stored as a variable for use by subsequent nodes. For example, when designing a customer service chatbot workflow, the user input content is stored as a variable, such as "userQuestion", and subsequent nodes can reference this variable to analyze the question and generate an answer.
[0082] During the execution of a workflow node, variable outputs of the node will be generated. For example, the intent recognition node will output two fixed variables, category ID and reason. Subsequent nodes can reference these two variables to continue business processing. Therefore, the flow of variable values plays a decisive role in the execution of the workflow. The role of the context variable filling module is to fill the input and output variables of the node according to different types when the node is executed. When the referenced variable does not exist or the type does not match, the system will handle the error or use the default value instead. Users can implement complex data processing and process control through the context flow filling of variable values, greatly improving the flexibility and convenience of the workflow.
[0083] 2. Workflow execution engine
[0084] The workflow execution engine is the core component of this system, responsible for executing and managing workflows. It receives the workflow definition from the user interface layer, parses each node and connection relationship in the workflow, and executes the processing logic of the node in a predetermined order. The workflow engine can process different types of nodes, including large language model nodes, logic judgment nodes, API nodes, etc., coordinate the input and output relationships between each node, and determine the workflow node execution link. For example, when the workflow is started, the workflow engine will execute the processing logic of each node in turn, and call the corresponding processing module according to the type of the node, such as calling the large language model processing module to generate an answer, or extracting the required data from the return information of the API node.
[0085] 3. Node selector
[0086] The node selector mainly follows the following two logics: the connection order of the workflow and the condition judgment logic.
[0087] Workflow connection order:
[0088] In general, the node selector will select the next execution node in the order of the connections between the nodes. For example, if node A is connected to node B, and then to node C, when node A is executed, the execution engine will automatically select node B as the next execution node, and then select node C after node B is executed. This method is suitable for simple workflows and ensures the orderly execution of the process.
[0089] Conditional judgment logic:
[0090] When there is a logic node or intent recognition in the workflow, the execution engine will select the next execution node based on the result of the conditional judgment. For example: the logic node is judged based on the value of a variable. If the variable meets a specific condition, the execution engine will select the node connected to the branch where the condition is true; if the variable does not meet the condition, the execution engine will select the node connected to the branch where the condition is false. As a result, the workflow can execute different paths according to different situations, increasing flexibility and adaptability.
[0091] The system of this embodiment solves the problems of long delivery time, fixed and limited usage scenarios, and high development and maintenance thresholds in the AI application development model in the prior art. It realizes the function of building AI tools with low code, and uses a drag-and-drop method so that users can integrate capabilities such as entity extraction, intent recognition, logical judgment, API calls, etc. without writing complex codes. At the same time, it provides external plug-in integration functions, allowing developers to integrate their existing codes or functions to meet personalized needs.
[0092] In addition, an embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0093] The memory is used to store computer programs;
[0094] The processor is used to implement the system described in the above embodiments when executing the program stored in the memory.
[0095] On the other hand, an embodiment of the present invention further provides a computer-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the system described in the above embodiments.
[0096] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0097] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.
[0098] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.
[0099] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0100] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0101] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.
Claims
1. A system for implementing intelligent dialogue based on a large model-based workflow, characterized in that: include: The node configuration module is used to select one or more nodes to configure in the configuration area according to the information displayed in the current user interface configuration layer to form a workflow; A plug-in import module, used for importing data of the plug-in node in the workflow to describe the input and output parameter formats of the plug-in node when there is a plug-in node in the workflow; The context variable filling module is used to fill the input and output variables of the node according to different types when the node is executed in the workflow; The workflow execution module is used to parse the nodes and node connection relationships in the workflow, and execute the processing logic of the nodes according to the specified workflow sequence.
2. The system according to claim 1, characterized in that The node types of the user interface configuration layer include: Large model node, intent recognition node, logic node, API node, plug-in node.
3. The system according to claim 2, characterized in that Workflow execution module, including: The node selection unit is used to select the next execution node according to the result of conditional judgment based on the logical node or intention recognition node workflow execution module in the workflow.
4. The system according to claim 2, characterized in that Plugin nodes include: built-in initialization plugins and third-party plugins.
5. The system according to claim 1, characterized in that The context variable populates the module, specifically for: When the node is executed, the input and output variables of the node are filled according to different types. When the referenced variable does not exist or the type does not match, the system issues an error message or fills it with a specified default value; Input and output variables include: text type, number type, list type; The input variable mode includes: constant mode and reference mode; In the reference mode, the current node is allowed to reference the output variable of the previous node in the execution order; The start node of the workflow is used to receive an input statement from the user. When the workflow is started, the input statement is used as a variable by other nodes of the workflow.
6. The system according to claim 2, characterized in that The context variables populate the module, which is also used to: When the plug-in node is an initialization plug-in, the initialization SQL is used to enter data for the plug-in node; When the plug-in node is a third-party plug-in, it is imported through a Schema document that complies with the OpenAPI specification. After the Schema document is imported, it is disassembled into structured data to describe the input and output parameter formats of the plug-in node.
7. The system according to claim 6, characterized in that The import is performed in accordance with the OpenAPI specification Schema document, including: Get the Server address in the Schema, extract the authentication method and get all interface objects; Loop through each interface object to check whether the interface object is referenced. If not, obtain the Param parameter. Otherwise, redundantly add the authentication method to the interface information and obtain the Param parameter. Get Body parameters and return parameters, and store interface information into the database to achieve import.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the system according to any one of claims 1 to 7 when executing the program stored in the memory.
9. A computer-readable medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to execute the system according to any one of claims 1 to 7.