Task generation method and system based on large language model, and device and storage medium
Through the task generation method based on the large language model, the problem of complexity and inefficiency of task generation in the prior art is solved, and the task generation and execution are realized are realized, user operations are simplified and costs are reduced.
Patent Information
- Application Number
- PCT/CN2023/127268
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-31
- Filing Date
- 2023-10-27
- Publication Date
- 2024-12-05
AI Technical Summary
In the prior art, when users need to manually complete workflow tasks, the operation is complex, inefficient and expensive, making it difficult to simplify the task generation process.
Using a task generation method based on a large language model, the task requirement information is obtained through an interactive task generation interface, the large language model is called for semantic understanding, the executable structure of the target task is generated, and the graphic rendering is performed to display the task execution flowchart and progress. Check the link to automate task execution.
The task generation process is simplified, efficiency and automation are improved, and operational complexity and cost are reduced. Users only need to provide task requirements information to automatically generate and execute tasks.
Smart Images

Figure CN2023127268_05122024_PF_FP_ABST
Abstract
Description
Task generation method, system, device and storage medium based on large language model
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 2023106458258, filed on May 31, 2023, entitled “Task generation method, system, device and storage medium based on large language model”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a task generation method based on a large language model, a task generation system based on a large language model, a computer device, a storage medium, and a computer program product. Background Art
[0004] A workflow is a sequence of tasks, activities, or steps used to implement one or more business processes or projects. These tasks or activities follow a specific sequence and rules and can be automated or executed manually. Workflows can help organizations improve efficiency, optimize business processes, reduce costs, and increase productivity and quality. Workflows are typically managed and executed by workflow engines or software.
[0005] However, current users need to use computers to complete a workflow task, which usually requires complex operations, including analyzing problems, designing processes, writing code, setting up execution environments, and executing code, etc. These operations are very tedious processes, and there are problems of complex operations, low efficiency, and high costs.
[0006] Summary of the Invention
[0007] A task generation method based on a large language model. The method comprises:
[0008] Obtaining task requirement information based on input from the interactive task generation interface;
[0009] Calling a large language model, inputting the task requirement information into the large language model, performing semantic understanding on the task requirement information through the large language model, and outputting an executable structure of a target task matching the task requirement information;
[0010] Based on the executable structure of the target task, the target task is graphically rendered to obtain a task execution flowchart of the target task, and the task execution flowchart is displayed in the task generation interface; the target task is composed of at least one target atomic task; and
[0011] An execution progress viewing link of the target task is displayed in the task generation interface, and the execution progress viewing link is used to view the execution progress of the target task.
[0012] A task generation system based on a large language model. The system includes:
[0013] An information acquisition module is used to obtain task requirement information input based on the interactive task generation interface;
[0014] a structure acquisition module, configured to call a large language model, input the task requirement information into the large language model, perform semantic understanding of the task requirement information through the large language model, and output an executable structure of a target task that matches the task requirement information;
[0015] a task execution flowchart display module, configured to graphically render the target task based on the executable structure of the target task, obtain a task execution flowchart of the target task, and display the task execution flowchart in the task generation interface; the target task is composed of at least one target atomic task; and
[0016] The link display module is used to display the execution progress viewing link of the target task in the task generation interface, and the execution progress viewing link is used to view the execution progress of the target task.
[0017] A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the above-mentioned method for task generation based on a large language model when executing the computer-readable instructions.
[0018] A non-volatile computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, implement the above-mentioned method for generating tasks based on a large language model.
[0019] A computer program product. The computer program product includes computer-readable instructions, which, when executed by a processor, implement the above-mentioned method for task generation based on a large language model. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0021] FIG1 is a diagram illustrating an application environment of a task generation method based on a large language model according to an embodiment;
[0022] FIG2 is a schematic diagram of a process of a task generation method based on a large language model in one embodiment;
[0023] FIG3A is a schematic diagram of an interactive task generation interface according to an embodiment;
[0024] FIG3B is a schematic diagram of an interactive task generation interface in another embodiment;
[0025] FIG3C is a schematic diagram of an execution progress viewing interface according to an embodiment;
[0026] FIG4 is a schematic flow chart of a target atomic task determination step in one embodiment;
[0027] FIG5 is a schematic diagram of a multi-level vector storage structure in one embodiment;
[0028] FIG6 is a schematic diagram of a process for generating an executable structure of a target task in one embodiment;
[0029] FIG7 is a schematic diagram of a task instance message queue in one embodiment;
[0030] FIG8 is a schematic diagram of a subtask instance message queue in one embodiment;
[0031] FIG9 is a schematic diagram of a global variable table in one embodiment;
[0032] FIG10 is a schematic diagram of a task execution process in one embodiment;
[0033] FIG11 is a block diagram of a task generation system based on a large language model according to an embodiment;
[0034] FIG12 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] The task generation method based on a large language model provided in an embodiment of the present application can be applied in the application environment shown in Figure 1. In this embodiment, the terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The terminal 102 and the server 104 can collaboratively execute the task generation method based on the large language model, or the terminal 102 and the server 104 can independently execute the task generation method based on the large language model.
[0037] The method for generating a task based on a large language model is described by way of example using the collaborative execution of the task by the terminal 102 and the server 104. In some embodiments, the terminal 102 displays an interactive task generation interface and sends the task requirement information entered in the interactive task generation interface to the server 104. The server 104 obtains the task requirement information entered in the interactive task generation interface. The server 104 calls the large language model, inputs the task requirement information into the large language model, performs semantic understanding of the task requirement information through the large language model, and outputs an executable structure of a target task that matches the task requirement information. The server 104 graphically renders the target task based on the executable structure of the target task, obtains a task execution flowchart for the target task, and displays the task execution flowchart in the task generation interface of the terminal 102. The target task is composed of at least one target atomic task. A link to view the execution progress of the target task is displayed in the task generation interface of the terminal 102. The execution progress view link is used to view the execution progress of the target task.
[0038] Terminal 102 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers.
[0039] In one embodiment, as shown in FIG2 , a task generation method based on a large language model is provided. The method is described by taking an example of applying the method to a computing device (which may be the terminal 102 in FIG1 or the computer device 104 in FIG1 ), and includes the following steps:
[0040] Step S202: Acquire task requirement information inputted based on the interactive task generation interface.
[0041] Task requirement information contains information about the tasks to be generated. This task requirement information refers to textual information. A task can be understood as a workflow, which is a set of ordered activities or steps used to implement one or more business processes or projects. These activities follow a specific sequence and rules and can be automated or manually executed. Workflows can be executed by a workflow execution engine or managed by software. Accordingly, in workflow scenarios, task requirement information refers to workflow requirement information.
[0042] The interactive task generation interface is an interactive task generation interface that supports human-computer interaction. This interactive task generation interface is used to receive task content input by the user. This task content can be in text or non-text form. If the task content is in text form, it represents the task requirement information. If the task content is in non-text form, for example, in the form of audio, images, or graphic information, the task content can be converted into text to obtain the task requirement information. The task generation interface can be presented in the form of a webpage. For example, a computer device can obtain the task content by entering it into a search box provided on the webpage. The task generation interface can also be a conversation interface provided by a social application. Figure 3A shows a schematic diagram of the task generation interface in one embodiment. In this embodiment, for a workflow scenario, the interactive task generation interface displays an interactive conversation between a user account and a workflow customer service account. Figure 3A shows voice information generated during the interactive conversation regarding the workflow, and users can send voice messages through their user accounts. In the embodiment of the present application, the interactive task generation interface allows users to send messages through their user accounts in any form, including voice, text, images, audio, and video. These messages can be converted into corresponding task requirements, which can then be semantically understood by the large language model. In one example, the task requirement is a text message that states: "Remind everyone in the group to write a daily work report at 6:00 PM every day. If that day falls on a Friday, remind everyone in the group to write a weekly work summary and a work plan for the next week."
[0043] Optionally, the computer device may display an interactive task generation interface in response to a search operation for a workflow customer service account. The task generation interface may display the task content submitted by the user account. The computer device may obtain task requirement information based on the task content and retrieve the task requirement information entered in the interactive task generation interface. Optionally, the user account may be an administrator account with task generation permission.
[0044] Exemplarily, in an instant messaging application logged in with a user account, in response to a search operation for a workflow customer service account in a search box, an interactive task generation interface is displayed in the instant messaging application.
[0045] The computer device may display the voice sent through the user account on the task generation interface, or display the text sent through the user account, or display the graphic information sent through the user account, or display the audio and video sent through the user account on the interactive task generation interface. The voice may include a target voice signal. In the workflow scenario, the target voice signal is "workflow". The text or graphic information may include prompt words related to the target task. In the workflow scenario, the prompt words may be "production" or "target workflow". It can be understood that in the embodiment of the present application, there is no restriction on the content and format of the task requirement information, and the user can enter any content that needs to be understood by the natural language model.
[0046] If the input information is in the form of voice, the computer device recognizes the voice information as text and uses the text as the task requirement information. If the interactive task generation interface displays text, the computer device directly obtains the text. If the interactive task generation interface displays audio or video, the computer device performs image recognition to obtain the relevant text and uses it as the task requirement information. As shown in Figure 3A, this figure shows a workflow scenario. The task requirement information is in the form of voice. In response to the voice input operation, a voice recognition progress prompt message, such as "Voice recognition in progress...", is sent through the workflow customer service account. After the computer device completes voice recognition and obtains the task requirement information, it sends the voice recognition results through the workflow customer service account, such as "Voice recognition results: Help me create a workflow that can remind group members to write a daily work report at 6 pm every day. If it is Friday, remind everyone to write a weekly work summary and next week's work plan."
[0047] In some embodiments, obtaining task requirement information based on input of an interactive task generation interface includes: displaying a task generation interface capable of human-computer information interaction; receiving task content input through the interactive task interface and obtaining the task content; and performing semantic transformation on the task content to obtain task requirement information.
[0048] Human-computer information interaction refers to the information interaction process between users and machines. Semantic transformation is used to identify the semantics of task content and obtain text that matches the semantics.
[0049] Optionally, the computer device provides an interactive task generation interface for human-computer information interaction. The interactive task generation interface can be a web page interface or a program application interface, such as an instant messaging application.
[0050] The computer device receives a task requirement voice message sent through a user account, obtains the task requirement voice message, and displays the task requirement voice message on a task generation interface. The computer device invokes a trained semantic recognition model and performs speech recognition on the workflow requirement voice message using the trained speech recognition model to obtain a first recognized text. The computer device obtains task requirement information based on the first recognized text.
[0051] Exemplarily, after determining the first recognized text, the computer device performs post-processing on the first recognized text to obtain task requirement information, where the post-processing includes adding punctuation marks and correcting spelling errors.
[0052] The training steps of the trained speech recognition model include: a computer device obtains sample speech, and the sample speech is obtained through various speech receiving software and hardware. The computer device preprocesses the sample speech to obtain preprocessed sample speech. The preprocessing includes at least one of noise removal, speech segmentation, and speech feature extraction. The computer device extracts features from the preprocessed sample speech to obtain a corresponding target signal. The computer device sends the target signal to the speech recognition model to be trained for model training to obtain a trained speech recognition model. Feature extraction is the conversion of sample speech into digital signals. A speech model is a statistical model used to describe various features of speech. The trained speech model is used to perform speech recognition on the target signal, that is, to convert the digital signal into text.
[0053] Alternatively, the computer device receives and obtains the graphic information sent through the user account, displays the graphic information in the task generation interface, and performs graphic recognition on the graphic information through a trained graphic recognition model to obtain a second recognized text, and determines the task requirement information based on the second recognized text.
[0054] Exemplarily, after determining the second recognized text, the computer device performs post-processing on the second recognized text to obtain task requirement information, where the post-processing includes adding punctuation marks and correcting spelling errors.
[0055] In this embodiment, the task content input in the task generation interface is semantically transformed to obtain task requirement information that better reflects the task requirements, which is more conducive to the subsequent large language model to perform accurate semantic understanding and obtain a more accurate executable structure of the target task.
[0056] Step S204 , calling the large language model, inputting the task requirement information into the large language model, performing semantic understanding on the task requirement information through the large language model, and outputting an executable structure of the target task that matches the task requirement information.
[0057] Among them, the large language model is a natural language processing technology based on deep learning. By training a large amount of corpus data, it can predict and generate text. Large language models generally use recurrent neural networks (RNN) or variants, such as long short-term memory networks (LSTM) and gated recurrent units (GRU), to capture contextual information in text sequences, thereby achieving tasks such as natural language text generation, language model evaluation, text classification, and sentiment analysis. In the field of natural language processing, large language models have been widely used, such as speech recognition, machine translation, automatic summarization, dialogue systems, intelligent question and answer, etc. Large language models are used to generate target tasks that match the task requirement information. Semantic understanding refers to understanding the semantics in the task requirement information, so as to make relevant inferences and judgments.
[0058] The executable structure refers to a data structure that can execute the atomic task, for example, a DSL Json (data structure in a domain-specific language data exchange format) structure.
[0059] Optionally, the computer device performs semantic understanding on the task requirement information by calling the large language model at least once, and obtains an executable structure of the target task that matches the task requirement information.
[0060] In some embodiments, the task requirement information is semantically understood through the large language model, and an executable structure of a target task matching the task requirement information is output, including: calling a prompt corpus constructed for the workflow through the large language model, performing semantic understanding on the task requirement information, obtaining an executable structure of a target task matching the task requirement information, and outputting the executable structure of the target task, wherein the prompt corpus includes prompt information constructed for each atomic task of the workflow, and the prompt information includes the executable structure and application information of the atomic task.
[0061] Among them, an atomic task is a task that can realize a basic function. For example, in a workflow scenario, the atomic task can refer to an application in the workflow platform, and each application can be understood as an atomic task. For example, as shown in Table 1, Table 1 lists the applications supported by the workflow platform:
[0062] Table 1 Application list
[0063] The prompt information (i.e., prompt) of each atomic task is used to explain the application scenario and usage of the atomic task, including the executable structure and application information of the atomic task. It can be used to explain how the atomic task is used, the parameters involved in its use, and what the input and output of the atomic task are. The prompt information of each atomic task can include questions and answers. For example, the following examples show the content of the prompt information of the atomic task [Initiate API Request] and the atomic task [Send Email]:
[0064] In the above example, prompt refers to prompt information, and WEB API refers to network application program interface. As can be seen from the above example, the prompt information of each atomic task includes a question and an answer, and the answer part includes a complete and detailed executable structure. In other words, the answer to the prompt information includes the executable structure of the atomic task and application information. Application information includes script code, programming code, parameters, etc. For example, if the atomic task is to execute a coding language code, the corresponding prompt information is shown in Table 2 below:
[0065] Table 2 Prompt information list
[0066] In Table 2, "id" represents the atomic task id (identity identifier), which is used to uniquely identify the atomic task. The id field is randomly generated; "type" represents the type field of the atomic task; "python" indicates that the atomic task is [Python script execution]; "code": "print('123')" refers to the specific code to be executed, "version": "3.5" refers to the programming language version used is version 3.5, and "param" refers to the application parameters to be used to execute the programming language; "preid" refers to the id of the previous atomic task (previous application); and "nextid" refers to the id of the next atomic task to be executed. Based on this, it can be seen that the prompt information for each atomic task not only contains the parameters and executable structure for executing the atomic task, but also indicates which atomic task is the previous atomic task and which atomic task is the next atomic task after the atomic task is executed. That is, the entire workflow is connected through preid and nextid to form an orderly execution.
[0067] Optionally, the computer device retrieves prompt corpus for workflow construction from a corpus, i.e., all prompt information used to construct the workflow. Prompt information for each atomic task is pre-constructed and stored. Based on the prompt corpus, the computer device invokes the large language model at least once to perform semantic understanding of the task requirement information, determines an executable structure for a target task that matches the task requirement information, and outputs the executable structure for the target task.
[0068] Taking the workflow scenario as an example, before the first call to the large language model, a prompt message about the large language model call is sent through the workflow customer service account. As shown in Figure 3A, the workflow customer service account sends a prompt message about the large language model call, "Large language model recognition...", to remind the user that the large language model is currently being called to generate a target task that matches the task requirement information.
[0069] It's important to note that each atomic task on the workflow platform requires corresponding prompt information. Each prompt information is pre-written and can be used to construct different workflows. In other words, for each task requirement, pre-written prompt data can be directly accessed. Each atomic task has corresponding prompt information. This allows the target task's executable structure to be generated quickly and accurately based on the corresponding atomic task's prompt information.
[0070] In this embodiment, by using a large language model and calling prompt corpus for workflow construction, the task requirement information can be accurately understood in language, and the executable structure of the target task that matches the task requirement information can be obtained.
[0071] In some embodiments, the task requirement information is semantically understood through the large language model according to the prompt corpus constructed for the workflow, and an executable structure of the target task that matches the task requirement information is obtained, including: through the large language model, semantic understanding is performed based on the task requirement information and the prompt corpus to obtain at least one target atomic task that matches the task requirement information; the executable structure of at least one target atomic task is obtained from the prompt corpus, and the executable structure of the target task that matches the task requirement information is obtained based on the executable structure of the at least one target atomic task.
[0072] For example, based on the task requirement information and prompt corpus, the computer device directly determines that the task requirement information is a target atomic task by calling the large language model once. In this case, the large language model directly obtains the executable structure of the target atomic task and uses the executable structure of the target atomic task as the executable structure of the target task. In this example, the task requirement information input is the requirement information corresponding to an application. In this case, only a single call to the large language model is required to obtain the executable structure of the target task.
[0073] Exemplarily, based on the task requirement information and the prompt corpus, the large language model is called at least once to determine multiple target atomic tasks that match the task requirement information. Based on the multiple target atomic tasks, the task requirement information and the prompt corpus, the large language model is called again to obtain the executable structures of the multiple target atomic tasks. The computer device determines the executable structure of the target task that matches the task requirement information based on the executable structures of the multiple target atomic tasks, and outputs the executable structure of the target task. In this example, the large language model is called at least twice, that is, the first call determines at least two target atomic tasks corresponding to the task requirement information, and then the second call is made to determine the executable structure of each target atomic task, thereby determining the executable structure of the target task.
[0074] In this embodiment, a large language model is used to perform semantic understanding based on task requirement information and prompt corpus, automatically decomposing at least one target atomic task that matches the task requirement information. Based on the executable structure of the at least one target atomic task, the executable structure of the target task that matches the task requirement information can be directly obtained. This simplifies the task generation process; users only need to provide the task requirement information to automatically complete the task without any complex operations, thus improving the efficiency of task generation.
[0075] Step S206 , based on the executable structure of the target task, performing graphic rendering on the target task, obtaining a task execution flowchart of the target task, and displaying the task execution flowchart in the task generation interface; the target task is composed of at least one target atomic task.
[0076] Among them, the task execution flowchart is a graphical representation of the target task, and the task execution flowchart reflects the execution process of the target task.
[0077] Optionally, after obtaining the executable structure of the target task, the computer device performs graphical rendering on the target task according to the executable structure of the target task, obtains the corresponding task execution flowchart, and displays the task execution flowchart of the target task in the interactive task generation interface.
[0078] Exemplarily, after obtaining the executable structure of the target task, the computer device sends a prompt message about workflow graphics rendering through the workflow customer service account. It should be noted that the prompt message about workflow graphics rendering also includes information about the completion of the large language model response. That is, once the prompt message about workflow graphics rendering is received, it means that the executable structure of the target task has been generated, and at the same time, the graphics rendering operation of the target task is ready. As shown in Figure 3A, after obtaining the executable structure of the target task, after the prompt message about the large language model call in the interactive task generation interface, the prompt message about workflow graphics rendering sent through the workflow customer service account is displayed, such as "Large language model response completed, workflow graphics rendering in progress". In this way, once the executable structure of the target task is determined, the user can be informed in a timely and clear manner that the current target task has been automatically generated through graphics rendering, and the structural details of the target task can be clearly reflected through the task execution flowchart. At the same time, the computer device parses the execution process of the target task based on the executable structure of the target task, and performs image rendering on the target task based on the execution process to obtain the task execution flowchart of the target task.
[0079] At this point, after the rendering operation is completed, a prompt message regarding the rendering operation result is sent through the workflow customer service account, such as "Rendering Completed" in Figure 3A. Of course, to ensure that the user can promptly understand the workflow task execution flow chart, the bubble containing the prompt message regarding the rendering operation result can be dynamically displayed, or the text in the bubble containing the prompt message regarding the rendering operation result can be flashed, or the text color of the bubble containing the prompt message regarding the rendering operation result can be changed, without limitation.
[0080] For example, in a workflow scenario, after sending a prompt message about the rendering operation result through the workflow customer service account, the task execution flowchart of the target workflow (i.e., the target work task) is directly sent. In the task execution flowchart of the workflow, according to the application of different functional types, corresponding graphics are selected for display. For example, the atomic task used to trigger the workflow is represented by a circle, such as the circle "18:00 trigger" in Figure 3A, which represents the manual trigger atomic task of the trigger function type; the atomic task of the runnable function type is represented by a square, such as the square "Get today's week", "Remind weekly report" and "Remind daily report" in Figure 3A, which represent the atomic task of the runnable function type; the atomic task of the conditional judgment function type is represented by a diamond, such as the diamond "conditional judgment" in Figure 3A, which determines whether today is Friday. If it is Friday, then remind the weekly report, if not, then remind the daily report.
[0081] In this way, displaying the target task's task execution flowchart in the interactive task generation interface can more intuitively reflect the target task structure corresponding to the task requirement information. When the target task's execution status is updated, the task execution flowchart is updated in real time to ensure that users can promptly understand the current execution progress, improving the user experience.
[0082] In some embodiments, after displaying the task execution flowchart in the task generation interface, the method further includes: executing the target task; and when the execution status of the target task is updated, updating the execution status of the target task in the task execution flowchart.
[0083] Optionally, the computer device executes the target task, and when it is verified that the execution status of the target task changes from not executed to being executed, the execution status of the target task is updated to the execution status of being executed in the task execution flow chart.
[0084] For example, if the execution status of the target task changes from unexecuted to being executed, the execution mark of being executed is displayed in the task execution flowchart accordingly. For example, when the color of the execution mark changes from the first color to the second color, the computer device determines that the execution mark is the execution mark of being executed, that is, the execution mark of the first color represents unexecuted, and the execution mark of the second color represents being executed, and the first color and the second color are different. Alternatively, a text message of being executed, such as "being executed", is displayed in the task execution flowchart. Alternatively, the execution mark flashes in the task execution flowchart. If the execution mark does not flash, it means that it has not been executed. If the execution mark flashes, it means that it is being executed.
[0085] When the target task is completed, the computer device displays an execution indicator indicating that the task has been completed in the task execution flowchart. For example, a text message indicating that the task has been completed, such as "Execution Completed," may be displayed in the task execution flowchart. It is understood that when the target task is completed, the target task is in a state where execution has ended and can be considered to be unexecuted. In this case, an unexecuted execution indicator may be displayed in the task execution flowchart, and the color of the execution indicator may be changed from the second color to the first color. For another example, when the target task is completed, the computer device does not flash the execution indicator in the task execution flowchart.
[0086] In this embodiment, once the target task begins to be executed, the execution status of the target task needs to be updated. At this time, by updating the execution status of the target task in the task execution flowchart, the user can directly know the execution status of the current target task. Subsequently, the user can choose whether to view the execution progress according to needs, thereby improving the user experience.
[0087] Step S208: Displaying an execution progress viewing link of the target task in the task generation interface, where the execution progress viewing link is used to view the execution progress of the target task.
[0088] Exemplarily, when the target task begins execution, a link to view the execution progress of the target task is displayed in the interactive task generation interface. For example, FIG3B is a schematic diagram of an interactive task generation interface in another embodiment. As shown in FIG3B , for a workflow scenario, when the target workflow begins execution, a link to view the execution progress sent by the workflow customer service account is displayed in the interactive task generation interface, i.e., the workflow address in FIG3B is: http: / / autoflow.woa.com / workflow / playbook / manage / read / 151458. At this point, the user can view the execution progress by clicking on the link to view the execution progress.
[0089] In some embodiments, the method further includes: in response to a triggering operation on an execution progress viewing link, jumping to an execution progress viewing interface; and displaying the execution progress of the target task in the execution progress viewing interface.
[0090] Optionally, when the target task begins execution, a link to view the execution progress of the target task is displayed in the interactive task generation interface. In response to a triggering operation on the execution progress view link, the computer device jumps to the execution progress view interface and displays the execution progress of the target task in the execution progress view interface. Each time the computer device executes an atomic task of the target task, the execution progress view interface displays a task execution flowchart for the target task being executed, and displays a completion mark in the graphic corresponding to the completed atomic task.
[0091] FIG3C is a schematic diagram of an execution progress viewing interface in one embodiment. As shown in FIG3C , the currently completed atomic tasks are the triggering atomic task "trigger at 18:00" and the executable atomic task "get today's week." The completed flags are displayed in the images corresponding to these two atomic tasks. For unexecuted atomic tasks, such as "conditional judgment," "weekly reminder," and "daily reminder," the corresponding completed flags are not displayed in the execution progress viewing interface.
[0092] In this embodiment, an execution progress viewing link of the target task is displayed in the interactive task generation interface; in response to the triggering operation of the execution progress viewing link, it is possible to quickly jump to the execution progress viewing interface. In this way, the execution progress of the target task can be displayed in real time in the execution progress viewing interface to ensure that the user can know the current execution progress in a timely manner, thereby improving the user experience.
[0093] The above-mentioned task generation method based on the large language model directly calls the large language model by obtaining the task requirement information input based on the interactive task generation interface, and inputs the task requirement information into the large language model. The task requirement information is semantically understood by the large language model, and the executable structure of the target task that matches the task requirement information is automatically obtained. Based on the executable structure of the target task, the target task is graphically rendered to obtain a task execution flowchart of the target task, and the task execution flowchart is displayed in the task generation interface; the target task is composed of at least one target atomic task, so that the detailed information of the generated target task can be intuitively displayed. The execution progress viewing link of the target task is displayed in the task generation interface. The execution progress viewing link is used to view the execution progress of the target task, so that the execution progress can be viewed in a timely and intuitive manner. In other words, the user only needs to provide the task requirement information to automatically generate the information used to complete a task without performing any complex operations, which simplifies the steps of task generation and improves the efficiency of task generation.
[0094] In some embodiments, calling the large language model includes: generating calling parameters according to task requirement information and prompt corpus; constructing a model calling request according to the calling parameters; and calling the large language model according to the model calling request.
[0095] Optionally, if the large language model is being called for the first time, the computer device combines the task requirement information and the prompt corpus to obtain call parameters for the first call, and constructs a model call request for the first call based on the call parameters. The computer device calls the large language model based on the model call request for the first call.
[0096] If this is not the first time the large language model is called, the computer device obtains the previous output result from the previous call, combines the task requirement information, the prompt corpus, and the previous output result to obtain the call parameters for the current call (not the first call). The computer device constructs a model call request for the current call based on the call parameters. The computer device calls the large language model based on the model call request for the current call.
[0097] For non-first calls to the large language model, the accuracy and reliability of target task generation are improved by using the output result of the previous call as the context information of the current call, and then combining the context information to determine the executable structure of the current call.
[0098] The large language model provides an HTTP (Hypertext Transfer Protocol) interface. Therefore, model call requests are HTTP requests, with call parameters written directly into the request body. After the large language model understands and predicts the target task, the executable structure is returned to the computer via an HTTP response message.
[0099] If the computer device is a terminal, after receiving the model call request, the terminal sends the model call request to the server, and the server calls the large language model according to the model call request.
[0100] In this embodiment, by generating calling parameters according to the task requirement information and the prompt corpus, a model calling request for calling the large language model can be constructed according to the calling parameters. According to the model calling request, by calling the large language model, at least one target atomic task matching the task requirement information can be obtained. Furthermore, the executable structure of the target task can be automatically obtained based on the executable structure of the at least one target atomic task, which simplifies the task generation steps. The user only needs to provide the task requirement information to automatically complete the task without performing any complex operations, thereby improving the efficiency of task generation.
[0101] In some embodiments, semantic understanding is performed based on the task requirement information and prompt corpus through a large language model to obtain at least one target atomic task that matches the task requirement information, including: using a large language model, based on the task requirement information and prompt corpus, sequentially determining at least one target atomic task that matches the task requirement information.
[0102] Among them, each atomic task has a unique corresponding atomic task identifier.
[0103] Optionally, the computer device determines at least one target atomic task that matches the task requirement information in sequence by calling the large language model at least once based on the task requirement information and the prompt corpus. When the number of target atomic tasks is one, the computer device automatically defaults the execution order of the target atomic task to the first one, determines the executable structure of the target atomic task from the prompt corpus, and uses the executable structure of the target atomic task as the executable structure of the target task. If there are multiple target atomic tasks, the computer device determines the execution order of each target atomic task. Based on this, the subsequent computer device determines the executable structure of the target task according to the execution order of each target atom to render the target task, and can also execute the target task according to the execution order of each target atom.
[0104] In this embodiment, a large language model is used to sequentially determine at least one target atomic task that matches the task requirement information based on the task requirement information and the prompt corpus. That is, the order of the at least one target atomic task required to implement the workflow requirement is determined. This allows the executable structures of each target atomic task to be combined according to the next atomic task identifier indicated by its respective executable structure, resulting in an executable structure for the target task that matches the task requirement information. In this way, based on the large language model, it is possible to automatically analyze the task requirement information and design a process to determine the order of the executable structures of each target atomic task, without requiring code writing, greatly improving the efficiency of target task generation.
[0105] In some embodiments, based on the executable structure of at least one target atomic task, the executable structure of the target task that matches the task requirement information is obtained, including: combining the executable structures of each target atomic task according to the next atomic task identifier indicated by the executable structure of each target atomic task, to obtain the executable structure of the target task that matches the task requirement information.
[0106] Optionally, for each target atomic task, the computer device determines the next target atomic task in the execution order after the target atomic task based on the next atomic task identifier indicated by the structure of the target atomic task, and adds the executable structure of the next target atomic task to the currently combined executable structure to obtain the currently combined executable structure, until the combination of the executable structures of all target atoms is completed to obtain the combined executable structure. It can be understood that the combined executable structure includes the executable structures of all target atoms. The computer device uses the combined executable structure as the executable structure of the target task that matches the task requirement information.
[0107] It should be noted that, as shown in the executable structure of the atomic task in Table 2 above, the executable structure of each atomic task includes the next atomic task identifier (i.e., nextid) of the next atomic task after the atomic task, and the previous atomic task identifier (preid) of the previous atomic task after the atomic task. Thus, for each target atomic task related to the target task, the next atomic task identifier indicated by the executable structure of the target atomic task can be understood as the next atomic task identifier of the next target atomic task after the target atomic task. It can be understood that, according to the next atomic task identifier indicated by the executable structure of each target atomic task, the next target atomic task after the execution order of the target atomic task is screened out from the multiple atomic tasks related to the target task, thereby, the execution order of each target atomic task can be known.
[0108] For example, after the computer device determines m target atomic tasks that match the task requirement information, it determines the execution order of each target atomic task based on the next atomic task identifier executed by the executable structure of each target atomic task. In order of execution, the target atomic tasks are sequentially from target atomic task 1 to target atomic task m, with target atomic task 1 being the first atomic task executed and target atomic task m being the last atomic task executed. Based on this, the computer device sequentially combines the executable structure of target atomic task 1, the executable structure of target atomic task 2, ..., and the executable structure of target atomic task m to obtain the executable structure of the target task.
[0109] In this embodiment, a large language model is used to sequentially determine at least one target atomic task that matches the task requirement information based on the task requirement information and the prompt corpus. Specifically, the order of the at least one target atomic task required to implement the workflow requirement is determined. The executable structures of each target atomic task are then combined according to the next atomic task identifier indicated by its respective executable structure to obtain the executable structure of the target task that matches the task requirement information. In this way, the large language model can automatically analyze the task requirement information and design a process to determine the order of the executable structures of each target atomic task, without requiring code writing, greatly improving the efficiency of task generation.
[0110] In some embodiments, at least one target atomic task that matches the task requirement information is determined in sequence based on the task requirement information and the prompt corpus through a large language model, including: decomposing the task requirement information into multiple sub-requirement information through a large language model; for each sub-requirement information, determining the target atomic task that matches the sub-requirement information in sequence based on the sub-requirement information and the prompt corpus; and determining at least one target atomic task that matches the task requirement information based on the target atomic task that matches each sub-requirement information.
[0111] The task requirement information corresponds to an original task, and the original task is to generate a target task corresponding to the task requirement information. The large language model can be called multiple times. In this case, the task requirement information is correspondingly broken down into multiple levels. For example, the first call performs a first breakdown of the task requirement information to obtain second-level sub-requirement information. The second call performs a second breakdown of each second-level sub-requirement information to obtain third-level sub-requirement information. ... The xth call performs an xth breakdown of each x-level sub-requirement information to obtain x+1-level sub-requirement information, where 0≤x≤n. x and n are both non-negative integers, and x is 0. The sub-requirement information includes the level of sub-requirement information corresponding to each breakdown. For example, the sub-requirement information includes second-level sub-requirement information, ..., and n+1-level sub-requirement information. The n+1-level sub-requirement information obtained from the final breakdown can be considered atomic requirement information. That is, the atomic requirement information corresponds to an atomic task, that is, each atomic requirement information corresponds to an atomic task. By calling the large language model at least once, the task requirement information can be broken down into a combination of atomic requirement information, which is the smallest information unit.
[0112] Optionally, the computer device calls the large language model at least once to decompose the task requirement information into multiple sub-requirement information, each of which has a corresponding execution sequence number. For each sub-requirement information, the computer device determines the target atomic task corresponding to the sub-requirement information based on the sub-requirement information and the prompt corpus, and determines the execution order of the target atomic tasks based on the execution sequence number of the sub-requirement information. Based on the target atomic task that matches each sub-requirement information, the computer device determines at least one target atomic task that matches the task requirement information.
[0113] Exemplarily, the computer device calls the large language model n times to decompose the task requirement information into n+1 levels of sub-requirement information, and for each level of sub-requirement information, includes at least one sub-requirement information of that level. Starting from the n+1 level of sub-requirement information, for each n+1 level of sub-requirement information, the computer device determines at least one target atomic task of the n-level sub-requirement information based on the target atomic task that matches the n+1 level of sub-requirement information. For each n-level sub-requirement information, the computer device determines at least one target atomic task of the n-1 level sub-requirement information based on the target atomic task that matches the n-level sub-requirement information. According to a similar processing procedure, the target atomic task that matches each second-level sub-requirement is obtained. The computer device determines at least one target atomic task that matches the task requirement information based on each target atomic task that matches the second-level sub-requirement.
[0114] In this embodiment, the task requirement information is decomposed into multiple sub-requirement information through a large language model, that is, the task requirement information is converted into requirement information of the smallest information unit. For each sub-requirement information, the target atomic task that matches the sub-requirement information is determined in turn based on the sub-requirement information and the prompt corpus, and the original task corresponding to the task requirement information is subdivided into target atomic tasks of the smallest task unit. In this way, based on the target atomic task that matches each sub-requirement information, at least one target atomic task that matches the task requirement information is determined, and based on this, the executable structure of the target task can be automatically and accurately output. The steps of task generation are simplified, and the user only needs to provide the task requirement information to automatically complete the task without performing any complex operations, thereby improving the efficiency of task generation.
[0115] In some embodiments, as shown in Figure 4, a flowchart of the target atomic task determination step in one embodiment is provided. Using a large language model, the task requirement information is broken down into multiple sub-requirement information. For each sub-requirement information, the target atomic task that matches the sub-requirement information is determined in sequence based on the sub-requirement information and the prompt corpus, including:
[0116] Step S402: obtaining a first-level prediction result based on the task requirement information and the prompt corpus through the large language model, and performing executable verification on the first-level prediction result to obtain a first-level verification result.
[0117] Among them, the first-level prediction result is the prediction result obtained by calling the large language model for the first time. The executable check is used to verify whether the prediction result is an executable structure. If the executable check of the i-level prediction result passes, the i-level prediction result includes the i-1-level prediction result located before the i-level prediction result. Since the executable check of the i-1-level prediction result fails, the i-1-level prediction result includes the target atomic task that matches the atomic requirement information. At this time, the i-level prediction result also includes the executable structure corresponding to the target atomic task that matches the atomic requirement information. In summary, if the executable check of the i-level prediction result passes, the i-level prediction result includes the target atomic task that matches the atomic requirement information and the executable structure corresponding to the target atomic task that matches the atomic requirement information.
[0118] Optionally, the computer device first calls the large language model and outputs a first-level prediction result based on the task requirement information and the prompt corpus. After verifying that the format of the first-level prediction result is legal, the computer device performs an executable verification on the first-level prediction result to obtain a first-level verification result. The first-level verification result represents the result of the executable verification of the first-level prediction result.
[0119] Exemplarily, after obtaining the first-level prediction result, the computer device performs a format check on the first-level prediction result. If the corresponding format check result is characterized as passed, the computer device returns to perform an executable check on the first-level prediction result, and obtains the first-level check result step for execution. Format check is used to verify whether the prediction result is a structure. If the corresponding format check result is characterized as passed, it means that the first-level prediction result is a structure and the format of the structure is legal. If the format check result is characterized as not passed, the first-level prediction result is not a structure, or the first-level prediction result is an illegal structure. At this time, the computer device does not need to perform an executable check on the first-level prediction result. The computer device directly disassembles the task requirement information into multiple second-level sub-requirement information.
[0120] Step S404: When the first-level verification result indicates that the first-level prediction result does not include an executable structure, the task requirement information is decomposed into multiple second-level sub-requirement information; for each second-level sub-requirement information, a second-level prediction result is output based on the second-level sub-requirement information, the prompt corpus and the first-level prediction result through a large language model, and the second-level prediction result is executable verified to obtain a second-level verification result; when the second-level verification result indicates that the second-level prediction result includes an executable structure, it is determined that the second-level prediction result passes the executable verification, and based on the second-level prediction result, a target atomic task that matches the second-level sub-requirement information is obtained.
[0121] Optionally, when the first-level verification result indicates that the first-level prediction result does not include an executable structure, the computer device decomposes the task requirement information into multiple second-level sub-requirement information. The computer device calls the large language model for the second time, and inputs each second-level sub-requirement information, prompt corpus and first-level prediction result into the large language model. For each second-level sub-requirement information, the computer device outputs a second-level prediction result based on the second-level sub-requirement information, prompt corpus and first-level prediction result through the large language model. When the computer device verifies that the format of the second-level prediction result is legal, it performs executable verification on the second-level prediction result to obtain a second-level verification result. The second-level verification result represents the result obtained by performing executable verification on the second-level prediction result. When the second-level prediction result passes the executable verification, the computer device obtains the target atomic task that matches the second-level sub-requirement information based on the second-level prediction result.
[0122] Exemplarily, after obtaining the secondary prediction result, the computer device performs a format check on the secondary prediction result. If the corresponding format check result characterizes passing, the computer device returns to perform an executable check on the secondary prediction result, obtains the secondary check result step and executes it. If the corresponding format check result characterizes passing, it means that the secondary prediction result is a structure, and the format of the structure is legal. If the corresponding format check result characterizes failing, the secondary prediction result is not a structure, or the secondary prediction result is an illegal structure. At this time, the computer device does not need to perform an executable check on the secondary prediction result. The computer device directly disassembles the secondary sub-demand information into multiple third-level sub-demand information.
[0123] In this embodiment, a large language model is used to output a first-level prediction result based on the task requirement information and the prompt corpus. The first-level prediction result is then checked for executable structure, specifically to see if the first-level prediction result contains the executable structure of the target atomic task. If the first-level verification result indicates that the first-level prediction result does not include an executable structure, it indicates that the large language model needs to be called a second time. Prior to this, the task requirement information needs to be broken down into multiple second-level sub-requirement information. For each second-level sub-requirement information, the large language model outputs a second-level prediction result based on the second-level sub-requirement information, the prompt corpus, and the first-level prediction result. The second-level prediction result is again checked for executable structure. If the second-level prediction result passes the executable structure check, the target atomic task that matches the second-level sub-requirement information is obtained based on the second-level prediction result. In this way, the original task corresponding to the task requirement information can be subdivided into the target atomic task of the smallest task unit, thereby automatically and accurately outputting the executable structure of the target task. This simplifies the task generation process. The user only needs to provide the task requirement information to automatically complete the task without any complex operations, thereby improving the efficiency of task generation.
[0124] In some embodiments, the method further includes: when the first-level verification result indicates that the first-level prediction result includes an executable structure, obtaining a target atomic task that matches the task requirement information based on the first-level prediction result.
[0125] It should be noted that when the first-level verification result indicates that the first-level prediction result includes an executable structure, it means that the task corresponding to the task requirement information is the target atomic task. At this time, as mentioned above, the first-level verification result corresponding to the first-level prediction result is characterized as passed, then the first-level prediction result includes the target atomic task that matches the atomic requirement information (in this embodiment, the atomic requirement information is the task requirement information) and the executable structure corresponding to the target atomic task that matches the atomic requirement information.
[0126] In this embodiment, if the first-level verification result indicates that the first-level prediction result includes an executable structure, the target atomic task matching the task requirement information is directly obtained based on the first-level prediction result. In other words, in this case, the task corresponding to the task requirement information is the target atomic task, and the executable structure of the target atomic task can be quickly and accurately determined to be the executable structure of the target task, eliminating the need for complex encoding operations. This simplifies the process of obtaining the executable structure and improves the efficiency of generating the target task.
[0127] In some embodiments, based on the target atomic task that matches each sub-requirement information, at least one target atomic task that matches the task requirement information is determined, including: obtaining the target atomic task that matches each second-level sub-requirement information, and obtaining the disassembly order of each second-level sub-requirement information; concatenating the target atomic task that matches each second-level sub-requirement information according to the disassembly order of each second-level sub-requirement information to obtain at least one target atomic task that matches the task requirement information.
[0128] For each second-level sub-demand information, the concatenation order of the target atomic tasks matching the second-level sub-demand information is the disassembly order of the second-level sub-demand information.
[0129] Optionally, the computer device obtains a target atomic task that matches each second-level sub-requirement information, and determines a concatenation order for the target atomic tasks of each second-level sub-requirement information based on the order in which the second-level sub-requirement information is decomposed. The computer device begins with the first target atomic task in the concatenation order and concatenates the target atomic tasks of each second-level sub-requirement information in sequence according to the concatenation order of the target atomic tasks of each second-level sub-requirement information, to obtain at least one target atomic task that matches the task requirement information.
[0130] For example, consider task requirement information P as being broken down into N second-level sub-requirements in the order of second-level sub-requirement information P2.1, second-level sub-requirement information P2.2, ..., and second-level sub-requirement information P2.N. The second-level subtasks corresponding to each second-level sub-requirement information are concatenated in the order of second-level subtask F2.1 corresponding to second-level sub-requirement information P2.1, ..., and second-level subtask F2.N corresponding to second-level sub-requirement information P2.N. At this point, the at least one target atomic task matching the task requirement information is, in order, second-level subtask F2.1, ..., and second-level subtask F2.N.
[0131] In this embodiment, by obtaining the target atomic tasks that match each second-level sub-requirement information, the target atomic tasks that match each second-level sub-requirement information can be quickly concatenated in the corresponding decomposition order according to the decomposition order of each second-level sub-requirement information, thereby obtaining at least one target atomic task that matches the task requirement information. Subsequently, the executable structure of the target task can be automatically and accurately output. This simplifies the task generation process; users only need to provide the task requirement information to automatically complete the task without any complex operations, thereby improving the efficiency of task generation.
[0132] In some instances, the method further includes: when the second-level verification result corresponding to the second-level sub-requirement information fails the executable verification, the second-level sub-requirement information is decomposed into multiple third-level sub-requirement information; for each third-level sub-requirement information, through the large language model, according to the third-level sub-requirement information, the prompt corpus and the second-level prediction result corresponding to each second-level sub-requirement information, the third-level prediction result is output, and the third-level prediction result is executable verified to obtain the third-level verification result; when the third-level verification result indicates that the third-level prediction result includes an executable structure, it is determined that the third-level prediction result passes the executable verification, and based on the third-level prediction result, a target atomic task matching the third-level sub-requirement information is obtained.
[0133] Optionally, when the secondary prediction result corresponding to the secondary sub-requirement information fails to pass the executable verification, the computer device decomposes the secondary sub-requirement information into multiple tertiary sub-requirement information. For each tertiary sub-requirement information, the computer device calls the large language model again, and inputs each tertiary sub-requirement information, the prompt corpus, and the secondary prediction result corresponding to each secondary sub-requirement information into the large language model. For each tertiary sub-requirement information, the computer device outputs the tertiary prediction result corresponding to the tertiary sub-requirement information through the large language model based on the tertiary sub-requirement information, the prompt corpus, and the secondary prediction result corresponding to the tertiary sub-requirement information. When the computer device verifies that the format of the tertiary prediction result is legal, it performs an executable verification on the tertiary prediction result to obtain a tertiary verification result. If the tertiary verification result indicates that the corresponding tertiary prediction result passes the executable verification, the computer device obtains the target atomic task that matches the tertiary sub-requirement information based on the tertiary prediction result.
[0134] After each call to the large language model, the prediction result generated by the call needs to be stored in the vector database as the context information for the next call. For example, as mentioned above, the first-level prediction result generated by the first call serves as the context information for the second-level prediction result generated by the second call, and the second-level prediction result generated by the second call serves as the context for the third-level prediction result generated by the third call. As mentioned above, since each call to the large language model may generate a secondary subtask (i.e., a subtask of the subtask corresponding to the level sub-requirement information corresponding to the previous call), the storage structure of the call record context is in the form of a multi-level vector, as shown in Figure 5, which is a schematic diagram of a multi-level vector storage structure in one embodiment. The original task refers to the task corresponding to the task requirement information. After the first call to the large language model, if the format of the first-level prediction result is illegal or the executable verification fails, the task requirement information is broken down into second-level sub-requirement information P2.1 through second-level sub-requirement information P2.N. After the second call to the large language model, if the format of the second-level prediction result is illegal or the executable verification fails, each second-level sub-requirement information is broken down, such as breaking down second-level sub-requirement information P2.1 into third-level sub-requirement information P2.1.1 through third-level sub-requirement information P2.1.M; or breaking down second-level sub-requirement information P2.N into third-level sub-requirement information P2.N.1 through third-level sub-requirement information P2.NK. The multi-level vector storage structure clearly describes the hierarchical analysis and decomposition process of the problem. Subsequent cyclic calls to the large language model with the call context information can more accurately obtain the executable structure of the target task.
[0135] Of course, if the format of the third-level prediction result is illegal or the executable check fails, it means that the third-level sub-demand information is not the smallest information unit. The third-level sub-demand information can be further disassembled until the format and executable check of the i-level prediction result corresponding to the i-level sub-demand information are passed. At this time, the i-level sub-demand information can be regarded as the smallest information unit, that is, the corresponding task is the target atomic task that matches the i-level sub-demand information.
[0136] Exemplarily, when it is verified that the format of the third-level prediction result is illegal, the computer device directly determines that the third-level prediction result does not include an executable structure. At this time, the computer device continues to disassemble the third-level sub-requirement information to obtain at least one fourth-level sub-requirement information, and inputs the at least one fourth-level sub-requirement information, the prompt corpus, and the third-level prediction result corresponding to the third-level sub-requirement information into the large language model to obtain the corresponding fourth-level prediction result. When it is verified that the format of the fourth-level prediction result is legal, the fourth-level prediction result is subjected to executable verification to obtain a fourth-level verification result. If the fourth-level verification result indicates that the corresponding third-level prediction result passes the executable verification, the computer device obtains the target atomic task that matches the fourth-level sub-requirement information based on the fourth-level prediction result.
[0137] Specifically, the large language model determines the prediction result for the current breakdown based on the corresponding sub-requirement information, the prompt corpus, and the verification results from the previous breakdown. Once the prediction result for the current breakdown is valid and contains an executable structure, the target atomic task for the sub-requirement information corresponding to the current breakdown is obtained from the prediction result.
[0138] Once the prediction result corresponding to the current disassembly is illegal, or does not contain an executable structure, the corresponding sub-requirement information obtained from the current disassembly will continue to be disassembled until the target atomic task is obtained. Referring to the above example, it can be understood that when the current disassembly is the first disassembly, the corresponding sub-requirement information obtained from the current disassembly is the second-level sub-requirement information, and the corresponding prediction result from the current disassembly is the second-level prediction result. When the current disassembly is the second disassembly, the corresponding sub-requirement information obtained from the current disassembly is the third-level sub-requirement information, and the corresponding prediction result from the current disassembly is the third-level prediction result. When the current disassembly is the third disassembly, the corresponding sub-requirement information obtained from the current disassembly is the fourth-level sub-requirement information, and the corresponding prediction result from the current disassembly is the fourth-level prediction result.
[0139] In this embodiment, when the second-level verification result corresponding to the second-level sub-demand information fails to pass the executable verification, it reflects that the large language model needs to be called three times. Before this, the second-level sub-demand information needs to be disassembled into multiple third-level sub-demand information, that is, the second-level sub-demand information needs to be further refined. For each third-level sub-demand information, the large language model outputs a third-level prediction result based on the third-level sub-demand information, the prompt corpus, and the second-level prediction result corresponding to each second-level sub-demand information. The third-level prediction result is subjected to executable verification. When the third-level prediction result passes the executable verification, it means that the third-level sub-demand information has been refined into the smallest information unit. Based on this, the target atomic task that matches the third-level sub-demand information is obtained according to the third-level prediction result, that is, the original task corresponding to the task requirement information is subdivided into the target atomic task of the smallest task unit, so that the executable structure of the target task can be automatically and accurately output. The task generation steps are simplified. The user only needs to provide the task requirement information to automatically generate the task without any complex operations, thereby improving the efficiency of task generation.
[0140] In some embodiments, at least one target atomic task that matches the task requirement information is determined based on the target atomic task that matches each sub-requirement information, including: obtaining the target atomic task that matches each third-level sub-requirement information, and obtaining the disassembly order of each third-level sub-requirement information and the disassembly order of each second-level sub-requirement information; concatenating the target atomic task that matches each third-level sub-requirement information according to the disassembly order of each third-level sub-requirement information to obtain at least one target atomic task that matches the second-level sub-requirement information; concatenating the target atomic task matched by each second-level sub-requirement information according to the disassembly order of each second-level sub-requirement information to obtain at least one target atomic task that matches the task requirement information.
[0141] For each third-level sub-requirement, the order in which the target atomic tasks matching the third-level sub-requirement are concatenated is the order in which the second-level sub-requirement is decomposed in the second decomposition. For each second-level sub-requirement, the order in which the target atomic tasks matching the second-level sub-requirement are concatenated is the order in which the second-level sub-requirement is decomposed in the third decomposition.
[0142] Optionally, the computer device determines the concatenation order of the target atomic tasks that match each tertiary sub-requirement information according to the decomposition order of each tertiary sub-requirement information in the secondary decomposition. For each secondary sub-requirement information, the computer device starts from the first target atomic task of the first concatenation order, and sequentially concatenates the target atomic tasks of each tertiary sub-requirement information according to the concatenation order of the target atomic tasks of each tertiary sub-requirement information, to obtain at least one target atomic task of the secondary sub-requirement information. The computer device starts from the first target atomic task of the second concatenation order, and sequentially concatenates the target atomic tasks of each secondary sub-requirement information according to the concatenation order of the target atomic tasks of each secondary sub-requirement information, to obtain at least one target atomic task that matches the task requirement information. The first concatenation order refers to the first concatenation order of the target atomic tasks that match the tertiary sub-requirement information, and the second concatenation order refers to the first concatenation order of the target atomic tasks that match the secondary sub-requirement information.
[0143] For example, using FIG5 as an example, for second-level sub-requirement information P2.1, corresponding to third-level sub-requirement information P2.1.1 through third-level sub-requirement information P2.1.M, the computer device concatenates the target atomic tasks matching the third-level sub-requirement information in the order in which they are concatenated, i.e., concatenating subtasks 1.1, ..., and 1.n in sequence to obtain target atomic tasks matching second-level sub-requirement information P2.1, i.e., subtasks 1.1, ..., and 1.n. (Subtasks 1.1, ..., and 1.n are the target atomic tasks matching third-level sub-requirement information P2.1.1, ..., and the target atomic tasks matching third-level sub-requirement information P2.1.M, respectively.) Similarly, the target atomic tasks of the third-level sub-requirement information of other second-level sub-requirement information are concatenated to obtain target atomic tasks matching each second-level sub-requirement information, such as the target atomic tasks matching second-level sub-requirement information P2.N, i.e., subtasks n.1, ..., and nn. For the task requirement information, there is corresponding secondary sub-requirement information P2.1 to secondary requirement information P2.N, and the target atomic tasks matching the task requirement information are: subtask 1.1, ..., subtask 1.n, ..., subtask n.1, ..., subtask nn.
[0144] In this embodiment, by concatenating the target atomic tasks that match each third-level sub-requirement information in the corresponding disassembly order, at least one target atomic task that matches the corresponding second-level sub-requirement information is obtained. Based on this, at least one target atomic task of the second-level sub-requirement information at the previous level is determined through the splicing results of the target atomic tasks of multiple third-level sub-requirement information corresponding to the same second-level sub-requirement information. The target atomic tasks matched by each second-level sub-requirement information are concatenated in the corresponding disassembly order to obtain at least one target atomic task that matches the task requirement information. That is to say, starting from the target atom corresponding to the smallest information unit, splicing step by step, and finally obtaining all the target atomic tasks spliced in order, in this way, each target atomic task can be executed in sequence according to the splicing order of the target atomic tasks to automatically realize the execution of the target task.
[0145] In some embodiments, as shown in FIG6 , there is a schematic diagram of the process of generating the executable structure of the target task in one embodiment. After obtaining the task requirement information and the prompt corpus, if the first call is a large language model, the call parameters are generated according to the work requirement information and the prompt corpus, and the call parameters are input into the large language model to obtain a first-level prediction result. The first-level prediction result is checked for executableness. When the first-level check result indicates that the first-level prediction result does not include an executable structure, that is, it is not executable, or the format of the first-level prediction result is illegal, the work requirement information is disassembled into multiple second-level sub-requirement information, and used as the context information for the second call to the large language model, and saved in the form of a multi-level vector and stored in the database. If the format of the first-level prediction result is verified to be legal, and the first-level check result indicates that the first-level prediction result includes an executable structure, the result is output, that is, the executable structure of the target task is output.
[0146] If the current call is not the first call to the large language model, the computer device obtains the context information of the current call (for example, if the current call is the second call, the context information of the current call is the second-level sub-demand information; if the current call is the third call, the context information of the current call is the third-level sub-demand information), and uses the context information of the current call, the prompt corpus and the level prediction result corresponding to the previous call as the call parameters of the current call (if the current call is the second call, the level prediction result corresponding to the previous call is the first-level prediction result; if the current call is the third call, the level prediction result corresponding to the previous call is the second-level prediction result), inputs the call parameters of the current call into the large language model, and obtains the level prediction result of the current call (if the current call is the second call, the level prediction result of the current call is the second-level prediction result; if the current call is the third call, the level prediction result of the current call is the third-level prediction result, and so on). If the level prediction result of the current call fails both the format check and the executable check, the context information of the current call is disassembled to obtain the result of the current call disassembly. The result of the current call disassembly (for example, if the current call is the second time, the result of the current call disassembly is the third-level sub-requirement information) is stored in the database in the form of a multi-level vector as the context information for the next call, and repeated iterations are performed until an executable structure is obtained.
[0147] In this embodiment, by obtaining the task requirement information input in the interactive task generation interface of the task generation interface, the user can directly input the workflow requirement information in the interactive task generation interface of the task generation interface. The prompt corpus constructed for the workflow is obtained. The prompt corpus includes prompt information constructed for each atomic task of the workflow. The prompt information includes the executable structure and application information of the atomic task; through the large language model, semantic understanding is performed based on the task requirement information and the prompt corpus, and at least one target atomic task of the task requirement information can be automatically and accurately matched. Based on the executable structure of at least one target atomic task, the executable structure of the target task that matches the task requirement information is automatically and accurately output. In this way, the steps of task generation are simplified. The user only needs to provide the task requirement information to automatically complete the task without performing any complex operations, thereby improving the efficiency of task generation.
[0148] In some embodiments, the method also includes: when an execution instruction for executing a target task is triggered, creating a task instance regarding the target task, the task instance includes at least one subtask instance, and the subtask instance is used to execute the corresponding target atomic task; starting from the first subtask instance of the task instance, executing each subtask instance in sequence according to the executable structure of the subtask instance.
[0149] Among them, the target task corresponds to a task instance, and the task instance refers to a specific target task instance. The task instance includes the subtask instances corresponding to each target atomic task. Each target atomic task uniquely corresponds to a subtask instance. A target atomic task can be executed using different parameters. Therefore, the subtask instance can be understood as the process of executing the target atomic task using specific parameters. The executable structure of the subtask instance refers to the executable structure of the corresponding target atomic task, that is, the actual operation process of the target atomic task is based on the specific parameters used by the corresponding subtask instance, combined with the corresponding executable structure.
[0150] Optionally, after obtaining the executable structure of the target task, the computer device can directly trigger the execution instruction of the target task, and the computer device creates a task instance for the target task, which includes at least one subtask instance corresponding to at least one target atomic task required to generate the target task.
[0151] Optionally, after obtaining the executable structure of the target task, the computer device may also store the executable structure of the target task, wait for a preset time period, and then trigger the execution of the target task, and the computer device creates a task instance for the target task.
[0152] Optionally, after obtaining the executable structure of the target task, the computer device triggers the execution instruction of the target task in response to the trigger operation on the target task, and the computer device creates a task instance for the target task.
[0153] After the task instance for the target task is created as described above, the computer device starts from the first subtask instance of the task instance and executes the subtask instance according to the executable structure of the subtask instance to complete the target atomic task corresponding to the subtask instance.
[0154] In this embodiment, when an execution instruction for executing a target task is triggered, a task instance for the target task is first created. Based on this, the subtask instances of the corresponding target atomic task can be determined. Thus, starting from the first subtask instance of the task instance, each subtask instance is executed in sequence according to the executable structure of the subtask instance, thereby being able to execute the target task in sequence and ensuring the accuracy of the target task execution.
[0155] In some embodiments, after creating a task instance regarding the target task, the method also includes: creating a task instance corresponding to the target task in a task instance table in a database; the task instance table is used to record the task instance identifier and the process data structure of the task instance, the process data structure including the subtask instance identifier and the pointing relationship between each subtask instance; pushing the task instance identifier of the created task instance to the task instance message queue; after consuming the task instance identifier from the task instance message queue, executing the steps of each subtask instance in sequence starting from the first subtask instance of the task instance according to the executable structure of the subtask instance.
[0156] Among them, the process data structure of the task instance can be understood as the executable structure of the target task. The task instance corresponding to the target task created in the task instance (execution) table of the database records the relevant information of the task instance, including the task instance identifier, the process data structure of the task instance, and can also include the target task identifier, the running status of the task instance, the start time and end time of executing the task instance, the executor who triggers the execution of the task instance, etc. The process data structure of the task instance records the execution process of the task instance, that is, the pointing relationship between each subtask instance. The computer device loads and executes each subtask instance in turn, that is, traversing and executing according to the pointing relationship between the subtask instances included in the process data structure. Each subtask instance corresponds to a target atomic task. The execution relationship of subtask instance 2 reflects which subtask instance is before subtask instance 2, and reflects which subtask instance is after subtask instance 2.
[0157] For example, each task instance in the task instance table includes the following fields:
[0158] id: task instance identifier;
[0159] workflow_id: workflow ID;
[0160] name: name;
[0161] executor: executor;
[0162] status: the running status of the task instance;
[0163] start_at: start time;
[0164] end_at: end time;
[0165] apps: the executable structure of the task instance;
[0166] The executable structure of the task instance may include the following information:
[0167] StartAppInstId: starting subtask instance;
[0168] DestAppInstId: end the subtask instance;
[0169] Apps: An array of subtask instances, where each subtask instance includes the following information:
[0170] Name: The name or description of the subtask instance;
[0171] Parameters: Parameters of the subtask instance, including parameters, parameter values, parameter types, and parameter descriptions;
[0172] Template: The subtask template used by the subtask instance, such as an HTTP request or Python script;
[0173] Position: The coordinate position of the subtask instance on the front-end canvas;
[0174] InstId: the identifier of the subtask instance;
[0175] PrevAppInstIds: points to the identifier of the previous subtask instance;
[0176] NextAppInstIds: The identifier of the next subtask instance to be pointed to;
[0177] Output: the output result of the subtask instance;
[0178] Error: Error message if an error occurs during the execution of the subtask instance;
[0179] Status: the running status of the subtask instance;
[0180] StartTime: the start time of the subtask instance execution;
[0181] EndTime: the end time of the subtask instance execution;
[0182] It can be seen that a task instance contains multiple subtask instances, and each subtask instance has a unique identifier used to locate which subtask instance in the task instance it is.
[0183] Optionally, when the computer device receives an execution instruction that triggers a target task, it creates a corresponding task instance, including the task instance identifier, the executor of the task instance, the process data result of the task instance, the status of the task instance, and other related information, and persistently stores the created task instance in the task instance table in the database. Afterwards, the computer device also pushes the task instance identifier corresponding to the task instance to the task instance message queue. For example, the message format in the queue is: RPUSH execution#queue executionId, so that the distributed execution node can consume the task instance identifier from the task instance message queue, and read the task instance table in the database based on the consumed task instance identifier, obtain the task instance corresponding to the task instance identifier, and start executing the task instance after reading the relevant information of the task instance.
[0184] As shown in Figure 7, it is a schematic diagram of a task instance message queue in one embodiment. As shown in Figure 7, in a workflow scenario, wherein, each time a workflow is triggered to execute, a corresponding task instance is created in the task instance table of the database, and the task instance identifier corresponding to the created task instance is pushed to the task instance message queue, and the computer device monitors the task instance message queue. Optionally, each container in the engine consumption cluster of the distributed workflow engine deployed in the computing device (which can be understood as each distributed execution node, such as container 1, container 2, ..., container N) monitors the task instance message queue. Once a new task instance identifier exists in the message queue, it will be consumed and executed in sequence in the first-in-first-out order.
[0185] When a task instance of a target task is consumed, starting from the first subtask instance of the task instance, each subtask instance is executed in sequence according to the executable structure of the subtask instance.
[0186] In this embodiment, a task instance corresponding to the target task is created in the task instance table in the database. The task instance identifier of the created task instance is pushed to the task instance message queue for consumption. Once the task instance identifier is consumed from the task instance message queue, indicating that the current task to be executed is the target task, the steps of each subtask instance are sequentially executed, starting with the first subtask instance of the task instance, according to the executable structure of each subtask instance. This ensures the target task is executed in sequence, ensuring accurate execution of the target task.
[0187] In some embodiments, starting from the first subtask instance of the task instance, each subtask instance is executed in sequence according to the executable structure of the subtask instance, including: pushing the subtask instance identifier corresponding to the first subtask instance to the subtask instance message queue; consuming the subtask instance identifier from the subtask instance message queue; loading the corresponding subtask instance according to the subtask instance identifier, and executing the corresponding subtask instance; after executing the corresponding subtask instance, determining the subtask instance pointed to by the corresponding subtask instance; after pushing the subtask instance identifier corresponding to the pointed subtask instance to the subtask instance message queue, returning to the step of consuming the subtask instance identifier from the subtask instance message queue, and continuing to execute until all subtask instances of the task instance are executed.
[0188] For example, as shown in FIG8 , a schematic diagram of a subtask instance message queue in one embodiment is shown. In FIG8 , a task instance including p subtask instances is used as an example for explanation: starting from the first subtask instance of the task instance, the computer device pushes the corresponding subtask instance identifier 1 to the subtask instance message queue, obtains the subtask instance table of the corresponding subtask instance identifier 1, and after being consumed by the container, the computer device loads the corresponding subtask instance into the memory for execution. After the execution is completed, the running status and execution data of the subtask instance are updated, and the subtask instance is stored in the corresponding subtask instance table in the database, and the next subtask instance pointed to is obtained. Similarly, the corresponding subtask instance identifier 2 is pushed to the subtask instance message queue. After being consumed by the container, the corresponding subtask instance is loaded into the memory for execution. After the execution is completed, the next subtask instance pointed to is obtained. Similarly, the corresponding subtask instance identifier p is pushed to the subtask instance message queue. After being consumed by the container, the subtask instance is loaded into the memory for execution. After the execution is completed, the entire task instance is executed. During execution, each container runs a daemon process to monitor the subtask instance message queue, using the command: BLPOP appinst#queue. Once a new subtask instance identifier appears in the message queue, it is consumed and executed in a first-in-first-out order. The container that consumes the new subtask instance first will execute it.
[0189] In this embodiment, multiple subtask instances corresponding to the task instance corresponding to the target task are loaded and executed in sequence. When the multiple subtask instances include time-consuming subtasks that need to interact with the outside world, there is no need to load the entire task instance at one time and wait for the execution of the time-consuming subtasks. The entire task instance does not need to occupy memory and consume running resources for a long time, which can greatly improve the efficiency of resource utilization.
[0190] After consuming and obtaining the subtask instance to be processed from the subtask instance message queue, the computer device updates the data status in the database corresponding to the subtask instance to processing and sets the start execution time. The subtask instance is stored in the corresponding subtask instance table. The fields of each subtask instance table are as follows:
[0191] id: the auto-increment primary key id, which is the application ID of the workflow system;
[0192] execution_id: the ID of the execution task instance;
[0193] app_inst_id: subtask instance ID;
[0194] name App: subtask instance name;
[0195] template App: The template type used (such as HTTP request, Python script, etc.). Different subtask instance templates support different functions.
[0196] status: the running status of the subtask instance;
[0197] start_at: the start time of the subtask instance execution;
[0198] end_at: the end time of the subtask instance execution;
[0199] apps: The executable structure of a subtask instance. It records information such as the execution result of the current subtask instance, the previous subtask instance it points to, the next subtask instance it points to, input parameters, and runtime data. The apps field has been explained above and will not be repeated here.
[0200] In some instances, the subtask instance identifier corresponding to the pointed subtask instance is pushed to the subtask instance message queue, including: when the corresponding subtask instance points to multiple subtask instances, the subtask instance identifiers of the multiple subtask instances pointed to are all pushed to the subtask instance message queue.
[0201] Among them, the current subtask instance points to multiple subtask instances. Usually, the multiple subtask instances are independent of each other and can be executed concurrently. At this time, the computer device can push the subtask instance identifiers of the multiple subtask instances pointed to to the subtask instance message queue.
[0202] In this embodiment, when a corresponding subtask instance points to multiple subtask instances, the subtask instance identifiers of the multiple subtask instances pointed to are pushed to the subtask instance message queue. In this way, subsequent execution based on the subtask instance message queue can ensure that each subtask instance pointed to is executed, ensuring the accuracy and effectiveness of task execution.
[0203] In some embodiments, consuming the subtask instance identifier from the subtask instance message queue includes: consuming multiple subtask instance identifiers from the subtask instance message queue through distributed execution nodes, and then concurrently loading and executing the corresponding multiple subtask instances.
[0204] Among them, after the distributed execution nodes consume the multiple subtask instance identifiers from the message queue respectively, they load and execute the multiple subtask instances concurrently. For example, if subtask instance A points to subtask instances B and C, and the execution of subtask instances B and C is independent of each other, then the computer device can push the two subtask instances to the subtask instance message queue, and the distributed execution node 1 consumes the identifier of subtask instance B from the message queue, and the execution node 2 consumes the identifier of subtask instance C from the message queue, and then the two subtask instances are executed concurrently on different execution nodes, which can achieve true concurrent loading and execution.
[0205] In this embodiment, compared to loading the entire task instance into the memory for execution at one time through a certain execution node, each subtask instance can only be executed in sequence according to the pointing relationship of the subtask instance of the task instance. Obviously, only one subtask instance can be executed at a time on the same node, and true concurrency cannot be achieved. In this embodiment, since the multiple subtask instances of the task instance are split apart and loaded and executed in sequence, when the number of subtask instances pointed to by a certain subtask instance is multiple, they can be loaded and executed separately by different distributed execution nodes, thereby achieving true concurrent execution.
[0206] In one embodiment, after determining the subtask instance to which the current subtask instance points, the computer device persists the pointed subtask instance to the subtask instance table of the database; the subtask instance table is used to record the subtask instance identifier, the running status of the subtask instance, and the execution data; the running status of the subtask instance is initialized to unprocessed; after the subtask instance is executed, in the subtask instance table, the running status of the subtask instance is updated to completed, and the execution data of the subtask instance is updated.
[0207] In this embodiment, once a subtask instance is executed, the running status of the subtask instance in the subtask instance table is directly updated, and the execution data of the subtask instance is updated in real time, such as the data output by executing the subtask instance.
[0208] In one embodiment, the workflow processing method also includes: parsing the task instance, obtaining the global variables of each subtask instance included, forming a global variable table and storing it, the global variables including global input variables and global output variables; after executing the current subtask instance, updating the global output variables in the global variable table according to the corresponding execution data; loading the updated global variable table, obtaining the input data corresponding to the global input variables of the pointed subtask instance, and executing the pointed subtask instance according to the input data.
[0209] In the process of sequentially loading the subtask instances of the execution instance of the target task, if there is a subtask instance whose input data is the output data of the previous subtask instance located before the subtask instance, for example, the previous subtask instance may be the output data of the previous subtask instance pointed to by the subtask instance, or for example, the previous subtask instance may be the output data of the previous two subtask instances pointed to by the subtask instance. However, since the multiple subtask instances of the task instance are split into separate parts and loaded and executed sequentially, the output data of each subtask instance cannot be transmitted directly.
[0210] To this end, in order to smoothly execute each loaded subtask instance, the computer device can parse the global variables of each subtask instance of the task instance, form a global variable table and store it, that is, the identifier of each subtask instance and the corresponding global variable (including global input variables and global output variables) are stored in correspondence. It can be understood that when the task instance is not executed, each variable in the global variable is a default parameter value. After each subtask instance is loaded and executed to obtain execution data, the global variable table is updated according to the execution data. Before each execution of the pointed subtask instance, the previously updated global variable table is loaded into the memory, and according to the identifier of the pointed subtask instance, the global variable table is read to obtain the input data corresponding to the global input variables of the subtask instance. Then, the subtask instance can be executed according to the input data.
[0211] Figure 9 is a schematic diagram of a global variable table in one embodiment. As shown in Figure 9, the global variables of each subtask instance of the currently processed task instance are loaded into the memory to form a mapping table between subtask instance identifiers and global variables.
[0212] Exemplarily, the global variables of the subtask instance can use constants. Exemplarily, the global variables of the subtask instance can also use path syntax expressions to reference the output data of any previous subtask instance. When the pointed subtask instance needs to be executed, the computer device locates the corresponding global variable in the global variable table through the identifier of the subtask instance. If it is a path syntax expression, the path syntax expression is parsed into corresponding data based on the data corresponding to the global variable included in the path syntax expression in the global variable table to obtain the input data of the pointed subtask instance.
[0213] For example, the data structure of a subtask instance includes a parameter field, which has the following structure:
[0214] <parameter key, parameter value, parameter type, parameter description>
[0215] The parameter types include string, boolean, number, etc. The value in the parameter can be a constant (number or string) or a path syntax expression that references the output of any previous subtask instance. For example:
[0216] <subtask instance Id>.data;
[0217] <subtask instance ID>.parameter.<parameter key value>;
[0218] In this embodiment, based on the identifier of the subtask instance, the input data and output data of the corresponding subtask instance can be located, and the execution data of each subtask instance will be stored in the database, so that the execution data of each subtask instance can be loaded into the memory, and the global variable table can be updated to parse the data corresponding to the path syntax expression used in the input parameters of the subtask instance. In this way, if the input data of a subtask instance is the output data of the previous subtask instance located before the subtask instance, the output data of the corresponding previous subtask instance can be quickly read through the global variable table stored in the local memory, thereby improving the speed of data reading.
[0219] In some embodiments, the method also includes: obtaining training corpus related to the workflow, the training corpus including multiple workflow sample texts and labels corresponding to each of the workflow sample texts; performing semantic understanding based on the training corpus through the semantic understanding model to be trained to obtain prediction results corresponding to each workflow sample text; performing model training on the semantic understanding model to be trained based on the prediction results and labels corresponding to each workflow sample text to obtain a trained semantic understanding model, and using the trained semantic understanding model as a large language model.
[0220] Optionally, the computer device acquires training corpus related to the workflow, which is technical corpus related to workflow initiation and operation instances. The computer device also acquires conventional natural corpus, which includes natural sample text related to web pages, news, novels, etc. The computer device performs data preprocessing on the training corpus and natural corpus separately, for example, cleaning, segmenting, and removing stop words on each workflow sample text and natural sample text, to obtain processed workflow sample text and processed natural sample text. The computer device performs statistics and techniques on the words appearing in all processed workflow sample texts and processed natural sample texts to establish a dictionary, in which each word in the dictionary has a unique corresponding number. The computer device inputs the processed workflow sample text and processed natural sample text into the semantic understanding model to be trained for training, and obtains prediction results corresponding to each processed workflow sample text and each processed natural sample text. The computer device determines a target loss based on the prediction results and labels corresponding to each processed workflow sample text and each processed natural sample text. The computer device then adjusts the model parameters of the semantic understanding model to be trained to minimize the target loss, thereby obtaining a trained semantic understanding model. The trained semantic understanding model is used as the large language model. The semantic example model to be trained is constructed using a neural network model.
[0221] Of course, during the training process, computer equipment can also enrich the training text used for model training through dropout and batch normalization to improve the training effect of the model.
[0222] In this embodiment, a large amount of rich workflow-related training corpus and a large amount of computing resources are used to train the semantic understanding capabilities of the semantic understanding model to be trained, ensuring that the trained semantic understanding model can be applied to fields such as natural language generation, machine translation, and speech recognition. In this way, using the trained semantic understanding model as a large language model can accurately decompose task requirement information into atomic and fine-grained units, obtain target atomic tasks, and accurately generate executable structures for target tasks that match the task requirement information, thereby achieving automatic execution of the target task.
[0223] The present application also provides an application scenario, which applies the above-mentioned task generation method based on a large language model. Optionally, the application of the task generation method based on a large language model in this application scenario is, for example, as described below: In the scenario of instant messaging applications, in order to facilitate managers to manage a certain business project, it is necessary to generate target tasks, that is, it is necessary to generate target workflows related to the business project. Managers can automatically generate an executable structure of the target task related to the business project based on the task requirement information corresponding to the business project through the task generation method based on a large language model provided in an embodiment of the present application. In this way, the business project can be managed through the executable structure of the target task. Optionally, task requirement information input based on the interactive task generation interface is obtained; a large language model is called to input the task requirement information into the large language model, the task requirement information is semantically understood by the large language model, and an executable structure of the target task that matches the task requirement information is output; based on the executable structure of the target task, the target task is graphically rendered to obtain a task execution flowchart for the target task, and the task execution flowchart is displayed in the task generation interface; the target task is composed of at least one target atomic task; a link to view the execution progress of the target task is displayed in the task generation interface, and the execution progress view link is used to view the execution progress of the target task. In this way, there is no need for additional manual programming of the target task, and a matching executable structure can be automatically generated, thereby improving the efficiency of target task generation.
[0224] Of course, it is not limited to this. The task generation method based on the large language model provided in this application can also be applied in other application scenarios. For example, the task generation method based on the large language model provided in the embodiment of this application pre-generates the executable structure of the target task and pre-stores it in the database. The development technicians now need to develop a certain product, and the normal operation of the product involves the normal execution of the target task. Based on this, the executable structure of the target task can be directly called for use. There is no need to spend extra time encoding to generate the target task, which improves coding efficiency.
[0225] The above application scenarios are merely illustrative. It will be understood that the application of the task generation method based on the large language model provided in the various embodiments of the present application is not limited to the above scenarios.
[0226] In a specific embodiment, a task generation method based on a large language model is provided, which is executed by a computer device. FIG10 is a flow chart of workflow execution in one embodiment, which is FIG10 (a), i.e., steps S1002a to S1010a.
[0227] Step S1002a: determining task requirement information through speech recognition.
[0228] Optionally, the computer device may obtain task requirement voice, text, or graphic information input in the interactive task generation interface; perform semantic conversion processing on the task requirement voice, text, or graphic information to obtain task requirement information.
[0229] The following description takes the conversion of task requirement speech into task requirement information as an example.
[0230] The specific process of step S1002a refers to (b), i.e., step S1002b to step S1014b:
[0231] Step S1002b: Obtain sample speech.
[0232] The sample speech is obtained through various speech receiving software and hardware.
[0233] Step S1004b: speech preprocessing.
[0234] Optionally, the computer device performs speech preprocessing on the sample speech to obtain a preprocessed sample speech, wherein the preprocessing includes at least one of noise removal, speech segmentation, and speech feature extraction.
[0235] Step S1006b: Feature extraction.
[0236] Optionally, the computer device performs feature extraction on the preprocessed sample speech to obtain a corresponding target signal.
[0237] Step S1008b: speech recognition model training.
[0238] Optionally, the target signal is sent to a speech recognition model to be trained for model training to obtain a trained speech recognition model.
[0239] After the computer device obtains the workflow requirement voice sent through the user account in the interactive task generation interface, step S1010b is executed.
[0240] Step S1010b: Voice recognition.
[0241] Optionally, the computer device obtains the task-required speech, and performs speech recognition on the task-required speech through a trained speech recognition model to obtain a first recognition text.
[0242] Step S1012b: text processing.
[0243] Optionally, the computer device performs post-processing on the first recognized text to obtain task requirement information, and the post-processing includes adding punctuation marks and correcting spelling errors.
[0244] Among them, post-processing includes adding punctuation marks and correcting spelling errors, etc.
[0245] Step S1014b: Output task requirement information.
[0246] Step S1004a: Obtain prompt corpus.
[0247] Optionally, the computer device may obtain prompt corpus for workflow construction from a workflow corpus, where the prompt corpus includes prompt information constructed for each atomic task of the workflow, and the prompt information includes executable structures and application information of the atomic tasks.
[0248] Step S1006a: Perform semantic understanding based on the task requirement information and prompt corpus to obtain the executable structure of the target task.
[0249] Step S1006a is the process of calling the large language model each time. Each call is taken as an example for explanation. For the specific process, refer to (c), i.e., step S1002c to step S1010c:
[0250] Step S1002c: Determine the call parameters of the current call according to the task requirement information and the prompt corpus; if the current call is not the first call, the historical call context information.
[0251] Optionally, the computer device uses the previous output result as the context information of the current call (for example, if the current call is the second time, the context information of the current call is the second-level sub-demand information; if the current call is the third time, the context information of the current call is the third-level sub-demand information), and uses the context information of the current call, the prompt corpus and the level prediction result corresponding to the previous call as the call parameters of the current call (if the current call is the second time, the level prediction result corresponding to the previous call is the first-level prediction result; if the current call is the third time, the level prediction result corresponding to the previous call is the second-level prediction result).
[0252] Step S1004c: Input the call parameters of the current call into the large language model to obtain the level prediction result of the current call.
[0253] Step S1006c: Determination of executable verification.
[0254] Optionally, if the format of the currently called prediction result is verified to be legal, the computer device performs an executable check on the currently called level prediction result. If the executable check fails, or the format of the currently called level prediction result is illegal, step S1008c is executed. If the executable check passes, step 1010c is executed.
[0255] Step S1008c: The result of the current call decomposition is stored in the database in a multi-level vector format as context information for the next call.
[0256] Optionally, the computer device disassembles the context information of the current call to obtain the result of the current call disassembly, and stores the result of the current call disassembly (for example, if the current call is the second time, the result of the current call disassembly is the third-level sub-demand information) in the database in the form of a multi-level vector as the context information for the next call.
[0257] Step 1010c: Output the executable structure of the target task.
[0258] Optionally, when the computer device verifies that the format of the level prediction result of the current call is legal and the executable verification passes, it determines the executable structure of the target task based on the level prediction result of the current call and outputs the executable structure of the target task.
[0259] For example, by calling the large language model for the first time, a first-level prediction result is output based on the task requirement information and the prompt corpus. After obtaining the first-level prediction result, the first-level prediction result is format-checked. If the corresponding format verification result representation passes, the first-level prediction result is then executable-checked to obtain the first-level verification result. If the format verification result representation fails, the first-level prediction result is not a structure, or the first-level prediction result is an illegal structure. In this case, there is no need to perform executable verification on the first-level prediction result, and the task requirement information is directly disassembled into multiple second-level sub-requirement information.
[0260] When the first-level verification result indicates that the first-level prediction result includes an executable structure, the target atomic task matching the task requirement information is directly obtained based on the first-level prediction result. When the first-level verification result indicates that the first-level prediction result does not include an executable structure, the computer device decomposes the task requirement information into multiple second-level sub-requirement information. The large language model is called a second time, and each second-level sub-requirement information, prompt corpus, and first-level prediction result are input into the large language model. For each second-level sub-requirement information, the large language model outputs a second-level prediction result based on the second-level sub-requirement information, prompt corpus, and first-level prediction result. A format check is performed on the second-level prediction result. If the corresponding format check result indicates that it passes, the process returns to the step of performing an executable check on the second-level prediction result to obtain the second-level verification result for execution. If the corresponding format check result indicates that it passes, the second-level prediction result is a structure and the format of the structure is valid. The target atomic task for each matching second-level sub-requirement information is obtained. Based on the order in which the second-level sub-requirement information is decomposed, the computer device determines the concatenation order of the target atomic tasks for each second-level sub-requirement information. The computer device starts from the first target atomic task in the concatenation order, and concatenates the target atomic tasks of each secondary sub-requirement information in sequence according to the concatenation order of the target atomic tasks of each secondary sub-requirement information to obtain at least one target atomic task that matches the task requirement information.
[0261] If the corresponding format check result representation fails, the secondary prediction result is not a structure, or the secondary prediction result is an illegal structure. At this time, there is no need to perform executable verification on the secondary prediction result, and the secondary sub-demand information can be directly disassembled into multiple third-level sub-demand information.
[0262] For each level 3 sub-demand information, the large language model is called again, and the level 2 prediction results corresponding to each level 3 sub-demand information, prompt corpus, and each level 2 sub-demand information are input into the large language model. For each level 3 sub-demand information, the computer device outputs the level 3 prediction result corresponding to the level 3 sub-demand information through the large language model based on the level 3 sub-demand information, prompt corpus, and the level 2 prediction results corresponding to the level 2 sub-demand information. When it is verified that the format of the level 3 prediction result is legal, the level 3 prediction result is subjected to executable verification to obtain a level 3 verification result. If the level 3 verification result indicates that the corresponding level 3 prediction result passes the executable verification, the target atomic task that matches the level 3 sub-demand information is obtained based on the level 3 prediction result.
[0263] Based on the order in which each tertiary sub-requirement information is decomposed during the secondary decomposition, the concatenation order of the target atomic tasks matching each tertiary sub-requirement information is determined. For each secondary sub-requirement information, starting with the first target atomic task of the first concatenation order, the target atomic tasks of each tertiary sub-requirement information are sequentially concatenated according to the concatenation order of the target atomic tasks of each tertiary sub-requirement information, thereby obtaining at least one target atomic task for the secondary sub-requirement information. Starting with the first target atomic task of the second concatenation order, the target atomic tasks of each secondary sub-requirement information are sequentially concatenated according to the concatenation order of the target atomic tasks of each secondary sub-requirement information, thereby obtaining at least one target atomic task matching the task requirement information. The first concatenation order refers to the first concatenation order among the target atomic tasks matching the tertiary sub-requirement information, and the second concatenation order refers to the first concatenation order among the target atomic tasks matching the secondary sub-requirement information. Based on the executable structure of at least one target atomic task matching the task requirement information, the executable structure of the target task matching the task requirement information is determined, and the executable structure of the target task is output.
[0264] Step S1008a: Execute the target task.
[0265] Optionally, a task execution flowchart of the target task is rendered and displayed in an interactive task generation interface; the target task is composed of at least one target atomic task; the computer device executes the target task; when the execution status of the target task is updated, the execution status of the target task is updated in the task execution flowchart.
[0266] The specific process of executing the target task refers to (d), that is, step S1002d to step S1012d:
[0267] Step S1002d: Create an execution instance corresponding to the task.
[0268] Optionally, the computer device directly triggers the execution instruction of the target task. Optionally, the computer device may also store the executable structure of the target task and trigger the execution of the target task after a preset time period. Optionally, the computer device may also trigger the execution instruction of the target task in response to a triggering operation on the target task. When the execution instruction of the target task is triggered, a task instance corresponding to the target task is created in the task instance table of the database.
[0269] Step S1004d: Obtain and initialize the execution instance.
[0270] Optionally, the computer device pushes the task instance identifier corresponding to the created task instance to the task instance message queue and monitors the task instance message queue. Optionally, the task instance message queue is monitored according to each container (which can be understood as each distributed execution node) in the consumption cluster of the distributed workflow engine deployed in the computer device. Once there is a new task instance identifier in the message queue, it will be consumed and executed in sequence according to the first-in-first-out order.
[0271] Step S1006d: Obtain the subtask instance table.
[0272] Optionally, when consuming the task instance of the target task, the computer device pushes the subtask instance identifier corresponding to the first subtask instance to the subtask instance message queue; consumes the subtask instance identifier from the subtask instance message queue; obtains the corresponding subtask instance table based on the subtask instance identifier, loads and executes the current subtask instance; after executing the current subtask instance, stores the subtask instance in the corresponding subtask instance table in the database, and determines the subtask instance pointed to by the current subtask instance; after pushing the subtask instance identifier corresponding to the pointed subtask instance to the subtask instance message queue, returns to the subtask instance message queue, and continues to consume the subtask instance identifier until all subtask instances of the task instance are executed.
[0273] After determining the subtask instance to which the current subtask instance points, obtain the subtask instance table of the executed subtask instance and persist the pointed subtask instance to the subtask instance table in the database; initialize the running status of the subtask instance to unprocessed; after executing the subtask instance, update the running status of the subtask instance to completed in the subtask instance table, and update the execution data of the subtask instance. In the case where the current subtask instance points to multiple subtask instances, push the subtask instance identifiers of the multiple subtask instances pointed to to the subtask instance message queue; through distributed execution nodes, after consuming multiple subtask instance identifiers from the subtask instance message queue, load and execute the corresponding multiple subtask instances concurrently. The target task processing method also includes: parsing the task instance, obtaining the global variables of each subtask instance included, forming a global variable table and storing it, the global variables including global input variables and global output variables; after executing the current subtask instance, updating the global output variables in the global variable table according to the corresponding execution data; loading the updated global variable table, obtaining the input data corresponding to the global input variables of the pointed subtask instance, and executing the pointed subtask instance according to the input data.
[0274] Step S1010d: Parse the path syntax expression.
[0275] Optionally, during the sequential execution of subtask instances of an execution instance of a target task, if the input data of a subtask instance is the output data of a previous subtask instance preceding the subtask instance, the input data of the subtask instance can be obtained by parsing the path syntax expression, that is, the output data of the previous subtask instance preceding the subtask instance can be obtained. The computer device executes the subtask instance based on the input data of the subtask instance.
[0276] Step S1012d: Determine whether the execution instance is completed.
[0277] Optionally, the output data obtained after execution is stored in the database, and it is determined whether the execution instance of the target task has ended, that is, whether all sub-execution instances in the execution instance of the target task have been completed. If the execution status of all sub-execution instances is "executed", it is determined that the execution instance of the target task has been completed.
[0278] Step S1010a: Display an execution progress viewing link.
[0279] Optionally, when the target task begins execution, a link to view the execution progress of the target task is displayed in the interactive task generation interface. In response to a triggering operation on the execution progress view link, the user is redirected to the execution progress view interface, where the execution progress of the target task is displayed. Each time the target task executes an application, a task execution flowchart of the target task in the execution status is displayed in the execution progress view interface, and a completion mark is displayed in the image corresponding to the application that has been executed in the task execution flowchart of the target task in the execution status.
[0280] In this embodiment, task requirement information inputted through an interactive task generation interface is retrieved, and the large language model is directly invoked. The task requirement information is then inputted into the large language model. The large language model then performs semantic understanding of the task requirement information, automatically generating an executable structure for the target task that matches the task requirement information. Based on the target task's executable structure, a graphical rendering is performed on the target task to generate a task execution flowchart for the target task, which is then displayed in the task generation interface. The target task is constructed from at least one target atomic task, thereby visually displaying the details of the generated target task. A link to view the execution progress of the target task is displayed in the task generation interface. This link is used to view the execution progress of the target task, allowing for timely and intuitive viewing of the execution progress. In other words, the user only needs to provide the task requirement information to automatically generate the tasks required to complete the task, without any complex operations. This simplifies the task generation process and improves task generation efficiency. Furthermore, during the task generation process, the runtime environment can be reused, allowing different tasks to be executed concurrently, effectively reducing costs. During the execution of target tasks, the fine-grained execution mechanism of atomic task shockwaves enables concurrent application execution. By converging applications concurrently, the workflow engine's execution approaches the operational characteristics of coded programming (such as concurrent wait control). Furthermore, the low-code design concept of the executable structure DSL Json significantly reduces learning and usage costs, greatly improving efficiency.
[0281] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0282] Based on the same inventive concept, embodiments of the present application also provide a large language model-based task generation system for implementing the large language model-based task generation method described above. The implementation solution provided by this system is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more embodiments of the large language model-based task generation system provided below can be found in the above limitations of the large language model-based task generation method and will not be repeated here.
[0283] In one embodiment, as shown in FIG11 , a task generation system 1100 based on a large language model is provided, comprising: an information acquisition module 1102 , a structure acquisition module 1104 , a task execution flow chart display module 1106 , and a link display module 1108 , wherein:
[0284] An information acquisition module is used to obtain task requirement information input based on the interactive task generation interface;
[0285] The structure acquisition module is used to call the large language model, input the task requirement information into the large language model, perform semantic understanding of the task requirement information through the large language model, and output the executable structure of the target task that matches the task requirement information;
[0286] A task execution flow chart display module is used to perform graphical rendering on the target task based on the executable structure of the target task, obtain the task execution flow chart of the target task, and display the task execution flow chart in the task generation interface; the target task is composed of at least one target atomic task; and
[0287] A link display module is used to display the execution progress viewing link of the target task in the task generation interface. The execution progress viewing link is used to view the execution progress of the target task. In some embodiments, the information acquisition module 1102 is used to display the task generation interface that can interact with human-computer information; receive the task content input through the interactive task interface and obtain the task content; perform semantic conversion on the task content to obtain task requirement information.
[0288] In some embodiments, the information acquisition module 1102 is used to call the prompt corpus constructed for the workflow through a large language model, perform semantic understanding of the task requirement information, obtain the executable structure of the target task that matches the task requirement information, and output the executable structure of the target task, wherein the prompt corpus includes prompt information constructed for each atomic task of the workflow, and the prompt information includes the executable structure and application information of the atomic task.
[0289] In some embodiments, the structure obtaining module 1104 is used to generate calling parameters according to the task requirement information and the prompt corpus; construct a model calling request according to the calling parameters; and call the large language model according to the model calling request.
[0290] In some embodiments, a structure acquisition module is used to perform semantic understanding based on task requirement information and prompt corpus through a large language model to obtain at least one target atomic task that matches the task requirement information; obtain the executable structure of at least one target atomic task from the prompt corpus, and obtain the executable structure of the target task that matches the task requirement information based on the executable structure of at least one target atomic task.
[0291] In some embodiments, the structure acquisition module is used to determine at least one target atomic task that matches the task requirement information in sequence according to the task requirement information and the prompt corpus through a large language model; the structure acquisition module is used to combine the executable structures of each target atomic task according to the next atomic task identifier indicated by the executable structure of each target atomic task to obtain the executable structure of the target task that matches the task requirement information.
[0292] In some embodiments, the structure acquisition module is used to decompose the task requirement information into multiple sub-requirement information through a large language model; for each sub-requirement information, the target atomic task that matches the sub-requirement information is determined in turn based on the sub-requirement information and the prompt corpus; based on the target atomic task that matches each sub-requirement information, at least one target atomic task that matches the task requirement information is determined.
[0293] In some embodiments, a structure acquisition module is used to obtain a first-level prediction result based on task requirement information and prompt corpus through a large language model, and perform executable verification on the first-level prediction result to obtain a first-level verification result; when the first-level verification result indicates that the first-level prediction result does not include an executable structure, the task requirement information is decomposed into multiple second-level sub-requirement information; for each second-level sub-requirement information, a second-level prediction result is output based on the second-level sub-requirement information, prompt corpus and first-level prediction result through a large language model, and executable verification is performed on the second-level prediction result to obtain a second-level verification result; when the second-level verification result indicates that the second-level prediction result includes an executable structure, it is determined that the second-level prediction result passes the executable verification, and based on the second-level prediction result, a target atomic task matching the second-level sub-requirement information is obtained.
[0294] In some embodiments, the structure acquisition module is further used to obtain a target atomic task matching the task requirement information according to the first-level prediction result when the first-level verification result indicates that the first-level prediction result includes an executable structure.
[0295] In some embodiments, the structure acquisition module is also used to obtain the target atomic task that matches each second-level sub-requirement information, and obtain the disassembly order of each second-level sub-requirement information; the target atomic task that matches each second-level sub-requirement information is concatenated according to the disassembly order of each second-level sub-requirement information to obtain at least one target atomic task that matches the task requirement information.
[0296] In some embodiments, the structure acquisition module is also used to decompose the second-level sub-requirement information into multiple third-level sub-requirement information when the second-level verification result corresponding to the second-level sub-requirement information fails the executable verification; for each third-level sub-requirement information, the third-level prediction result is output through the large language model according to the third-level sub-requirement information, the prompt corpus and the second-level prediction result corresponding to each second-level sub-requirement information, and the third-level prediction result is executable verified to obtain the third-level verification result; when the third-level verification result indicates that the third-level prediction result includes an executable structure, it is determined that the third-level prediction result passes the executable verification, and based on the third-level prediction result, a target atomic task matching the third-level sub-requirement information is obtained.
[0297] In some embodiments, the structure acquisition module is also used to obtain the target atomic task that matches each third-level sub-requirement information, and obtain the disassembly order of each third-level sub-requirement information and the disassembly order of each second-level sub-requirement information; the target atomic task that matches each third-level sub-requirement information is concatenated according to the disassembly order of each third-level sub-requirement information to obtain at least one target atomic task that matches the second-level sub-requirement information; the target atomic task matched by each second-level sub-requirement information is concatenated according to the disassembly order of each second-level sub-requirement information to obtain at least one target atomic task that matches the task requirement information.
[0298] In some embodiments, the system further includes an update module, which is configured to execute the target task; when the execution status of the target task is updated, the execution status of the target task is updated in the task execution flowchart.
[0299] In some embodiments, the update module is further configured to jump to an execution progress viewing interface in response to a triggering operation on an execution progress viewing link; and display the execution progress of the target task in the execution progress viewing interface.
[0300] In some embodiments, the system also includes a task execution module, which is used to create a task instance about the target task when an execution instruction to execute the target task is triggered. The task instance includes at least one subtask instance, and the subtask instance is used to execute the corresponding target atomic task; starting from the first subtask instance of the task instance, each subtask instance is executed in sequence according to the executable structure of the subtask instance.
[0301] In some embodiments, the task execution module is also used to create a task instance corresponding to the target task in the task instance table of the database; the task instance table is used to record the task instance identifier and the process data structure of the task instance, the process data structure includes the subtask instance identifier and the pointing relationship between each subtask instance; push the task instance identifier to the task instance message queue; after consuming the task instance identifier from the task instance message queue, execute starting from the first subtask instance of the task instance, and execute the steps of each subtask instance in sequence according to the executable structure of the subtask instance.
[0302] In some embodiments, the task execution module is also used to push the subtask instance identifier corresponding to the first subtask instance to the subtask instance message queue; consume the subtask instance identifier from the subtask instance message queue; load the corresponding subtask instance according to the subtask instance identifier, and execute the corresponding subtask instance; after executing the corresponding subtask instance, determine the subtask instance pointed to by the corresponding subtask instance; after pushing the subtask instance identifier corresponding to the pointed subtask instance to the subtask instance message queue, return to the subtask instance message queue, and continue to consume the subtask instance identifier until all subtask instances of the task instance are executed.
[0303] In some embodiments, the task execution module is also used to push the subtask instance identifiers of the multiple subtask instances pointed to to the subtask instance message queue when the corresponding subtask instance points to multiple subtask instances; the workflow execution module is also used to consume multiple subtask instance identifiers from the subtask instance message queue through distributed execution nodes, concurrently load the corresponding multiple subtask instances, and execute the corresponding multiple subtask instances.
[0304] Each module in the large language model-based task generation system can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0305] In one embodiment, a computer device is provided, which can be a server or a terminal, and its internal structure diagram can be shown in Figure 12. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer-readable instructions are executed by the processor, a task generation method based on a large language model is implemented.
[0306] Those skilled in the art will understand that the structure shown in FIG12 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0307] In one embodiment, a computer device is further provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps in the above-mentioned method embodiments when executing the computer-readable instructions.
[0308] In one embodiment, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0309] In one embodiment, a computer program product is provided, comprising computer-readable instructions, which implement the steps in the above-mentioned method embodiments when executed by a processor.
[0310] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0311] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0312] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0313] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A task generation method based on a large language model, performed by a computer device, the method comprising: Obtaining task requirement information based on input in the interactive task generation interface; Calling a large language model, inputting the task requirement information into the large language model, performing semantic understanding on the task requirement information through the large language model, and outputting an executable structure of a target task matching the task requirement information; Based on the executable structure of the target task, the target task is graphically rendered to obtain a task execution flowchart of the target task, and the task execution flowchart is displayed in the task generation interface; The target task is composed of at least one target atomic task; and An execution progress viewing link of the target task is displayed in the task generation interface, and the execution progress viewing link is used to view the execution progress of the target task.
2. According to the method of claim 1, the step of obtaining task requirement information inputted based on the interactive task generation interface comprises: Displaying the task generation interface capable of human-computer information interaction; Receiving task content input through the interactive task interface and acquiring the task content; The task content is semantically transformed to obtain the task requirement information.
3. According to the method of claim 1 or 2, the semantic understanding of the task requirement information by the large language model and outputting an executable structure of the target task matching the task requirement information comprises: Through the large language model, the prompt corpus constructed for the workflow is called, the task requirement information is semantically understood, the executable structure of the target task matching the task requirement information is obtained, and the executable structure of the target task is output, wherein the prompt corpus includes prompt information constructed for each atomic task of the workflow, and the prompt information includes the executable structure and application information of the atomic task.
4. The method according to claim 3, wherein calling the large language model comprises: Generate calling parameters according to the task requirement information and the prompt corpus; Constructing a model call request according to the call parameters; The large language model is called according to the model calling request.
5. The method according to claim 3 or 4, wherein the large language model is used to call the prompt corpus for workflow construction, semantically understand the task requirement information, and obtain an executable structure of the target task matching the task requirement information, including: By using a large language model, semantic understanding is performed according to the task requirement information and the prompt corpus to obtain at least one target atomic task matching the task requirement information; An executable structure of at least one target atomic task is acquired from the prompt corpus, and an executable structure of a target task matching the task requirement information is obtained according to the executable structure of the at least one target atomic task.
6. The method according to claim 5, wherein the step of performing semantic understanding based on the task requirement information and the prompt corpus using a large language model to obtain at least one target atomic task matching the task requirement information comprises: Determining, in sequence, at least one target atomic task matching the task requirement information according to the task requirement information and the prompt corpus through a large language model; The step of obtaining an executable structure of a target task matching the task requirement information according to the executable structure of the at least one target atomic task includes: According to the next atomic task identifier indicated by the executable structure of each of the target atomic tasks, the executable structure of each of the target atomic tasks is combined to obtain the executable structure of the target task matching the task requirement information.
7. The method according to claim 6, wherein the step of sequentially determining at least one target atomic task matching the task requirement information based on the task requirement information and the prompt corpus through a large language model comprises: Decomposing the task requirement information into a plurality of sub-requirement information by using a large language model; For each sub-requirement information, according to the sub-requirement information and the prompt corpus, a target atomic task matching the sub-requirement information is determined in sequence; At least one target atomic task matching the task requirement information is determined according to the target atomic task matching each of the sub-requirement information.
8. The method according to claim 7, wherein the task requirement information is decomposed into a plurality of sub-requirement information by using a large language model; for each sub-requirement information, a target atomic task matching the sub-requirement information is sequentially determined according to the sub-requirement information and the prompt corpus, comprising: Obtaining a first-level prediction result through the large language model according to the task requirement information and the prompt corpus, and performing executable verification on the first-level prediction result to obtain a first-level verification result; In the case where the first level verification result indicates that the first level prediction result does not include an executable structure, then Decomposing the task requirement information into a plurality of secondary sub-requirement information; For each secondary sub-demand information, output a secondary prediction result according to the secondary sub-demand information, the prompt corpus and the primary prediction result through the large language model, and perform executable verification on the secondary prediction result to obtain a secondary verification result; When the secondary verification result indicates that the secondary prediction result includes an executable structure, it is determined that the secondary prediction result passes the executable verification, and a target atomic task matching the secondary sub-requirement information is obtained based on the secondary prediction result.
9. The method according to claim 8, further comprising: When the first-level verification result indicates that the first-level prediction result includes an executable structure, a target atomic task matching the task requirement information is obtained according to the first-level prediction result.
10. The method according to claim 8, wherein determining at least one target atomic task matching the task requirement information according to the target atomic task matching each of the sub-requirement information comprises: Obtaining a target atomic task matching each of the second-level sub-demand information, and obtaining a disassembly order of each of the second-level sub-demand information; The target atomic task matching each of the second-level sub-demand information is serially connected according to the disassembly order of each of the second-level sub-demand information to obtain at least one target atomic task matching the task demand information.
11. The method according to any one of claims 8 to 10, further comprising: If the secondary verification result corresponding to the secondary sub-requirement information fails the executable verification, then Decomposing the second-level sub-demand information into a plurality of third-level sub-demand information; For each third-level sub-demand information, output a third-level prediction result through the large language model according to the third-level sub-demand information, the prompt corpus and the second-level prediction result corresponding to each second-level sub-demand information, and perform executable verification on the third-level prediction result to obtain a third-level verification result; When the third-level verification result indicates that the third-level prediction result includes an executable structure, it is determined that the third-level prediction result passes the executable verification, and a target atomic task matching the third-level sub-requirement information is obtained based on the third-level prediction result.
12. The method according to claim 11, wherein determining at least one target atomic task matching the task requirement information according to the target atomic task matching each of the sub-requirement information comprises: Obtaining a target atomic task matching each of the third-level sub-demand information, and obtaining a disassembly order of each of the third-level sub-demand information and a disassembly order of each of the second-level sub-demand information; The target atomic task matching each of the third-level sub-demand information is concatenated in the order of disassembly of each of the third-level sub-demand information to obtain at least one target atomic task matching the second-level sub-demand information; The target atomic tasks matched by each of the second-level sub-demand information are serially connected according to the disassembly order of each of the second-level sub-demand information to obtain at least one target atomic task matching the task demand information.
13. The method according to any one of claims 1 to 11, after displaying the task execution flowchart in the task generation interface, the method further comprises: Execute the target task; When the execution status of the target task is updated, the execution status of the target task is updated in the task execution flow chart.
14. The method according to claim 13, further comprising: In response to a triggering operation on the execution progress viewing link, jumping to an execution progress viewing interface; The execution progress of the target task is displayed in the execution progress viewing interface.
15. The method according to claim 13, wherein the executing the target task comprises: In case of triggering an execution instruction to execute the target task, creating a task instance for the target task, wherein the task instance includes at least one subtask instance, and the subtask instance is used to execute the corresponding target atomic task; Starting from the first subtask instance of the task instance, each subtask instance is executed in sequence according to the executable structure of the subtask instance.
16. The method according to claim 15, after creating the task instance related to the target task, the method further comprises: In the task instance table of the database, creating a task instance corresponding to the target task; The task instance table is used to record the task instance identifier and the process data structure of the task instance, wherein the process data structure includes the subtask instance identifier and the pointing relationship between each of the subtask instances; Pushing the task instance identifier to the task instance message queue; After consuming the task instance identifier from the task instance message queue, the steps of executing each subtask instance in sequence starting from the first subtask instance of the task instance according to the executable structure of the subtask instance are executed.
17. The method according to claim 16, wherein starting from the first subtask instance of the task instance, executing each subtask instance in sequence according to the executable structure of the subtask instance comprises: Push the subtask instance identifier corresponding to the first subtask instance to the subtask instance message queue; Consume the subtask instance identifier from the subtask instance message queue; According to the subtask instance identifier, load the corresponding subtask instance and execute the corresponding subtask instance; After executing the corresponding subtask instance, determine the subtask instance to which the corresponding subtask instance points; After pushing the subtask instance identifier corresponding to the pointed subtask instance to the subtask instance message queue, the step of returning to the subtask instance message queue and consuming the subtask instance identifier continues to be executed until all the subtask instances of the task instance are executed.
18. The method according to claim 17, wherein the step of pushing the subtask instance identifier corresponding to the pointed subtask instance to the subtask instance message queue comprises: In the case where the corresponding subtask instance points to multiple subtask instances, the subtask instance identifiers of the multiple subtask instances pointed to are all pushed to the subtask instance message queue; The consuming the subtask instance identifier from the subtask instance message queue includes: Through the distributed execution nodes, after consuming the multiple subtask instance identifiers from the subtask instance message queue, the corresponding multiple subtask instances are loaded concurrently and the corresponding multiple subtask instances are executed.
19. A task generation system based on a large language model, the system comprising: An information acquisition module, used to acquire task requirement information input based on the interactive task generation interface; A structure acquisition module is used to call a large language model, input the task requirement information into the large language model, perform semantic understanding on the task requirement information through the large language model, and output an executable structure of a target task matching the task requirement information; A task execution flowchart display module is used to perform graphic rendering on the target task based on the executable structure of the target task, obtain the task execution flowchart of the target task, and display the task execution flowchart in the task generation interface; The target task is composed of at least one target atomic task; and The link display module is used to display the execution progress viewing link of the target task in the task generation interface, and the execution progress viewing link is used to view the execution progress of the target task.
20. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method according to any one of claims 1 to 18 when executing the computer-readable instructions.
21. A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 18.
22. A computer program product comprising computer readable instructions, which when executed by a processor implement the steps of the method according to any one of claims 1 to 18.
Citation Information
Patent Citations
Visualized flow display method and system
CN107341643A
Workflow process deployment method, apparatus, computer device, and storage medium
CN109389299A
Flow chart arrangement method and device, equipment and storage medium
CN113741965A
Task generation method, system and equipment based on large language model and storage medium
CN116775183A
Dynamic task association
US20120304187A1
Cited By
Land space planning index calculation method and system based on large language model
CN119294771A
Behavior instruction generation method and device, equipment, robot, medium and product
CN119610099A
Inference task execution method, electronic equipment, readable storage medium and program product
CN119886360A
Architecture design method based on requirements and functions and computer equipment
CN120068371A
File migration method and device
CN120104589A
