A DEM landform analysis method based on large language model

Through the DEM geomorphological analysis method based on large language model, the bottlenecks of spatial topological relationships and semantic understanding in DEM data analysis are solved, efficient and intelligent analysis of DEM data is realized, and the processing capability of geospatial data is improved.

CN120407750BActive Publication Date: 2025-08-29NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510912858.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-08-29
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

Existing geographic information system tools are inefficient in DEM data analysis and application, making it difficult to parse the spatial topological relationship and semantic understanding of DEM raster data, and the iterative and efficient retrieval mechanisms of geographic knowledge are missing.

Method used

The DEM geomorphological analysis method based on large language models is adopted, and the semantic processing of DEM raster data and dynamic iterative update of geographical knowledge are realized by loading the DEM semantic mapping tool set and the two-way knowledge evolution memory iteration mechanism, including problem classification, multi-dimensional analysis and timeliness management of memory databases.

Benefits of technology

It effectively bridges the semantic gap between DEM raster data and large language models, improves the intelligent analysis level and application efficiency of DEM data, and can automatically generate structured landform analysis reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407750B_ABST
    Figure CN120407750B_ABST
Patent Text Reader

Abstract

The present invention discloses a DEM landform analysis method based on a large language model, which relates to the field of DEM data analysis technology. The method comprises the following steps: loading a DEM semantic mapping tool set to initialize the system; when the system receives user input, classifying the problem into single-tool problems, multi-tool collaborative problems, and non-tool-solvable problems based on a pre-trained model through a question classification agent; processing the single-tool problems, multi-tool collaborative problems, and non-tool-solvable problems separately; searching for existing memories of each problem based on a bidirectional knowledge evolution memory iteration mechanism, and performing multi-dimensional analysis in combination with a large language model to implement DEM landform analysis based on the large language model. The present invention solves the technical difficulties in the prior art of LLM in directly and effectively analyzing the spatial topological relationships contained in DEM raster data, as well as the difficulty in iteratively updating geographic knowledge in complex dynamic analysis tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of DEM data analysis, and in particular to a DEM landform analysis method based on a large language model. Background Art

[0002] As a core component of geospatial information, digital elevation model (DEM) plays an irreplaceable fundamental role in key areas such as geological disaster monitoring and early warning, national land space and ecological environment planning, and provides key data support for many decision support systems.

[0003] However, existing geographic information system (GIS) tools generally rely on an expert experience-based analysis paradigm for DEM data analysis and application. This paradigm often exposes bottlenecks such as low efficiency and low automation when handling advanced tasks such as the fusion analysis of increasingly complex multimodal geospatial data and intelligent reasoning of complex terrain features.

[0004] In recent years, large language models (LLMs), leveraging significant advances in natural language processing and understanding unstructured data, have begun to demonstrate their potential for application in geospatial data analysis. Despite this, LLMs currently face a significant semantic gap when directly processing and understanding discrete raster data such as DEMs. LLMs inherently struggle to directly interpret the spatial topological characteristics inherent in raster data, such as spatial location, distribution, and relationships. This limits their effective application in deep terrain understanding and analysis tasks.

[0005] Against this backdrop, academia and industry have begun exploring technical approaches to integrating GIS and LLM, hoping to combine the strengths of both. However, existing fusion technology solutions, particularly in the in-depth analysis and application of DEM data, face the following core technical bottlenecks:

[0006] (1) Insufficient analysis and semantic understanding of DEM spatial topological relationships;

[0007] (2) There is a lack of a mechanism for dynamic iteration and efficient retrieval of geographic knowledge.

[0008] Therefore, how to effectively bridge the gap between the spatial characteristics of DEM raster data and the semantic understanding capabilities of LLM, and establish a knowledge iteration and efficient retrieval mechanism that adapts to the needs of dynamic geographic analysis, is a key technical problem that needs to be urgently solved in the current field of geographic spatial intelligence. Summary of the Invention

[0009] In response to the above-mentioned deficiencies in the existing technology, the present invention provides a DEM landform analysis method based on a large language model, which solves the technical difficulties in the existing technology that LLM is difficult to directly and effectively analyze the spatial topological relationship contained in DEM raster data, and the iterative update of geographical knowledge in complex dynamic analysis tasks.

[0010] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a DEM landform analysis method based on a large language model, comprising the following steps:

[0011] S1: Load the DEM semantic mapping toolset to initialize the system;

[0012] S2: After the system receives user input, the question classification agent classifies the question into single-tool questions, multi-tool collaborative questions, and non-tool-answerable questions based on the pre-trained large language model.

[0013] S3: Deal with single-tool problems, multi-tool collaborative problems, and non-tool-solvable problems separately;

[0014] S4: Based on the bidirectional knowledge evolution memory iteration mechanism, the existing memory of each problem is retrieved, and multi-dimensional analysis is performed in combination with the large language model to realize DEM landform analysis based on the large language model.

[0015] Furthermore, the S1 includes the following sub-steps:

[0016] S11: Loading DEM semantic mapping toolset, which is implemented based on the GDAL library;

[0017] S12: Use the tools in the DEM semantic mapping toolset to parse the DEM raster data through Python functions and output a standardized semantic structure;

[0018] S13: Loading the memory knowledge base, which includes a permanent memory base and a short-term memory base. During initialization, the timeliness evaluation module calculates the timeliness score of the short-term memory entry according to the timestamp, and performs memory forgetting based on the timeliness score to eliminate expired knowledge.

[0019] Furthermore, the calculation formula for the timeliness score is:

[0020]

[0021] in, Score timeliness. is the current time, To remember the timestamp, is a hyperparameter.

[0022] Furthermore, the processing of the single tool problem in S3 includes the following steps:

[0023] a1: The question classification agent parses the user's question into question-tool-parameter pairs;

[0024] a2: The tool is executed based on the parsing results through the function call node, and the results are integrated into a natural language answer. If the tool call fails, the system returns an error prompt and suggests that the user adjust the input.

[0025] Furthermore, the processing of the multi-tool collaboration problem in S3 includes the following sub-steps:

[0026] b1: The question classification agent decomposes the question raised by the user based on the thought chain method to generate a question decomposition structure;

[0027] b2: Design a parallel tool call node, use multi-threaded parallel calling tools to call the problem decomposition structure, and return the tool call results to the large language model;

[0028] b3: The large language model combines the tool call results and the intermediate product paths generated during the tool call to generate output in markdown format.

[0029] Furthermore, the method for handling non-tool-answerable questions in S3 is as follows: the system processes the user's questions based on the RAG generalization of dual retrieval of permanent memory and short-term memory, specifically including:

[0030] c1: Retrieve the user's question from the permanent memory bank and the short-term memory bank;

[0031] c2: Input the search results into the large language model, which fuses the two types of search results to generate accurate answers.

[0032] Furthermore, the S4 includes the following sub-steps:

[0033] S41: The system retrieves existing memories based on specific questions and conducts multi-dimensional analysis in combination with a large language model;

[0034] S42: The language model scores the input memory item and outputs a structure containing the accuracy score, relevance score, completeness score, security score, whether the subject is included, and repeatability score;

[0035] S43: Based on the structure, the evaluation score is obtained by fusion of weighted formulas;

[0036] S44: Using the assessment score, whether to include the subject, and the repeatability score as the basis for memory updating decisions, short-term memory updating is performed;

[0037] S45: The system improves the timeliness of the next retrieval based on the updated memory, achieving two-way timeliness optimization.

[0038] Furthermore, the calculation formula for the evaluation score in S43 is:

[0039]

[0040] in, To evaluate the score, and is the weight coefficient, is the timeliness correlation coefficient of current memory, Score for accuracy, is the correlation score, Score for completeness, Score for safety.

[0041] Furthermore, the short-term memory update in S44 includes the following sub-steps:

[0042] S441: If the evaluation score of the current document satisfies ≥7 and repetition<2.5 or subject==False, then proceed to step S442, where repetition represents the repeatability score, subject represents whether the subject is included, and subject==False means that if the current memory library does not contain the subject, then the memory is updated;

[0043] S442: The language model automatically generates a role profile for the agent based on the document content and determines its field or professional direction;

[0044] S443: Based on the role profile, decompose the document into a knowledge hierarchy, remove redundant content, extract key points, and form a memory item list response;

[0045] S444: For each entry in the memory entry list response, construct the page content page_content in the format of "title:"+item ['subject']+"-"+item ['title']+"content:"+item ['content'], and create a document doc whose page content is page_content. The current memory entry timestamp is added to the metadata, and the document doc is stored in the Chroma vector database as a short-term memory library to complete the short-term memory update.

[0046] The beneficial effects of the present invention are:

[0047] First, the present invention designs and implements a raster data terrain feature extraction and semanticization process. Through structured module invocation and processing, this process transforms discrete DEM raster data into feature information with clear geographic semantics, including statistical features and terrain parameter fields. This effectively bridges the gap between the original DEM data and the semantic understanding of LLM, and enables efficient mapping of geospatial data into a semantic space processable by LLM.

[0048] Secondly, the present invention constructs a bidirectional knowledge evolution and memory iteration mechanism. This mechanism innovatively integrates a multi-dimensional consistency assessment method with a knowledge hierarchy decomposition strategy. Based on the feedback and intermediate results of the analysis task, it can dynamically evaluate, filter, modify, and enhance relevant geographic knowledge in the LLM internal or external knowledge base. This enables continuous optimization and adaptive evolution of knowledge during the analysis process, improving the analysis capabilities for dynamic scenarios such as complex terrain evolution.

[0049] Through the synergistic effect of the above-mentioned raster data terrain feature extraction and semanticization process and the bidirectional knowledge evolution and memory iteration mechanism, the framework proposed in this invention can enable the large language model to conduct in-depth analysis and understanding of the digital elevation model more accurately and efficiently, and can automatically generate structured and content-rich landform analysis reports based on this, significantly improving the level of intelligent analysis of DEM data and the application efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a flow chart of a DEM landform analysis method based on a large language model.

[0051] Figure 2 Problem solving flowchart for a single tool.

[0052] Figure 3 Schematic diagram of the optimization and updating mechanism for multi-tool problem solving and bidirectional memory.

[0053] Figure 4 Flowchart for non-tool-answerable problems. DETAILED DESCRIPTION

[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0055] like Figure 1 As shown, a DEM landform analysis method based on a large language model includes the following steps:

[0056] S1: Load the DEM semantic mapping toolset to initialize the system;

[0057] S2: After the system receives user input, the question classification agent classifies the question into single-tool questions, multi-tool collaborative questions, and non-tool-answerable questions based on the pre-trained large language model.

[0058] S3: Deal with single-tool problems, multi-tool collaborative problems, and non-tool-solvable problems separately;

[0059] S4: Based on the bidirectional knowledge evolution memory iteration mechanism, the existing memory of each problem is retrieved, and multi-dimensional analysis is performed in combination with the large language model to realize DEM landform analysis based on the large language model.

[0060] The S1 includes the following steps:

[0061] S11: Loading DEM semantic mapping toolset, which is implemented based on the GDAL library;

[0062] Specifically, it includes the following core tools, as shown in Table 1:

[0063] Table 1 List of core tools

[0064] Tool Name Functional Description parameter Return Value open_dataset Open the DEM map according to the DEM path and load the DEM data dem_path: str (DEM file path) Map opening success information and basic information get_elevation Get the elevation information of a point x: float (longitude), y: float (latitude) Point elevation information or error message get_area_information Get slope, elevation, or aspect statistics for an area min_lon: float, min_lat: float, max_lon: float, max_lat: float, task: str (task type) Regional statistics or error messages get_slope_percentage Get the proportion of a specific slope range in DEM min_slope: float, max_slope: float Slope ratio information or error message get_slope_distribution Get the slope distribution of DEM none Slope distribution information plot_2d_elevation Visualize the digital elevation model and save it as an image none Visual image save path or error prompt get_geo_types Get the landform type based on the opened DEM none Landform type statistics water_area_analysis Get water area analysis based on the opened DEM and save it as an image none Water area analysis results and image saving path get_countours Get the topographic contour analysis based on the opened DEM and save it as an image none Contour map saving path and statistical information

[0065] In Table 1, min_lon refers to the minimum longitude, which is a floating-point number; min_lat refers to the minimum latitude, which is a floating-point number; max_lon refers to the maximum longitude, which is a floating-point number; max_lat refers to the maximum latitude, which is a floating-point number; min_slope refers to the minimum value of the slope range, which is a floating-point number; and max_slope refers to the maximum value of the slope range, which is a floating-point number.

[0066] S12: Use the tools in the DEM semantic mapping toolset to parse the DEM raster data through Python functions and output a standardized semantic structure;

[0067] In this embodiment, the slope statistics result is taken as an example:

[0068] {

[0069] "Slope Statistics": {

[0070] "Maximum slope": "85 degrees",

[0071] "Minimum slope": "5 degrees",

[0072] "Average slope": "20.6 degrees",

[0073] "Slope Standard Deviation": "0.23",

[0074] "Slope Distribution": {"0-10": "30%", "10-20": "40%", "20-30": "10%", "30-50": "10%", "50-70": "6%", "70-90": "4%"}

[0075] }

[0076] }

[0077] S13: Load the memory knowledge base, which includes a permanent memory base and a short-term memory base. During initialization, the timeliness evaluation module calculates the timeliness score of the short-term memory entry according to the timestamp, and performs memory forgetting based on the timeliness score, eliminating expired knowledge, and ensuring that the final analysis is based on the latest data.

[0078] The permanent memory bank stores objective geographical knowledge (such as landform classification rules), while the short-term memory bank stores time-sensitive knowledge (such as recent terrain change data).

[0079] The calculation formula for the timeliness score is:

[0080]

[0081] in, Score timeliness. is the current time, To remember the timestamp, is a hyperparameter that determines the frequency of memory forgetting.

[0082] The logic of memory forgetting is directly related to timeliness. The specific logical process is as follows:

[0083] First, retrieve all document IDs from the short-term memory (kno_docsearch) to generate a list of raw IDs raw_ids;

[0084] Secondly, create an empty list valid_ids to store IDs that meet the retention criteria;

[0085] Then, for each ID in raw_ids, perform the following judgment:

[0086] Call the should_keep_id function to determine whether the ID should be retained based on the max_interval time limit;

[0087] If the ID should be retained, it is added to the valid_ids list.

[0088] Finally, if the length of the valid_ids list is greater than 0, all IDs in the valid_ids list are deleted from the knowledge base documents (kno_docsearch).

[0089] After the system receives user input in S2, the question classification agent classifies the question into:

[0090] Single tool problem: such as "calculate the slope distribution of a certain area."

[0091] Multi-tool collaboration problems: such as "summarizing the geomorphological characteristics of a certain area."

[0092] Questions that can be answered by non-tools: such as "explain the cause of a certain terrain feature."

[0093] The classification results guide the subsequent processing path and improve system efficiency.

[0094] Among them, single tool problems refer to user problems that can be solved using a single tool;

[0095] Multi-tool collaboration problems refer to problems that require the collaborative execution of multiple tools to complete.

[0096] Non-tool-solvable questions refer to questions that can be answered by the user's own abilities or memory knowledge without using tools.

[0097] Specifically, when a user enters a question into the system, the large model analyzes the user's question and outputs it according to the following rules: single-tool questions output {"problem_type":1}; multi-tool collaborative questions output {"problem_type":2}; and questions that cannot be solved by any tool output {"problem_type":3}. The system then uses the problem_type to determine the current user's question type.

[0098] like Figure 2 As shown, the processing of the single tool problem in S3 includes the following steps:

[0099] a1: The question classification agent parses the user's question into question-tool-parameter pairs;

[0100] Taking the calculation of slope distribution as an example, the format is as follows:

[0101] {

[0102] "task": "Calculate slope distribution",

[0103] "action": "get_slope_distribution",

[0104] "tool_param": null

[0105] }

[0106] a2: Execute the tool based on the parsing results through the function call node, and integrate the obtained results into a natural language answer. If the tool call fails, the system returns an error prompt and suggests that the user adjust the input.

[0107] like Figure 3 As shown, the processing of the multi-tool collaboration problem in S3 includes the following steps:

[0108] b1: The question classification agent decomposes the question raised by the user based on the thought chain method to generate a question decomposition structure;

[0109] Taking regional landslide risk as an example, the problem decomposition structure is generated as follows:

[0110] {

[0111] "Task": "Assess the landslide risk in a region",

[0112] "Steps": [

[0113] {"Subtask": "Extract elevation data", "Action": "get_elevation", "Tool_param": {"min_lon": 120.1, "max_lat": 30.2, ...}},

[0114] {"Subtask": "Calculate slope distribution", "Action": "get_slope_distribution", "Tool_param": null},

[0115] {"Subtask": "Analyze water area impact", "Action": "water_area_analysis", "Tool_param": null},

[0116] …, ]

[0118] }

[0119] Task is a task proposed by the user, and Steps is a list containing multiple subtasks. The attributes of each subtask include the subtask description, the function tool used, and the tool parameters.

[0120] b2: Design a parallel tool call node, use multi-threaded parallel calling tools to call the problem decomposition structure, and return the tool call results to the large language model;

[0121] During the tool call, a series of intermediate products are generated, such as elevation maps, aspect maps, watershed analysis maps, contour maps, etc. These products are named with unique codes and returned to the big model through the tool call results;

[0122] In this embodiment, a parallel tool call node is designed, and the specific process is as follows:

[0123] (1) Subtask state preparation: Receive the subtask list of the current task. For each subtask in the list, the module creates an independent state copy dedicated to processing that subtask. This independent state contains information about the subtask as the current input and processing context.

[0124] (2) Instantiate a sub-agent workflow: The node defines and instantiates a simplified sub-agent workflow. This sub-workflow is designed to handle a single subtask. The node is responsible for calling one or more external tools based on the specific content of the subtask and obtaining the tool execution results.

[0125] (3) Parallel execution: Using a parallel execution mechanism (e.g., ThreadPoolExecutor), the module assigns an execution thread or process to each prepared subtask state and its corresponding subagent workflow instance. All these subagent workflow instances are started and executed concurrently. Each instance runs in its own independent context, calling its contained tool call node to process its assigned subtask.

[0126] (4) Result Collection and Aggregation: The node waits for all sub-agent workflows executed in parallel to complete. The execution results of each completed instance are collected, especially the output information obtained from its tool call node. The results of subtasks that successfully execute and return valid results are retained; subtasks that fail or do not return valid results can be marked or filtered out. Finally, the results of all successfully executed subtasks are aggregated into a list and updated to the original agent state for use in subsequent processes (such as result synthesis and final answer generation).

[0127] b3: The large language model combines the tool call results and the intermediate product paths generated during the tool call to generate output in markdown format.

[0128] like Figure 4 As shown in Figure 2, the method for handling non-tool-answerable questions in S3 is as follows: the system processes user questions based on the RAG generalization of dual retrieval of permanent memory (objective truth) and short-term memory (temporal information), specifically including:

[0129] c1: Retrieve the user's question from the permanent memory bank and the short-term memory bank;

[0130] c2: Input the search results into the large language model, which fuses the two types of search results to generate accurate answers.

[0131] For example, if a user asks, "What are the causes of recent topographic changes in a certain area?", the system provides a comprehensive answer by combining permanent knowledge (the principles of landform formation) and short-term memory (recent monitoring data). The short-term memory is updated promptly to ensure the timeliness of the answer.

[0132] The answers generated by multi-tool questions are obtained based on the DEM elevation analysis tool, which is highly reliable and can effectively manage and update short-term memory through reverse optimization technology.

[0133] In the two-way optimization mechanism, the system can retrieve existing memories based on specific questions and conduct multi-dimensional analysis in combination with a large language model to ensure that the results meet the requirements of accuracy, relevance, completeness, security, subject coverage, repeatability and timeliness. The specific operation process is as follows:

[0134] The S4 includes the following sub-steps:

[0135] S41: The system retrieves existing memories based on specific questions and conducts multi-dimensional analysis in combination with a large language model;

[0136] S42: The language model scores the input memory entry and outputs a structure containing the accuracy score, relevance score, completeness score, security score, whether the subject is included, and repetitiveness score:

[0137] {

[0138] "accuracy": <type:float>, / / Accuracy score (1-10 points)

[0139] "relevance": <type:float>, / / Relevance score (1-10 points)

[0140] "completeness": <type:float>, / / Completeness score (1-10 points)

[0141] "safety": <type:float>, / / Security score (1-10 points)

[0142] "subject": <type:bool>, / / Whether to include the subject (Boolean value)

[0143] "repetition": <type:float> / / Repeatability score (1-10 points)

[0144] }

[0145] S43: Based on the structure, the evaluation score is obtained by fusion of weighted formulas;

[0146] The calculation formula of the evaluation score in S43 is:

[0147]

[0148] in, To evaluate the score, it is used to balance timeliness and multi-dimensional scoring. and is the weight coefficient, is the timeliness correlation coefficient of current memory, Score for accuracy, is the correlation score, Score for completeness, Score for safety;

[0149] S44: Using the assessment score, whether to include the subject, and the repeatability score as the basis for memory updating decisions, short-term memory updating is performed;

[0150] Before updating short-term memory, the agent will simulate the human knowledge comprehension model, first performing a hierarchical decomposition of knowledge, removing redundant content, extracting the core points, forming knowledge point entries, and finally using the knowledge point entries to update short-term memory. The specific logic of short-term memory update is as follows:

[0151] The short-term memory updating in S44 includes the following steps:

[0152] S441: If the evaluation score of the current document satisfies ≥7 and repetition<2.5 or subject==False, then proceed to step S442, where repetition represents the repeatability score, subject represents whether the subject is included, and subject==False means that if the current memory library does not contain the subject, then the memory is updated;

[0153] S442: The language model automatically generates a role profile for the agent based on the document content, determining its field or professional direction (e.g., terrain classification expert, water area analysis expert, etc.);

[0154] S443: Based on the role profile, decompose the document into a knowledge hierarchy, remove redundant content, extract key points, and form a memory item list response;

[0155] S444: For each entry in the memory entry list response, construct the page content page_content in the format of "title:" + item ['subject'] + "-" + item ['title'] + "content:" + item ['content'], and create a document doc whose page content is page_content. The timestamp of the current memory entry is added to the metadata. The document doc is stored in the Chroma vector database and used as a short-term memory library to complete the short-term memory update.

[0156] S45: After the short-term memory is updated, the system improves the timeliness of the next retrieval based on the updated memory, achieving two-way timeliness optimization and improving the response accuracy and reliability of the system.

[0157] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the invention.< / type:float> < / type:bool> < / type:float> < / type:float> < / type:float> < / type:float>

Claims

1. A DEM landform analysis method based on a large language model, characterized in that: The following steps are involved: S1: Load the DEM semantic mapping toolset to initialize the system; The S1 includes the following steps: S11: Loading DEM semantic mapping toolset, which is implemented based on the GDAL library; S12: Use the tools in the DEM semantic mapping toolset to parse the DEM raster data through Python functions and output a standardized semantic structure; S13: Loading a memory knowledge base, which includes a permanent memory base and a short-term memory base. During initialization, the timeliness evaluation module calculates the timeliness score of the short-term memory entry based on the timestamp, and performs memory forgetting based on the timeliness score, eliminating expired knowledge. S2: After the system receives user input, the question classification agent classifies the question into single-tool questions, multi-tool collaborative questions, and non-tool-answerable questions based on the pre-trained large language model. S3: Deal with single-tool problems, multi-tool collaborative problems, and non-tool-solvable problems separately; S4: Based on the bidirectional knowledge evolution memory iteration mechanism, the existing memory is retrieved for each question, and multi-dimensional analysis is performed in combination with the large language model to realize DEM landform analysis based on the large language model; The S4 includes the following sub-steps: S41: The system retrieves existing memories based on specific questions and conducts multi-dimensional analysis in combination with a large language model; S42: The language model scores the input memory item and outputs a structure containing the accuracy score, relevance score, completeness score, security score, whether the subject is included, and repeatability score; S43: Based on the structure, the evaluation score is obtained by fusion of weighted formulas; S44: Using the assessment score, whether to include the subject, and the repeatability score as the basis for memory updating decisions, short-term memory updating is performed; S45: The system improves the timeliness of the next retrieval based on the updated memory, achieving two-way timeliness optimization.

2. The DEM landform analysis method based on a large language model according to claim 1 is characterized in that: The calculation formula for the timeliness score is: ; in, Score timeliness. is the current time, To remember the timestamp, is a hyperparameter.

3. The DEM landform analysis method based on a large language model according to claim 1 is characterized in that: The processing of the single tool problem in S3 includes the following steps: a1: The question classification agent parses the user's question into question-tool-parameter pairs; a2: Execute the tool based on the parsing results through the function call node, and integrate the obtained results into a natural language answer. If the tool call fails, the system returns an error prompt and suggests that the user adjust the input.

4. The DEM landform analysis method based on a large language model according to claim 1 is characterized in that: The processing of multi-tool collaboration in S3 includes the following steps: b1: The question classification agent decomposes the question raised by the user based on the thought chain method to generate a question decomposition structure; b2: Design a parallel tool call node, use multi-threaded parallel calling tools to call the problem decomposition structure, and return the tool call results to the large language model; b3: The large language model combines the tool call results and the intermediate product paths generated during the tool call to generate output in markdown format.

5. The DEM landform analysis method based on a large language model according to claim 1 is characterized in that: The method for handling non-tool-answerable questions in S3 is as follows: the system processes user questions based on the RAG generalization of dual retrieval of permanent memory and short-term memory, specifically including: c1: Retrieve the user's question from the permanent memory bank and the short-term memory bank; c2: Input the search results into the large language model, which fuses the two types of search results to generate accurate answers.

6. The DEM landform analysis method based on a large language model according to claim 1 is characterized in that: The calculation formula of the evaluation score in S43 is: ; in, To evaluate the score, and is the weight coefficient, is the timeliness correlation coefficient of current memory, Score for accuracy, is the correlation score, Score for completeness, Score for safety.

7. The DEM landform analysis method based on a large language model according to claim 6 is characterized in that: The short-term memory updating in S44 includes the following steps: S441: If the evaluation score of the current document satisfies ≥7 and repetition<2.5 or subject==False, then proceed to step S442, where repetition represents the repeatability score, subject represents whether the subject is included, and subject==False means that if the current memory library does not contain the subject, then the memory is updated; S442: The language model automatically generates a role profile for the agent based on the document content and determines its field or professional direction; S443: Based on the role profile, decompose the document into a knowledge hierarchy, remove redundant content, extract key points, and form a memory item list response; S444: For each entry in the memory entry list response, construct the page content page_content in the format of "title:"+item ['subject']+"-"+item ['title']+"content:"+item ['content'], and create a document doc whose page content is page_content. The current memory entry timestamp is added to the metadata, and the document doc is stored in the Chroma vector database as a short-term memory library to complete the short-term memory update.

Citation Information

Patent Citations

  • Full-information lossless conversion method for space coordinate system and projection of digital topographic map

    CN114546941A

  • Question and answer method and system based on credibility perception and retrieval enhanced language model

    CN118153690A