A forestry GIS intelligent query method and system based on end-side offline large model

CN122838435APending Publication Date: 2026-09-29GUIZHOU FORESTRY SURVEY & DESIGN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611341419.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0003]然而,在林业外业调查中,现有自然语言空间查询技术高度依赖云端大模型与服务器端空间数据库

Benefits of technology

[0047]本发明通过在移动终端部署端侧离线大语言模型并直接建立与本地要素数据库的脱机物理访问连接,摆脱了林业外业调查对云端网络和服务器的依赖,从根本上消除了涉密地理数据外传的安全合规隐患。针对大模型生成SQL易出错的问题,本方案摒弃了高风险的端到端直接生成机制,创新性地提取包含当前工程、活动图层目录及内部字段别名的动态业务快照作为受控上下文约束大模型推理。通过将自然语言意图精准映射至预置的受控本地业务能力目录,有效阻断了大模型的字段幻觉,确保了生成的底层空间操作指令在本地GIS运行环境下的绝对可执行性与结果的确定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122838435A_ABST
    Figure CN122838435A_ABST
Patent Text Reader

Abstract

This invention discloses a forestry GIS intelligent query method and system based on an offline large-scale model on the edge, belonging to the field of geographic information query technology. The method specifically includes: receiving voice commands, generating standard query text through offline recognition and inverse text normalization; extracting layer metadata to construct a business snapshot and concatenating it with text, inputting it into the edge large-scale model, mapping its semantic intent to the local business directory to generate a structured request; then verifying the completeness of parameters, and merging user feedback through interactive cards to construct a complete parameter set when missing; then converting the parameter set into low-level operation commands to drive the local database to perform spatial operations to extract spatial element data; finally, inputting the data into the large-scale model to generate a summary and construct a map positioning component. This invention completely overcomes the limitations of weak network environments in the field, and through the edge-side operation security closed loop and human-machine collaborative error correction mechanism, it achieves highly fault-tolerant, leak-proof, and accurate intelligent spatial interaction and query in offline mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information query technology, specifically to a forestry GIS intelligent query method and system based on a large offline model on the edge. Background Technology

[0002] The integration of modern forestry surveys and Geographic Information Systems (GIS) is deepening, and utilizing natural language processing (NLP) technology to achieve intelligent interaction of geospatial data has become an important direction for industry development. In conventional spatial data retrieval architectures, systems typically rely on high-performance cloud servers to deploy large-scale language models, combined with backend enterprise-level spatial databases to support complex business logic. After operators collect voice or text commands via mobile terminals, the system uploads the data to the computing center. The cloud-based large model performs semantic parsing of the natural language and directly maps or converts it into a structured query language (such as spatial SQL). Subsequently, the cloud database engine performs multi-dimensional spatial topology operations and attribute filtering based on the generated query statements, ultimately sending the extracted geographic features and statistical results to front-end devices for map rendering and information display. This interactive mechanism based on the collaboration of a cloud-based large model and a centralized spatial database, in an ideal environment with sufficient computing resources and a smooth network, can effectively lower the barrier for non-professionals to operate professional GIS software, enabling natural language question answering and retrieval of spatial data.

[0003] However, in forestry field surveys, existing natural language spatial query technologies heavily rely on large cloud-based models and server-side spatial databases. This architecture is highly susceptible to failure in weak network environments in the field, and the external transmission of confidential geographic data poses security and compliance risks. Furthermore, existing solutions often employ mechanisms that directly generate spatial SQL from natural language, which, due to a lack of dynamic awareness of the local GIS business context, are prone to model illusions and execution errors. In addition, the system often directly interrupts tasks when faced with missing parameter commands, lacks a multi-round completion mechanism for human-machine collaboration, and struggles to effectively adapt to the spoken language characteristics of client-side applications. This rigid query execution framework results in low query success rates, poor business adaptability, and uncontrollable results in offline mobile scenarios. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for intelligent data collection in forestry GIS based on a large offline model on the edge, thereby solving the problems in the background technology.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] A smart data query method for forestry GIS based on a large offline model on the edge includes the following steps:

[0007] S1: Receives voice commands from the mobile terminal, calls the offline speech recognition model on the terminal to extract text, and uses the inverse text normalization algorithm to extract Chinese numerals in the text to generate standard query text;

[0008] S2: Extract layer metadata from the local geographic information system to construct a business snapshot, concatenate the standard query text with the business snapshot, and input it into the offline large language model on the edge.

[0009] S3: Capture the semantic intent output by the offline large language model on the client side, map it to the local business capability directory, and generate a structured request containing the target function and initial parameters;

[0010] S4: Verify the completeness of the initial parameters in the structured request. If the initial parameters are missing mandatory conditions, generate an interaction card, merge the supplementary parameters from user input feedback, and combine them to build a complete parameter set.

[0011] S5: Convert the complete parameter set into underlying spatial operation instructions, call the target function to perform spatial operations on the local feature database, and extract structured spatial feature data;

[0012] S6: Input spatial feature data into the offline large language model on the edge, generate natural language summaries, and construct a positioning component pointing to map coordinates based on feature identifiers.

[0013] As a further aspect of the present invention: the process of generating standard query text is as follows:

[0014] The system receives voice commands from the mobile terminal, extracts target speech segments, decomposes the target speech segments into acoustic observation frames, inputs them into the offline speech recognition model on the edge, and extracts the underlying acoustic feature vectors.

[0015] The decoding network is used to decode and map the underlying acoustic feature vectors to generate the initial text. The inverse text normalization algorithm is called to parse the initial text and convert the spoken Chinese numeric characters into Arabic numerals.

[0016] The system reads forestry-specific terms before and after the Arabic numerals and compares them with the local business dictionary. It then replaces non-standard colloquial terms in the initial text and merges and reconstructs them to generate standard query text.

[0017] As a further aspect of the present invention: the process of constructing a complete parameter set by combination is as follows:

[0018] Scan the local geographic information system's operating environment, extract layer metadata containing the active layer directory and layer internal field aliases, filter redundant data, and combine them to construct a business snapshot;

[0019] Read the standard query text, perform a sequence concatenation operation on the standard query text, business snapshot, and preset business scheduling rules, and encapsulate and construct the system prompt text;

[0020] The system prompt text is injected into the input window of the offline large language model on the mobile device by calling the unified model abstraction interface, thus starting the semantic reasoning task of the offline large language model on the mobile device.

[0021] As a further aspect of the present invention: in step S3, the process of generating a structured request containing an objective function and initial parameters is as follows:

[0022] The word sequence output by the offline large language model on the client side is parsed, the natural language intent text inside the word sequence is extracted, and the natural language intent text is converted into an independent format intent feature vector.

[0023] Traverse the local service capability directory configured in the mobile terminal, calculate the correlation between the intent feature vector and the preset function description in the local service capability directory, and extract the target function with the highest correlation.

[0024] Read the parameter structure declaration configuration associated with the target function, retrieve entity words in the word sequence according to the data constraint rules defined by the parameter structure declaration configuration, and extract the entity words as initial parameters;

[0025] The system integrates the identifier name of the objective function with the initial parameters, performs character sequence transformation according to the data key-value pair encoding rules required by the objective function, and constructs a structured request containing the objective function and the initial parameters.

[0026] As a further aspect of the present invention: the process of constructing a complete parameter set by combination is as follows:

[0027] Read the initial parameters of the structured request and the parameter structure declaration configuration of the target function, compare the required conditions of the initial parameters with the required conditions of the parameter structure declaration configuration, locate the missing required conditions of the initial parameters, and trigger the task suspension command.

[0028] Extract missing required conditions and match them with a pre-set candidate dataset. Render a visual interactive card based on the matched candidate data. Capture the feature commands input by the user through the interactive card and parse the feature commands into entity supplementary parameters.

[0029] Retrieve the initial parameters from the suspended state, merge the key-value data of the supplementary parameters into the corresponding empty slots of the initial parameters, complete all data items required by the parameter structure declaration configuration, and combine them to construct a complete parameter set for business execution.

[0030] As a further aspect of the present invention: the process of extracting structured spatial element data is as follows:

[0031] Extract the spatial boundary constraint features and attribute filtering conditions within the complete parameter set, and compile the spatial boundary constraint features and attribute filtering conditions into low-level spatial operation instructions according to the operation rules of the objective function.

[0032] Parse the target layer identifier carried by the underlying spatial operation command, use the target layer identifier to establish an access connection with the local feature database, and lock the target feature table to be calculated in the local feature database.

[0033] Inject the underlying spatial operation instructions into the target function, drive the target function to perform spatial intersection analysis and attribute aggregation operations on the target feature table, and extract the matching original spatial patches from the target feature table;

[0034] Read the geometric coordinate set and business attribute field values ​​of the original spatial patch, and concatenate the geometric coordinate set and business attribute field values ​​according to the preset data encapsulation rules to construct and generate structured spatial element data.

[0035] As a further aspect of the present invention: the process of inputting spatial element data into an offline large language model on the terminal side, generating a natural language summary, and constructing a positioning component pointing to map coordinates based on element identifiers is as follows:

[0036] The structured spatial element data is serialized to construct prompt text, which is then injected into the input environment of the offline large language model on the device to trigger the summary generation task.

[0037] The offline large language model on the device parses the prompt text, generates a natural language summary through an incremental streaming mechanism, and pushes it to the mobile terminal interface for refresh and display.

[0038] Extract feature identifiers and geometric position coordinates from spatial feature data to render a data list, and bind the geometric position coordinates to touch events to build a positioning component.

[0039] A forestry GIS intelligent data query system based on a large-scale offline model on the edge, comprising:

[0040] The instruction parsing module is used to receive voice commands from the mobile terminal, call the offline speech recognition model on the terminal to extract the text, transform and extract the Chinese numerals in the text through the inverse text normalization algorithm, and generate standard query text.

[0041] The context construction module is used to extract layer metadata from the local geographic information system to construct a business snapshot, and then concatenate the standard query text with the business snapshot and input it into the offline large language model on the edge.

[0042] The semantic mapping module is used to capture the semantic intent output by the offline large language model on the client side, map it to the local business capability directory, and generate a structured request containing the target function and initial parameters.

[0043] The interactive completion module is used to verify the completeness of the initial parameters in the structured request. If the initial parameters are missing the required conditions, an interactive card is generated, and the supplementary parameters input by the user are combined to construct a complete parameter set.

[0044] The feature extraction module is used to convert the complete parameter set into underlying spatial operation instructions, call the target function to perform spatial operations on the local feature database, and extract structured spatial feature data.

[0045] The response encapsulation module is used to input spatial feature data into the offline large language model on the edge, generate natural language summaries, and build a positioning component pointing to map coordinates based on feature identifiers.

[0046] The beneficial effects of this invention are:

[0047] This invention eliminates the reliance on cloud networks and servers for forestry field surveys by deploying an offline large language model on a mobile terminal and directly establishing an offline physical access connection with the local feature database, fundamentally eliminating the security and compliance risks associated with the external transmission of classified geographic data. Addressing the issue of error-prone SQL generation from large models, this solution abandons the high-risk end-to-end direct generation mechanism and innovatively extracts a dynamic business snapshot containing the current project, active layer directory, and internal field aliases as a controlled context for large model inference. By accurately mapping natural language intent to a pre-defined controlled local business capability directory, the field illusion of the large model is effectively prevented, ensuring the absolute executability and deterministic results of the generated underlying spatial operation commands within the local GIS operating environment.

[0048] This invention constructs a highly flexible multi-round human-machine collaborative completion mechanism and spoken language correction process, significantly improving query success rate and business adaptability in complex mobile scenarios. On one hand, by utilizing inverse text normalization algorithms and local business dictionary comparison, it can accurately convert complex colloquial numbers and non-standard terminology in field operations into standard underlying parsing text. On the other hand, when a missing required parameter of the objective function is detected, a task suspension command is triggered to freeze and save the current business execution state, and then an intuitive visual interactive card is rendered based on pre-set candidate data. Field operators only need to perform simple screen selections, and the underlying layer can capture touch feature commands and reverse parse them into entity supplementary parameters to complete the parameter set, thus ensuring business continuity and execution stability in offline weak network environments with extremely low interaction threshold. Attached Figure Description

[0049] The invention will now be further described with reference to the accompanying drawings.

[0050] Figure 1 This is a flowchart illustrating a forestry GIS intelligent data collection method based on an offline large-scale model of the present invention.

[0051] Figure 2 This is a schematic diagram of a forestry GIS intelligent data collection system based on an offline large-scale model of the present invention. Detailed Implementation

[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0053] Please see Figure 1 As shown, this invention is a forestry GIS intelligent data query method based on an offline large-scale model on the edge, comprising the following steps:

[0054] S1: Receives voice commands from the mobile terminal, calls the offline speech recognition model on the terminal to extract text, and uses the inverse text normalization algorithm to extract Chinese numerals in the text to generate standard query text;

[0055] S2: Extract layer metadata from the local geographic information system to construct a business snapshot, concatenate the standard query text with the business snapshot, and input it into the offline large language model on the edge.

[0056] S3: Capture the semantic intent output by the offline large language model on the client side, map it to the local business capability directory, and generate a structured request containing the target function and initial parameters;

[0057] S4: Verify the completeness of the initial parameters in the structured request. If the initial parameters are missing mandatory conditions, generate an interaction card, merge the supplementary parameters from user input feedback, and combine them to build a complete parameter set.

[0058] S5: Convert the complete parameter set into underlying spatial operation instructions, call the target function to perform spatial operations on the local feature database, and extract structured spatial feature data;

[0059] S6: Input spatial feature data into the offline large language model on the edge, generate natural language summaries, and construct a positioning component pointing to map coordinates based on feature identifiers.

[0060] In one embodiment of the present invention, the process of receiving a mobile terminal voice command, calling the terminal-side offline speech recognition model to extract text, converting and extracting Chinese numerals within the text using an inverse text normalization algorithm, and generating standard query text is as follows:

[0061] The system receives voice commands collected by the mobile device and converts them into raw voice data streams. When processing the raw voice data stream, it calls the endpoint detection algorithm to accurately identify the valid start and end intervals within the data stream. After determining the valid start and end points, it uses a noise reduction algorithm to remove environmental noise and background noise signals mixed in with the data stream. After completing the background noise signal filtering operation, it accurately extracts the target voice segment.

[0062] After acquiring the target speech segment, framing technology is used to decompose it into continuous acoustic observation frames. To extract deep acoustic features, these frames are input into the feature extraction network of an on-device offline speech recognition model pre-deployed within the mobile device. This feature extraction network performs deep processing on each frame of data through matrix operations to extract the underlying acoustic feature vector of the target speech segment. It should be noted that the on-device offline large language model is a lightweight inference engine deployed in the local application's private directory on the Android mobile terminal, serving as the core decision-making hub of the forestry GIS intelligent query system in a completely network-free field environment. This model receives standard query text after speech normalization and dynamically injected controlled GIS context snapshots (such as current project, available layers, and main field aliases) for accurate semantic understanding and intent recognition. To avoid field illusion and execution risks, the model does not directly generate underlying spatial SQL but strictly adheres to the Function Calling mechanism, mapping the user's natural language intent into controlled structured function call requests within a pre-defined forestry GIS business capability directory. In the business process, the model supports generating candidate completion questions for users when parameters are missing. After the underlying business module completes the deterministic calculation of local spatial data, it receives real structured feedback data and finally generates natural language summary descriptions in real time through an incremental streaming mechanism. At the same time, it relies on a unified inference framework for multiple Android versions to automatically adapt to the CPU, GPU and available memory computing power of different devices to ensure compatibility and stable operation on mobile devices.

[0063] Upon obtaining the underlying acoustic feature vector, the decoding network within the offline speech recognition model on the edge is used to perform frame-by-frame decoding and character mapping operations on the underlying acoustic feature vector; the decoding network maps the high-dimensional acoustic features into specific character units; based on this, these character units are reassembled and assembled according to the time series to generate initial text containing the user's original business semantics.

[0064] For the generated initial text, a specially constructed inverse text normalization algorithm is called to parse the initial text sequence character by character; during the parsing process, Chinese spoken numeric characters present in the initial text sequence are extracted; after extraction, a strict mathematical base mapping mechanism is executed to convert all the identified Chinese spoken numeric characters into standard Arabic numerals.

[0065] When the Arabic numeral conversion is completed, the program's operation logic automatically reads the forestry-specific terms that are adjacent to the Arabic numerals. After reading, these forestry-specific terms are strictly compared with the local business dictionary. Through the comparison operation, non-standard colloquial terms existing in the initial text are accurately located, and these non-standard colloquial terms are replaced with standard terms defined in the local business dictionary.

[0066] The standard Arabic numerals after integration and the standard forestry terms after replacement are reconstructed according to the semantic requirements of the standard. The character sequence structure of the initial text is then reconstructed according to the business logic rules. Finally, the character units of each part are concatenated to generate a standard query text that conforms to the parsing specifications of the underlying program. This ensures that the large language model can accurately identify the business intent based on the standard query text.

[0067] In one embodiment of the present invention, step S2, which involves extracting layer metadata from the local geographic information system to construct a business snapshot, concatenating the standard query text with the business snapshot, and inputting it into the offline large language model on the edge, is as follows:

[0068] The underlying operating environment of the local geographic information software is scanned on the mobile device to obtain global context state parameters within the current workspace. The active layer directory within the currently visible range is extracted by reading the map view rendering tree in memory, such as the currently displayed forest resource plot layer and pest distribution layer. Each active layer in the active layer directory is traversed, and the underlying field names and their corresponding human-computer interaction display aliases within the feature table are read. For example, English fields in the underlying database are mapped to tree species aliases and area aliases. A controlled budget threshold mechanism is introduced in this process, setting the upper limit of extracted layer entries to twelve and the upper limit of field entries within each layer to twenty. Hidden layers not displayed in the current view and redundant field data unrelated to the survey business are filtered according to the set entry limits to reduce memory usage and interference. Finally, the simplified current project name, current visible map range coordinates, active layer list, and layer internal field aliases are structurally combined to construct a dynamic business snapshot reflecting the current geospatial operation status.

[0069] The system reads a standard query text generated through inverse text normalization from a memory buffer. This standard query text contains the user's explicit and genuine intent for forestry surveys, such as a standardized statement querying the area of ​​pine forest changes over the past three years. It then retrieves a dynamic business snapshot constructed using the preceding steps and extracts pre-stored business scheduling rules from the local application's private directory. These pre-stored business scheduling rules include controlled role constraints, forestry geographic information capability directory groupings, and strict function call parameter format requirements. Following specific large language model prompt word engineering specifications, the standard query text, business snapshot, and pre-stored business scheduling rules are sequentially concatenated. In this sequential concatenation operation, the pre-stored business scheduling rules serve as the underlying logical foundation, the business snapshot as the current spatial state boundary, and the standard query text as the trigger instruction, encapsulating and constructing a comprehensive prompt text containing complete business constraints. This comprehensive encapsulation operation ensures that the input content contains both accurate user natural language intent and the current map patch state context within the mobile software interface, thereby preventing the model from generating field illusions or query conditions that are detached from the actual engineering situation during inference.

[0070] The system invokes the unified model abstraction interface integrated within the mobile terminal. This interface shields the differences in underlying hardware architectures, such as the central processing unit, graphics processing unit, and neural network acceleration application interface, between different Android versions. Through this interface, the encapsulated and constructed comprehensive prompt text is injected into the context input window of the on-device offline large language model, initiating its semantic reasoning task. During semantic reasoning, the on-device offline quantized large language model first uses its built-in word segmenter to divide the comprehensive prompt text into discrete word sequences. Then, it passes the word sequence layer by layer through its internal transformer network architecture. The system utilizes a multi-head self-attention mechanism to calculate the association weight matrix between user query command terms and business snapshot terms. The offline large language model on the client side deeply analyzes the natural language structure based on the association weight matrix to accurately identify the user's business operation purpose, such as identifying the true intent to perform spatial area statistics or attribute filtering and matching. According to the parameter requirements in the aforementioned pre-set business scheduling rules, the model extracts the corresponding layer identifiers and field mapping values ​​from the business snapshot, and uses a probabilistic decoding algorithm to gradually generate structured output instructions containing the target execution function name and the specific execution parameter set, thereby completely completing the capture and transformation process from complex natural language to standard business intent.

[0071] In one embodiment of the present invention, the process of capturing the semantic intent output by the offline large language model on the capture end, mapping it to the local business capability directory, and generating a structured request containing a target function and initial parameters in step S3 is as follows:

[0072] The word sequence generated in real time by the offline large language model on the mobile terminal memory receiving end is used to call the text parsing engine to read the string data in the word sequence word by word; the syntax tree filtering algorithm is used to remove redundant punctuation and stop words in the word sequence, accurately locate and extract the natural language intent text that can fully express the user's true query purpose, such as extracting phrase text containing queries about pest and disease area statistics or area change analysis; after obtaining the extracted natural language intent text, it is input into the offline vector encoder pre-deployed locally; the offline vector encoder performs numerical mapping of the lexical semantics in the text through multi-layer neural matrix multiplication, and finally converts the natural language intent text into a real number feature vector with fixed dimension, resulting in an offline intent feature vector that is represented in a very low dimension and is easy to compare mathematically.

[0073] The system retrieves a local business capability directory pre-configured in a controlled directory on the mobile terminal's local disk. This directory encapsulates forestry operations such as spatial data querying, attribute analysis, statistical calculation, patch positioning, sample plot and tree association, pest and disease analysis, and change detection into a set of standard functions. It then iterates through the local business capability directory, reading the semantic description text accompanying each preset function and converting it into a corresponding function description vector. The user-input offline intent feature vector is then denoted as... , No. The description vectors of the preset functions are The cosine similarity between two vectors is calculated using the formula for the product of vector dot product and magnitude, and is used as the correlation. The specific mathematical formula is as follows: After calculating the correlation degree of each preset function, the values ​​are sorted from largest to smallest, and the function with the highest correlation degree is selected as the target function. This target function has a fixed type expression within the system. For example, matching and extracting offline function types specifically used for forestry change analysis.

[0074] After obtaining the determined target function, the parameter structure declaration configuration bound to the target function is retrieved and read. The parameter structure declaration configuration strictly defines the required parameter names, parameter data types, value boundaries, and optional parameter conditions required when the target function is executed. Based on the constraint rules defined by the parameter structure declaration configuration, the original word sequence and natural language intent text are scanned and analyzed again. The local entity extraction algorithm is used to retrieve key business terms in the sequence. For example, when the target function requires tree species parameters and year range parameters, the entity term "pine tree" is automatically extracted from the word sequence to fill in the tree species parameter, and the time term "nearly three years" is extracted and converted into a standard year range to fill in the year parameter. The extracted business values ​​are then mapped and extracted with text elements to form the initial parameters.

[0075] After extracting and organizing the identifier name and initial parameters of the target function, the two are merged in a structured manner. The key-value pair encoding conversion rules preset in the parameter structure declaration configuration of the target function are read, such as automatically converting and mapping parameters such as tree type, time range, and statistical indicators to corresponding standardized field keys. According to the data format requirements, the identifier name of the target function is assigned to the function name field, and the initial parameters are written into the parameter set in key-value pair form. The character sequence serialization conversion operation is performed, and the output is constructed into a structured request that conforms to a fixed format and contains the target function and initial parameters, so that the request can be distributed to the lower-level verification and scheduling logic to perform deterministic business operations.

[0076] In one embodiment of the present invention, in step S4, the process of verifying the completeness of the initial parameters in the structured request, generating an interactive card if the initial parameters are missing mandatory conditions, merging the supplementary parameters input by the user, and combining them to construct a complete parameter set is as follows:

[0077] After receiving a structured request containing a target function and initial parameters, the intelligent data engine first reads the set of initial parameters from the structured request's memory carrier. By calling the local function registry, it accurately locates and extracts the parameter structure declaration configuration bound to the target function. This configuration strictly defines the business field elements that must be included to execute the function. For example, when the target function is a pest and disease area query function, its parameter structure declaration configuration requires two mandatory conditions: spatial query range and disease type. The parsing module maps and compares the extracted initial parameter key-value pairs with the list of mandatory conditions in the parameter structure declaration configuration one by one. Through cross-table comparison logic, it accurately locates completely missing mandatory condition entries or invalid entries with empty values ​​in the initial parameters. When a missing mandatory condition entry for spatial query range is detected, the scheduling module immediately intercepts the execution summary action of the large language model, sends and triggers a task suspension command to the main control thread. This task suspension command temporarily freezes the current data analysis process into a waiting state, while simultaneously saving the current known session parameters and business execution environment. This prevents incomplete parameters from incorrectly mobilizing the underlying geographic information database, thereby ensuring the security and accuracy of local spatial data queries.

[0078] After triggering the task suspension command and saving the current execution state, the interactive presentation layer extracts the precisely located missing mandatory conditions and passes them to the local pre-set candidate dataset for retrieval and matching. For example, for the missing spatial query range, the current sub-compartment, the current forest farm, and the entire county are retrieved and matched as three limited geographic spatial boundaries as pre-set candidate data. Based on these successfully matched candidate data, the interactive presentation layer dynamically renders a clear and intuitive visual interactive card on the graphical user interface of the mobile terminal. After observing the visual interactive card, the field operator directly selects the option area that matches the current actual measurement intention on the touch screen of the mobile terminal. The underlying hardware driver layer accurately captures the feature commands generated when the user touches a specific coordinate area on the surface of the visual interactive card. After receiving this feature command, the command parsing engine reverse-parses the feature command carried by the touch operation into specific entity supplementary parameters based on the binding mapping relationship between the touch coordinates and the pre-set candidate data. For example, the action of touching the current forest farm button is accurately parsed and transformed into entity supplementary parameters representing the forest farm boundary constraints, thereby achieving efficient error correction and data entry of parameters in noisy and inconvenient forestry field operation environments.

[0079] After obtaining the entity supplementary parameters confirmed by the user, the scheduling execution logic module accesses the memory storage stack and retrieves the initial parameter set, which is in a suspended state and contains incomplete data. The scheduling execution logic module performs a key-value pair assembly operation, seamlessly merging the key-value data of the extracted entity supplementary parameters and injecting them into the corresponding empty slots left in the initial parameter set. For example, the entity supplementary parameter representing the current forest farm constraint is used as the value of the spatial range key and filled into the corresponding position in the initial parameter list, thereby completely completing all data items required in the parameter structure declaration configuration of the objective function. When the completion operation is completed, the scheduling execution logic module will perform an integrity review again to confirm that all required condition entries have obtained valid entity values. After the review is correct, all the initial incomplete data and the newly added key-value data are packaged and merged to construct a complete parameter set that fully conforms to the underlying function call specification. This complete parameter set is then distributed to the business logic layer to directly drive the underlying geographic information business module to access the local feature table, thereby ensuring that every business execution is based on a solid foundation of complete data and clear user intent.

[0080] In one embodiment of the present invention, step S5, which involves converting the complete parameter set into underlying spatial operation instructions, calling the target function to perform spatial operations on the local feature database, and extracting structured spatial feature data, is as follows:

[0081] The system analyzes the complete parameter set passed from the scheduling and execution module, extracting the spatial boundary constraint features and business attribute filtering conditions embedded within it. The spatial boundary constraint features represent the geographical range that field personnel expect to query, such as extracting polygonal feature data representing the administrative boundary of the current sub-compartment or a specific forest farm. The business attribute filtering conditions represent the screening dimensions of forest resources, such as extracting specific attribute filtering matching items like "tree species equals pine" and "sickness status equals pest and disease occurrence." After obtaining the spatial boundary constraint features and attribute filtering conditions, the system reconstructs instructions based on the underlying operation rules of the objective function pre-loaded into memory. The operation rules of the objective function strictly define the translation mapping path from high-dimensional natural language business requirements to the machine language of the geographic information engine. Through the built-in logic compiler, the obtained spatial boundary constraint features and attribute filtering conditions are directly compiled into underlying spatial operation instructions. This compilation process explicitly defines the topological relationship of the spatial query and the Boolean algebra logic of attribute filtering, ensuring that the underlying spatial operation instructions contain precise data retrieval paths and data filtering standards, thereby providing an unambiguous instruction basis for performing local database retrieval.

[0082] The system obtains the compiled low-level spatial operation instructions and calls the instruction analyzer to deeply parse the target layer identifier carried within these instructions. This target layer identifier uniquely corresponds to a specific resource layer stored locally on the mobile terminal, such as a unique identification code representing a forestry sub-compartment or a pest and disease survey patch. After obtaining the target layer identifier, the low-level data driver actively establishes a physical access connection with the local feature database using this identifier. Since the local feature database is typically stored securely in a controlled private folder on the mobile terminal as offline feature tables or offline map packages, the process of establishing the access connection operates entirely in a network-free environment, greatly minimizing the risk of leaking confidential geographic data to external networks. After successfully establishing the local connection, the retrieval program iterates and compares numerous data tables in the local feature database based on the target layer identifier, ultimately accurately locating the target feature table to be calculated within the local feature database. Locating the target feature table opens a dedicated high-speed data reading channel for spatial geometric queries and attribute condition filtering, allowing geographic information operations to directly apply to the real data from the forestry field survey.

[0083] After locking the target feature table, the execution engine injects the underlying spatial operation instructions, including query boundaries and attribute logic, into the target function, driving it to perform spatial intersection analysis and attribute aggregation operations on the locked target feature table. In the spatial intersection analysis phase, the target function uses a topological intersection algorithm to determine whether geometric objects within the target feature table fall within the range of spatial boundary constraints. In the attribute aggregation operation phase, the target function performs deterministic mathematical statistical analysis on the local feature table. For example, when calculating the survey progress rate, the target function performs aggregation and evaluation operations on the survey status field of the map features. The formula for the survey progress rate attribute aggregation operation is expressed as: ,in, This represents the progress rate of the investigation within the target area. This represents the total number of map features that have been surveyed and include those with a submitted status. This represents the total number of main map patch elements within the target spatial boundary; when performing fragmented patch quality inspection aggregation calculations, the area threshold conversion formula is used: Perform area parameter parsing, where To convert the fragmented area threshold to square meters, This is the threshold for determining the fragmented area, input in mu (a Chinese unit of area, approximately 0.165 acres). The constant coefficients are converted to units; through the above deterministic spatial intersection analysis and mathematical formula aggregation operation, the objective function accurately extracts the original spatial patches that are completely matched in terms of spatial location and business attributes from the complex target element table.

[0084] After successfully extracting the matching original spatial patches, the data encapsulation module sequentially reads the geometric coordinate set and business attribute field values ​​associated with each original spatial patch. The geometric coordinate set records the set of node positions of the patch within the geographic reference frame, which is directly used to depict the precise polygon outline or center positioning point on the map canvas. The business attribute field values ​​cover resource survey data in four dimensions: tree species, area size, pest and disease level, and operator remarks. After reading the above information, the data encapsulation module strictly follows the preset data encapsulation rules in the code program to splice and combine the independent discrete geometric coordinate sets with the corresponding business attribute field values. For example, the latitude and longitude boundary set of the extracted pine forest change patch and its newly added or reduced area values ​​are bound to the same data object. Through this key-value binding and array nesting splicing method, structured spatial element data that can be directly read and understood by large language models is constructed. This batch of structured spatial element data carries definite and tamper-proof real forestry survey results and provides sufficient data support for the final presentation of clickable interactive charts and dynamic location jump labels.

[0085] In one embodiment of the present invention, step S6, which involves inputting spatial feature data into an offline large language model on the device side, generating a natural language summary, and constructing a positioning component pointing to map coordinates based on feature identifiers, is as follows:

[0086] The data flow module reads the structured spatial element data returned by the underlying computation. This structured spatial element data is typically a set of values ​​containing core indicators such as the area and quantity of map features. The data conversion module initiates a serialization conversion logic to encode and map the structured spatial element data, transforming it from a machine-readable dataset into a prompt text conforming to a specific format. For example, the total number of diseased and pest map features and the sum of their areas are filled and concatenated into a coherent string of text according to a preset semantic template. After the conversion and concatenation operation is completed, the unified model abstraction interface is called to inject the prompt text completely into the input environment of the offline large language model on the edge. At this time, the input environment has already loaded the accurate results returned by the deterministic execution of the real geographic business module. The instruction orchestration module then issues a computation start instruction to the underlying computing framework, thereby formally triggering the summary generation task of the large language model. This ensures that the large language model strictly follows the injected real computational data to perform text summarization operations, fundamentally blocking the path of the language model fabricating values ​​out of thin air.

[0087] After receiving the injection command, the offline large language model on the client side begins to parse the contextual logic within the prompt text and performs deep decoding operations. During the low-level decoding inference process, in order to adapt to the limited computing power of mobile terminals and avoid long waiting periods, the large language model adopts an incremental streaming output mechanism to generate natural language summaries step by step. Specifically, the large language model immediately delivers each text word it infers and calculates through the output channel, instead of waiting for the entire summary description to be calculated before returning it all at once. For example, when generating a description containing statistical information, the model will output the text content such as the area of ​​pine forest changes within the target range in acres and the increase or decrease, word by word. After the data rendering engine captures the fragmented characters returned by the streaming, it immediately pushes these natural language summaries to the interactive interface of the mobile terminal and performs dynamic local refresh of the text content at the presentation layer according to the set minimum refresh interval. By presenting smooth text summarization results to field workers through this word-by-word or sentence-by-sentence dynamic refresh method, the anxiety of waiting for computation is greatly alleviated and the real-time response experience of the interactive interface is significantly improved.

[0088] The information parsing module simultaneously extracts the associated feature identifiers and geometric coordinates from the structured spatial feature data returned from the underlying layer. The feature identifier represents a unique identification number for each forestry patch, and the geometric coordinates contain latitude and longitude boundary sets or center point vector data used for geographic mapping. After obtaining this information, the interface rendering engine dynamically renders a structured data list on the mobile terminal's interactive interface, strictly based on the extracted feature identifiers. For example, all patches that meet the area threshold for fragmented forest plot determination are clearly listed in a row-column table within the screen window. While the table interface is being constructed, event monitoring... The listener implicitly binds the geometric coordinates of each element to the touch events of the corresponding data rows in the data list. Through this deep fusion and mapping of underlying data and front-end interaction events, the program successfully constructs a positioning component pointing to the precise coordinates of the map at the view layer. When field workers tap any element record in the list, the program immediately captures the touch signal and reads the bound geometric coordinates. It then controls the underlying geographic information rendering engine to quickly zoom and pan the map viewport to that coordinate position and highlight the target patch, thus completely opening up the closed loop of operation from text-based data collection to on-site map verification.

[0089] Please see Figure 2 As shown, the present invention also provides a forestry GIS intelligent data query system based on an offline large-scale model on the edge, comprising:

[0090] The instruction parsing module is used to receive voice commands from the mobile terminal, call the offline speech recognition model on the terminal to extract the text, transform and extract the Chinese numerals in the text through the inverse text normalization algorithm, and generate standard query text.

[0091] The context construction module is used to extract layer metadata from the local geographic information system to construct a business snapshot, and then concatenate the standard query text with the business snapshot and input it into the offline large language model on the edge.

[0092] The semantic mapping module is used to capture the semantic intent output by the offline large language model on the client side, map it to the local business capability directory, and generate a structured request containing the target function and initial parameters.

[0093] The interactive completion module is used to verify the completeness of the initial parameters in the structured request. If the initial parameters are missing the required conditions, an interactive card is generated, and the supplementary parameters input by the user are combined to construct a complete parameter set.

[0094] The feature extraction module is used to convert the complete parameter set into underlying spatial operation instructions, call the target function to perform spatial operations on the local feature database, and extract structured spatial feature data.

[0095] The response encapsulation module is used to input spatial feature data into the offline large language model on the edge, generate natural language summaries, and build a positioning component pointing to map coordinates based on feature identifiers.

[0096] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A forestry GIS intelligent data query method based on a large offline model on the edge, characterized in that, Includes the following steps: S1: Receives voice commands from the mobile terminal, calls the offline speech recognition model on the terminal to extract text, and uses the inverse text normalization algorithm to extract Chinese numerals in the text to generate standard query text; S2: Extract layer metadata from the local geographic information system to construct a business snapshot, concatenate the standard query text with the business snapshot, and input it into the offline large language model on the edge. S3: Capture the semantic intent output by the offline large language model on the client side, map it to the local business capability directory, and generate a structured request containing the target function and initial parameters; S4: Verify the completeness of the initial parameters in the structured request. If the initial parameters are missing mandatory conditions, generate an interaction card, merge the supplementary parameters from user input feedback, and combine them to build a complete parameter set. S5: Convert the complete parameter set into underlying spatial operation instructions, call the target function to perform spatial operations on the local feature database, and extract structured spatial feature data; S6: Input spatial feature data into the offline large language model on the edge, generate natural language summaries, and construct a positioning component pointing to map coordinates based on feature identifiers.

2. The intelligent data collection method for forestry GIS based on a large offline model on the edge, as described in claim 1, is characterized in that... The process of generating the standard query text is as follows: The system receives voice commands from the mobile terminal, extracts target speech segments, decomposes the target speech segments into acoustic observation frames, inputs them into the offline speech recognition model on the edge, and extracts the underlying acoustic feature vectors. The decoding network is used to decode and map the underlying acoustic feature vectors to generate the initial text. The inverse text normalization algorithm is called to parse the initial text and convert the spoken Chinese numeric characters into Arabic numerals. The system reads forestry-specific terms before and after the Arabic numerals and compares them with the local business dictionary. It then replaces non-standard colloquial terms in the initial text and merges and reconstructs them to generate standard query text.

3. The intelligent data collection method for forestry GIS based on a large offline model on the edge, as described in claim 1, is characterized in that... The process of constructing a complete parameter set by combining the parameters is as follows: Scan the local geographic information system's operating environment, extract layer metadata containing the active layer directory and layer internal field aliases, filter redundant data, and combine them to construct a business snapshot; Read the standard query text, perform a sequence concatenation operation on the standard query text, business snapshot, and preset business scheduling rules, and encapsulate and construct the system prompt text; The system prompt text is injected into the input window of the offline large language model on the mobile device by calling the unified model abstraction interface, thus starting the semantic reasoning task of the offline large language model on the mobile device.

4. The intelligent data collection method for forestry GIS based on a large offline model on the edge, as described in claim 1, is characterized in that... The process of generating a structured request containing an objective function and initial parameters is as follows: The word sequence output by the offline large language model on the client side is parsed, the natural language intent text inside the word sequence is extracted, and the natural language intent text is converted into an independent format intent feature vector. Traverse the local service capability directory configured in the mobile terminal, calculate the correlation between the intent feature vector and the preset function description in the local service capability directory, and extract the target function with the highest correlation. Read the parameter structure declaration configuration associated with the target function, retrieve entity words in the word sequence according to the data constraint rules defined by the parameter structure declaration configuration, and extract the entity words as initial parameters; The system integrates the identifier name of the objective function with the initial parameters, performs character sequence transformation according to the data key-value pair encoding rules required by the objective function, and constructs a structured request containing the objective function and the initial parameters.

5. The intelligent data collection method for forestry GIS based on a large offline model on the edge, as described in claim 4, is characterized in that... The process of constructing a complete parameter set by combining the parameters is as follows: Read the initial parameters of the structured request and the parameter structure declaration configuration of the target function, compare the required conditions of the initial parameters with the required conditions of the parameter structure declaration configuration, locate the missing required conditions of the initial parameters, and trigger the task suspension command. Extract missing required conditions and match them with a pre-set candidate dataset. Render a visual interactive card based on the matched candidate data. Capture the feature commands input by the user through the interactive card and parse the feature commands into entity supplementary parameters. Retrieve the initial parameters from the suspended state, merge the key-value data of the supplementary parameters into the corresponding empty slots of the initial parameters, complete all data items required by the parameter structure declaration configuration, and combine them to construct a complete parameter set for business execution.

6. The intelligent data collection method for forestry GIS based on a large offline model on the edge, as described in claim 5, is characterized in that... The process of extracting structured spatial feature data is as follows: Extract the spatial boundary constraint features and attribute filtering conditions within the complete parameter set, and compile the spatial boundary constraint features and attribute filtering conditions into low-level spatial operation instructions according to the operation rules of the objective function. Parse the target layer identifier carried by the underlying spatial operation command, use the target layer identifier to establish an access connection with the local feature database, and lock the target feature table to be calculated in the local feature database. Inject the underlying spatial operation instructions into the target function, drive the target function to perform spatial intersection analysis and attribute aggregation operations on the target feature table, and extract the matching original spatial patches from the target feature table; Read the geometric coordinate set and business attribute field values ​​of the original spatial patch, and concatenate the geometric coordinate set and business attribute field values ​​according to the preset data encapsulation rules to construct and generate structured spatial element data.

7. The intelligent data collection method for forestry GIS based on a large offline model on the edge, as described in claim 6, is characterized in that... The process of inputting spatial feature data into an offline large language model on the edge, generating a natural language summary, and constructing a positioning component pointing to map coordinates based on feature identifiers is as follows: The structured spatial element data is serialized to construct prompt text, which is then injected into the input environment of the offline large language model on the device to trigger the summary generation task. The offline large language model on the device parses the prompt text, generates a natural language summary through an incremental streaming mechanism, and pushes it to the mobile terminal interface for refresh and display. Extract feature identifiers and geometric position coordinates from spatial feature data to render a data list, and bind the geometric position coordinates to touch events to build a positioning component.

8. A forestry GIS intelligent data collection system based on an edge-side offline large model, implemented in any one of claims 1-7, characterized in that, include: The instruction parsing module is used to receive voice commands from the mobile terminal, call the offline speech recognition model on the terminal to extract the text, transform and extract the Chinese numerals in the text through the inverse text normalization algorithm, and generate standard query text. The context construction module is used to extract layer metadata from the local geographic information system to construct a business snapshot, and then concatenate the standard query text with the business snapshot and input it into the offline large language model on the edge. The semantic mapping module is used to capture the semantic intent output by the offline large language model on the client side, map it to the local business capability directory, and generate a structured request containing the target function and initial parameters. The interactive completion module is used to verify the completeness of the initial parameters in the structured request. If the initial parameters are missing the required conditions, an interactive card is generated, and the supplementary parameters input by the user are combined to construct a complete parameter set. The feature extraction module is used to convert the complete parameter set into underlying spatial operation instructions, call the target function to perform spatial operations on the local feature database, and extract structured spatial feature data. The response encapsulation module is used to input spatial feature data into the offline large language model on the edge, generate natural language summaries, and build a positioning component pointing to map coordinates based on feature identifiers.