A large model driven water conservancy one map application task execution method and device

Through a large-model-driven method, the task process is automated and intelligent in a water conservancy map system, which solves the problem of users calling multiple interfaces in complex systems and improves task execution efficiency and accuracy.

CN118916946BActive Publication Date: 2024-12-17长江水利委员会网络与信息中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411404700.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2024-12-17
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

In the existing water conservancy map system, users need to find multiple interfaces in complex systems and call them in sequence, resulting in complex tasks being complicated, high learning costs and prone to error operations, affecting efficiency.

Method used

Using a large-model-driven method, use user historical behavior log to mine tasks with independent business meanings, establish a task library, and use large language models and embedded models to convert the task requirements entered by users into vector forms, and search and execute the most appropriate task flow.

Benefits of technology

The automation and intelligence of the task process of a water conservancy map has been realized, which reduces user usage costs, improves task execution efficiency, and improves accuracy through user feedback correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916946B_ABST
    Figure CN118916946B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for executing a water conservancy one map application task driven by a large model, the method comprising: mining out tasks with independent business meanings and establishing a task library according to the user historical behavior log of the water conservancy one map system; using a large language model to generate a text representation of each task according to the meta-task knowledge block of each meta-task in each task, converting the text representation into a vector representation, and storing it in a vector index of the task library; using the vector index to retrieve multiple candidate tasks from the task library; using a large language model to determine a task to be executed according to the user's question content; using a large language model to determine the task name and input parameters of the first meta-task according to the meta-task knowledge block of the first meta-task in the task to be executed, so as to execute all meta-tasks in the task to be executed. The present invention can realize the understanding of the natural language requirements input by the user, and perform accurate task generation and execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of spatial data technology, and in particular to a method and device for executing a water conservancy one-map application task driven by a large model. Background Art

[0002] In the water conservancy one map system, various data and functions in the water conservancy industry are gathered, and various interfaces and methods are provided for users to call. However, although the existing methods can assist users to meet their needs, they are composed of single functional interfaces with smaller granularity. Users often need to find multiple interfaces in a complex system and call them in sequence, and need to manually enter various intermediate results. For example: 1) To query the water level information of a certain location, the user needs to first query the station code near a certain location on page A, and then go to page B to query the water level information through the station code and time information; 2) To query the wharf near a certain location, the user needs to first query the longitude and latitude of the location on page C, and then go to page D to manually enter the longitude and latitude numbers (accurate to at least 4 decimal places), as well as the distance range, target type (i.e. wharf) and other highly professional parameters. The whole process is not only complicated and has a high learning cost, but also prone to errors in the process, which affects the effectiveness of task execution.

[0003] Therefore, it is necessary to automate and intelligentize the execution process of user needs through intelligent technical means. Summary of the invention

[0004] The present invention provides a large-model driven water conservancy one-map application task execution method and device, which compensates for the above limitations of the large model, improves the automation and intelligence of the water conservancy one-map task process, reduces user usage costs, and improves task execution efficiency.

[0005] In a first aspect, the present invention provides a large-model driven method for executing water conservancy one-map application tasks, comprising: mining tasks with independent business meanings according to the user historical behavior log of the water conservancy one-map system, and establishing a task library; wherein each task is an ordered set including at least one meta-task, and each meta-task has a corresponding meta-task knowledge block, and the meta-task knowledge block includes the input parameters, output results and meta-task description of the meta-task; according to the meta-task knowledge block of each meta-task in each task, a text representation of each task is generated by a large language model, and the text representation is converted into a vector representation by an embedded model, and stored in a vector index of the task library; the task requirements input by the user are mapped into a vector form by using the embedded model, so as to retrieve multiple candidate tasks from the task library by using the vector index; according to the user's question content, a task to be executed is determined from multiple candidate tasks by using the large language model; according to the meta-task knowledge block of the first meta-task in the task to be executed, the task name and input parameters of the first meta-task are determined by using the large language model, so as to execute all meta-tasks in the task to be executed.

[0006] According to a large model-driven water conservancy one map application task execution method provided by the present invention, tasks with independent business meanings are mined based on the user historical behavior logs of the water conservancy one map system, including: extracting multiple meta-task execution sequences from the user behavior logs; for each meta-task execution sequence, cutting it into multiple meta-task fragments using n-gram technology; each meta-task fragment includes at least one meta-task; and screening out meta-task fragments with independent business meanings from all meta-task fragments as the tasks.

[0007] According to a large model-driven water conservancy one-map application task execution method provided by the present invention, a meta-task fragment with independent business meaning is screened out from all meta-task fragments as the task, including: by analyzing the meta-task knowledge block of each meta-task in the meta-task fragment, the meta-task fragments that meet the preset screening conditions are screened out from all the meta-task fragments as candidate meta-task fragments; for any candidate meta-task fragment, according to the appearance frequency of any candidate meta-task fragment in all candidate meta-task fragments, the appearance frequency of each meta-task in any candidate meta-task fragment in all candidate meta-task fragments and the number of meta-task execution sequences containing any candidate meta-task fragment, the candidate meta-task fragment is scored; according to the score of each candidate meta-task fragment, the candidate meta-task fragment with a score higher than a preset threshold is determined as the task.

[0008] According to a large-model driven water conservancy one-map application task execution method provided by the present invention, when the meta-task segment contains only one meta-task, the preset screening condition is that the internal input parameter of the meta-task is empty; and, when the meta-task segment contains multiple meta-tasks, the preset screening condition is that the internal input parameter of the first meta-task is empty, the execution interval time of two adjacent meta-tasks is within the preset time length, and the input parameter of the subsequent meta-task is determined based on the output result of the previous meta-task; wherein the internal input parameter is a parameter whose output result is obtained by executing other meta-tasks as input.

[0009] According to a large model-driven water conservancy one-map application task execution method provided by the present invention, the formula for scoring any candidate meta-task fragment is specifically:

[0010]

[0011] in, represents any candidate meta-task fragment, express The rating score, express The frequency of occurrence in all candidate meta-task fragments, N represents the number of meta-task execution sequences, express The number of meta-tasks included, Indicates that it contains The number of meta-task execution sequences, i express For each meta-task in express i The frequency of occurrence of all candidate meta-task fragments, , as well as It is an adjustable parameter.

[0012] According to a large model-driven water conservancy one-map application task execution method provided by the present invention, a large language model is used to generate a text representation of each task based on the meta-task knowledge block of each meta-task in each task, including: obtaining the meta-task description of each meta-task from the meta-task knowledge block of each meta-task; inputting all the meta-task descriptions into the large language model, and outputting the text representation of each task.

[0013] According to a large model-driven water conservancy one-map application task execution method provided by the present invention, when the task includes multiple meta-tasks, all meta-tasks in the task to be executed are executed, including: using the output result of the previous meta-task as the input parameter of the subsequent meta-task, confirming or adjusting the input parameter of the subsequent meta-task through human-computer interaction, and executing all meta-tasks in sequence.

[0014] In a second aspect, the present invention further provides a large model driven water conservancy one map application task execution device, comprising:

[0015] The first processing module is used to mine tasks with independent business meanings according to the user historical behavior logs of the water conservancy one map system, and establish a task library; wherein each task is an ordered set including at least one meta-task, and each meta-task has a corresponding meta-task knowledge block, and the meta-task knowledge block includes the input parameters, output results and meta-task description of the meta-task;

[0016] The second processing module is used to generate a text representation of each task using a large language model according to the meta-task knowledge block of each meta-task in each task, and convert the text representation into a vector representation using an embedded model, and store it in a vector index of the task library;

[0017] A third processing module is used to map the task requirements input by the user into a vector form by using the embedded model, so as to retrieve a plurality of candidate tasks from the task library by using the vector index;

[0018] A fourth processing module is used to determine a task to be executed from multiple candidate tasks using a large language model according to the user's question content;

[0019] The fifth processing module is used to determine the task name and input parameters of the first meta-task in the tasks to be executed by using the large language model according to the meta-task knowledge block of the first meta-task in the tasks to be executed, so as to execute all the meta-tasks in the tasks to be executed.

[0020] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for executing a water conservancy one-map application task driven by a large model as described above are implemented.

[0021] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the large model-driven water conservancy one-map application task execution method as described in any of the above.

[0022] The large model-driven water conservancy one-map application task execution method and device provided by the present invention can understand the natural language requirements input by the user and perform accurate task generation and execution.

[0023] The present invention proposes a method for mining the core task requirements of users based on the historical behavior logs of users of a water conservancy map without the need for a large amount of manual annotation, and obtains the natural language expression of the task requirements, thereby building a bridge between machine language and natural language and effectively shortening the semantic gap between the two.

[0024] The present invention proposes a method driven by a large model intelligent agent from understanding user needs to task allocation and precise parameter generation, which realizes the conversion between user natural language and water conservancy one-map tasks and parameters, reducing the user's understanding and use costs of the one-map system.

[0025] The present invention proposes a method for automatic execution of continuous tasks that supports user feedback correction, which effectively utilizes user feedback to make up for the lack of accurate prediction effect of large models, and improves the efficiency of task execution while ensuring the effectiveness of task execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 It is a flow chart of a method for executing a water conservancy one-map application task driven by a large model provided by the present invention;

[0028] Figure 2 It is a schematic diagram of the framework of the method for executing a water conservancy one-map application task driven by a large model provided by the present invention;

[0029] Figure 3 It is a flowchart of executing the task to be executed provided by the present invention;

[0030] Figure 4 This is one of the front-end interactive interface schematic diagrams provided by the present invention;

[0031] Figure 5 This is the second schematic diagram of the front-end interactive interface provided by the present invention;

[0032] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.

[0035] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.

[0036] In recent years, with the development of large language model (abbreviated as large model) technology, its application in various industries has gradually become widespread. The large model has excellent performance in understanding human natural language, and provides strong support for understanding user needs in the execution of water conservancy one map system tasks. However, due to the following limitations of the large model's capabilities in the tasks in the field of spatial data in the water conservancy industry: First, the model's reserves of water conservancy professional knowledge are insufficient, and it is difficult to accurately identify the professional needs of users, especially the accurate parameter prediction when executing tasks; second, the model has no understanding of the tasks of the water conservancy one map, and it is difficult to drive the execution of tasks through a simple question-answer method. Therefore, there are few application results of related large model intelligent bodies in the field of spatial data in the water conservancy industry. Based on this, the present invention provides a large model-driven water conservancy one map application task execution method and device.

[0037] Combine the following Figure 1-Figure 6 The present invention describes a method and device for executing a large model-driven water conservancy one-map application task provided in an embodiment of the present invention.

[0038] Figure 1It is a flowchart of a method for executing a water conservancy one-map application task driven by a large model provided by the present invention. Figure 2 This is a schematic diagram of the framework of the large model driven water conservancy one map application task execution method provided by the present invention. Figure 1 and Figure 2 The technical solution provided by the present invention is described.

[0039] Step 101: Based on the historical behavior logs of users of the water conservancy one-map system, tasks with independent business meanings are mined and a task library is established.

[0040] Each task is an ordered set including at least one meta-task, and each meta-task has a corresponding meta-task knowledge block, and the meta-task knowledge block includes the input parameters, output results and meta-task description of the meta-task.

[0041] Specifically, the meta-task has been defined in the Water Conservancy One Map system, and supports the user to manually call the interface through the visual interface. For example, the interface name get_objcode is used to query the corresponding object code based on the place name entered by the user.

[0042] The meta-task knowledge block contains the following:

[0043] metatask_id: string format, metatask ID (identity identifier)

[0044] metatask_name: string format, metatask name

[0045] external_input: JSON list format, external input parameter name list, that is, the parameter name manually entered by the user (note that it is the parameter name, such as "objcode", not the actual parameter value, the same below)

[0046] internal_input: JSON list format, internal input parameter name list, that is, the results obtained by executing other meta-tasks as input parameter names

[0047] output: json format, output result parameter name

[0048] description: string format, meta-task description

[0049] Here are two examples of meta-task knowledge blocks:

[0050] Meta-task knowledge blocks encoded by keyword query objects:

[0051] {“metatask_id”: “11”,

[0052] "metatask_name":"get_objcode",

[0053] "external_input":[{"arg_name": "keyword", "type": "string", "description": "keyword"}],

[0054] "internal_input":[],

[0055] "output":{"arg_name":"objcode","type":"string","description":"Object code"},

[0056] "description": "Query object code based on keywords"}

[0057] According to the object code and time, query the meta-task knowledge block of the water level:

[0058] {“metatask_id”: “12”,

[0059] "metatask_name":"get_waterlevel",

[0060] "external_input":[

[0061] {"arg_name": "start_time", "type": "string", "description": "Start time, such as: 2024-01-01 00:00"},

[0062] {"arg_name": "end_time", "type": "string", "description": "End time, such as: 2024-01-01 23:00"}],

[0063] "internal_input":[{"arg_name":"objcode","type":"string","description":"Object code"}],

[0064] “output”:{“arg_name”: “waterlevel_url”, “type”: “string”, “description”: “Water level data link”},

[0065] “description”: “Query water level according to object code and time”}

[0066] Step 102: According to the meta-task knowledge chunks of each meta-task in each task, use a large language model to generate a text representation of each task, and use an embedding model to convert the text representation into a vector representation, which is stored in the vector index of the task library.

[0067] Specifically, after obtaining the task, obtain the meta-task description of each meta-task from the meta-task knowledge chunks of each meta-task to form a task representation, and combine it with the prompt template and input it into the large language model (which can be a general large model providing a network interface, such as ChatGPT, Wenxin Yiyan, Tongyi Qianwen, etc., or a local large model, such as GhatGLM4, Qwen2-7B, etc. The large models mentioned below are the same), and obtain the description text of each task. The following is an example of a prompt template:

[0068] “<Instruction>You will receive the descriptions of several meta-tasks. Please combine these descriptions to generate a complete task description, which consists of the consecutive execution of these meta-tasks.< / Instruction>

[0069] <Meta-task description>{metatask description}< / Meta-task description>

[0070] <Meta-task description>{metatask description}< / Meta-task description>

[0071] ……

[0072] <Requirement>Please describe the task in one sentence, within 100 words, and reflect the function of the task and the parameters required. Please only output the text of the task description, without outputting any extra content.< / Requirement>”

[0073] The content output by the large model is the text representation of the task.

[0074] After obtaining the text representation of the task, through an embedding model (a semantic vector model, such as bge-large-zh-v1.5), map the task text into a vector form. The embedding model is trained through a large number of text pairs, maps the text into a low-dimensional dense vector, and can better represent the semantic features of the text. After obtaining the vector representation of the task, use the FAISS (Facebook AI Similarity Search) tool to build a vector index for subsequent retrieval processes.

[0075] Step 103: Use the embedding model to map the task requirements input by the user into a vector form, so as to retrieve multiple candidate tasks from the task library using the vector index.

[0076] After receiving the task requirements input by the user online, use the embedded model to map the user requirements into a vector pattern, and use the retrieval function of the Faiss index to find multiple results with the closest cosine similarity to the query vector. For example, query 5 candidate tasks that best match the requirements.

[0077] Step 104: According to the content of the user's question, use the large language model to determine a task to be executed from multiple candidate tasks.

[0078] Specifically, input the content of the user's question and the text representations of multiple candidate tasks into the large language model to determine a task to be executed therefrom.

[0079] Taking 5 candidate tasks as an example, use the user's question and the text representations of the 5 candidate tasks to generate a top prompt, input it into the large model, and obtain the task to be executed. The following is the template of the top prompt:

[0080] "<Instruction>You are an assistant to help users solve problems. Your responsibility is to perform the first-step task assignment for the problems input by the user.

[0081] You need to accurately assign each question to a specific task. Note that one question corresponds to only one task, and ensure that this task is the one that can best solve the problem.

[0082] Please output the serial number of the corresponding task.< / Instruction>

[0083] <User's question>{query}< / User's question>

[0084] <Task list>

[0085] 1{metatask description 1}

[0086] 2{metatask description 2}

[0087] 3{metatask description 3}

[0088] 4{metatask description 4}

[0089] 5{metatask description 5}

[0090] < / Task list>

[0091] <Requirement>Please only return the task id, and do not output any extra content. If no suitable task is found, output the number 0< / Requirement>

[0092] Step 105: Based on the meta-task knowledge block of the first meta-task in the to-be-executed task, use a large language model to determine the task name and input parameters of the first meta-task, so as to execute all meta-tasks in the to-be-executed task.

[0093] After obtaining the ID of the to-be-executed task, the corresponding meta-task sequence of the to-be-executed task can be obtained.

[0094] At this time, query the first meta-task knowledge block in the meta-task sequence, input the task parameters into the task prompt template to form a complete task prompt, and input it into the large model to obtain specific meta-task execution instructions (including specific parameter values). The following is a specific task prompt example:

[0095] "<Instruction>You are an assistant to help users with the task of **querying the water level information of a location within a period of time**. Your responsibility is to extract the parameters required to execute the task for the user input question.< / Instruction>

[0096] The specific content and parameters of this task are as follows:

[0097] {

[0098] "Function name": "Query water level",

[0099] "Function description": "Query the water level of the corresponding measuring station according to the keyword",

[0100] "Parameters":

[0101] {"Keyword": {

[0102] "Type": "string",

[0103] "Parameter description": "Element keyword"

[0104] },

[0105] {"Start time": {

[0106] "Type": "string",

[0107] "Parameter description": "Query start time, accurate to the hour, default is empty, hour number is 00~23.",

[0108] "Format example": "2024-01-01+12:00",

[0109] "Default value": ""

[0110] }},

[0111] {"End Time": {

[0112] "type": "string",

[0113] "Parameter description": "Query end time, accurate to the hour, empty by default, hours are 00~23.",

[0114] "Format example": "2024-01-01+12:00",

[0115] "default value": ""

[0116] }}

[0117] },

[0118] "Call Example":"{'action_name':'Query water level','args':{'Keyword':'Three Gorges',"Start time":"2024-01-01+12:00",'End time':'2024-01-01+12:00'}}"

[0119] }”

[0120] After obtaining the first meta-task parameter, execute the meta-task, and then execute the remaining meta-tasks in the order of tasks until the entire task is completed. Specifically, the result of the previous meta-task is used as the parameter of the next one, and after executing the last meta-task, the final task result is obtained.

[0121] The large model-driven water conservancy one-map application task execution method provided by the present invention can understand the natural language requirements input by users and perform accurate task generation and execution.

[0122] Based on the contents of the above embodiments, as an optional embodiment, the large model-driven water conservancy one map application task execution method provided by the present invention mines out tasks with independent business significance based on the user historical behavior log of the water conservancy one map system, including: extracting multiple meta-task execution sequences from the user behavior log; for each meta-task execution sequence, cutting it into multiple meta-task fragments using n-gram technology; each meta-task fragment includes at least one meta-task; and screening out meta-task fragments with independent business significance from all meta-task fragments as the tasks.

[0123] Specifically, based on the user behavior log, the meta-task execution sequence is extracted in units of days, and the following data structure is obtained:

[0124] [{"session_id": "100", "action_id": "10011", "metatask_id": "123", "action_time": "2024-07-01 10:13"},

[0125] {"session_id": "100", "action_id": "10012", "metatask_id": "456, "action_time": "2024-07-01 10:22"},

[0126] ……]

[0127] Among them, session_id is the unique identifier of user + date, and is also the unique identifier of a meta-task execution sequence in this step; action_id is the unique identifier of executing a meta-task.

[0128] For each meta-task execution sequence corresponding to session_id, it is cut into several meta-task segments using n-gram. n-gram is a text processing technology widely used in the field of natural language processing (NLP). However, since the front-back dependency of the meta-task sequence is similar to the context dependency in the field of NLP, the present invention uses this method to extract meta-task segments. Specifically, n takes the values ​​of 1, 2, and 3, respectively, that is, sliding windows of length 1, 2, and 3 are used respectively to extract L meta-task segments of length 1, L-1 meta-task segments of length 2, and L-2 meta-task segments of length 3 from the entire meta-task execution sequence (assuming the length is L, that is, the number of meta-tasks).

[0129] Assuming that a meta-task execution sequence is: A, B, C, D and E, the meta-task fragment is as follows:

[0130] When n=1, the meta-task segments are: A, B, C, D and E; when n=2, the meta-task segments are: AB, BC, CD and DE; when n=3, the meta-task segments are: ABC, BCD and CDE.

[0131] Based on the content of the above embodiment, as an optional embodiment, the large model-driven water conservancy one-map application task execution method provided by the present invention selects meta-task fragments with independent business meanings from all meta-task fragments as the task, including the following steps:

[0132] (1) By analyzing the meta-task knowledge blocks of each meta-task in the meta-task fragment, the meta-task fragments that meet the preset screening conditions are screened out from all the meta-task fragments as candidate meta-task fragments.

[0133] When the meta-task segment contains only one meta-task, the preset filtering condition is that the internal input parameter of the meta-task is empty; and, when the meta-task segment contains multiple meta-tasks, the preset filtering condition is that the internal input parameter of the first meta-task is empty, the execution interval between two adjacent meta-tasks is within the preset time length, and the input parameter of the subsequent meta-task is determined based on the output result of the previous meta-task; wherein the internal input parameter is a parameter whose input is the output result obtained by executing other meta-tasks.

[0134] Specifically, n=1, 2, 3 are taken as examples for explanation.

[0135] For a meta-task subsequence with a length of 1, if its internal_input is empty, the meta-task subsequence can be retained;

[0136] For meta-task subsequences of length 2 and 3, they can be retained if the following conditions are met at the same time:

[0137] a. The internal_input of the first meta-task is empty

[0138] b. The interval between adjacent meta-task action_times should not exceed 10 minutes

[0139] c. The internal_input of the subsequent meta-task is empty, or all of its parameters exist in the output of all previous meta-tasks (i.e. the second parameter can be found in the first, and the third parameter can be found in the first or second).

[0140] (2) For any candidate meta-task fragment, score the candidate meta-task fragment according to the frequency of occurrence of the candidate meta-task fragment in all candidate meta-task fragments, the frequency of occurrence of each meta-task in the candidate meta-task fragment in all candidate meta-task fragments, and the number of meta-task execution sequences containing the candidate meta-task fragment. The specific formula is:

[0141]

[0142] in, represents any candidate meta-task fragment, express The rating score, express The frequency of occurrence in all candidate meta-task fragments, N represents the number of meta-task execution sequences, express The number of meta-tasks included, Indicates that it contains The number of meta-task execution sequences, i express For each meta-task in express i The frequency of occurrence of all candidate meta-task fragments, , as well as It is an adjustable parameter.

[0143] (3) According to the scoring value of each candidate meta-task segment, a candidate meta-task segment having a scoring value higher than a preset threshold is determined as the task.

[0144] The present invention proposes a method for mining the core task requirements of users based on the historical behavior logs of users of a water conservancy map without the need for a large amount of manual annotation, and obtains the natural language expression of the task requirements, thereby building a bridge between machine language and natural language and effectively shortening the semantic gap between the two.

[0145] The present invention proposes a method driven by a large model intelligent agent from understanding user needs to task allocation and precise parameter generation, which realizes the conversion between user natural language and water conservancy one-map tasks and parameters, reducing the user's understanding and use costs of the one-map system.

[0146] Based on the content of the above embodiments, as an optional embodiment, when the task includes multiple meta-tasks, all meta-tasks in the task to be executed are executed, including: using the output result of the previous meta-task as the input parameter of the subsequent meta-task, confirming or adjusting the input parameter of the subsequent meta-task through human-computer interaction, and executing all meta-tasks in sequence.

[0147] Figure 3 This is a flow chart of executing the task to be executed provided by the present invention, and the following reference is made to Figure 3 Provide further explanation.

[0148] Step 1: Display the initial meta-task name and parameters on the front end, and provide interactive buttons for users to confirm and adjust, such as Figure 4 As shown, Figure 4 This is one of the front-end interactive interface schematic diagrams provided by the present invention.

[0149] Step 2: If the user clicks the confirmation button in step 1, the meta-task execution code is generated according to the current meta-task name and parameters, and the current meta-task is executed. All meta-task execution codes are encapsulated into a unified format, and the process of generating execution codes will be automatically executed by the back-end program.

[0150] Step 3: If the result in step 2 is a unique value (e.g., only one object is found when searching for an object based on a keyword), the unique value is used as the input for the subsequent meta-task;

[0151] If the result in step 2 is not unique (e.g., searching for objects based on keywords and finding several objects), multiple objects are displayed on the front end, and a radio button is provided for the user to select an object, so that the user can select an object as the input for the subsequent meta-task, such as Figure 5 As shown, Figure 5 This is the second schematic diagram of the front-end interactive interface provided by the present invention;

[0152] Repeat step 2 to execute subsequent meta-tasks until the task is completed and the final result is obtained.

[0153] Furthermore, in step 1, if the user clicks the adjustment button, an adjustment box will be displayed, and the user can adjust the parameter value by himself, and click the confirmation button in the adjustment box to continue the operation of step 2.

[0154] The present invention proposes a method for automatic execution of continuous tasks that supports user feedback correction, which effectively utilizes user feedback to make up for the lack of accurate prediction effect of large models, and improves the efficiency of task execution while ensuring the effectiveness of task execution.

[0155] On the other hand, the present invention also provides a large model driven water conservancy one map application task execution device, comprising:

[0156] The first processing module is used to mine tasks with independent business meanings according to the user historical behavior logs of the water conservancy one map system, and establish a task library; wherein each task is an ordered set including at least one meta-task, and each meta-task has a corresponding meta-task knowledge block, and the meta-task knowledge block includes the input parameters, output results and meta-task description of the meta-task;

[0157] The second processing module is used to generate a text representation of each task using a large language model according to the meta-task knowledge block of each meta-task in each task, and convert the text representation into a vector representation using an embedded model, and store it in a vector index of the task library;

[0158] A third processing module is used to map the task requirements input by the user into a vector form by using the embedded model, so as to retrieve a plurality of candidate tasks from the task library by using the vector index;

[0159] A fourth processing module is used to determine a task to be executed from multiple candidate tasks using a large language model according to the user's question content;

[0160] The fifth processing module is used to determine the task name and input parameters of the first meta-task in the tasks to be executed by using the large language model according to the meta-task knowledge block of the first meta-task in the tasks to be executed, so as to execute all the meta-tasks in the tasks to be executed.

[0161] It should be noted that the large model-driven water conservancy one map application task execution device provided in the embodiment of the present invention can execute the large model-driven water conservancy one map application task execution method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0162] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the large model driven water conservancy one map application task execution method.

[0163] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0164] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the large model-driven water conservancy one-map application task execution method provided in the above-mentioned embodiments.

[0165] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the large model-driven water conservancy one-map application task execution method provided in the above-mentioned embodiments.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A large model driven water conservancy one map application task execution method, characterized in that: include: According to the user historical behavior logs of the Water Conservancy One Map system, tasks with independent business meanings are mined and a task library is established; wherein each task is an ordered set including at least one meta-task, and each meta-task has a corresponding meta-task knowledge block, and the meta-task knowledge block includes the input parameters, output results and meta-task description of the meta-task; Based on the meta-task knowledge blocks of each meta-task in each task, a large language model is used to generate the text representation of each task, and an embedded model is used to convert the text representation into a vector representation, which is stored in the vector index of the task library. The task requirements input by the user are mapped into vector form by using the embedded model, so as to retrieve multiple candidate tasks from the task library by using the vector index; Based on the user's question content, a large language model is used to determine a task to be executed from multiple candidate tasks; According to the meta-task knowledge block of the first meta-task in the tasks to be executed, the task name and input parameters of the first meta-task are determined by using the large language model to execute all the meta-tasks in the tasks to be executed; Among them, according to the user historical behavior log of the water conservancy one map system, tasks with independent business meanings are mined, including: Extract multiple meta-task execution sequences from user behavior logs; For each meta-task execution sequence, use n-gram technology to cut it into multiple meta-task segments; each meta-task segment includes at least one meta-task; Filter out meta-task fragments with independent business meanings from all meta-task fragments as the tasks; The meta-task fragments having independent business meanings are selected from all the meta-task fragments as the tasks, including: By analyzing the meta-task knowledge block of each meta-task in the meta-task fragment, the meta-task fragments meeting the preset screening conditions are screened out from all the meta-task fragments as candidate meta-task fragments; For any candidate meta-task segment, scoring the candidate meta-task segment according to the frequency of occurrence of the candidate meta-task segment in all candidate meta-task segments, the frequency of occurrence of each meta-task in the candidate meta-task segment in all candidate meta-task segments, and the number of meta-task execution sequences containing the candidate meta-task segment; According to the scoring value of each candidate meta-task segment, a candidate meta-task segment having a scoring value higher than a preset threshold is determined as the task; Wherein, when the meta-task segment contains only one meta-task, the preset screening condition is that the internal input parameter of the meta-task is empty; and, In the case where a meta-task segment includes multiple meta-tasks, the preset screening conditions are that the internal input parameter of the first meta-task is empty, the execution interval between two adjacent meta-tasks is within the preset time length, and the input parameter of the subsequent meta-task is determined based on the output result of the previous meta-task; Among them, the internal input parameters are the output results obtained by executing other meta-tasks as input parameters; The formula for scoring any candidate meta-task segment is specifically: in, represents any candidate meta-task fragment, express The rating score, express The frequency of occurrence in all candidate meta-task fragments, N represents the number of meta-task execution sequences, express The number of meta-tasks included, Indicates that it contains The number of meta-task execution sequences, i express For each meta-task in express i The frequency of occurrence of all candidate meta-task fragments, , as well as It is an adjustable parameter.

2. The large model-driven water conservancy one-map application task execution method according to claim 1 is characterized in that: Based on the meta-task knowledge blocks of each meta-task in each task, a large language model is used to generate the text representation of each task, including: Obtain a meta-task description of each meta-task from the meta-task knowledge block of each meta-task; All meta-task descriptions are input into a large language model, which outputs a textual representation of each task.

3. The large model-driven water conservancy one-map application task execution method according to claim 1 is characterized in that: In the case where the task includes multiple meta-tasks, executing all meta-tasks in the task to be executed includes: The output result of the previous meta-task is used as the input parameter of the subsequent meta-task. The input parameters of the subsequent meta-task are confirmed or adjusted through human-computer interaction, and all meta-tasks are executed in sequence.

4. A large model driven water conservancy one map application task execution device, characterized in that: include: The first processing module is used to mine tasks with independent business meanings according to the user historical behavior logs of the water conservancy one map system, and establish a task library; wherein each task is an ordered set including at least one meta-task, and each meta-task has a corresponding meta-task knowledge block, and the meta-task knowledge block includes the input parameters, output results and meta-task description of the meta-task; Among them, selecting meta-task fragments with independent business meanings from all meta-task fragments as the tasks includes: By analyzing the meta-task knowledge block of each meta-task in the meta-task fragment, the meta-task fragments meeting the preset screening conditions are screened out from all the meta-task fragments as candidate meta-task fragments; For any candidate meta-task segment, scoring the candidate meta-task segment according to the frequency of occurrence of the candidate meta-task segment in all candidate meta-task segments, the frequency of occurrence of each meta-task in the candidate meta-task segment in all candidate meta-task segments, and the number of meta-task execution sequences containing the candidate meta-task segment; According to the scoring value of each candidate meta-task segment, a candidate meta-task segment having a scoring value higher than a preset threshold is determined as the task; Wherein, when the meta-task segment contains only one meta-task, the preset screening condition is that the internal input parameter of the meta-task is empty; and, In the case where a meta-task segment includes multiple meta-tasks, the preset screening conditions are that the internal input parameter of the first meta-task is empty, the execution interval between two adjacent meta-tasks is within the preset time length, and the input parameter of the subsequent meta-task is determined based on the output result of the previous meta-task; Among them, the internal input parameters are the output results obtained by executing other meta-tasks as input parameters; The formula for scoring any candidate meta-task segment is specifically: in, represents any candidate meta-task fragment, express The rating score, express The frequency of occurrence in all candidate meta-task fragments, N represents the number of meta-task execution sequences, express The number of meta-tasks included, Indicates that it contains The number of meta-task execution sequences, i express For each meta-task in express i The frequency of occurrence of all candidate meta-task fragments, , as well as is an adjustable parameter; The second processing module is used to generate a text representation of each task using a large language model according to the meta-task knowledge block of each meta-task in each task, and convert the text representation into a vector representation using an embedded model, and store it in a vector index of the task library; A third processing module is used to map the task requirements input by the user into a vector form by using the embedded model, so as to retrieve a plurality of candidate tasks from the task library by using the vector index; A fourth processing module, for determining a task to be executed from multiple candidate tasks using a large language model according to the user's question content; The fifth processing module is used to determine the task name and input parameters of the first meta-task in the tasks to be executed by using the large language model according to the meta-task knowledge block of the first meta-task in the tasks to be executed, so as to execute all the meta-tasks in the tasks to be executed.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for executing a water conservancy one-map application task driven by a large model as described in any one of claims 1 to 3 are implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for executing a water conservancy one-map application task driven by a large model as described in any one of claims 1 to 3 are implemented.