A model application scenario orchestration method and device, electronic equipment and storage medium
By selecting and connecting various types of work nodes, including model interaction nodes and private nodes, on the workflow orchestration page, the problem of large language model application solutions failing to meet expectations is solved. This enables flexible model application scheme orchestration and efficient data retrieval, improving users' problem-solving capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YOUZHUJU NETWORK TECH CO LTD
- Filing Date
- 2023-09-22
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies for large language models cannot fully meet user needs, and the solutions that need to be built may not achieve the expected results.
This paper provides a model application scheme orchestration method. By selecting and connecting various types of work nodes, including model interaction nodes and private nodes, on the workflow orchestration page, it supports calling private data and capabilities, and uses the process execution engine to execute the workflow link to generate output results that meet user needs.
Users can create and edit workflows in an intuitive workflow orchestration page, flexibly select nodes, lower the threshold for training and modifying large language models, support access to capabilities and data beyond large language models, and improve the adaptability and efficiency of model application solutions.
Smart Images

Figure CN117271729B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and storage medium for arranging model application schemes. Background Technology
[0002] As the capabilities of Large Language Models (LLMs) continue to improve, there are more and more application scenarios for solving practical problems using them.
[0003] To help the model produce results that meet the requirements, it is usually necessary to build model application schemes. However, due to the limitations of the model itself, the built model application schemes may not meet expectations. Summary of the Invention
[0004] This disclosure provides at least one model application scheme arrangement method, apparatus, electronic device, and storage medium.
[0005] In a first aspect, embodiments of this disclosure provide a method for arranging model application schemes, the method comprising:
[0006] In response to a user-initiated model application scheme orchestration request, the workflow orchestration page is displayed;
[0007] In response to the selection and connection operations for each work node on the workflow orchestration page, a workflow link containing multiple work nodes corresponding to the model application scheme is generated; each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and private nodes; the model interaction nodes are used to call the target model's capabilities for data processing, and the private nodes are used to call private data or call private capabilities for data processing.
[0008] In response to the application trigger operation for the model application scheme, the workflow link is executed by calling the process execution engine to obtain the output result under the model application scheme.
[0009] In one optional implementation, the step of generating a workflow link containing multiple work nodes corresponding to the model application scheme in response to the selection and connection operations for each work node on the workflow orchestration page includes:
[0010] The workflow orchestration page displays various node types;
[0011] In response to a selection operation for a target node type, a target worker node matching the target node type is generated;
[0012] The target worker node is added to the workflow link, so that the target worker node is connected to other worker nodes in the workflow link, and configuration information for the target worker node is obtained; the configuration information is used to instruct the target worker node to execute task information.
[0013] In one optional implementation, the private node includes a private capability node; when the target working node is the private capability node, obtaining configuration information for the private capability node includes:
[0014] Obtain the subprocess task code configured by the user for the private capability node; the subprocess task code is used to execute the subprocess task corresponding to the target private capability, and feed back the execution result of the subprocess task to the main process corresponding to the process execution engine.
[0015] In one optional implementation, the private node includes a private data node; when the target working node is the private data node, obtaining configuration information for the private data node includes:
[0016] Obtain the database configured for the private data node; the private data node is used to perform data query and return operations on the configured database.
[0017] In one optional implementation, the private data node includes a vectorized query node; the vectorized query node provides text content vectorization processing and query capabilities; the database includes a vector database;
[0018] The vector database is obtained according to the following steps:
[0019] Obtain the target text content uploaded by the user; the target text content is text content exceeding a preset number of characters;
[0020] After the target text content is segmented, multiple text segments are obtained. After the multiple text segments are vectorized, the resulting text segment vectors are stored in a vector database.
[0021] The vectorized query node is used to vectorize the query keywords to obtain keyword vectors when performing a query task, query the target text paragraph vector that matches the keyword vector in the vector database, and return the target text paragraph corresponding to the queried target text paragraph vector to the model interaction node.
[0022] In an optional implementation, before segmenting the target text content, the method further includes:
[0023] Obtain the sharding dimension information configured by the user, wherein the allocation dimension information is used to indicate the method of sharding the queried text content;
[0024] After segmenting the target text content, multiple text paragraphs are obtained, including:
[0025] The target text content is segmented according to the segmentation dimension information to obtain multiple text paragraphs.
[0026] In one optional implementation, querying the vector database for a target text paragraph vector that matches the keyword vector includes:
[0027] According to the target similarity matching algorithm confirmed by the user from among the supported similarity matching algorithms, the target text paragraph vector that matches the keyword vector is queried in the vector database.
[0028] In one optional implementation, the various types of work nodes further include process nodes; the process nodes are used to control the start and end times of the execution of the target logic in the workflow link; the target logic is completed by at least one work node in the workflow link.
[0029] In one optional implementation, when the target working node is the model interaction node, obtaining configuration information for the model interaction node includes:
[0030] In response to the existence of multiple models that implement the target model function corresponding to the model interaction node, model invocation information configured for the model interaction node is obtained. The model invocation information is used to invoke the target model that supports the target model function. The target model is any model selected from the multiple models.
[0031] Specifically, when executing the model interaction node, the data to be processed input to the model interaction node is processed in a unified format by calling the model proxy service, and then input to the target model corresponding to the model interaction node. The output data of the target model is processed in a unified format and then transmitted to the next working node.
[0032] In one optional implementation, the step of executing the workflow chain by calling the process execution engine to obtain the output result under the model application scheme includes:
[0033] By calling the process execution engine, the output data of each scheduled work node is processed for status verification in sequence according to the workflow link and then output to the next work node.
[0034] After determining that there is no next working node, the output data of the last working node will be processed for status verification and used as the output result.
[0035] Secondly, embodiments of this disclosure also provide a model application scheme orchestration apparatus, comprising:
[0036] The presentation module is used to respond to user-initiated model application scheme orchestration requests and display the workflow orchestration page;
[0037] The generation module is used to generate a workflow link containing multiple work nodes corresponding to the model application scheme in response to the selection and connection operations for each work node on the workflow orchestration page; each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and private nodes; the model interaction nodes are used to call the target model's capabilities for data processing, and the private nodes are used to call private data or call private capabilities for data processing.
[0038] The calling module is used to respond to the application trigger operation for the model application scheme, execute the workflow link by calling the process execution engine, and obtain the output result under the model application scheme.
[0039] Thirdly, embodiments of this disclosure also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any optional implementation of the first aspect, are performed.
[0040] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any optional implementation thereof.
[0041] For a description of the effects of the above-mentioned model application scheme arrangement device, computer equipment, and computer-readable medium, please refer to the description of the above-mentioned model application scheme arrangement method; it will not be repeated here.
[0042] By employing any of the above aspects or any implementation methods, users can initiate a model application scheme orchestration request, select various work nodes including model interaction nodes on the workflow orchestration page, and connect multiple work nodes to generate a workflow link containing multiple work nodes for the model application scheme. Each work node includes various types, at least including model interaction nodes (i.e., nodes that call the capabilities of the large language model for data processing) and private nodes. In this way, users can create and edit workflows in an intuitive workflow orchestration page, and can also flexibly select and connect these work nodes to adapt to the needs of different tasks. Furthermore, the platform provides access to private nodes, allowing users to access capabilities and data beyond the large language model without training or modifying it, thus lowering the barrier to problem-solving for users.
[0043] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0045] Figure 1 A flowchart of a model application scheme arrangement method provided by an embodiment of this disclosure is shown;
[0046] Figure 2 This diagram illustrates the scheme display page after entering the model application scheme orchestration platform in the model application scheme orchestration method provided in this embodiment of the present disclosure.
[0047] Figure 3 This illustration shows a schematic diagram of the workflow orchestration page in the model application scheme orchestration method provided in this embodiment of the disclosure;
[0048] Figure 4 This diagram illustrates the overall DSL design in the model application scheme arrangement method provided in this embodiment of the present disclosure;
[0049] Figure 5 This illustration shows a schematic diagram of various types of node lists in the model application scheme arrangement method provided in the embodiments of this disclosure;
[0050] Figure 6 This illustration shows a flowchart of the process of constructing a vector database before executing a vectorized query node in the model application scheme arrangement method provided in this embodiment of the present disclosure.
[0051] Figure 7 This illustration shows a flowchart of vector database query retrieval in the model application scheme orchestration method provided in this embodiment of the present disclosure;
[0052] Figure 8 This illustration shows a workflow diagram for problem-solving in the model application scheme orchestration method provided in this embodiment of the present disclosure;
[0053] Figure 9 This diagram illustrates another workflow link for problem-solving in the model application scheme orchestration method provided in this embodiment of the disclosure;
[0054] Figure 10 The diagram illustrates the process of model invocation proxy in the model application scheme orchestration method provided in this embodiment of the present disclosure;
[0055] Figure 11 The diagram illustrates the workflow execution scheduling process in the model application scheme orchestration method provided in this embodiment of the present disclosure.
[0056] Figure 12 This diagram illustrates a model application scheme orchestration apparatus provided in an embodiment of the present disclosure;
[0057] Figure 13 A schematic diagram of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0059] Research has shown that as the capabilities of large language models continue to improve, their potential in solving practical problems is gradually becoming apparent. To help the model better answer user questions, it is usually necessary to build model application schemes. However, due to the limitations of the model itself, the built model application schemes may not meet expectations.
[0060] Based on the above research, this disclosure provides a model application scheme orchestration method. By setting up various types of work nodes, the platform provides access to private nodes during the process orchestration. Users do not need to train and modify the large language model. They can easily select and configure the required private node type on the platform. The model application scheme supports calling capabilities and data outside the large language model, reducing the threshold for users to solve problems.
[0061] In addition, process nodes are included among the various types of work nodes to control the timing of the start and end of the execution of target logic in the workflow chain, so as to realize the orchestration of complex process logic.
[0062] The deficiencies of the above solutions and the proposed solutions are the result of the inventor's practical experience and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.
[0063] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely to illustrate selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0064] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0065] To facilitate understanding of this embodiment, a detailed description of the model application scheme orchestration method disclosed in this disclosure is provided first. The executing entity of the model application scheme orchestration method provided in this disclosure is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, this model application scheme orchestration method can be implemented by a processor calling computer-readable instructions stored in memory.
[0066] The following describes the model application scheme arrangement method provided in this disclosure embodiment, taking the terminal device as the execution subject as an example.
[0067] Example 1
[0068] See Figure 1 The diagram shows a flowchart of a model application scheme arrangement method provided in Embodiment 1 of this disclosure. The method includes steps S101 to S103, wherein:
[0069] S101: In response to a user-initiated model application scheme orchestration request, display the workflow orchestration page.
[0070] In this step, the workflow orchestration display page can be shown based on the user-initiated model application scheme orchestration request.
[0071] In this embodiment of the disclosure, users can perform model application scheme orchestration operations on the model application scheme orchestration platform. After the user enters the model application scheme orchestration platform, the following can be displayed: Figure 2 The solution demonstration page is shown below. Figure 2 The solution display page shown can include model application solutions already built and generated by the current user, as well as model application solutions published by other users in the model application solution orchestration platform. It should be noted that the model application solutions already created by the current user can be incomplete, meaning that in situations like... Figure 2 The solution display page shown can save any model application solution generated in the user's history.
[0072] In addition, Figure 2Each example solution displayed can include a preview of the solution's effect, its name, and the creator's information. The preview of the model application solution can be uploaded by the creator or automatically generated by the model application solution orchestration platform based on the problem addressed by the user-created model application solution.
[0073] In practice, users can click as follows Figure 2 The "Create" button in the upper right corner of the solution display page can be used to initiate a model application solution arrangement request. In addition, users can also select a solution by moving the cursor to a target solution that has not yet been created. A floating button will be displayed on the selected solution so that users can edit it further. At this time, users can initiate a model application solution arrangement request by clicking the "Go to Design" button on the solution's floating window.
[0074] In this embodiment of the disclosure, when a user initiates a model application scheme orchestration request, the following is displayed: Figure 3 The workflow orchestration page shown. Figure 3 As shown, the left side of the workflow orchestration page is the workflow orchestration setup area, and the right side is the information configuration area for multiple dimensions. In practice, users can first build workflow links in the workflow orchestration setup area on the left; then, they can select a work node in the workflow link on the left. At this time, the configuration area on the right corresponds to the configuration information under the selected work node. Users can configure the parameters, preset information, and other information of the work node in the configuration area. Since work nodes include various node types, the corresponding configuration dimensions will also be different when the selected target work node has different node types. The specific implementation method will be explained in detail in S102, and will not be repeated here.
[0075] S102: In response to the selection and connection operations for each work node in the workflow orchestration page, a workflow link containing multiple work nodes corresponding to the model application scheme is generated; each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and private nodes; the model interaction nodes are used to call the target model's capabilities for data processing, and the private nodes are used to call private data or call private capabilities for data processing.
[0076] In this step, users can select each work node on the workflow orchestration page and connect each work node according to the process of the model application solution to generate a workflow link containing multiple work nodes corresponding to the model application solution.
[0077] In this embodiment of the disclosure, when building the workflow link, it is necessary to use a Domain-Specific Language (DSL) to record the configuration and execution logic of different workflows. Therefore, the overall DSL design in this embodiment of the disclosure is introduced first. It should be noted that the following overall DSL design is only an optional implementation method in this embodiment of the disclosure. This application does not make specific limitations on it, and the corresponding function shall prevail.
[0078] like Figure 4 The diagram shown illustrates the three key structures of the overall DSL design in this embodiment. Here, Graph represents the overall workflow structure; Node represents a node in the workflow; and Edge represents an edge in the workflow. Figure 4 In the diagram shown, the PK (Primary Key) is a field or attribute used to uniquely identify each row of data in a table, ensuring that each record in the table has a unique identifier for easy data retrieval, updating, and management; furthermore, Figure 4 It also identifies the data type of each type of data in the three key structures (such as int, bigint, and text in the diagram).
[0079] Specifically, a Graph can include id, version, nodes, and edges; where id is a UUID (Universally Unique Identifier) used to identify a unique instance; version is the workflow version used for multiple version implementations; nodes is an array of nodes used to record all nodes in the workflow chain and their corresponding configurations. A Node can include id, node_type, and config; where id is a UUID used to identify a unique node; node_type indicates the node type, including process nodes If, Start, End; private data nodes Hive, Viking; private capability nodes Python, RPC; and model interaction nodes LLM; config is the configuration content corresponding to the node, with different node types corresponding to different configuration data structures. An Edge can include id, from_node, and to_node; where id is a UUID used to identify a unique edge; from_node records the starting point of the edge, i.e., upstream in the execution order; and to_node records the ending point of the edge, i.e., downstream in the execution order.
[0080] In this embodiment of the disclosure, multiple node types can be displayed on the workflow orchestration page; in response to a selection operation for a target node type, a target work node matching the target node type is generated; the target work node is added to the workflow link, so that the target work node is connected to other work nodes in the workflow link, and configuration information for the target work node is obtained; the configuration information is used to instruct the target work node to perform task information.
[0081] In practice, multiple node types can be displayed directly on the workflow orchestration page, or a pop-up window displaying various node types can be brought up by right-clicking on a blank area of the workflow orchestration page. For example... Figure 5 As shown, there is a list of various types of nodes. Users can select the target node type by clicking or dragging, and instruct the generation of a target work node that matches the target node type. Then, the corresponding type of target work node is added to the workflow orchestration page, connected to other target work nodes in the current workflow link, and the configuration information for the target work node is obtained to instruct the target work node to execute the task corresponding to the configuration information.
[0082] It should be noted that since worker nodes can include various types, the required configuration information will differ depending on the type of the target worker node selected by the user. Therefore, the dimensions of the configuration information will also differ for different types of worker nodes; for example, when the target worker node is... Figure 3 When the model interaction node is shown, the corresponding configuration information dimensions may include parameter configuration, system preset, dialogue preset, instruction information, etc.; when the node type of the target working node is a private capability node, the corresponding configuration information dimensions may include request method, request parameters, etc.
[0083] Taking model interaction nodes as an example, in specific implementations, users can, for instance, interact with nodes such as... Figure 3The "Parameter Settings" control is triggered within the information configuration area corresponding to the model interaction node shown, allowing users to adjust and set the model's parameters. For example, after triggering this control, users can select from various model types supported by the current platform. Additionally, users can adjust the `top_p` parameter (which controls the probability quality considered when generating text, used to generate text with a certain degree of randomness to increase text diversity) after triggering this control. Users can also set the model's `temperature` parameter (which controls how the model samples the probability distribution when generating the next word or token; its value is usually between 0 and 1. A value of 0 indicates a very conservative approach, resulting in highly deterministic and singular content, while 1 indicates a very open approach, resulting in more diverse and random text). Furthermore, users can set the model's memory selection to control the degree to which the model accesses and utilizes its internal memory or knowledge when generating text or performing tasks.
[0084] In addition, in such Figure 3 The "System Presets" area shown allows you to set the role, abilities, and task requirements of the current model. For example, you can enter the following in the system presets: "You are a professional math teacher, skilled at answering student questions and guiding student thinking. Please follow these requirements to answer student questions: 1. Maintain a polite and friendly tone. 2. Do not reply to students with content unrelated to learning, such as games."
[0085] In addition, in the "Dialogue Preset" area shown in Figure 3, several rounds of dialogue can be simulated before the user interacts with the language model, serving as an example. For instance, the user can input the following in the dialogue preset area:
[0086] "user (user input): Hello teacher, how old are you?
[0087] assistant (large model reply): Hello, classmate, let's talk about topics related to learning!
[0088] user (user input): Hello teacher, please tell me the answer to this question. The question is: The two direct sides of a straight triangle are 3 and 4. What is the length of the hypotenuse?
[0089] Assistant (large model reply): Hi there, classmate. This problem can be solved using the Pythagorean theorem. Are you familiar with the Pythagorean theorem?
[0090] In this embodiment of the disclosure, various types of working nodes include private nodes, wherein the private nodes include private capability nodes, such as... Figure 4The RPC and Python type nodes shown can invoke private capabilities. When the target worker node is a private capability node, the user-configured subprocess task code for that private capability node can be obtained. This subprocess task code executes the subprocess task corresponding to the target private capability and feeds back the execution result of the subprocess task to the main process corresponding to the process execution engine. The following will provide a detailed explanation using Python type nodes as an example.
[0091] For Python nodes, a Python sandbox can be created using Bubblewrap (a lightweight command-line tool for creating application runtime environments to restrict access to the underlying system, thus improving security). This sandbox can then run as a child process. Within the Python sandbox, communication between the main and child processes can be achieved using UnixSockets (a communication mechanism used for inter-process communication in Unix-like operating systems, allowing different processes to exchange data via sockets on the same computer without needing to transmit data through a network protocol stack). The main process passes the Python code configured by the user in the node to the child process. After the child process completes the code implementation within the Python sandbox, it can implement the corresponding private capabilities and send the execution results, log information, and other data back to the main process.
[0092] In this embodiment, various types of worker nodes include private nodes, which in turn include private data nodes, such as Hive, Viking, and LocalData nodes, enabling private data querying and retrieval. When the target worker node is a private data node, a database can be configured for the private data node; the private data node is used to perform data querying and return operations on the configured database; users can access private data by using the private data node.
[0093] In one implementation, the private data node includes a vectorized query node, which can provide text content vectorization processing and query capabilities, wherein the database includes a vector database. For example... Figure 6 The diagram illustrates the process of building the vector database before executing the vectorized query node. It retrieves target text content uploaded by the user that exceeds a preset character limit (the preset character limit is the maximum number of characters the model corresponding to the model interaction node can process at one time). The target text content is then segmented into multiple text paragraphs. These paragraphs are then vectorized, and the resulting text paragraph vectors are stored in the vector database to obtain the vector database.
[0094] The vectorized query node is used to vectorize the query keywords to obtain keyword vectors when executing query tasks, query the target text paragraph vectors that match the keyword vectors in the vector database, and return the target text paragraphs corresponding to the queried target text paragraph vectors to the model interaction node.
[0095] In this embodiment of the disclosure, the above-described method for segmenting the target text can be a user-defined segmentation dimension. Specifically, user-configured segmentation dimension information can be obtained to indicate the segmentation method for the queried text content; then, the target text content is segmented according to the segmentation dimension information. In specific implementations, multiple segmentation dimension information supported by this embodiment of the disclosure can be provided to the user for selection; alternatively, the user can be prompted to directly input the corresponding segmentation dimension information, such as segmenting the target text content according to segmentation dimensions like character count, delimiter, and semantics.
[0096] The following explanation uses the Viking type node as an example.
[0097] In practical implementation, before executing the Viking node, the vector database needs to be built first. Specifically, users can upload target text content of any format that exceeds the preset character limit; then, they can first upload the target text content to the server via the HTTP (Hypertext Transfer Protocol) interface. After receiving the target text content, the server parses its content and completes the fragmentation of the file content according to the fragmentation dimensions set by the user; for the fragmented target text content, it is vectorized, converting the text information into vector data in advance, and then writing the obtained vector data into the vector database, thus obtaining a vector database that can perform vectorized queries.
[0098] After the vector database is built, you can execute commands such as... Figure 7 The vector database query recall process is shown.
[0099] Specifically, users can enter the content they want to query in the question input area corresponding to the vectorized query node. The query content configured by the user in the node is then vectorized. For the query content after vectorization, the similarity algorithm specified in the configuration of the working node can be used to perform content matching calculation from the vector database. Finally, the matching results are retrieved to obtain the answer to the query question.
[0100] It should be noted that users can select a target similarity matching algorithm from among the supported similarity matching algorithms and query the vector database for target text paragraphs that match the keyword vectors. In practice, users can choose from similarity matching algorithms provided by the model application orchestration platform, such as cosine similarity (which measures the similarity between two vectors by calculating the cosine of the angle between them), HNSW (Hierarchical Navigable Small World algorithm, which finds the nearest neighbor data point to a given query point in a large dataset without considering the exact nearest neighbor value), and Brute force (which finds the required information by exhaustively searching all possible search or query conditions), and configure the algorithm in the corresponding working node to search the vector database for the query problem.
[0101] For example, when a user queries a question using a vectorized query node, such as "how should the rate be calculated", the question can be vectorized to obtain the corresponding keyword vector, where the keyword vector can be the vector corresponding to "rate". Then, based on the similarity matching algorithm pre-configured in the vectorized query node by the user, the target text paragraph vector matching the keyword vector is queried in the vector database. The target text paragraph corresponding to the queried target text paragraph vector is returned to the model interaction node. That is, the knowledge point information related to "rate" is provided to the model interaction node so that the model interaction node can call the relevant language model to answer the user's question based on the relevant knowledge points.
[0102] In this embodiment of the disclosure, the various types of work nodes also include process nodes, which are used to control the start and end times of the execution of the target logic in the workflow chain. The target logic is completed by at least one work node in the workflow chain.
[0103] Specifically, process nodes include If, Start, End, etc. Based on these process nodes, it is possible to support the orchestration and execution of workflows containing complex logic such as branches, loops, and multi-round execution.
[0104] For example, such as Figure 8 The diagram shown illustrates a workflow for problem-solving that includes If nodes. Figure 8As shown, the If node determines whether the current question is a humanities question. This workflow can then use different models to solve the question based on whether it's a humanities or science question. Specifically, when a question passes through the If node, its humanities / science classification is determined. If the question is a humanities question, the right branch is used. The "LLM Humanities X" node calls model X to solve the question, the "LLM Humanities Y" node calls model Y to solve the question, and the "Python Humanities Result Aggregation" node aggregates the solutions from the two models. Similarly, in the left branch, the "Python_1" node constructs a few-shot text sample for the question, the "LLM Science_X" node calls model X to solve the question, the "LLM Science_Y" node calls model Y to solve the question, and the "Python_2 Science Result Aggregation" node aggregates the solutions from the two models.
[0105] Furthermore, loops in workflow orchestration can be implemented using the If node, such as... Figure 9 The diagram shown illustrates another workflow chain for problem-solving, including an If node. Figure 9 As shown, the If node can be used to determine whether the structure of the model output is complete, such as whether it includes the answer and solution to the user's question. If the structure of the model output is complete, the subsequent process can proceed. If the structure of the model input is incomplete, the process returns to the LLM (Model Interaction Module) node to regenerate the relevant content.
[0106] It's important to clarify that the aforementioned cyclic workflow orchestration and multi-round workflow orchestration can be conceptually distinguished. Multi-round refers to the overall workflow being executed multiple times; while cyclic refers to the repeated execution of a specific part of the workflow's logic within the overall workflow's single execution.
[0107] For example, let's continue with the workflow used for problem-solving. When a user inputs the question "1+1=?", for a loop structure, the model's first output might be "2". However, since the workflow allows for local loops, the model can repeatedly execute based on these loops, outputting the second result "equals 2, this is an axiom in mathematics," until the optimal solution is found as the final output for this round. For a multi-round structure, when the user inputs "1+1=?" in the first round, the model's answer could be "1+1=2, this is an axiom in mathematics." Based on this, the user can input "What does the axiom mean?" in the second round, and the model's answer could be "The axiom is...". Furthermore, the user can initiate a third round of dialogue until the "problem-solving" scenario of this workflow truly ends.
[0108] In this embodiment of the disclosure, when the target working node is a model interaction node, in response to the existence of multiple models that implement the target model function corresponding to the model interaction node, model invocation information configured for the model interaction node is obtained. The model invocation information is used to invoke a target model that supports the target model function, and the target model is any model selected from the multiple models. When the model interaction node is executed, the data to be processed input to the model interaction node is processed in a unified format by calling the model proxy service and then input to the target model corresponding to the model interaction node. The output data of the target model is processed in a unified format and then transmitted to the next working node.
[0109] Specifically, as described in S102, when the node type of the target working node is a model interaction node, there are multiple models used to implement the corresponding target model function. Since the multiple models have different sources, their corresponding input, output and other data formats are also different. Therefore, in order to facilitate users to call different models with similar functions on the current platform, model calling information can be configured on the model interaction node to smooth out the differences between multiple models, thereby realizing the indiscriminate calling of multiple models on the current platform.
[0110] like Figure 10 The diagram illustrates the process of model invocation proxy. In practical implementation, different language models can be uniformly abstracted in LLMConfig, allowing the front-end to configure different model execution parameters in a common way. Specifically, in the LLMConfig design, the `model` field represents the name of the specific interaction type to be invoked in the node; the `memory_num` field represents the range of dialogue memory data to be guided when executing the node; the `prompt` field represents the information input given by the user to the language model; and the `X_Config` field records the execution parameters that the language model depends on, such as the settings of parameters like `temperature` and `top_p` mentioned in S102, where `X` in the `X_Config` field corresponds to the specific language model.
[0111] Through the above-mentioned unified configuration structure abstraction for models, a unified model invocation proxy service can be realized. For different types of models, the processes of constructing invocation data, invoking multi-party model services, and processing model response data are completed, thereby eliminating the usage differences between different models.
[0112] S103: In response to the application trigger operation for the model application scheme, the workflow link is executed by calling the process execution engine to obtain the output result under the model application scheme.
[0113] In this step, the model application scheme can be triggered to execute the created workload chain by calling the process execution engine, and the output results under the model application scheme can be obtained.
[0114] In this embodiment of the disclosure, the output data of each scheduled work node can be verified sequentially according to the workflow chain by calling the process execution engine and then output to the next work node; after determining that there is no next work node, the output data of the last work node will be verified and then used as the final output result.
[0115] like Figure 11 The diagram illustrates the workflow execution scheduling process. Through a unified node scheduling interface protocol, the central control service can sequentially complete the following stages during each node's execution: node input construction, node logic execution, execution data post-processing, debug log output, and persistent execution results. Within the node execution logic, specific logic is executed through different node types, node configurations, and calls to related services. Furthermore, after each node's execution is complete, the central control service searches for the next node to be executed based on the edge information described in the workflow DSL. If no next node is found, the current round of execution ends.
[0116] Specifically, the above-mentioned post-processing of execution data can check whether there are errors or anomalies in the output data structure of the node. If errors or anomalies are found, it returns to a unified error status. If there are no anomalies, it proceeds to send the structured data output by the current node to the next node. Filling in context information can integrate the node execution input, execution rounds, and other context information with the node execution output, node execution status (success or failure), execution time, and other information returned after the node execution. Filling in debug information can output debug information (i.e., the node's internal execution log) after the node. Here, the context information and log are packaged together for easy backtracking and querying of problems later. Persisting the execution status can store the node execution records and node execution logs in the database so that they can be packaged and sent to the next execution node.
[0117] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0118] Based on the same inventive concept, this disclosure also provides a model application scheme arrangement device corresponding to the model application scheme arrangement method. Since the principle of the device in this disclosure for solving the problem is similar to the above-mentioned model application scheme arrangement method in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0119] Example 2
[0120] Reference Figure 12 The diagram shown is an architectural schematic of a model application scheme orchestration device provided in an embodiment of this disclosure. The device includes: a display module 1201, a generation module 1202, and a calling module 1203; wherein,
[0121] The display module 1201 is used to respond to user-initiated model application scheme orchestration requests and display the workflow orchestration page;
[0122] The generation module 1202 is used to generate a workflow link containing multiple work nodes corresponding to the model application scheme in response to the selection and connection operations of each work node in the workflow orchestration page; each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and private nodes; the model interaction nodes are used to call the target model's capabilities for data processing, and the private nodes are used to call private data or call private capabilities for data processing.
[0123] The calling module 1203 is used to respond to the application trigger operation for the model application scheme, and execute the workflow link by calling the process execution engine to obtain the output result under the model application scheme.
[0124] In one optional implementation, the generation module 1202 is specifically used for:
[0125] The workflow orchestration page displays various node types;
[0126] In response to a selection operation for a target node type, a target worker node matching the target node type is generated;
[0127] The target worker node is added to the workflow link, so that the target worker node is connected to other worker nodes in the workflow link, and configuration information for the target worker node is obtained; the configuration information is used to instruct the target worker node to execute task information.
[0128] In one optional implementation, the generation module 1202 is specifically used for:
[0129] Obtain the subprocess task code configured by the user for the private capability node; the subprocess task code is used to execute the subprocess task corresponding to the target private capability, and feed back the execution result of the subprocess task to the main process corresponding to the process execution engine.
[0130] In one optional implementation, the generation module 1202 is specifically used for:
[0131] Obtain the database configured for the private data node; the private data node is used to perform data query and return operations on the configured database.
[0132] In one optional implementation, the private data node includes a vectorized query node; the vectorized query node provides text content vectorization processing and query capabilities; the database includes a vector database;
[0133] The vector database is obtained according to the following steps:
[0134] Obtain the target text content uploaded by the user; the target text content is text content exceeding a preset number of characters;
[0135] After the target text content is segmented, multiple text segments are obtained. After the multiple text segments are vectorized, the resulting text segment vectors are stored in a vector database.
[0136] The vectorized query node is used to vectorize the query keywords to obtain keyword vectors when performing a query task, query the target text paragraph vector that matches the keyword vector in the vector database, and return the target text paragraph corresponding to the queried target text paragraph vector to the model interaction node.
[0137] In an optional implementation, the generation module 1202 is further configured to:
[0138] Obtain the sharding dimension information configured by the user, wherein the allocation dimension information is used to indicate the method of sharding the queried text content;
[0139] After segmenting the target text content, multiple text paragraphs are obtained, including:
[0140] The target text content is segmented according to the segmentation dimension information to obtain multiple text paragraphs.
[0141] In one optional implementation, the generation module 1202 is specifically used for:
[0142] According to the target similarity matching algorithm confirmed by the user from among the supported similarity matching algorithms, the target text paragraph vector that matches the keyword vector is queried in the vector database.
[0143] In one optional implementation, the various types of work nodes further include process nodes; the process nodes are used to control the start and end times of the execution of the target logic in the workflow link; the target logic is completed by at least one work node in the workflow link.
[0144] In one optional implementation, the generation module 1202 is specifically used for:
[0145] In response to the existence of multiple models that implement the target model function corresponding to the model interaction node, model invocation information configured for the model interaction node is obtained. The model invocation information is used to invoke the target model that supports the target model function. The target model is any model selected from the multiple models.
[0146] Specifically, when executing the model interaction node, the data to be processed input to the model interaction node is processed in a unified format by calling the model proxy service, and then input to the target model corresponding to the model interaction node. The output data of the target model is processed in a unified format and then transmitted to the next working node.
[0147] In one optional implementation, the calling module 1203 is specifically used for:
[0148] By calling the process execution engine, the output data of each scheduled work node is processed for status verification in sequence according to the workflow link and then output to the next work node.
[0149] After determining that there is no next working node, the output data of the last working node will be processed for status verification and used as the output result.
[0150] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0151] Corresponding to Figure 1 In addition to the method for arranging application schemes in the model, this disclosure also provides a computer device 1300, such as... Figure 13 The diagram shown is a structural schematic of a computer device 1300 provided for an embodiment of this disclosure, including:
[0152] The system includes a processor 1301, a memory 1302, and a bus 1303. The memory 1302 stores execution instructions and includes main memory 1321 and external memory 1322. Main memory 1321, also called internal memory, temporarily stores computational data in the processor 1301 and data exchanged with external memory such as a hard disk. The processor 1301 exchanges data with external memory 1322 through main memory 1321. When the computer device 1300 is running, the processor 1301 communicates with the memory 1302 through the bus 1303, causing the processor 1301 to execute the following instructions:
[0153] In response to a user-initiated model application scheme orchestration request, the workflow orchestration page is displayed;
[0154] In response to the selection and connection operations for each work node on the workflow orchestration page, a workflow link containing multiple work nodes corresponding to the model application scheme is generated; each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and private nodes; the model interaction nodes are used to call the target model's capabilities for data processing, and the private nodes are used to call private data or call private capabilities for data processing.
[0155] In response to the application trigger operation for the model application scheme, the workflow link is executed by calling the process execution engine to obtain the output result under the model application scheme.
[0156] This disclosure also discloses a computer-readable storage medium storing a computer program. When a processor executes the computer program, it performs the steps of the model application scheme arrangement method described in the above method embodiments, or performs the steps of the model application scheme arrangement method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0157] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the model application scheme arrangement method described in the above method embodiments, or to execute the steps of the model application scheme arrangement method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0158] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0159] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or modules may be electrical, mechanical, or other forms.
[0160] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0161] In addition, the functional modules in the various embodiments of this disclosure can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0162] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0163] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for arranging model application schemes, characterized in that, include: In response to a user-initiated model application scheme orchestration request, the workflow orchestration page is displayed; In response to the selection and connection operations for each work node on the workflow orchestration page, a workflow link containing multiple work nodes corresponding to the model application scheme is generated; each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and non-model interaction nodes; the model interaction nodes are used to call the target large language model that supports the target model's capabilities among multiple large language models for data processing, and the non-model interaction nodes are used to call database data or call non-model capabilities for data processing, wherein the data results queried from the database data are provided to the model interaction nodes; In response to the application trigger operation for the model application scheme, the workflow link is executed by calling the process execution engine to obtain the output result under the model application scheme.
2. The method according to claim 1, characterized in that, In response to the selection and connection operations for each work node on the workflow orchestration page, a workflow link containing multiple work nodes corresponding to the model application scheme is generated, including: The workflow orchestration page displays various node types; In response to a selection operation for a target node type, a target worker node matching the target node type is generated; The target worker node is added to the workflow link, so that the target worker node is connected to other worker nodes in the workflow link, and configuration information for the target worker node is obtained; the configuration information is used to instruct the target worker node to execute task information.
3. The method according to claim 2, characterized in that, The non-model interaction node includes a non-model capability node; when the target working node is the non-model capability node, configuration information for the non-model capability node is obtained, including: Obtain the subprocess task code configured by the user for the non-model capability node; the subprocess task code is used to execute the subprocess task corresponding to the target non-model capability, and feed back the execution result of the subprocess task to the main process corresponding to the process execution engine.
4. The method according to claim 2, characterized in that, The non-model interaction node includes a database data node; when the target working node is the database data node, configuration information for the database data node is obtained, including: Obtain the database configured for the database data node; the database data node is used to perform data query and return operations for the configured database.
5. The method according to claim 4, characterized in that, The database data nodes include vectorized query nodes; the vectorized query nodes provide text content vectorization processing and query capabilities; the database includes a vector database; The vector database is obtained according to the following steps: Obtain the target text content uploaded by the user; the target text content is text content exceeding a preset number of characters; After the target text content is segmented, multiple text segments are obtained. After the multiple text segments are vectorized, the resulting text segment vectors are stored in a vector database. The vectorized query node is used to vectorize the query keywords to obtain keyword vectors when performing a query task, query the target text paragraph vector that matches the keyword vector in the vector database, and return the target text paragraph corresponding to the queried target text paragraph vector to the model interaction node.
6. The method according to claim 5, characterized in that, Before segmenting the target text content, the process further includes: Obtain the sharding dimension information configured by the user, which indicates the method of sharding the queried text content; After segmenting the target text content, multiple text paragraphs are obtained, including: The target text content is segmented according to the segmentation dimension information to obtain multiple text paragraphs.
7. The method according to claim 5, characterized in that, The step of querying the target text paragraph vector that matches the keyword vector in the vector database includes: According to the target similarity matching algorithm confirmed by the user from among the supported similarity matching algorithms, the target text paragraph vector that matches the keyword vector is queried in the vector database.
8. The method according to claim 2, characterized in that, The various types of work nodes also include process nodes; the process nodes are used to control the start and end times of the execution of the target logic in the workflow link; the target logic is completed by at least one work node in the workflow link.
9. The method according to claim 2, characterized in that, When the target working node is the model interaction node, obtain the configuration information for the model interaction node, including: In response to the existence of multiple large language models that implement the target model function corresponding to the model interaction node, model invocation information configured for the model interaction node is obtained. The model invocation information is used to invoke the target large language model that supports the target model function. The target large language model is any large language model selected from the multiple large language models. Specifically, when executing the model interaction node, the data to be processed input to the model interaction node is processed in a unified format by calling the model proxy service, and then input to the target large language model corresponding to the model interaction node. The output data of the target large language model is processed in a unified format and then transmitted to the next working node.
10. The method according to claim 1, characterized in that, By invoking the process execution engine to execute the workflow chain, the output results under the model application scheme are obtained, including: By calling the process execution engine, the output data of each scheduled work node is processed for status verification in sequence according to the workflow link and then output to the next work node. After determining that there is no next working node, the output data of the last working node will be processed for status verification and used as the output result.
11. A model application scheme arrangement device, characterized in that, include: The presentation module is used to respond to user-initiated model application scheme orchestration requests and display the workflow orchestration page; A generation module is used to generate a workflow link containing multiple work nodes corresponding to the model application scheme in response to the selection and connection operations for each work node on the workflow orchestration page. Each work node includes multiple types of work nodes, and the multiple types of work nodes include at least model interaction nodes and non-model interaction nodes. The model interaction nodes are used to call the target large language model that supports the target model's capabilities among multiple large language models for data processing, and the non-model interaction nodes are used to call database data or call non-model capabilities for data processing. The data results queried from the database data are used to provide the model interaction nodes. The calling module is used to respond to the application trigger operation for the model application scheme, execute the workflow link by calling the process execution engine, and obtain the output result under the model application scheme.
12. An electronic device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the model application scheme orchestration method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the model application scheme orchestration method as described in any one of claims 1 to 10.