An agent optimization method and system for GIS task planning
By introducing style gating and fuzzy gating agent optimization methods into the Transformer architecture, combined with low-rank adapters and LoRA experts, the problems of low automation and unstable parsing results in traditional GIS task planning systems are solved, achieving efficient, stable and consistent execution of GIS task planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional GIS task planning systems have high barriers to entry, limited automation and intelligence, and large language models produce inconsistent and unstable parsing results when faced with different language styles and semantic ambiguity, resulting in poor task execution performance.
A style-gated and fuzzy-gated agent optimization method is adopted. By introducing a low-rank adapter and LoRA expert into the Transformer structure and combining the dynamic adjustment of the multi-head attention sublayer and the feedforward network sublayer, differentiated routing and semantic parsing of input instructions are achieved, thereby improving the stability of task parsing and the consistency of planning.
It improves the stability of task parsing and planning consistency of GIS intelligent agents under diverse inputs, enhances the application value of scenarios such as path planning, spatial analysis and resource scheduling, and ensures the reliability and robustness of task execution.
Smart Images

Figure CN121636555B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large language model technology, and in particular to an agent optimization method and system for GIS task planning. Background Technology
[0002] In recent years, the rapid development of Large Language Models (LLMs) has brought new breakthroughs to agent technology, driving the emergence of a series of LLM-based agent systems such as WorldGPT and TreeGPT. These agents, with large language models at their core, possess excellent language understanding capabilities, accurately parsing user instructions, formulating reasonable execution plans, and efficiently completing complex tasks by invoking various tools. In the field of Geographic Information System (GIS) task planning, the introduction of agents has shown broad application prospects.
[0003] However, traditional GIS task planning systems typically rely on complex modeling processes and professional personnel, resulting in a high barrier to entry and limited automation and intelligence. When tasks involve multi-source data fusion, dynamic path selection, or emergency response scheduling, existing systems often lack efficient task decomposition and intelligent planning capabilities. Furthermore, directly relying on task planning results generated by large language models still has limitations: when faced with inputs of different language styles or semantic ambiguity and uncertainty, model parsing results are prone to inconsistencies and instability, leading to poor performance of downstream GIS tasks. Summary of the Invention
[0004] In view of this, the present invention proposes an intelligent agent optimization method and system for GIS task planning.
[0005] The technical solution of this invention is implemented as follows: The first aspect of this invention provides an agent optimization method for GIS task planning, comprising:
[0006] The input instructions are segmented and identified to generate structured instructions; the structured instructions include task type and constraints.
[0007] The structured instructions are input into a preset Transformer structure for enhancement processing. Multiple LoRA experts are dynamically combined at the Q / V projection of the multi-head attention sublayer using style gating. The ambiguity weights of the feedforward network sublayer are adjusted by combining ambiguity gating and global vectors to obtain the first optimized instructions. The preset Transformer structure includes the multi-head attention sublayer and the feedforward network sublayer, which are optimized and adjusted by low-rank adapters respectively.
[0008] The rank of the low-rank adapter is adjusted by using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction, and the first optimization instruction is enhanced based on the adjusted preset Transformer structure to obtain the target optimization instruction.
[0009] Based on the target optimization instructions, information retrieval and scheduling analysis are performed to generate a task execution strategy.
[0010] Based on the above technical solutions, preferably, before inputting the structured instructions into a preset Transformer structure for enhancement processing, the method further includes:
[0011] A low-rank adapter is inserted into the projection matrix, output merging matrix, and fully connected layer of the feedforward network sublayer of the multi-head attention sublayer.
[0012] When training the original Transformer structure using sample data, the original weights of the multi-head attention sublayer and the feedforward network sublayer are dynamically fused with the low-rank increment, the original weights are maintained, and the low-rank increment is updated to obtain the preset Transformer structure.
[0013] Based on the above technical solutions, preferably, the dynamic combination of multiple LoRA experts at the Q / V projection of the multi-head attention sublayer using style gating includes:
[0014] In each attention head of the multi-head attention sub-layer, multiple LoRA experts are deployed for the Q / V projection matrix; each LoRA expert corresponds to an input style.
[0015] The structured instructions are pooled using style gating to obtain a global vector, and then the following steps are performed based on the global vector: Calculate and determine the weight of each LoRA expert.
[0016] Based on the above technical solutions, preferably, the step of combining fuzziness gating and global vector adjustment of the fuzziness weights of the feedforward network sublayer includes:
[0017] A low-rank adapter is introduced into the dimension-upper or dimension-lowering matrix of the feedforward network sublayer, and the ambiguity of the structured instructions is quantized using global vectors to generate ambiguity weights, thereby adjusting the attention of the feedforward network sublayer to ambiguous regions.
[0018] Based on the above technical solutions, preferably, the step of adjusting the rank of the low-rank adapter using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction includes:
[0019] As the network layer of the preset Transformer structure increases, and / or when the ambiguity of the first optimization instruction is greater than a first preset threshold, the rank of the low-rank adapter is increased.
[0020] Based on the above technical solutions, preferably, the step of performing information retrieval and scheduling analysis based on the target optimization instructions to generate a task execution strategy includes:
[0021] The target optimization instruction is input into the retrieval system to obtain the corresponding candidate content;
[0022] The central controller filters and integrates the candidate content, and the model context protocol server performs scheduling analysis to generate a task execution strategy.
[0023] Based on the above technical solutions, preferably, when training the original Transformer structure using sample data, the original weights of the multi-head attention sublayer and the feedforward network sublayer are dynamically fused with the low-rank increment, the original weights are maintained, the low-rank increment is updated, and after obtaining the preset Transformer structure, the method further includes:
[0024] The preset Transformer structure is trained based on the loss function and gradient descent algorithm until the loss function is lower than a second preset threshold; the loss function includes analytical loss, consistency loss, gated supervision loss, distillation loss and rank regularization.
[0025] More preferably, a second aspect of the present invention provides an intelligent agent optimization system for GIS task planning, comprising: an instruction recognition module, a first optimization module, a second optimization module, and a strategy generation module; wherein, the instruction recognition module is configured to perform word segmentation and recognition on input instructions to generate structured instructions; the structured instructions include task type and constraints; the first optimization module is configured to input the structured instructions into a preset Transformer structure for enhancement processing, dynamically combine multiple LoRA experts at the Q / V projection of the multi-head attention sublayer using style gating, and adjust the ambiguity weights of the feedforward network sublayer using ambiguity gating and global vectors to obtain a first optimized instruction; the preset Transformer structure includes the multi-head attention sublayer and the feedforward network sublayer, which are respectively optimized and adjusted by a low-rank adapter; the second optimization module is configured to adjust the rank of the low-rank adapter using the network hierarchy of the preset Transformer structure and the ambiguity of the first optimized instruction, and enhance the first optimized instruction based on the adjusted preset Transformer structure to obtain a target optimized instruction; the strategy generation module is configured to perform information retrieval and scheduling analysis based on the target optimized instruction to generate a task execution strategy.
[0026] More preferably, a third aspect of the present invention provides an electronic device, including a processor and a memory; the memory has a computer program stored thereon, wherein the computer program, when executed by the processor, implements the agent optimization method for GIS task planning described in the first aspect.
[0027] More preferably, a fourth aspect of the present invention provides a non-transitory computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the agent optimization method for GIS task planning described in the first aspect.
[0028] The intelligent agent optimization method and system for GIS task planning of the present invention have the following advantages over the prior art:
[0029] 1. By introducing style gating and ambiguity gating into the large language model, differentiated routing of input instructions is achieved, enabling inputs with different styles and semantic clarity to be matched with the most suitable LoRA expert module. At the same time, combined with a dynamic Rank mechanism, the Rank of LoRA is adaptively adjusted in different levels of Transformer, achieving a fine-tuning effect of lightweight lower layers and high expressive upper layers. This effectively improves the task parsing stability and planning consistency of GIS intelligent agents under diverse inputs, and significantly enhances its application value in scenarios such as path planning, spatial analysis, and resource scheduling.
[0030] 2. Low-rank adapters are inserted into the key projection matrices of the multi-head attention sublayer and feedforward network sublayer in the Transformer architecture to achieve fast adaptation with lower computational and storage overhead. The semantic parser performs fine-grained analysis of user input, and combined with the dual-gated LoRA mechanism, dynamic adaptation to inputs with different styles and ambiguities is achieved, thereby maintaining the consistency and robustness of the task parsing results.
[0031] 3. As the network layer of the preset Transformer structure increases, or when the ambiguity of the first optimization instruction is greater than the first preset threshold, the rank of the low-rank adapter is increased. This enables adaptive adjustment of the rank of LoRA in Transformers at different layers, achieving a fine-tuning effect of lightweight lower layers and high expression in upper layers, thus ensuring the reliability of subsequent strategy planning. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 A flowchart illustrating an intelligent agent optimization method for GIS task planning provided in an embodiment of the present invention;
[0034] Figure 2 This is a schematic diagram of a preset Transformer structure provided in an embodiment of the present invention;
[0035] Figure 3 This is a schematic diagram illustrating the matrix training principle provided in an embodiment of the present invention;
[0036] Figure 4 This is a schematic diagram of the structure of a GIS intelligent agent system provided in an embodiment of the present invention;
[0037] Figure 5 This is a schematic diagram of the structure of an intelligent agent optimization system for GIS task planning provided in an embodiment of the present invention;
[0038] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0039] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0040] In some embodiments, such as Figure 1 As shown, Figure 1 This is a flowchart illustrating an agent optimization method for GIS task planning provided by an embodiment of the present invention; the agent optimization method for GIS task planning provided by the present invention includes:
[0041] S110 performs word segmentation and recognition on the input command to generate a structured command; the structured command includes the task type and constraints.
[0042] In this embodiment, the input command can be a user's voice or text. The input command is broken down into task type and constraints. For example, the task type could be route planning or area analysis, and the constraints could be fields such as avoiding congestion or time limits. The input command may also include geographic entities, such as location names or coordinate ranges, which are not enumerated.
[0043] S120, the structured instructions are input into the preset Transformer structure for enhancement processing. Multiple LoRA experts are dynamically combined at the Q / V projection of the multi-head attention sub-layer using style gating. The ambiguity weights of the feedforward network sub-layer are adjusted by combining ambiguity gating and global vector to obtain the first optimized instructions. The preset Transformer structure includes a multi-head attention sub-layer and a feedforward network sub-layer that have been optimized and adjusted by a low-rank adapter.
[0044] In this embodiment, please refer to Figure 2 , Figure 2 This is a schematic diagram of the preset Transformer structure provided in the embodiment of the present invention. Low-rank adapters are inserted into the query / numerical projection matrix (Q / V) of the multi-head attention sublayer and the dimension-upgrading / dimensional-downgrading matrix of the feedforward network sublayer, thereby simultaneously enhancing the two key stages of attention calculation and feedforward nonlinear transformation. At the same time, the residual connection and normalization structure remain unchanged, thereby ensuring the stability of the training and inference process.
[0045] In some embodiments, before inputting structured instructions into a preset Transformer structure for enhancement processing, the method further includes:
[0046] Insert low-rank adapters into the projection matrix, output merging matrix, and fully connected layers of the feedforward network sublayer of the multi-head attention sublayer;
[0047] When training the original Transformer structure using sample data, the original weights of the multi-head attention sublayer and the feedforward network sublayer are dynamically fused with the low-rank increments. The original weights are maintained, and the low-rank increments are updated to obtain the preset Transformer structure.
[0048] In this embodiment, please refer to Figure 3 , Figure 3 This is a schematic diagram of the matrix training principle provided in an embodiment of the present invention; the training principle is as follows: for any original weight matrix Keep its parameters frozen and only learn low-rank increments:
[0049]
[0050] ;
[0051] in, This is the original weight matrix of the linear layer. These are low-rank decomposition matrices, and These represent the input dimension and the output dimension, respectively. Since it is low-rank, much smaller than the original dimension of the matrix, the training overhead and memory consumption decrease accordingly. It increases approximately linearly.
[0052] In some embodiments, when training the original Transformer structure using sample data, the original weights of the multi-head attention sublayer and the feedforward network sublayer are dynamically fused with the low-rank increments, the original weights are maintained, the low-rank increments are updated, and after obtaining the preset Transformer structure, the method further includes:
[0053] The preset Transformer structure is trained based on the loss function and gradient descent algorithm until the loss function is lower than the second preset threshold; the loss function includes analytical loss, consistency loss, gated supervision loss, distillation loss and rank regularization.
[0054] In this embodiment, the loss function includes five parts: analytical loss. To ensure the accuracy of structured output; consistency loss. To ensure consistency of results for the same task across three modes of expression: colloquial, written, and professional; gate control monitoring loss. Enhance gating and classification capabilities; distillation loss High-quality analytical results generated by large models are used as soft objectives; and rank regularization is employed. This ensures the compactness of the shallow Rank. The overall objective function is:
[0055] ;
[0056] in, These are the weighting coefficients for each type of loss.
[0057] Through joint optimization, the Transformer structure can not only output task parsing correctly, but also possess style robustness and fuzziness resolution capabilities.
[0058] In some embodiments, style gating is used to dynamically combine multiple LoRA experts at the Q / V projection of the multi-head attention sublayer, including:
[0059] In each attention head of the multi-head attention sub-layer, multiple LoRA experts are deployed for the Q / V projection matrix; each LoRA expert corresponds to an input style.
[0060] Style gating is used to pool structured instructions to obtain a global vector, and then the global vector is used for... Calculate and determine the weight of each LoRA expert.
[0061] Here, in the specific execution of the Transformer structure, let the first... Layer input is After normalization, we obtain , This is the normalized input.
[0062] In the multi-head attention sublayer, LoRA is injected into the Q / V projection:
[0063] ;
[0064] in: These are linear mapping matrices representing queries, keys, and values, respectively. The low-rank increment term introduced for LoRA yields the attention output:
[0065] ;
[0066] in, For normalization function, This is the scaling factor.
[0067] The output is obtained through residual connection:
[0068] .
[0069] Building upon this, the style-gated S-Gate performs pooling on the input sequence to obtain a global vector. Then through Obtain style weights:
[0070] ;
[0071] Where is a trainable projection matrix. For each expert, there are three styles: spoken, written, and professional. The S-Gate dynamically combines LoRA experts at the Q / V projection:
[0072] ;
[0073] For an upgraded matrix, This is a dimensionality reduction matrix, which ensures that the semantic intent of the input remains stably aligned regardless of the style used.
[0074] In some embodiments, adjusting the ambiguity weights of feedforward network sublayers by combining ambiguity gating and global vectors includes:
[0075] A low-rank adapter is introduced into the up-dimensional or down-dimensional matrix of the feedforward network sublayer, and the fuzziness of the structured instructions is quantized using global vectors to generate fuzziness weights, thereby adjusting the attention of the feedforward network sublayer to fuzzy regions.
[0076] In the feedforward network sublayer, LoRA is introduced into the dimension-upgrading / dimensional-reducing matrix:
[0077] ;
[0078] in: For input, For an upgraded matrix, For a dimension reduction matrix, , These are the low-rank increment terms introduced by LoRA. For example, GELU is an activation function.
[0079] The final layer output is obtained as follows:
[0080] ;
[0081] in, For the first The final output of the layer.
[0082] Based on this, the ambiguity-gated A-Gate calculates the ambiguity weights according to the global vector:
[0083] ;
[0084] in, For trainable projection matrices, For ambiguity expert numbers, such as deterministic, fuzzy, or highly uncertain. A-Gate controls the combination of LoRAs within the FFN:
[0085]
[0086] ;
[0087] and These are the LoRA adapter matrices for the FFN dimensionality-up transformation. and These are the LoRA adapter matrices for the FFN dimensionality reduction transformation.
[0088] S130, the rank of the low-rank adapter is adjusted by using the network layer of the preset Transformer structure and the ambiguity of the first optimization instruction, and the first optimization instruction is enhanced based on the adjusted preset Transformer structure to obtain the target optimization instruction.
[0089] In this embodiment, precise instruction enhancement is achieved by dynamically adjusting the rank of the low-rank adapter, combining the characteristics of the Transformer hierarchy with instruction ambiguity. Different Transformer levels have different levels of semantic abstraction, requiring dynamic matching of LoRA's expressive capabilities. Instruction ambiguity reflects semantic uncertainty; high ambiguity requires higher rank to capture complex patterns, while low ambiguity can reduce rank to improve efficiency. An adaptive rank value is assigned to each LoRA expert based on their hierarchy position and ambiguity score using a gating network or rule engine.
[0090] In some embodiments, adjusting the rank of the low-rank adapter using the network layers of a preset Transformer structure and the ambiguity of a first optimization instruction includes:
[0091] As the network layer of the preset Transformer structure is increased, and / or if the ambiguity of the first optimization instruction is greater than the first preset threshold, the rank of the low-rank adapter is increased.
[0092] Shallow layers are assigned a lower rank to save computation, while higher layers gradually increase the rank to enhance abstraction capabilities. When the input has high ambiguity, the rank of higher layers can be dynamically increased based on the uncertainty score output by the A-Gate. For example, for shallow networks of layers 1-6, a low-rank baseline is used, such as Rank=8, to focus on local feature extraction and basic semantic encoding, avoiding the risk of overfitting caused by high-rank parameters; for mid-layer networks of layers 7-12, the rank is linearly increased to a moderate value, such as Rank=16, to adapt to moderately complex semantic combinations; for deep networks of layers 13-24, the rank is exponentially increased to a high rank, such as Rank=32 / 64, to capture long-range dependencies and high-order abstract features.
[0093] S140 performs information retrieval and scheduling analysis based on target optimization instructions to generate task execution strategies.
[0094] In some embodiments, S140, information retrieval and scheduling analysis are performed based on the target optimization instructions to generate a task execution strategy, including:
[0095] Input the target optimization command into the search engine to obtain the corresponding candidate content;
[0096] The central controller filters and integrates candidate content, and the model context protocol server performs scheduling analysis to generate task execution strategies.
[0097] In this embodiment, the embedded model and the Retriever dynamically select the optimal tools, task planning schemes, and content information from the knowledge space and solution space. Combined with a dynamic Rank fine-tuning strategy, the accuracy and efficiency of semantic representation at different levels are enhanced. Based on this, the central controller forms a complete task chain according to the LLM parsing and retrieval results, and coordinates the invocation of external GIS tools and data resources through the MCP Server to automate tasks such as path planning, spatial analysis, risk assessment, and resource scheduling, ultimately outputting clear and executable task results.
[0098] In one optional embodiment, the user-input natural language GIS task command is first fine-tuned to output a unified structured result. This result uses a fixed JSON format and includes background, target, intent, and method fields. For example, the input could be "Identify residential areas affected by flooding in a certain region and generate a distribution map." After obtaining the structured parsing, a complete GIS intelligent agent system is constructed by combining the Retrieval Enhancement Group (RAG) and MCP frameworks, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of the GIS intelligent agent system provided in an embodiment of the present invention. The background, intent, and method fields in the structured output are encoded as query vectors.
[0099] ;
[0100] in, This represents a semantic embedding model. This is a field-level concatenation operation. This represents the query statement for the current task. These are descriptions of the input context, analysis objective, task intent, and processing method.
[0101] Subsequently, the encoded query vector Document vectors from external knowledge bases The similarity matching calculation formula is as follows:
[0102] ;
[0103] The acquired knowledge is incorporating into the context of the large language model to create enhanced knowledge prompts. Simultaneously, the `method` field is directly mapped to a task chain, which invokes standardized, encapsulated tools and resources through the MCP Server. The MCP Server includes Resources (remote sensing, vector, meteorological, and traffic data), Tools (algorithm modules for spatial analysis, route planning, resource scheduling, and risk assessment), and Prompts (domain-specific standard operating procedure (SOP) templates). The central controller sequentially invokes the tools according to the task chain order, obtaining results such as GeoJSON, tables, or metrics. Finally, the large language model generates a natural language report, which is then visually displayed using 2D / 3D visualizations.
[0104] This embodiment integrates a dual-gated LoRA and dynamic Rank fine-tuning mechanism within the Transformer to form a highly efficient and robust task parsing front-end layer. Combined with RAG retrieval and MCP scheduling, it constitutes a complete GIS task planning intelligent agent system. It maintains parsing stability and planning consistency under diverse inputs and demonstrates intelligence, robustness, and efficiency in scenarios such as path planning, spatial analysis, and resource scheduling.
[0105] In some embodiments, please refer to Figure 5 , Figure 5This is a schematic diagram of the structure of an agent optimization system for GIS task planning provided by an embodiment of the present invention. The present invention provides an agent optimization system 500 for GIS task planning, comprising: an instruction recognition module 510, a first optimization module 520, a second optimization module 530, and a strategy generation module 540; wherein, the instruction recognition module 510 is configured to perform word segmentation and recognition on input instructions to generate structured instructions; the structured instructions include task type and constraints; the first optimization module 520 is configured to input the structured instructions into a preset Transformer structure for enhancement processing, dynamically combine multiple LoRA experts at the Q / V projection of the multi-head attention sublayer using style gating, and combine fuzzy gating and global vector adjustment feedforward network. The ambiguity weights of the sub-layers are used to obtain the first optimization instruction; the preset Transformer structure includes the multi-head attention sub-layer and the feedforward network sub-layer, which are respectively optimized and adjusted by the low-rank adapter; the second optimization module 530 is configured to adjust the rank of the low-rank adapter using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction, and enhance the first optimization instruction based on the adjusted preset Transformer structure to obtain the target optimization instruction; the strategy generation module 540 is configured to perform information retrieval and scheduling analysis based on the target optimization instruction to generate a task execution strategy.
[0106] In some embodiments, the agent optimization system for GIS task planning further includes a Transformer training module; the Transformer training module is specifically configured as follows:
[0107] Insert low-rank adapters into the projection matrix, output merging matrix, and fully connected layers of the feedforward network sublayer of the multi-head attention sublayer;
[0108] When training the original Transformer structure using sample data, the original weights of the multi-head attention sublayer and the feedforward network sublayer are dynamically fused with the low-rank increments. The original weights are maintained, and the low-rank increments are updated to obtain the preset Transformer structure.
[0109] In some embodiments, the first optimization module 520 is specifically configured as follows:
[0110] In each attention head of the multi-head attention sub-layer, multiple LoRA experts are deployed for the Q / V projection matrix; each LoRA expert corresponds to an input style.
[0111] Style gating is used to pool structured instructions to obtain a global vector, and then the global vector is used for... Calculate and determine the weight of each LoRA expert.
[0112] In some embodiments, the first optimization module 520 is specifically configured as follows:
[0113] A low-rank adapter is introduced into the up-dimensional or down-dimensional matrix of the feedforward network sublayer, and the fuzziness of the structured instructions is quantized using global vectors to generate fuzziness weights, thereby adjusting the attention of the feedforward network sublayer to fuzzy regions.
[0114] In some embodiments, the second optimization module 530 is specifically configured as follows:
[0115] As the network layer of the preset Transformer structure is increased, and / or if the ambiguity of the first optimization instruction is greater than the first preset threshold, the rank of the low-rank adapter is increased.
[0116] In some embodiments, the policy generation module 540 is specifically configured as follows:
[0117] Input the target optimization command into the search engine to obtain the corresponding candidate content;
[0118] The central controller filters and integrates candidate content, and the model context protocol server performs scheduling analysis to generate task execution strategies.
[0119] In some embodiments, the Transformer training module is further configured as follows:
[0120] The preset Transformer structure is trained based on the loss function and gradient descent algorithm until the loss function is lower than the second preset threshold; the loss function includes analytical loss, consistency loss, gated supervision loss, distillation loss and rank regularization.
[0121] It should be noted that the intelligent agent optimization system for GIS task planning provided in this application embodiment and the intelligent agent optimization method for GIS task planning provided in this application embodiment are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned intelligent agent optimization method for GIS task planning, and the repeated parts will not be described again.
[0122] In some embodiments, please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 600 provided in this application includes a processor 610 and a memory 620; the memory 620 stores a computer program, wherein the computer program, when executed by the processor, implements the aforementioned intelligent agent optimization method for GIS task planning.
[0123] Specifically, processor 610 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. Processor 610 may also include onboard memory for caching purposes. Processor 610 may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.
[0124] Memory 620 may be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory 620 may include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory 620 include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and may also be random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0125] This application also provides a non-transitory computer-readable medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned agent optimization method for GIS task planning. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0126] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.
[0127] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments, but should be defined not only by the appended claims, but also by their equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.
Claims
1. An agent optimization method for GIS task planning, characterized in that, include: The input instructions are segmented and identified to generate structured instructions; The structured instructions include task types and constraints; The structured instructions are input into a preset Transformer structure for enhancement processing. Multiple LoRA experts are dynamically combined at the Q / V projection of the multi-head attention sublayer using style gating. The ambiguity weights of the feedforward network sublayer are adjusted by combining ambiguity gating and global vectors to obtain the first optimized instructions. The preset Transformer structure includes the multi-head attention sublayer and the feedforward network sublayer, which are optimized and adjusted by low-rank adapters respectively. The method of combining fuzziness gating and global vector adjustment of the fuzziness weights of the feedforward network sublayer includes: introducing a low-rank adapter into the dimension-up or dimension-down matrix of the feedforward network sublayer, and using global vectors to quantize the fuzziness of the structured instructions to generate fuzziness weights, so as to adjust the attention of the feedforward network sublayer to the fuzzy region. The rank of the low-rank adapter is adjusted using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction, and the first optimization instruction is enhanced based on the adjusted preset Transformer structure to obtain the target optimization instruction; the adjustment of the rank of the low-rank adapter using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction includes: increasing the rank of the low-rank adapter as the network layers of the preset Transformer structure increase, and / or increasing the rank of the low-rank adapter when the ambiguity of the first optimization instruction is greater than a first preset threshold; Based on the target optimization instructions, information retrieval and scheduling analysis are performed to generate a task execution strategy.
2. The agent optimization method for GIS task planning as described in claim 1, characterized in that, Before inputting the structured instructions into the preset Transformer structure for enhancement processing, the following steps are also included: A low-rank adapter is inserted into the projection matrix, output merging matrix, and fully connected layer of the feedforward network sublayer of the multi-head attention sublayer. When training the original Transformer structure using sample data, the original weights of the multi-head attention sublayer and the feedforward network sublayer are dynamically fused with the low-rank increment, the original weights are maintained, and the low-rank increment is updated to obtain the preset Transformer structure.
3. The agent optimization method for GIS task planning as described in claim 1, characterized in that, The method of dynamically combining multiple LoRA experts at the Q / V projection of the multi-head attention sublayer using style gating includes: In each attention head of the multi-head attention sub-layer, multiple LoRA experts are deployed for the Q / V projection matrix; each LoRA expert corresponds to an input style. The structured instructions are pooled using style gating to obtain a global vector, and then the following steps are performed based on the global vector: Calculate and determine the weight of each LoRA expert.
4. The agent optimization method for GIS task planning as described in claim 1, characterized in that, The step of performing information retrieval and scheduling analysis based on the target optimization instructions to generate a task execution strategy includes: The target optimization instruction is input into the retrieval system to obtain the corresponding candidate content; The central controller filters and integrates the candidate content, and the model context protocol server performs scheduling analysis to generate a task execution strategy.
5. The agent optimization method for GIS task planning as described in claim 2, characterized in that, When training the original Transformer structure using sample data, the method further includes dynamically fusing the original weights of the multi-head attention sublayer and the feedforward network sublayer with the low-rank increment, maintaining the original weights, updating the low-rank increment, and obtaining the preset Transformer structure by: The preset Transformer structure is trained based on the loss function and gradient descent algorithm until the loss function is lower than a second preset threshold; the loss function includes analytical loss, consistency loss, gated supervision loss, distillation loss and rank regularization.
6. An intelligent agent optimization system for GIS task planning, characterized in that, include: The system comprises an instruction recognition module, a first optimization module, a second optimization module, and a strategy generation module; among which, The instruction recognition module is configured to perform word segmentation and recognition on the input instruction to generate a structured instruction; the structured instruction includes a task type and constraints. The first optimization module is configured to input the structured instruction into a preset Transformer structure for enhancement processing, dynamically combine multiple LoRA experts at the Q / V projection of the multi-head attention sublayer using style gating, and adjust the ambiguity weights of the feedforward network sublayer using ambiguity gating and global vectors to obtain the first optimization instruction; the preset Transformer structure includes the multi-head attention sublayer and the feedforward network sublayer, which are respectively optimized and adjusted by low-rank adapters; the step of adjusting the ambiguity weights of the feedforward network sublayer using ambiguity gating and global vectors to obtain the first optimization instruction includes: introducing a low-rank adapter into the dimension-up or dimension-down matrix of the feedforward network sublayer, and using global vectors to quantify the ambiguity of the structured instruction to generate ambiguity weights, so as to adjust the attention of the feedforward network sublayer to the ambiguity region; The second optimization module is configured to adjust the rank of the low-rank adapter using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction, and to enhance the first optimization instruction based on the adjusted preset Transformer structure to obtain a target optimization instruction; the adjustment of the rank of the low-rank adapter using the network layers of the preset Transformer structure and the ambiguity of the first optimization instruction includes: increasing the rank of the low-rank adapter as the network layers of the preset Transformer structure increase, and / or increasing the rank of the low-rank adapter when the ambiguity of the first optimization instruction is greater than a first preset threshold; The strategy generation module is configured to perform information retrieval and scheduling analysis based on the target optimization instructions to generate a task execution strategy.
7. An electronic device, comprising a processor and a memory; said memory having storage for computer programs, wherein, When the computer program is executed by the processor, it implements the agent optimization method for GIS task planning as described in any one of claims 1 to 5.
8. A non-transitory computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the agent optimization method for GIS task planning as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent optimization method based on lightweight language training data
CN120470323A
Low-rank fine-tuning transformer fault diagnosis method based on adaptive attention guidance
CN120873758A